Module 2 – Arduino with LM35 temperature sensor

This post is part of a series on Arduino-based energy and climate monitoring.

P1130979

The Texas Instruments LM35 is a temperature sensor with an analog output voltage that is linearly proportional to the temperature. I combined it with an Arduino Pro mini and a RFM12b module. Since I am using a 3.3V Arduino, the RFM12b module can be connected without any voltage level converters.

Using some pin headers I soldered the Pro mini to a small piece of 0.1″ perfboard. The RFM12b has a 2mm pitch and does not fit the perfboard, hence I hot-glued it to the perfboard, making sure it does not touch. On the other side of the board I mounted the LM35 sensor. The whole assembly nicely fits within a case for two 18650 batteries.

P1130981

Power is provided by connecting a rechargeable 18650 LiPo battery to VCC on the programming header of the Arduino. This battery provides nominally 3.7V, which in my experience is close enough for the board to work fine. Since the LM35 provides a temperature output reading that is proportional to the input voltage, it is important that the battery voltage is actually measured. The AVR chips ability to measure the internal 1.1 volt reference can be used to determine VCC.

P1130980

It performs a temperature reading every 62 seconds and transmits it to the central relay module.

You can find the sketch for the Arduino here.

4 thoughts on “Module 2 – Arduino with LM35 temperature sensor

    1. Robert Post author

      Hi Daniel,

      Yes, the 18650 battery is directly connected. However, I am using 3.3 V Arduino’s and not the 5V version. The battery voltage is about 4.2 when completely full, and around 3.7 most of the time, and the 3.3 V Arduino can handle that just fine.

      best, Robert

      Reply
    1. Robert Post author

      Good point. If you look at http://www.ti.com/lit/ds/symlink/lm35.pdf figure 5, you see that at room temperature the minimal supply voltage is specified to slightly lower than 3.7V. Whether the accuracy is as good as it would be with a higher supply voltage I don’t know, but it does give decent temperature readings in my setup. If you want to be sure, you may want to test whether the reading would be different on a 3.3V or a 5V Arduino.

      Reply

Leave a Reply

Your email address will not be published.