Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

romel_emperado

Advanced Member level 2
Joined
Jul 23, 2009
Messages
606
Helped
45
Reputation
132
Reaction score
65
Trophy points
1,318
Location
philippines
Activity points
6,061
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.
 
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).

are you asking about this or the ADC result calculation?

Alex
 
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.
 
are you asking about this or the ADC result calculation?

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.

**broken link removed**

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.

It may help you to read this thread https://www.edaboard.com/threads/24400/

Alex
 
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.

It may help you to read this thread https://www.edaboard.com/threads/24400/

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.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top