Getting Started with Temperature Sensor (Celsius) (SN-LM35DZ)

The LM35 temperature sensor is an integrated circuit sensor that can be used to measure temperature with an electrical output proportional to the temperature in Celsius. This tutorial will show you the basic operation on how to use this sensor.

Last Updated on 6 July 2017
This article is written by internship student Tian Fu Loke


INTRODUCTION

The LM35 temperature sensor is an integrated circuit sensor that gives an analog output proportional to the temperature in Celsius. You can download the datasheet here.

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
PINSDESCRIPTION
VCCVoltage requirement 4-20V to operate (it can directly connect to Arduino 5V to used)
OUTConnect to the Arduino analog pin
GNDConnect to the ground of Arduino

HARDWARE REQUIREMENT

SOFTWARE REQUIREMENT

Arduino IDE

HARDWARE SETUP

  1. Take out your Arduino and components.
  2. Build your LM35 temperature sensor on the breadboard.
  3. Using jumper wire to connect between sensor and Arduino UNO/CT Uno
  4. Connect the sensor Vcc to Arduino 5V, GND TO ARDUINO GND and the output pin connected to the analog pin of Arduino.

SAMPLE CODE

int ldrPin = 7;
int value = 0;
float voltage = 0;
float temp = 0;

void setup ()
{
Serial.begin(9600);
}

void loop ()
{
value = analogRead(A0);      // sensor output to arduino analog A0 pin
voltage = value*0.00488;
temp = voltage*100;
Serial.print("TEMP:");
Serial.println(temp);

delay(500);
}

VIDEO

Note: For further inquiry, please visit our technical forum as we seldom check the comment here.

2 thoughts on “Getting Started with Temperature Sensor (Celsius) (SN-LM35DZ)”

  1. ” value = analogRead(A0);
    voltage = value*0.00488;
    temp = voltage*100; ”
    What does value*0.00488 means?
    Why can’t I directly analogRead(A0) = voltage ?
    temp = voltage*100
    What does the coefficient .00488 mean?

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

EDU:BIT Kickstarter Campaign – How to Pledge
Playing Snake game on Raspberry Pi Sense HAT
Display on MAX7219 Dot Matrix Using Maker NANO
Heart Rate Monitor Using Pulse Sensor and Maker Nano
Gas Detector Using The MQ2 Sensor on Maker NANO
Scroll to Top