Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
FREEDOM251

Freedom251 › Blog › Arduino

How to Monitor Temperature with an Arduino and an LM35 Sensor

By Freedom251 Team · · 5 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To monitor temperature with an LM35 and Arduino, connect the sensor’s output to an analog input, convert the board’s ADC reading into volts using the board’s actual reference voltage and resolution, then divide the voltage by 0.010 V/°C. That gives a nominal Celsius reading because the LM35’s output changes by 10 mV per degree Celsius. The exact wiring and attainable accuracy depend on the sensor package and the Arduino board.

What you need to know before wiring an LM35

The LM35 is an analog temperature sensor: it produces a voltage proportional to temperature, with a nominal scale factor of 10 mV/°C. It is not a digital sensor, so the Arduino must measure its output through an analog-to-digital converter (ADC).

As an Amazon Associate I earn from qualifying purchases.

  • An LM35 sensor whose exact suffix and package you have identified.
  • An Arduino board with a usable analog input. An Uno R3 is the board used in the cited Arduino example; other Arduino boards may use different ADC references or resolutions.
  • For a temporary prototype, a breadboard and jumper wires are convenient. The Arduino example documentation lists a breadboard and Uno R3; the breadboard and wires are build choices, not requirements of the sensor itself.

Before connecting anything, check the part marking and use the matching pinout in the LM35 datasheet. TI offers multiple packages and family members with differing ranges; do not assume a generic drawing’s pin order applies to your part. The TI product page identifies the family and its available package information.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to connect the sensor

For a basic positive-temperature setup, power the sensor as shown in the datasheet, connect its ground to Arduino ground, and connect its output to a valid analog input. The precise pin positions depend on the package and should come from that part’s datasheet.

#1 Best Overall
Bridgold 5pcs LM35DZ Analogue Precision Centigrade Temperature Sensor,To-92
  • Rated for full −55˚ to +150˚C range
  • Suitable for remote applications
  • Operates from 4 to 30 volts
  • Low self-heating, 0.08˚C in still air
  • Nonlinearity only ±1⁄4˚C typical
  1. With the Arduino disconnected from power, identify the LM35 supply, ground, and output pins from the datasheet for your exact package.
  2. Connect the sensor supply and ground according to the datasheet’s basic application circuit. Connect the sensor ground and Arduino ground together.
  3. Connect the LM35 output to an analog input, such as A0 if that pin is available on your board.
  4. Check that the sensor’s supply and output voltage are within the board’s permitted electrical limits before powering the circuit.

A single-supply, direct-output hookup is a straightforward choice for temperatures that produce a positive output voltage. It should not be treated as a circuit for measuring the LM35’s full negative-temperature range.

Convert an Arduino ADC reading to Celsius

The conversion has two stages: convert the ADC count to an estimated input voltage using the selected board’s reference and ADC resolution, then convert that voltage to temperature.

For an ADC that reports counts from 0 through N, where N is the maximum count for the configured resolution:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
BOJACK TMP36 Temperature Sensors 3 Pin TMP36GZ High Precision Celsius Temperature Sensor (Pack of 5 Pcs)
  • BOJACK High Precision Celsius Temperature Sensor
  • Operating Voltage:2.7 V - 5.5 V
  • Rated temperature range: -40 °C-+125 °C
  • Accuracy: ±2°C
  • Scale factor: 10 mV/8°C

Voltage (V) = ADC count × ADC reference voltage (V) ÷ N

Then apply the LM35’s nominal scale factor:

Temperature (°C) = Voltage (V) ÷ 0.010 V/°C

For example, if the ADC calculation produces 0.250 V, the nominal LM35 conversion is 0.250 ÷ 0.010 = 25°C. This example illustrates the sensor’s scale factor; it is not a promised output for a particular Arduino reading.

In code, use the reference voltage and maximum ADC count that match your board and its current ADC configuration. Do not assume every Arduino uses a 5 V reference or the same bit depth. Texas Instruments’ Arduino interface demonstration specifically discusses ADC configuration and reducing conversion error. The TI LM35 Arduino example code is another board-specific reference, not a universal ADC configuration for every Arduino.

Rank #3
Bridgold 5pcs TMP36GT9Z TMP36 36GT Low Voltage Temperature Sensors,3-Pin.
  • Specified −40°C to +125°C, operation to +150°C
  • Low voltage operation (2.7 V to 5.5 V)
  • Stable with large capacitive loads
  • Less than 50 μA quiescent current
  • Qualified for automotive applications

Read and display the measurement

Once the wiring and conversion match your board, read the analog input repeatedly and print the calculated Celsius value to the Serial Monitor or send it to a display of your choice. The right output frequency and display depend on the project; the sensor and ADC conversion do not require a particular screen or logging method.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When checking the result, verify the signal path in order: confirm the sensor pinout, confirm that the analog input is the one connected to the output, confirm the ADC reference and resolution in the calculation, and confirm that the voltage-to-temperature step divides by 0.010 V/°C. A multimeter across the sensor output and ground can help check whether the measured voltage is plausible, but it is optional.

Understand accuracy and sources of error

The sensor specification does not guarantee the accuracy of the assembled Arduino measurement. TI’s product page states 0.5°C ensured accuracy at 25°C and gives a rated LM35 range of −55°C to 150°C, while noting that family variants can differ. Separately, the Rev. H datasheet’s basic application table lists ±0.5°C at 25°C and ±1°C from −55°C to 150°C. These are manufacturer specifications in distinct contexts, not guarantees for every LM35 variant or complete Arduino system.

Rank #4
Chiffonade ‌LM35 Temperature Sensor Module Linear 10mV/°C Output 5VDC -40°C to +110°C Range 3-Pin Interface for Microbit DIY Electronics
  • ‌Precision Temperature Measurement‌: Linear 10mV/°C output (0V at 0°C) with ‌±0.25°C accuracy‌ at 25°C for reliable data
  • ‌Plug-and-Play Compatibility‌: 3-pin interface works compatible with ‌Microbit and most microcontroller expansion boards 5VDC powered
  • ‌Robust Design‌: Four ‌3mm mounting holes‌ secure the module to prototypes or enclosures; compact size 34×22×9mm, 2.6g
  • ‌Wide Operating Range‌: Measures ‌-40°C to +110°C‌, ideal for environmental monitoring, DIY projects, and industrial prototyping
  • ‌Analog Signal Output‌: Directly interfaces for real-time temperature logging and control systems, suitable for engineers, technicians, factories, individual DIY, electronic enthusiasts, etc

TI also says the LM35 needs no external calibration or trimming to provide typical accuracy of ±¼°C at room temperature and ±¾°C over a full −55°C to 150°C temperature range. That typical-accuracy statement is not the same as the datasheet’s basic-application table limits, and neither accounts for every source of error after installation.

The LM35’s output is relatively small, so ADC step size and reference-voltage accuracy can affect the result. Wiring, electrical noise, sensor placement, thermal contact, and differences between the sensor’s temperature and the object or air being measured can also matter. If closer system-level agreement is important, compare the completed setup with a reliable temperature reference under the conditions in which it will be used.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Measuring below zero

Do not assume the elementary formula and direct single-supply hookup will measure negative temperatures. The output and circuit arrangement must be suitable for the temperatures being measured, and the Arduino input must stay within its permitted voltage range. TI’s support discussion points to a datasheet circuit that lifts the LM35 ground to support negative readings with a single supply. Follow the circuit and component requirements in the datasheet rather than applying the positive-only hookup unchanged; consult TI’s support discussion for that negative-reading context.

Best Value
eMagTech 10x LM35DZ Temperature Sensor IC Acquisition TO-92 for Electronic Device Temperature Control
  • Type: Precision Temperature Sensor.Measuremen accuracy +/- 0.25¡ãC
  • Operating voltage: DC 4 ~ 30 V;Rated for full ?55? to +150?C
  • Model: LM335Z, suitable for remote applications
  • Applications: Ideal for temperature sensing and control applications in a variety of electronic devices.
  • Package: Available in a TO-92 package for easy installatio

Check the exact range and package before building

The LM35 name covers a family, not a single interchangeable package and temperature specification. TI’s product information gives the LM35 a −55°C to 150°C rated range, but family members such as the LM35C have different ratings. Check the suffix, package pinout, supply requirements, and range for the actual device you have before choosing a circuit or interpreting a reading.

For a project limited to ordinary above-zero readings, the basic analog method is simple. Projects that must measure below zero, operate near the sensor’s specified limits, or meet a tighter total error budget need a circuit and measurement plan designed for those conditions.

Quick Recap

Bestseller No. 1
Bridgold 5pcs LM35DZ Analogue Precision Centigrade Temperature Sensor,To-92
Bridgold 5pcs LM35DZ Analogue Precision Centigrade Temperature Sensor,To-92
Rated for full −55˚ to +150˚C range; Suitable for remote applications; Operates from 4 to 30 volts
$9.99
Bestseller No. 2
BOJACK TMP36 Temperature Sensors 3 Pin TMP36GZ High Precision Celsius Temperature Sensor (Pack of 5 Pcs)
BOJACK TMP36 Temperature Sensors 3 Pin TMP36GZ High Precision Celsius Temperature Sensor (Pack of 5 Pcs)
BOJACK High Precision Celsius Temperature Sensor; Operating Voltage:2.7 V - 5.5 V; Rated temperature range: -40 °C-+125 °C
$11.99
Bestseller No. 3
Bridgold 5pcs TMP36GT9Z TMP36 36GT Low Voltage Temperature Sensors,3-Pin.
Bridgold 5pcs TMP36GT9Z TMP36 36GT Low Voltage Temperature Sensors,3-Pin.
Specified −40°C to +125°C, operation to +150°C; Low voltage operation (2.7 V to 5.5 V)
$9.99
Bestseller No. 5
eMagTech 10x LM35DZ Temperature Sensor IC Acquisition TO-92 for Electronic Device Temperature Control
eMagTech 10x LM35DZ Temperature Sensor IC Acquisition TO-92 for Electronic Device Temperature Control
Type: Precision Temperature Sensor.Measuremen accuracy +/- 0.25¡ãC; Operating voltage: DC 4 ~ 30 V;Rated for full ?55? to +150?C
$11.49

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ArduinoElectronicsLM35MicrocontrollersTemperature Sensor

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.