LM35 Temperature Sensor With Arduino
by Rachana Jain in Circuits > Arduino
16 Views, 0 Favorites, 0 Comments
LM35 Temperature Sensor With Arduino
.png)
The LM35 temperature sensor is a popular and cost-effective choice for measuring temperature in electronic projects. Known for its simplicity and accuracy, the LM35 provides a linear analog voltage output directly proportional to the temperature in Celsius. It requires no external calibration or signal conditioning, making it an ideal component for Arduino-based applications.
In this tutorial, you’ll learn how to interface the LM35 sensor with an Arduino UNO. We’ll build a real-time temperature monitoring system that measures and displays temperature in both Celsius and Fahrenheit. The readings will be shown on a 16×2 LCD display.
Supplies
Arduino UNO R3
LM35 Temperature Sensor
Resistance
Breadboard
RGB LED
Jumper Wires
USB Cable Type A to B
12V Supply Adapter
LM35 Temperature Sensor

The LM35 is a precision analog temperature sensor that delivers a linear voltage output directly proportional to the ambient temperature in degrees Celsius (°C). It operates over a wide voltage range of 4V to 30V and consumes a very low current of 60 μA, minimizing self-heating and ensuring accurate temperature readings.
One of the key advantages of the LM35 is its 10 mV/°C linear output, which simplifies temperature-to-voltage conversion. This makes it easy to interface with analog-to-digital converters (ADCs) or microcontrollers like the Arduino, without the need for external calibration or signal conditioning. However, when used with 8-bit ADCs such as the ADC0808 or ADC0804, an amplifier may be required for precise 1°C resolution due to the limited ADC resolution.
Despite its benefits, the LM35 has some limitations:
- It cannot directly measure negative temperatures without a dual-polarity power supply. For applications requiring negative temperature sensing, the TMP36 is a more suitable alternative.
- As an analog sensor, it is susceptible to electrical noise, which can degrade accuracy, especially in long cable runs or electrically noisy environments. In such cases, digital sensors like the DS18B20 offer better reliability.
Specifications of LM35 Temperature Sensor
- Operating Voltage: 4V to 30V
- Temperature Range: -55°C to 150°C
- Current Consumption: 60 μA (typical)
- Output Type: Analog
- Accuracy: ±0.5°C (typical)
- Output Impedance: 0.1 Ω for 1 mA load
- Linearity: ±0.25°C
- Sensitivity: 10 mV/°C
LM35 Temperature Sensor Pinout
The LM35 has three pins:
VCC (Power Supply): This is the power supply pin of the LM35.
GND: This is the ground pin.
Out: This is the analog output pin of the sensor.
Interfacing LM35 Temperature Sensor With an Arduino

Let’s begin by connecting the LM35 temperature sensor to an Arduino UNO and display the temperature readings in both Celsius and Fahrenheit on an I2C 16×2 LCD display. Additionally, we’ll use a common cathode RGB LED to visually indicate the temperature range:
- Red for high temperature
- Green for normal temperature
- Blue for low temperature
Sensor and RGB LED Connections
In the wiring setup:
- The Analog output pin of the LM35 is connected to analog pin A0 of the Arduino.
- The VCC pin of the sensor is connected to 5V, and the GND pin is connected to GND of the Arduino.
- A 10 nF capacitor is placed between the output and GND pins of the LM35 to help stabilize the sensor's analog signal and minimize noise.
The common cathode RGB LED is wired as follows:
- Red anode → Arduino pin 10
- Green anode → Arduino pin 8
- Blue anode → Arduino pin 9
- Cathode → GND via a current-limiting resistor
This configuration allows the LED to change colors based on the current temperature.
I2C LCD Connections
We’re using a PCF8574-based I2C module attached to a 16×2 LCD to display the temperature readings.
- The SDA (data) pin of the LCD is connected to Arduino A4
- The SCL (clock) pin is connected to Arduino A5
- The VCC and GND pins of the LCD module are connected to the 5V and GND pins of the Arduino, respectively
Note: Since the I2C communication uses A4 (SDA) and A5 (SCL) pins, these should not be used as regular analog inputs when the I2C LCD is connected.
I2C Address Configuration
Make sure that the A0, A1, and A2 address jumpers on the I2C module are not shorted. This configuration sets the I2C address of the LCD to 0x27, which matches the address used in the Arduino code.
If all three address jumpers (A0, A1, A2) are shorted, the I2C address changes to 0x20, and the code would need to be updated accordingly.
Arduino Code
To learn code description in detail checkout: Interfacing LM35 Temperature Sensor with Arduino