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 implementing Arduino projects.
Circuit Diagram for Arduino Thermometer
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.
Components used for Arduino Thermometer
Implemented Circuit Output
Code for Arduino Thermometer
/*
Arduino Thermometer using LM35
Tested By Amol Shah from DNA Technology : http://www.dnatechindia.com/
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.h>
LiquidCrystal lcd(12,11,5,4,3,2);
const int inPin = 0;
void setup()
{
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print(" Thermometer");
}
void loop()
{
int value = analogRead(inPin);
float millivolts = (value / 1024.0) * 5000;
float celsius = millivolts / 10;
lcd.setCursor(0,1);
lcd.print(celsius);
lcd.write(0xdf);
lcd.print("C ");
lcd.print((celsius * 9)/5 + 32);
lcd.write(0xdf);
lcd.print("F");
delay(1000);
}
You can Download the working Code from HERE