Using arduino uno with lcd display and temperature sensor LM35

Things you need:

  • Arduino Uno
  • LM35 temperature sensor
  • 16×2 LCD display
  • 330Ω resistor
  • 10kΩ trimmer
  • jumper wires

Characteristic of LM35DZ sensor:

  • Units in ̊ Celsius
  • Operation power : 4 to 30 volts
  • Sensor Gain (slope) + 10.0 mV/ ̊C scale factor
  • ±0.6 ̊C accuracy tested at +25 ̊C, ±0.9 ̊C at Tmax and Tmin
  • Range : −55 ̊ to +150 ̊C
  • Less than 60 μA current drain
  • Low self-heating 0.08 ̊C (air)
  • Non-linearity only ±0.25 ̊C typical
  • Low impedance output, 0.1Ω, for 1 mA load

Circuit Diagram:

Arduino program:

#include <LiquidCrystal.h>

int rs = 2;
int e = 3;
int d4=4, d5=5, d6=6, d7=7;
LiquidCrystal lcd(rs,e,d4,d5,d6,d7);
int sensorInput = A0;

float vout ;
float tempDegC;

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

  pinMode (sensorInput , INPUT);
  lcd.begin(16,1);

}

void loop() {
  // put your main code here, to run repeatedly:
  vout = analogRead(sensorInput);
  vout=(vout*500)/1023;
  tempDegC = vout;
  lcd.print(tempDegC);
  lcd.print("deg.Celsius");
  delay(1000);
  

}