DIGITAL THERMOMETER USING ARDUINO

LM35 AND LCD DISPLAY WITH ARDUINO


Components required:-

1.Arduino Uno:-



2. LCD display:-



3.LM-35:-


4. 10K Potentiometer:-

LM35:-It is a temperature sensor whose voltage varies as temperature increases or decreases. With 1° change in temperature, there is a change of 10 millivolts therefore if temperature rises by 1 degree then 10 millivolts will be added similarly if temperature is reduced by 1 degree then 10 millivolts will be reduced.

Summary in mathematical equation:-

1°C = 10mV

LM35 PINOUT

  1. GND PIN- connected to GND pin of Arduino.

  2. OUTPUT– it is an output pin.

  3. VCC PIN-  connected to VCC pin of Arduino.



16x2 LCD display

The name "16x2 LCD display" came from this fact that is has 16 columns and 2 rows , that means we can display 32 characters on this LCD display screen. Characters could  be either alphabets, numbers or custom made characters. Each column is made from 5 x 8 matrix of pixels which means 40 pixels per column .


                


Features:-

  • Operating voltage is  4.7V to 5.3V
  • Current consumption is 1mA without backlight
  • Alphanumeric LCD display module, meaning can display alphabets and numbers
  • Can work on both 8-bit and 4-bit mode
  • Available in Green and Blue Backlight
Pinouts:-
1. Vss:-  Connect GND here
2. Vdd:- Powers the LCD with +5V (4.7V – 5.3V)
3.VEE:-To set contrast of display
4.Register Select:-command/data register
5.Read/Write:-Used to read or write data. Normally grounded to write data to LCD
6.Enable:- To enable Read/Write on LCD
7. Data bit 0:- To microcontroller to send 8 bit data
8. Data bit 1:- To microcontroller to send 8 bit data
9.Data bit 2:- To microcontroller to send 8 bit data
10.Data bit 3:- To microcontroller to send 8 bit data
11.Data bit 4:- To microcontroller to send 4/8 bit data
12.Data bit 5:- To microcontroller to send 4/8 bit data
13.Data bit 6:- To microcontroller to send 4/8 bit data
14.Data bit 7:- To microcontroller to send 4/8 bit data
15.LED+ :- To set backlight
16.LED-  :- To set backlight

LM35 AND LCD DISPLAY INTERFACING WITH ARDUINO

  1. VSS and LED-  pin of LCD are combined together and are grounded.

  2. VCC and LED+ pin of LCD are combined together and is connected to 5v pin of Arduino.

  3. Then connect a potentiometer to VEE to adjust the contrast of LCD by varying the knob of potentiometer.

  4. Then connect RS pin of LCD to 6th pin of Arduino and R/W pin of LCD to 7th pin of Arduino.

  5. Then connect E pin of LCD to 8th pin of Arduino.

  6. Then connect DB4 pin of LCD to 9th pin of Arduino, DB5 pin to 10th pin , DB6 pin to 11th pin and DB7 to 12th pin of Arduino.

  7. Connect VCC pin of LM35 with 5v pin of Arduino.

  8. Then connect OUTPUT pin of LM35 to A0 pin of Arduino.

  9. Then connect GND pin of LM35 to GND pin of Arduino.


ARDUINO CODE

_____________________

#include <LiquidCrystal.h>

LiquidCrystal lcd(6,7,8,9,10,11,12);

int sensor=A0;

float celcius,fahrenheit;

void setup() 

{

  pinMode(sensor,INPUT);

  lcd.begin(16,2);

}

 

void loop() 

{

  celcius=0.48828125 * analogRead(A0);

  fahrenheit=1.8*celcius + 32;

  lcd.clear();

  if(celcius> 40)

  {

    lcd.print("It's hot");

  }

  else if(celcius <25)

  {

    lcd.print("It's cold");

  }

  else

  {

    lcd.print("It's normal temp");

  }

  lcd.setCursor(0,1);

  lcd.print(celcius);

  lcd.print("C | ");

  lcd.print(fahrenheit);

  lcd.print("F");

  delay(100);

}

__________________________

To understand this project in more detail, click here or on this image to watch on YouTube.




                                      



Comments