LM35 Temperature Sensor with Raspberry Pi

Using LM35 temperature sensor with Raspberry Pi is a relatively simple task once you have a way to read and convert analog signals. Fortunately in my previous project I’ve shown how to build a basic Raspberry Pi voltmeter with ADS1015 chip. So now we just need to connect the LM35 sensor to one of ADC inputs and adjusts the output format and we have a working thermometer in Celsius. Python code is here. Schematic diagram is shown next.

LM35 Temperature Sensor with Raspberry Pi Schematic

For Arduino based design click here. The sensor is outputting 10mv for each 1 Celsius. So a simple normalization for 0-100 C range can be done by dividing the sensor voltage by 10mv. I’ve used LM35DT version in TO-220 package, however most commonly used is a TO-92 variant of LM35 sensor. Pay attention that these 2 packages have different pinout. GND, V+ and Vout are in different location. Make sure to connect them correctly otherwise you can damage the chip and possibly the Raspberry Pi itself as the sensor is powered by +3.3V taken directly from Raspberry board.

LM35-Temperature-Sensor-with-Raspberry-Pi-Board