Measure negative temperature with Lm35

Summary of Measure negative temperature with Lm35


This project enables measuring negative temperatures using an LM35 sensor without requiring a negative voltage power supply. Typically, LM35 needs a negative supply to measure temperatures below 0°C (down to -55°C). The circuit design eliminates this need by using two ADC channels and subtracting their readings to get accurate negative temperature values. The provided BASCOM code reads analog inputs from the LM35 configuration, processes the difference between two ADC channels, and displays the temperature on a 16x2 LCD. A Proteus simulation file is available for desktop testing.

Parts used in the Measure negative temperature with LM35 project:

  • LM35 Temperature Sensor
  • AVR Microcontroller (ATmega16)
  • 16x2 LCD Display
  • Resistors (for LCD and sensor circuits)
  • Power Supply (Positive voltage only, no negative supply)
  • Proteus software (for simulation)

LM35 can measure temperatures from -55deg to 150deg and we need negative supply voltage for measuring this negative temperature.
This circuit eliminates the negative voltage power supply and this project can measure the negative temperature
Download the protesu file to simulate the project on your desktop
Measure negative temperature

Bascom Code

$regfile = "m16def.dat"
$crystal = 1000000
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portd.4 , Db5 = Portd.5 , Db6 = Portd.6 , Db7 = Portd.7 , E = Portd.0 , Rs = Portd.1
Config Adc = Single , Prescaler = Auto , Reference = Internal
Deflcdchar 0 , 12 , 18 , 18 , 12 , 32 , 32 , 32 , 32
Deflcdchar 1 , 32 , 4 , 12 , 28 , 28 , 32 , 32 , 32
Deflcdchar 2 , 32 , 4 , 14 , 31 , 31 , 32 , 32 , 32
Deflcdchar 3 , 32 , 4 , 14 , 31 , 31 , 7 , 6 , 4
Deflcdchar 4 , 32 , 4 , 14 , 31 , 31 , 31 , 14 , 4
Deflcdchar 5 , 32 , 32 , 32 , 32 , 32 , 32 , 32 , 32
Dim A As Word
Dim B As Word
Dim C As Single
Dim D As Byte
D = 1
Start Adc
Cursor Off
Cls
Locate 2 , 1
Lcd "avrprojects.info"
Do
A = Getadc(3)
B = Getadc(4)
C = A - B
C = C / 4
Locate 1 , 1
Lcd "Temp =" ; C ; Chr(0) ; "c   "
Locate 1 , 16
Lcd Chr(d)
Waitms 500
Incr D
If D > 6 Then D = 1
Loop
End

For more Detail: Measure negative temperature with Lm35


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top