Temperature Sensor LM35 with Arduino

In order to find the temperature, we have several option but the first choice will be LM 35 temperature sensing IC. Interfacing Temperature Sensor LM35 with Arduino is super easy process and it requires no external interfacing components.

The LM35 sense the temperature between -55 °C to 150 °C with ±5% accuracy. It can be easily connected with Arduino board.


Temperature Sensor LM35 with Arduino Hookup


Here we have given basic interface circuit with arduino and sketch code to display sensor reading in serial port of arduino. In arduino board the output terminal of LM 35 connected to A0 that is analog input pin. +Vcc and Gnd from the arduino board can be given to temperature sensor as bias supply.

Temperature Sensor LM35 with Arduino-code

 * Temperature Sensor LM35 with Arduino
 * Source: www.theorycircuit.com
int val;
int tempPin = 1;
void setup()

void loop()
val = analogRead(tempPin);

float mv = ( val/1024.0)*5000;
float cel = mv/10;
float farh = (cel*9)/5 + 32;
Serial.print("TEMPRATURE = ");
/* uncomment this to get temperature in farenhite
Serial.print("TEMPRATURE = ");

LM35 Pinout


Components List

S.No Name Quantity
1. Arduino uno 1
2. LM 35 temperature sensor 1
3. Connecting wires as required

2 thoughts on “Temperature Sensor LM35 with Arduino

  1. Hallo,

    How about a sub Zero temperature ( Celsius ).
    The Arduino ADC can not handle negative voltages!!!

    Better use an TMP36.

Leave a Reply

Your email address will not be published.