Digital Thermometer Using Arduino UNO & LM35




Introduction: Digital Thermometer Using Arduino UNO & LM35

In this instructables i will show, how to read the temperature using Arduino UNO & LM35

Step 1: Video

You can also watch the video or continue reading for detailed explanation

If you like to subscribe to my YouTube Channel please Click Here

Step 2: Components Required

1. Arduino UNO

2. LM35

3. Bread Board

4. Jumper Wires

Step 3: Circuit Diagram

Step 4: Sketch Explanation


This is where the variables are declared which will store the values during execution

float temperature, referenceTemp, referenceVolt;

int lm35Reading;

int lm35Pin = 5;


Setup - Setting the arduino pins

void setup()




the statement analogReference(INTERNAL); is used toConfigures the reference voltage used for analog input (i.e. the value used as the top of the input range).

& the statement Serial.begin(9600); is for setting the baud rate



This is the place where all the things happen. This is main core of the sketch or program.

void loop()

lm35Reading = analogRead(lm35Pin);

referenceVolt = 1 / 1024 ;

referenceTemp = 0.01 / referenceVolt ;

temperature = lm35Reading / referenceTemp ;

Serial.print("Temperature = ");

Serial.println( temperature );



  • lm35Reading = analogRead(lm35Pin); - This statement will the read the value from the LM35 which is an analog value.
  • referenceVolt = 1 / 1024 ; - This will be our reference voltage
  • referenceTemp = 0.01 / referenceVolt ; - Now if your wondering from where did i get the value 0.01. The answer is simple if you refer the datasheet it says "Linear a 10.0 mV/'C scale factor" which means for every 10m volt or 0.01 volt change there is a 1 degree change
  • temperature = lm35Reading / referenceTemp ; - This statement calculates the temperature
  • Serial.print("Temperature = "); & Serial.println( temperature ); - This statement is to print the values in the serial monitor
  • delay(500); - For every 500 milli second the loop will execute


Important Note : I have used 1 volt has my reference in my sketch, so please kindly change it to 1.1 volt in the statement & comment the line analogReference(INTERNAL); ( i.e referenceVolt = 1 / 1024 ; into referenceVolt = 1.1 / 1024 ; ).

Using 1 volt will limit temperature range to 0 to 100'C approx and if you are using 1.1 volt you will get a range of approx 0 to 115'C.

If you refer the LM35 datasheet the temperature range is -55 to +150'C so we are not utilizing the full potential of LM35, i.e is the one drawback.

If your wondering why i used 1 volt instead of 1.1 volt, using 1 volt as my top range i got the near exact temperature and with 1.1volt i got nearly 1.5'c difference. This may be because a faulty LM35

If you are trying, I strongly Recommend you to use 1.1 volt as the reference

Step 5: Construction & Working

1st & 2nd Image - Now connect the circuit as show in the Step 3 and upload the sketch. Once uploaded open the serial monitor which is under the TOOLS section or press Ctrl + Shift + M.

3rd Image - It is reading the temperature of the room

4th Image - When i touched the LM35 with my hand the temperature went up due to my body tempearature

5th Image - When i removed my hand the temperature kept and started showing the room temperature which is shown in the video

To watch the test video please CLICK HERE

Testing begins @ 00:51 sec


If you interested in making this product you can please use my affiliate buying links to buy the components

Do you want to support my videos?
If Yes, Please browse and buy things from my Amazon Store. This way I get a small commission which will help me produce more videos. Please use the link to visit my store :

You can also contribute to me on Patreon using the link :

Amazon India :

Arduino UNO :

Bread Board :

Jumper Wires :

LM35 :

Amazon US :

Arduino UNO :

Bread Board & Jumper Wires :

LM35 :


Follow Me On :

You Tube :

Twitter :

Instagram :

Google Plus :

Facebook :




    • Trash to Treasure

      Trash to Treasure
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Pro Tips Challenge

      Pro Tips Challenge

    We have a be nice policy.
    Please be positive and constructive.