LM35 Temperature Sensor Interfaced With Arduino Uno

#arduino #LM35

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Collect All the Stuff!

You would need:

1) Arduino Uno board or equivalent.

2) LM35 temperature sensor.

3) Bread board.

4) USB (as supported by the board)

5) Arduino IDE.

6) Connecting wires.

All the required components are avilable on amazon as well as at local market if you're willing to venture.

I've given some links for some of the components should you wish to check :)

Arduino Uno:http://www.amazon.in/Arduino-UNO-board-DIP-ATmega3...

LM35: http://www.amazon.in/Robomart-LM-35-Temperature-Se...

Arduino IDE: https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&...

Step 2: Connections.

LM35 is a three terminal IC and reads analog voltage.

Connections are made as shown in the picture. (pins are numbered 1,2,3 from right seeing through the flat side of the IC)

  • Connect 1 to 5 Volts supply.
  • Connect 3 to GND.
  • Connect 2 to analog pin A1 of Arduino Uno.
  • Connect the supply to the bread board as shown in picture 2.

Step 3: Code!

int val;

int tempPin=A1;

void setup() {

Serial.begin(9600); //pinMode(tempPin,OUTPUT); // put your setup code here, to run once: }

void loop() {


float cel=val/9.31;

float farh=(cel*9)/5+32;

Serial.print("TEMPERATURE in CELCIUS=");

Serial.print(cel); Serial.print("*C");



Serial.println("TEMPERATURE in FARHENHITE=");



delay(5000); Serial.println(); i

f (cel>25) { Serial.println("Its a hot day");


else {

Serial.println("Good day to be alive"); }




Step 4: Upload the Code

upload the code on your arduino. Open the Serial Monitor to see your circuit in work!

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest



    2 years ago

    Cool, I should make one of these for the house. I'm pretty sure the thermostat is way off.