Introduction: Arduino Thermometer Using LM35 Temperature Sensor
Arduino Thermometer using LM35 Temperature Sensor is a very simple to implement Arduino based project. Its a perfect project if you are a beginner and have just started practically testing Arduino projects.
In this project we will be displaying temperature in degree Centigrade and Fahrenheit as well. The ambient temperature is sensed using LM35 Temperature sensor which is a linear sensor. LM35 gives linear output of 10mv/°C this output of the sensor is then given to Analog input of Arduino UNO. Which then measures the temperature and displays it on 16x2 Alphanumeric Display in real time.
Step 1: Components Used
Step 2: Circuit Diagram
The output of the LM35 Temperature sensor is analog so it is given to A0 if the Arduino. LM35 is an integrated analog temperature sensor whose electrical output is proportional to Degree Centigrade. LM35 Sensor does not require any external calibration or trimming to provide typical accuracies also it is a very low cost and easily available Sensor. Main advantage of LM35 is that it is linear i.e. 10mv/°C scare factor which means for every degree rise in temperature the output of LM35 will rise by 10mv. Want to Learn more basics of LM35 Temperature Sensor?
Arduino measures output of the sensor and then displays the reading on Alphanumeric Display. As said earlier LM35 sensors gives output in Degree Centigrade the arduino then calculates the temperature in Fahrenheit as well and displays both reading on LCD.
This calculation is quite simple
°F =°C x 9/5 + 32
So30°C to Fahrenheit will be 30°C x 9/5 + 32 = 86.0°F
Step 3: Coding
Arduino Thermometer using LM35
To wire your LCD screen to your Arduino, connect the following pins:
LCD Pin 6 to digital pin 12
LCD Pin 4 to digital pin 11
LCD Pin 11 to digital pin 5
LCD Pin 12 to digital pin 4
LCD Pin 13 to digital pin 3
LCD Pin 14 to digital pin 2
#include LiquidCrystal lcd(12,11,5,4,3,2);
const int inPin = 0;
int value = analogRead(inPin);
float millivolts = (value / 1024.0) * 5000;
float celsius = millivolts / 10;
lcd.write(0xdf); lcd.print("C ");
lcd.print((celsius * 9)/5 + 32);
delay(1000); //Updating Temperature reading after every 1 second
You can Download the complete Code from HERE
We have a be nice policy.
Please be positive and constructive.