Circuits / Microcontrollers
Arduino UNO: LM35 thermometer
The LM35 turns temperature into 10 mV per °C; the ADC turns that voltage into a number, and the program back into degrees

Tap a part to see its voltages and currents. It is a model, not a measurement.
What do you need?
- Development board Arduino UNOSearch on Amazon
- Temperature sensor LM35DZSearch on Amazon
- Jumper wires × 4Search on Amazon
- BreadboardSearch on Amazon
How does an Arduino read the temperature from an LM35?
The LM35 has three pins: power, ground and an output that gives 10 mV for each degree Celsius, so 250 mV at 25 °C and 1 V at 100 °C. It draws only about 56 µA, too little to warm itself noticeably. Its output goes to A0. analogRead turns that voltage into a number from 0 to 1023 for 0 to 5 V, so each step is about 4.9 mV, nearly half a degree. At 25 °C the reading is 51. The program undoes both conversions: reading × 5.0 / 1023.0 gives volts, and volts × 100 gives degrees. With exactly 5 V, the serial monitor shows 24.93 C: the sensor is not wrong, that is the step nearest to 25. At 100 °C the model shows 100.20 C; a real board, about 99.7 C. This thermometer can only tell half degrees apart. The LM35DZ is rated from 0 to 100 °C, and with this wiring, on a single supply, a real one works down to about 2 °C.
Values from the Protoboard ISO simulation: a model, not a bench measurement.
Hear about the next circuit
One email when a new circuit is out, about twice a month. Nothing else.