Continue to Site

# [HELP]Pls give me hint on programming ADC for temperature sensor.. :)

Status
Not open for further replies.

##### Advanced Member level 2
guys.. Im planning to create temperature sensor project with microcontroller..
I have experience about ADC interfacing and programming but I dont have solid idea how do I create a program for temperature sensor..I have already a temperature circuit also..

my questions are:

• how do I know that the temperature is correct?
• I know that the temperature circuit output will vary according to the temperature sensed but how do I know that the voltage is the normal e.g normal room temperature?

I know that the output of my temperature circuit will be feed to the ADC input but I need more clarification in the programming side of the ADC.. just a hint will do.

thanks guys...

Last edited:

Some sensors are calibrated. Radio Shack once carried one called the LM34.

It changes so many mV per degree. You must use the proper circuit and use the proper resistances.

Or maybe you must add/subtract a certain voltage to get a number equal to degrees of temperature.

Or add/subtract a certain value after ADC to get degrees temperature.

Points: 2
Some sensors are calibrated.

pls consider my noob question ..

there are many Lm35 based circuit in google to sense temperature. If I build that circuit does it mean it will output the right voltage based on the sensed temperature in the current environment?? my problem is how to know the right voltage output of the temperature circuit when the temperature is normal or above normal.

I dont know how to ask this question properly but I think you got My point..

LM35 for example has a specific temperature to output voltage equation, it is described in the datasheet, 10mV /degree Celsius or you can use a digital device like DS18B20 with a 12bit result but the code will be more complex (1wire protocol).

Alex

Points: 2
Its right there on the first page of the data sheet.

Points: 2
If I were building a temperature sensor with a display of temperature, I would calibrate it by comparing it to an ordinary thermometer in various places, such as:

(1) room temperature
(2) in the refrigerator
Etc.

If it did not read correctly I would try to find what resistance I should change, what amplification I should change, etc.

I would make a graph of voltage reading versus real temperature, or V versus displayed temperature, etc.

I would make different adjustments. Each time I would wait for the sensor to settle at normal temperature. See what behavior is the result, make adjustments, etc.

Points: 2

I have the calculation I got them in existing projects. thanks. my doubts are about the calibration of sensors like what BradtheRad said..

---------- Post added at 02:38 ---------- Previous post was at 02:35 ----------

Its right there on the first page of the data sheet.

yeah I see but actually I am not using Lm35 I will try the diode as temperature sensors as I seen in some projects... I got interested with that simple diode I just know it can be also used as temperature sensors that's why I make a move to make this project..

---------- Post added at 02:39 ---------- Previous post was at 02:38 ----------

If I were building a temperature sensor with a display of temperature, I would calibrate it by comparing it to an ordinary thermometer in various places, such as:

(1) room temperature
(2) in the refrigerator
Etc.

If it did not read correctly I would try to find what resistance I should change, what amplification I should change, etc.

I would make a graph of voltage reading versus real temperature, or V versus displayed temperature, etc.

I would make different adjustments. Each time I would wait for the sensor to settle at normal temperature. See what behavior is the result, make adjustments, etc.

thanks for this BradtheRad A great help to me...

If you are not going to use a proper device designed for temperature measurement then the circuit will probably be more complicated and maybe with lower accuracy too.

Alex

Points: 2
If you are not going to use a proper device designed for temperature measurement then the circuit will probably be more complicated and maybe with lower accuracy too.

Alex

yeah.. it would be less accurate and more complex I think but it just for fulfilling my curiosity to try new things for me. I just love to do things I haven't done before .. thanks for your great help guys...

Status
Not open for further replies.