Arduino Temperature Sensor Using LM35

47,074

10

10

Introduction: Arduino Temperature Sensor Using LM35

About: This is a groups of electronics hobbyist, roboticist. We developed electronics project tutorials make open for everyone. Our Projects is fully open source and contains no copyright. So you are free to use co...

Introduction

The LM35 series are precision integrated-circuit temperature devices with an output voltage linearly proportional to the Centigrade temperature. LM35 is three terminal linear temperature sensor from National semiconductors. It can measure temperature from -55 degree Celsius to +150 degree Celsius. The voltage output of the LM35 increases 10mV per degree Celsius rise in temperature. LM35 can be operated from a 5V supply and the stand by current is less than 60uA. The pin out of LM35 is shown in the figure below.

Features

• Calibrated Directly in Celsius (Centigrade)

• Linear + 10-mV/°C Scale Factor

• 0.5°C Ensured Accuracy (at 25°C)

• Rated for Full −55°C to 150°C Range

• Suitable for Remote Applications

• Low-Cost Due to Wafer-Level Trimming

• Operates from 4 V to 30 V

• Less than 60-μA Current Drain

• Low Self-Heating, 0.08°C in Still Air

• Non-Linearity Only ±¼°C Typical

• Low-Impedance Output, 0.1 Ω for 1-mA Load

PinOuts Of LM35 is Shown in image.

You can download the datasheet from below file.

Attachments

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: Hardware Required and Circuit Diagram

Connect the Circuit as shown in image and upload the following code.

Step 2: Programming the Arduino

/*Code designed by Sujay Alaspure in SA Lab */

const int sensor=A5; // Assigning analog pin A5 to variable 'sensor'

float tempc; //variable to store temperature in degree Celsius

float tempf; //variable to store temperature in Fahreinheit

float vout; //temporary variable to hold sensor reading

void setup() {

pinMode(sensor,INPUT); // Configuring sensor pin as input

Serial.begin(9600);

}

void loop() {

vout=analogRead(sensor); //Reading the value from sensor

vout=(vout*500)/1023;

tempc=vout; // Storing value in Degree Celsius

tempf=(vout*1.8)+32; // Converting to Fahrenheit

Serial.print("in DegreeC=");

Serial.print("\t");

Serial.print(tempc);

Serial.print(" ");

Serial.print("in Fahrenheit=");

Serial.print("\t");

Serial.print(tempf);

Serial.println();

delay(500); //Delay of 1 second for ease of viewing }

Step 3: Output Result

See the result on Serial Moniter....

First of all, I would like to thank you for reading this guide ! I hope it helps you.

If You have any queries I am happy to help you.....

Drop a Comment. Your feedback is valuable for me.

Arduino Contest 2017

Participated in the
Arduino Contest 2017

Be the First to Share

    Recommendations

    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020
    • First Time Author Contest

      First Time Author Contest

    10 Discussions

    0
    neodali
    neodali

    8 months ago

    My reading is:
    in DegreeC= 291.99 in Fahrenheit= 557.59
    in DegreeC= 291.99 in Fahrenheit= 557.59
    in DegreeC= 291.99 in Fahrenheit= 557.59
    in DegreeC= 291.99 in Fahrenheit= 557.59
    in DegreeC= 291.99 in Fahrenheit= 557.59
    in DegreeC= 291.99 in Fahrenheit= 557.59
    in DegreeC= 291.99 in Fahrenheit= 557.59

    what's the problem ?

    0
    alusinehjalloh11
    alusinehjalloh11

    9 months ago on Step 3

    Thanks very much for sharing this knowledge with the public. I am facing a challenge to integrate LM35 and heartbeat sensor. Whenever I integrate it, the temperature value will be incorrect, it will start to read 40, 52, 21 degree celcuis instead of 27.
    How can I solve this problem?
    Thanks for your understanding

    0
    tgray1
    tgray1

    Question 10 months ago on Step 3

    Clear and simple, easy to follow. But why does the temperature reading fluctuate so much?

    0
    49DAVE
    49DAVE

    Question 1 year ago

    Can u make a video using arduino nano, buzzer and lm35 sensor ? It should start z buzzer when a certain temp is reached .

    0
    Jim0000
    Jim0000

    1 year ago

    Sujay,
    Is there a sensor that could be used with this circuit and code that will have a temperature range up to 200 deg. C?
    I need one for monitoring a two stroke engine head temperature.
    Thanks for the page.
    Jim.

    1
    RavinderK19
    RavinderK19

    1 year ago

    Why we are using 500

    0
    GghV
    GghV

    1 year ago

    It doesn't work for me either. Temperature keeps changing from 30-40 to zero and back to 30-40 C. Maybe my LM35 is faulty?

    1
    gabimal_ro
    gabimal_ro

    Question 2 years ago

    Hi Sujay, thanks for posting this! Quick question: I did this schematic but the temperature is not showed correctly. I got variations between 120-202 Celsius on room temperature.

    I actually tried several schematics with LM35 but I got the same results. I'm using an arduino nano with atmel 328P chipset if matters.

    Any idea why is not working correctly? Thank you!

    0
    salab
    salab

    Answer 2 years ago

    you should check LM35 pin outs properly. if you connect it in wrong manner. it will not give proper output. Else there should not any issue.

    FQ2IK6SJASJNMRD.jpeg
    0
    DIY Hacks and How Tos

    Nice tutorial. You should enter this in the Arduino contest.