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.

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
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
    Pos_and_neg_Range.jpg
    52.2 KB · Views: 317

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
 

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.
 

Example how to read negative value with LM35 and ATMega32
 

Attachments

  • !!! LM35 Measure Negative Temp ATMega32.rar
    641.2 KB · Views: 300
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!
 

3345289400_1362380662.png


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.
 

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.[/QUOTE
;*******************************************************
HELLO THERE.
TWO LAST LETTERS ARE-DZ-LM35DZ-RANGE-+150/-55
;********************************************************8
I CONECT DIRECTLY TO ADC-FOR BETTER RESOLUTION YOU MAST USE
-OP.BUT THEN YOU NEED TO SCALE THE INPUT.ALSO YOU NEED TO ADJAST THE OUTPUT RESISTOR OF LM35.IF WE USING CURRENT MIROR
THERE THE RESULTS WILL BE BETTER.THAT IS FROM DATASHEET OF SENSOR.IF ANYONE WANT CODE FOR TEPERATURE I CAN POST IT.
;******************************************************

derser@mail.bg
bestregards to all.
Barosov
 

Attachments

  • LM35 IN PROTEUS.pdf
    39.6 KB · Views: 154
3345289400_1362380662.png


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

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.[/QUOTE
;*******************************************************
HELLO THERE.
TWO LAST LETTERS ARE-DZ-LM35DZ-RANGE-+150/-55
;********************************************************8
I CONECT DIRECTLY TO ADC-FOR BETTER RESOLUTION YOU MAST USE
-OP.BUT THEN YOU NEED TO SCALE THE INPUT.ALSO YOU NEED TO ADJAST THE OUTPUT RESISTOR OF LM35.IF WE USING CURRENT MIROR
THERE THE RESULTS WILL BE BETTER.THAT IS FROM DATASHEET OF SENSOR.IF ANYONE WANT CODE FOR TEPERATURE I CAN POST IT.
;******************************************************

derser@mail.bg
bestregards to all.
Barosov

can u please upload the code
 

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.
 
  • Like
Reactions: Ma3ix

    Ma3ix

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top