Introduction: Interfacing LM35 Temperature Sensor With Arduino and Simulation in Proteus 8

About: Engineer

Introduction:

Hi, This is liono maker.

My Youtube Channel: Youtube Channel

In this Video we will learn #HowToInterfaceLM35 with Arduino and this is #LM35SimulationinProteus .In this project, we interfaced LM35 Temperature Sensor with Arduino to design a digital thermometer. The measured temperature will be directly displayed on a 16*2 LCD. LM35DZ is capable of reading the temperature in Centigrade scale. The output voltage of the sensor is directly proportional to the temperature in centigrade. LM35 can be used in the range of -55°C to +150°C with +/- 0.75°C accuracy. So let’s learn how to design Digital Thermometer Using Arduino & LM35 Temperature Sensor.

Components Required:

  1. · Arduino
  2. · LM35
  3. · Breadboard
  4. · LCD Display 16*2
  5. · Connecting wires

Softwares:

  1. · Fritzing
  2. · Arduino IDE
  3. · Proteus 8

Code and Schematics:

Int outputpin = A0;

Void setup()

{

Serial.begin(9600);

}

//main loop

Void loop()

{

int rawvoltage= analogRead(outputpin);

float millivolts= (rawvoltage/1024.0) * 5000;

float celsius= millivolts/10;

Serial.print(celsius);

Serial.print(" degrees Celsius ");

Serial.print((celsius * 9)/5+ 32);

Serial.println(" degrees Fahrenheit");

delay(1000);

}

Step 1:

Arduino Code With LCD Display:

#include<LiquidCrystal.h>

LiquidCrystal lcd(8,9,10,11,12,13);

#define sensor A0

byte degree[8] = { 0b00011, 0b00011, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 };

void setup()
{

lcd.begin(16,2);

lcd.createChar(1, degree);

lcd.setCursor(0,0);

lcd.print(" Digital ");

lcd.setCursor(0,1);

lcd.print(" Thermometer ");

delay(2000);

lcd.clear();

}

void loop()

{

// how to measure Temperature

float reading=analogRead(sensor);

float temperature=reading*(5.0/1023.0)*100;

delay(10);

//* LCD Displays Final Result

lcd.clear();

lcd.setCursor(2,0);

lcd.print("Temperature");

lcd.setCursor(4,1);

lcd.print(temperature);

lcd.write(1);

lcd.print("C");

delay(1000);

}

Step 2:

HEX File:

You can find HEX file "Arduino_lm35_lcd_ino.hex " .

upload this file when have finally completed your design in Proteus with Arduino. upload in Arduino by selecting file and then RUN SIMULATION, shows your results. we can see by changing the value of LM35 Temperature sensor we have different values on Secreen.