Lm35 Temperature sensor working
Arduino analog pin is used to read the analog output signals from the sensor. The circuit diagram of the project is given below. To Pin#1 of Lm35 apply 5v, make Pin#2 ground, and the third one the middle pin is output pin. It gives a voltage signal that is actually the temperature of the particular place.
Note: LM35 is an absolute temperature sensor. It can only measure the temperature of the surroundings with in the circle of between 100 to 500 feet . So if you are using internet and you are matching your temperature reading from the one that is given for your city on a weather forecast site than your reading will not be same like theirs. It will be near but not the same.
Lm35 temperature sensor voltage to temperature conversion
Main crux from data sheet: LM35 Output temperature in Celsius form. It Increments the output by 1 on every 10 mV change in temperature.
- when the sensor outputs 500 mv voltage, the temperature in Celsius is 50 degree Centigrade.
- For 400 mv output temperature in Celsius is 40 degree centigrade.
- For 600 mv temperature is 60 degree Celsius.
Now we now the resolution of Lm35 and its characteristics lets derive the formula to convert the output raw voltage by Lm35 in to centigrade/Celsius temperature.
Lm35 voltage conversion to temperature formula/equation derivation for Arduino
- Arduino analog pins can measure up-to +5 volts OR the voltage on which it is working normally +5 volts.
- Arduino analog pin resolution is 1023 starting from 0. On +5 volts input it counts to 1023.
- Lm35 max voltage output is 1500mV( At 150 degree centigrade). 1500mV is equal to 1500/1000 = 1.5 volts. So Lm35 at max outputs 1.5 voltage.
- Arduino analog pin count for 1.5 volts equals to (1.5 / 5)*1023 = 307.5 . At +5 volts its 1023 and at 1.5 volts its 307.5.
- New Arduino-Lm35 Resolution = 307.5 / 150 = 2.048 . Now if arduino analog pin counts 2.048 its equal to 1 degree change in centigrade/Celsius temperature of LM35.
The same above formula/equation is in the code and its working perfectly.
Arduino uno measuring temperature using Lm35 temperature sensor – Circuit diagram
Note: For temperatures measurement i used the float data types to accurately measure the temperature in decimal form.
More projects on interfaicning Lm35 temperature sensor with various other mirocontrollers. Each project code is open source. One can use and modify it according to his needs.
Sorry for the bad quality of the video
Filed Under: Arduino Projects, Microcontroller Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.