Interface LM35 temperature sensor with Arduino

About Temperature Sensor

It is a precision temperature IC. Its output voltage linearly varies with respect to the temperature. It does not require any type of external calibration. You can measure temperature between -55 degree Celsius to 150 degree Celsius.

Pinout of LM35 Temperature Sensor

Features

  • Operating voltage:4-30 volt
  • Current: 60 uA
  • Temperature range: -55 to 150 degree Celsius

Components Needed

  • Lm35 temperature sensor
  • Arduino UNO
  • Jumper Wires

Circuit Diagram

Arduino IDE Code

int Sen_value;
int tempPin = 2;

void setup()
{
Serial.begin(9600);
}
void loop()
{
Sen_value = analogRead(tempPin);
float value = (Sen_value/1024.0)*5000; 
float cel = value/10;
float far = (cel*9)/5 + 32;

Serial.print("TEMPRATURE IN CELSIUS: ");
Serial.print(cel);
Serial.print("*C");
Serial.println();
delay(100);
Serial.print("TEMPRATURE IN FAHRENHEIT:");
Serial.print(far);
Serial.print("*F");
Serial.println();
delay(100);
}

Leave a Reply

Your email address will not be published. Required fields are marked *