LM35 temperature sensor


The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external calibration or trimming to provide typical accuracies of ±1/4°C at room temperature and ±3/4°C over a full -55 to +150°C temperature range
LM35 temperature sensor pinout
In this project you have to need
1.Arduino uno
2.LCD Display 
3.LM 35 LM35 temperature sensor 
4. LED

 Project Overview


In this project you can see your  temperature on LCD Display and control your output according to temperate and also you can see ADC valu on your Lcd Display 


Source code

#include <LiquidCrystal.h>
LiquidCrystal lcd (7,6,5,4,3,2); //RS cont 7pin //E 6pin //D3, D4, D5, D6, pin no 5,4,3,2
float value;
int cel;
int far;
int output1=8;
int output2=9;
int output3=10;

void setup()
{
  Serial.begin(9600);
  lcd.begin(16,2);
  pinMode(output1,OUTPUT);
  pinMode(output2,OUTPUT);
  pinMode(output3,OUTPUT);
  digitalWrite(output1,LOW);
    digitalWrite(output2,LOW);
    digitalWrite(output3,LOW);
}

void loop()
{
  value=analogRead(A0);
  value = (value*5000)/1024;
  cel=value/10;
  far = (cel*9)/5;
  far = far+32;

  lcd.setCursor(0,0);
 lcd.print("Temperat");
 lcd.setCursor(0,1);
 lcd.print(cel);
 lcd.print(char(223));
 lcd.print("C");
 lcd.setCursor(4,1);
 lcd.print(",");
 lcd.setCursor(5,1);
 lcd.print(far);
 lcd.print(char(223));
 lcd.print("F"); 
 lcd.setCursor(9,0);
 lcd.print("|");
 lcd.setCursor(9,1);
 lcd.print("|");
 lcd.setCursor(10,0);
 lcd.print("ADC is");
 lcd.setCursor(10,1);
 lcd.print(value);
 if(cel>=28)
 {
  digitalWrite(output1,HIGH);
  digitalWrite(output2,LOW);
  digitalWrite(output3,LOW);
 }
 if(cel>=30)
 {
  digitalWrite(output2,HIGH);
  digitalWrite(output1,LOW);
  digitalWrite(output3,LOW);
 }
 if(cel>=33)
 {
  digitalWrite(output2,LOW);
  digitalWrite(output3,HIGH);
  digitalWrite(output1,LOW);
 }
  if(cel<=27){
    digitalWrite(output2,LOW);
  digitalWrite(output3,LOW);
  digitalWrite(output1,LOW);
    
    }
    delay(100);
}

//K connect to ground and A connected to 5v
//VSS cont to GROUND
//VDD cont to 5V
//VO cont to GROUND
//RS cont 7pin
//E 6pin
//D3, D4, D5, D6, pin no 5,4,3,2


Arduino and lm35 schematic
Arduino and lm35 schematic



Video Simulation  

Complete Project Free Download Click Here




No comments

Theme images by Dizzo. Powered by Blogger.