how to measure negative temperature using LM35 and pic?

Status
Not open for further replies.

babatundeawe

Full Member level 5
Joined
Apr 12, 2007
Messages
244
Helped
16
Reputation
32
Reaction score
12
Trophy points
1,298
Location
Nigeria
Visit site
Activity points
2,738
please guys, i thought i got a hang of it until i fumbled while i was trying to measure a negative temperature and found that i was getting a wrong value. can someone help me out.

1. sensor is LM35.
2. Micro is PIC 16F877a

please help thanks.
 

hello,
what is your exact reference of Lm35
is it a Lm35cz range -40°c up to 150 °c ?
you get 2730mV at 0°C (273°K)
slope is 10mV per degre.
so just using the good offset and calculation!
think about,and give us your solution.
 
You have to give negative voltages to LM35 (as mention on its datasheet) and to RA2/AN2/VREF- (pin 4)
for pic you have to configure ADC registers accordingly
 

hello

if you choose the good one type of sensor you can do it, without using negative power supply !
be carrefull: VREF- dosen't support negative power supply !
2 example : positive range 0 up to 50°C
negative and positive -40 up to 50°C

I used both in datalogger application, but with a 12bits ADC to have more resolution...
 

Attachments

  • Pos_and_neg_Range.jpg
    52.2 KB · Views: 390

What LM35 sensor You use? What is two last letter in sensor marking?

Some LM35 sensors cant measure negative value, such as LM35DZ, he measure between 0 and +110C.
 

thanks guys for ur response. i am yet to get one yet but i cnt get to use the one wit proteus to measure the negatve result. atleast the model in proteus has d capability to do that.
so how to accomplish that nd display it on lcd is my problem.
 

I think this is wasting of time with proteus, better use some adequate evaluation board for Your needs and practice in real environment.
 

i think i will buy your idea.but which of thve lm35 shud i buy. thanks

Hi,

My choice would be a DS18B20 sensor over the LMs any day, if you can get them.

They only need a single 5k pull up resistor into a digital port and give a reading -55c to +125c to several decimal places, plus you can have them on very long leads, 20mtrs+ possible.

Most high level languages have ready made libraries for the ds18b20, if not, plenty of code examples in the forum.
 

please guys, i thought i got a hang of it until i fumbled while i was trying to measure a negative temperature and found that i was getting a wrong value. Can someone help me out.

1. Sensor is lm35.
2. Micro is pic 16f877a

please help thanks.
;**************************
hello
i am from bulgaria.
Conect ground lead of lm35 via two 1n914,to ground
then measure output of the sensor and ground lead-
the concection of two diodes end gnd oh sensor.
Substract grounded voltage from output voltage.
That is temperature.
Then multiplay the result to ref of the adc-then devide to 1024
that is all
;*************************************8


layoff the caps!
 



Measure V1 and V2 with the PIC. You'll be using two ADC channels for this.

The temperature is equal to (V1 - V2)*100 'C. This should be implemented in the PIC.

Hope this helps.
Tahmid.
 

 

Attachments

  • LM35 IN PROTEUS.pdf
    39.6 KB · Views: 223


Measure V1 and V2 with the PIC. You'll be using two ADC channels for this.

The temperature is equal to (V1 - V2)*100 'C. This should be implemented in the PIC.

Hope this helps.
Tahmid.

using the above formular and schematic will one be able to measure the negative temperature range using LM35DZ

- - - Updated - - -

 

using the above formular and schematic will one be able to measure the negative temperature range using LM35DZ

Yes it can be used to measure the negative temperature range. The two diodes act as a level shifter. Since the LM35 ground is now at 2*Vf potential (with respect to the ground), the negative voltage output at the LM35 output (with respect to LM35 ground) will be positive with respect to the circuit ground as long as the magnitude is lower than 2 * Vf. If it's greater, then, another diode can be used in series to shift the level up to 3*Vf, which will cover the entire range.

Hope this helps.
Tahmid.
 
Reactions: Ma3ix

    Ma3ix

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…