Thermometer Using LM35D Arduino And LCD

Description

It is a LCD Thermometer Using Arduino and LM35D temperature sensor. It shows temperature on 16×2 LCD in degree centigrade.

Circuit Diagram

In circuit diagram 16×2 LCD is connected to arduino. LM35D is connected to analog channel input of arduino.

Detail

LCD is connected in conventional 4 bit mode and LM35D temperature sensor is connected to first analog input channel of arduino. LM35D gives analog output corresponding to temperature. When temperature of environment changes it’s output voltages also changes. It gives 10mv per degree centigrade, means if output of LM35D is 10mv then surrounding temperature will be 1 degree centigrade. If output changes to 100mv then surrounding temperature will be 10 degree centigrade. Our arduino program reads this voltage level and converts it into corresponding temperature value. And then displays this value on 16×2 LCD in centigrade.

Software

#include <LiquidCrystal.h>

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

// Define analog pin where
// LM35D is connected.
const int LM35DPin = A0;

void setup() {
  // put your setup code here, to run once:

  // Setup LCD
  lcd.begin(16, 2);

  lcd.print("Temperature");

}

void loop() {
  // put your main code here, to run repeatedly:
  float temperature = analogRead(LM35DPin);
  temperature = temperature * 5000;
  temperature /= 10240;
  lcd.setCursor(0,1);
  lcd.print(temperature);
  lcd.print((char) 223);
  lcd.print('C');
  delay(300);
}