Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›LM35 temperature sensor

Component guide · Beginner · 3 min read

LM35 temperature sensor

Pinout, Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the LM35 temperature sensor isLM35 temperature sensor pinoutWiring the LM35 temperature sensorExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Short answer

The LM35 is an analog temperature sensor whose output rises 10 mV for every degree Celsius, so 250 mV means 25 °C. It needs 4 to 30 V supply and gives about ±0.5 °C accuracy at room temperature. Read it with an analog pin and multiply the voltage by 100. The LM35DZ version covers 0 to 100 °C.

Key specs at a glance

Output
10 mV per °C, 0 V at 0 °C
Range
LM35: −55 to 150 °C (needs negative supply below 2 °C); LM35DZ: 0 to 100 °C
Accuracy
±0.5 °C at 25 °C (LM35A), about ±1 °C for LM35DZ
Supply
4 to 30 V, about 60 µA
Package
TO-92 (three pins) or probe and module versions
Self-heating
About 0.08 °C in still air

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1Texas Instruments LM35DZ/NOPB TO-92 Temperature Sensor – 卤1.5掳C Accuracy₹78
  • Option 2Keyestudio LM35 Linear Temperature Sensor Module for Arduino₹337
  • Option 3LM35D Analog Temperature Sensor Module (Without Cable) – Analog Voltage Output₹138
  • Option 4LM35DZ Precision Temperature Sensor Probe with 1 Meter Cable₹169
01

What the LM35 temperature sensor is

The LM35 is a precision integrated-circuit temperature sensor with a linear voltage output calibrated in Celsius. No library and no calibration are needed: read the voltage and divide by 10 mV.

It is a classic first sensor in lessons because the maths is simple. For long cables or several sensors on one pin, the digital DS18B20 is usually better.

02

LM35 temperature sensor pinout

The pins on the LM35 temperature sensor and what each one does.

PinFunction
+Vs (left, flat side facing you)4 to 30 V supply
Vout (middle)Analog output, 10 mV/°C
GND (right)Ground
PinFunction
+Vs (left, flat side facing you)
4 to 30 V supply
Vout (middle)
Analog output, 10 mV/°C
GND (right)
Ground
03

Wiring the LM35 temperature sensor

With the flat face towards you and pins down, the order is +Vs, Vout, GND. Getting this wrong makes the chip hot within seconds. On an ESP32, power the LM35 from 5 V; its output stays under 1.5 V, which is safe for the ADC.

LM35 temperature sensor pinArduino UnoESP32
+Vs5V5V (VIN)
VoutA0GPIO 34
GNDGNDGND
+Vs
Arduino Uno:
5V
ESP32:
5V (VIN)
Vout
Arduino Uno:
A0
ESP32:
GPIO 34
GND
Arduino Uno:
GND
ESP32:
GND
04

Example code

The internal 1.1 V reference gives about 0.1 °C resolution up to 110 °C. With the default 5 V reference each step is about 0.5 °C.

Read temperature on an Uno · Arduino C++Verify & upload in Electrolark
const int PIN = A0;

void setup() {
  Serial.begin(9600);
  analogReference(INTERNAL);        // 1.1 V reference: ~0.1 C per step
}

void loop() {
  long sum = 0;
  for (int i = 0; i < 16; i++) sum += analogRead(PIN);   // average out noise
  float mv = (sum / 16.0) * 1100.0 / 1023.0;
  Serial.print(mv / 10.0, 1);
  Serial.println(" C");
  delay(1000);
}
05

Setup and tuning

Noise

average several readings and add a 0.1 µF capacitor from Vout to GND at the Arduino end.

Long cables

add a 2 kΩ resistor in series with the output to keep the LM35 stable with cable capacitance.

ESP32 ADC

use analogReadMilliVolts(), which applies the factory calibration.

Waterproof probe

the probe version can sit in liquids; seal any joints.

06

What you need

Shop this list4 of 6 found in our store · ₹5,946

  • TI LM35DZ temperature sensor (TO-92): the bare chipFind this part
  • Keyestudio LM35 temperature sensor module: plug-in modulekeyestudio₹5,571
  • LM35D analog temperature sensor module: breadboard moduleLM35D Analog Temperature Sensor Module (Without Cable) – Analog Voltage Output₹138
  • LM35DZ temperature probe with 1 m cable: for liquidsLM35DZ Precision Temperature Sensor Probe with 1 Meter Cable₹169
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • Solderless breadboard: to build without solderingSolderless Breadboard₹68
07

Alternatives and when to choose them

  • ✓DS18B20: digital, waterproof probes, many on one pin.
  • ✓AHT20: adds humidity, I2C.
  • ✓NTC thermistors: cheapest, non-linear, wide range.
08

Try it: Adc resolution calculator

Change the values and the diagram and results update as you type.

09

Common mistakes to avoid

  • !Reversing the pins, which heats the chip.
  • !Expecting negative temperatures from the LM35DZ on a single supply.
  • !Reading with the 5 V reference and seeing 0.5 °C jumps.
  • !Using it on 3.3 V supply; it needs at least 4 V.
10

Frequently asked questions

How do I convert LM35 output to temperature?

Temperature in °C = output voltage in mV ÷ 10.

Can the LM35 run on 3.3 V?

No, it needs at least 4 V. Power it from 5 V; its output is still safe for 3.3 V ADCs.

Can it measure negative temperatures?

The LM35 can with a negative bias supply; the LM35DZ is 0 to 100 °C only.

Why are my readings jumping?

ADC noise. Average readings, use the 1.1 V reference and add a capacitor.

LM35 or DS18B20?

LM35 for the simplest analog lesson; DS18B20 for accuracy, long cables and waterproof probes.

Is it accurate?

About ±0.5 °C to ±1 °C, depending on version and your ADC.

Parts for this guide

  • Texas Instruments LM35DZ/NOPB TO-92 Temperature Sensor – 卤1.5掳C Accuracy
    ₹78View
  • Keyestudio LM35 Linear Temperature Sensor Module for Arduino
    ₹337View
  • LM35D Analog Temperature Sensor Module (Without Cable) – Analog Voltage Output
    ₹138View
  • LM35DZ Precision Temperature Sensor Probe with 1 Meter Cable
    ₹169View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • Solderless Breadboard
    ₹68View
Shop Temperature & Thermal Sensors

Calculators

Adc resolution calculatorTemperature converter calculator

Projects that use it

Put this into practice: 13 step-by-step builds in our project library use parts from this guide.

Beginner · 1 hourLM35 room thermometerView projectBeginner · 1 hourGeyser outlet pipe hot alarmView projectIntermediate · 2 hoursIce box temperature loggerView project
Browse all 13 projects

Keep learning

Buying guideBeginnerHow to Choose a Temperature Sensor for Arduino and ESP32Compare temperature sensors for Arduino and ESP32: DHT22, DS18B20, BME280, LM35, TMP36, NTC thermistors, K-type thermocouples and the MLX90614 IR sensor.3 min read · SensorsComponent guideBeginnerDS18B20 Waterproof Temperature SensorThe DS18B20 is a digital temperature sensor that talks over a single data wire called 1-Wire.3 min read · SensorsConcept explainerBeginnerADCs ExplainedAn analog-to-digital converter (ADC) measures a voltage and returns a number.4 min read · Electronics FundamentalsComparisonBeginnerTemperature Sensor ICsCompare analog LM35 and TMP36 with digital MCP9808 and TMP117 temperature sensors: accuracy, voltage, wiring, formulas and Arduino and ESP32 code.3 min read · Sensors

Sources

  • LM35 precision centigrade temperature sensors datasheet (Texas Instruments)

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the LM35 temperature sensor isLM35 temperature sensor pinoutWiring the LM35 temperature sensorExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide3 items · ₹5,717

Texas Instruments LM35DZ/NOPB TO-92 Temperature Sensor – 卤1.5掳C Accuracy · keyestudio · Solderless Breadboard

Run itChange the inputs and watch the output
Serial monitor9600 baud
29.2 C

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question