Saturday 10 March 2018

LM35 temperature sensor using arduino uno in proteus ISIS




LM35 temperature sensor using arduino uno in proteus ISIS:
Here I have show you how to use temperature sensor in proteus
Download arduino uno and temperature sensor library files and add it to your proteus library folder

COMPONENTS:
  • Arduino uno
  • LED red,yellow,green
  • LM35 temperature sensor
  • resistors
  • virtual terminal

We use three conditions for LM35 temperature sensor using arduino uno in proteus ISIS

CONDITIONS:
  • temperature cel value below 30 -Blinking Green LED
  • temperature cel  value 30 to 40 -Blinking Yellow LED
  • temperature cel  value above 50 -Blinking RED LED

Analog temperature sensor LM35 with proteus simulation
LM35 temperature sensor using arduino uno in proteus ISIS
we use some arduino coding convert from analog temperature value to digital in arduino IDE software
It will show output value through virtual terminal
temperature level low,normal and high.

Arduino IDE coding:

#define TempPin A0
int TempValue;
void setup()
{
  Serial.begin(9600); // Initializing Serial Port
  pinMode(2,OUTPUT);
  pinMode(3,OUTPUT);
  pinMode(4,OUTPUT);
}

void loop()
{
  TempValue = analogRead(TempPin); // Getting LM35 value and saving it in variable
  float TempCel = ( TempValue/1024.0)*500; // Getting the celsius value from 10 bit analog value
  float TempFarh = (TempCel*9)/5 + 32; // Converting Celsius into Fahrenhiet
if (TempCel>=50)
{
  Serial.println("HIGH TEMPERATURE");
  digitalWrite(3,LOW);
  digitalWrite(4,LOW);
  digitalWrite(2,HIGH);
}
else if(TempCel>=30 && TempCel<40){
  Serial.println("NORMAL TEMPERATURE");
  digitalWrite(2,LOW);
  digitalWrite(4,LOW);
  digitalWrite(3,HIGH);
}
else{
  Serial.println("LOW TEMPERATURE");
  digitalWrite(3,LOW);
  digitalWrite(2,LOW);
  digitalWrite(4,HIGH);
}
  delay(1000);
}

No comments: