Blogs
LM35DZ Temperature Sensor
LM35DZ Precision Analog Temperature Sensor
Linear +10mV/°C Output for Accurate Temperature Measurement
Introduction
The LM35DZ is a precision integrated-circuit temperature sensor that provides an analog output voltage linearly proportional to the Celsius temperature. With ±0.5°C accuracy (at 25°C) and no external calibration required, it’s ideal for environmental monitoring, HVAC systems, and industrial applications.
Key Features
Linear Output
+10mV per °C (0°C = 0V)
High Accuracy
±0.5°C at 25°C (typical)
Simple Interface
Single analog output
Low Power
60μA current draw (typical)
Technical Specifications
Temperature Range | 0°C to +100°C (DZ version) |
---|---|
Output Scale Factor | +10.0mV/°C |
Accuracy | ±0.5°C at 25°C |
Supply Voltage | 4V to 30V (5V typical) |
Current Drain | 60μA (typical) |
Package | TO-92 (3-pin) |
Pin Configuration (TO-92 Package)

Pin | Name | Description | Arduino Connection |
---|---|---|---|
1 | VCC | Power Supply (4-30V) | 5V |
2 | VOUT | Analog Output | A0 |
3 | GND | Ground | GND |
Note: Flat side of TO-92 package faces toward you when pins point downward
Basic Wiring (Arduino)

1 2 3 4 5 6 7 |
// Basic Connections: // VCC → 5V // VOUT → A0 (or any analog input) // GND → GND // Optional: Add 0.1μF capacitor between VCC and GND // for noise reduction in electrically noisy environments |
Temperature Measurement Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
const int sensorPin = A0; void setup() { Serial.begin(9600); } void loop() { // Read analog voltage (0-1023) int sensorValue = analogRead(sensorPin); // Convert to voltage (5V reference) float voltage = sensorValue * (5.0 / 1023.0); // Convert to temperature (10mV per °C) float temperature = voltage * 100; Serial.print("Temperature: "); Serial.print(temperature); Serial.println(" °C"); delay(1000); } |
Advanced Applications
Negative Temperature Measurement
1 2 3 4 5 |
// For -55°C to +150°C range: // Use LM35CZ version with dual supply // Connect VCC to +5V, GND to -5V // Output will be 0V at 0°C, positive for // temperatures above zero, negative below |
Improved Resolution
1 2 3 4 |
// Use Arduino's internal 1.1V reference analogReference(INTERNAL); // 1.1V on ATmega // Now 1.1V = 1023, giving ~0.1°C resolution // in the 0-110°C range |
Multiple Sensors
1 2 3 4 5 6 7 8 9 10 |
// Array of sensor pins const int sensorPins[] = {A0,A1,A2,A3}; float temperatures[4]; void readTemperatures() { for(int i=0; i<4; i++) { int val = analogRead(sensorPins[i]); temperatures[i] = (val * (5.0/1023.0)) * 100; } } |
Temperature Averaging
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
// Moving average filter #define READINGS 10 float tempHistory[READINGS]; int index = 0; float getFilteredTemp() { tempHistory[index] = temperature; index = (index + 1) % READINGS; float sum = 0; for(int i=0; i<READINGS; i++) { sum += tempHistory[i]; } return sum / READINGS; } |
Troubleshooting
Incorrect Readings
- Verify wiring (VCC, GND, VOUT)
- Check for proper voltage at VCC pin
- Ensure sensor isn’t self-heating (limit current)
Noisy Output
- Add 0.1μF ceramic capacitor near sensor
- Use shorter wires between sensor and Arduino
- Implement software averaging
Zero Voltage at Room Temp
- Check for reversed power supply
- Verify sensor isn’t damaged (check continuity)
- Test with known good sensor