This is a shortened translation from Russian of my article published in Radiolubitel magazine, no. 7 (2009), pp. 20-22.
The device is intended for measuring the air temperature and relative humidity in the range -9.99°C - 99.9°C and 1% - 99%, respectively. It is based on Sensirion SHT-15 sensor and its accuracy is determined by the accuracy of this sensor (±0.5°C for temperature and ±2% for humidity). The temperature range matches the one of the used LCD. A nice feature of this device is a pretty low power consumption (22μA in average) which allows it to work for several years from a single AAA battery. The temperature is displayed with a 0.1°C resolution and the humidity - as an integer. The temperature and humidity measurements are alternating with a period of 8 seconds.
Measuring temperature | Measuring humidity | |
Although the sensor DD2 provides a 14-bit and 12-bit resolution for the temperature and humidity readings, we use it with a reduced resolution of 12 and 8 bits, respectively. The lower resolution does not affect the accuracy in our application, but reduces the power consumption in a factor of 2.5. The sensor communicates with a microcontroller via an I2C-kind interface. The pull-up resistor is only needed for the data line, as the sensor works as a slave device only.
The microcontroller DD3 (TI MSP430F4260) contains a built-in LCD driver and consumes less that 5 μA in a sleep mode LPM3 if powered from 3.3V. It runs from a 32.768 KHz crystal and has a PLL that boost up the clock to about 1 MHz in active mode. The LCD driver works with bias 1/2, which provides a more convenient angle for reading the display, compared with the recommended bias 1/3 mode.
The device is powered from a DC-DC converter built on TPS60312 which provides nominal 3.3V for the sensor, microcontroller and the LCD. The converter works in the snooze mode that significantly improves its efficiency for low current consumption. It starts from input voltage in the range 0.9 - 1.8 V. The standard application of TPS60312 assumes 5 capacitors (C1 - C3 and C7, C8).
The microcontroller code is written in assembly language and is intended for compilation with EW430 IDE. The algorithm of linearization and thermo-compensation of the sensor readings is slightly different from the one in the data-sheet, see here for details. The processing takes just 600 CPU cycles, or about 600 μsec. The main program cycle consists of alternating reading of temperature or humidity from sensor and converting them into BCD representation for displaying. After updating the display the CPU enter the LPM3 sleep mode, when its only working peripheral devices are the timer and the LCD driver. The timer provides an interrupt every 2 seconds that awakes the CPU. At the end of the main loop we count for 4 such interrupts to perform the next measurement in 8 seconds.
Schematic | PCB front | PCB back | ||
The unit is assembled on a 2-sided PCB. The foil on one side is used as a ground plane. The PCB is embedded in a plastic enclosure of size 76x50x27 mm. The front and side panels have holes for the LCD (Varitronix VIM-404) and the sensor, respectively. The PCB is mounted inside the case on 5mm posts which are epoxy glued to the enclosure. The sensor hangs on 4 wire posts bended 90° in order to minimize the thermal contact with the PCB. The battery holder is glued to the enclosure door on the back. All capacitors are resistors are in 0603 packages. The crystal is Abracon ABS07-32.768KHZ-T and the programming connector is Sullins LPPB071NFSC-RC.
We used MSP-FET430UIF programmer for loading the code into the microcontroller. It has a 14-pin connector, which is too large for our device. Moreover, just 7 pins out of 14 are used for programming (and debugging). To interface with the programmer we made two adapters shown below, which slide one into the other. Actually, they could be combined in one, but we also use them separately to program other devices.
Programming adapters | Programming adapters | |
In order to estimate the average power consumption we used the approach published in TI Application Report SLAA398 Powering an MSP430 From a Single Battery Cell by M. Seaman. The main program cycle starts with sending a temperature conversion request to the sensor. This takes 343 μsec while the circuit draws 1.9mA from battery. Next, the microcontroller goes into LPM3 mode for a period of 80 msec of waiting for the end of conversion. The drawn current drops down to 1.4mA. After that the microcontroller pulls the data from sensor, which takes 431 μsec under current consumption of 1.9mA. As the data is on board, it is needed to be formatted, which takes about 200μsec. Since the sensor goes to the sleep mode the drawn current sinks to 1.3mA. Upon updating the display, the MCU goes into LPM3 sleep mode again for about 8 seconds. During this time the entire circuit draws just 13μA form battery. Therefore, for the average current consumption we have:
Iave = (1900·342 + 1400·80000 + 1900·431 + 1300·200 + 13·8000000) / (342 + 80000 + 431 + 200 + 8000000) ≈ 27μA.
A similar analysis of the current consumption for the humidity measuring mode leads to 17μA. The sensor only needs 20msec for the humidity conversion compared with 80msec for the temperature. That's why the power consumption in this mode is lower. Since both modes take about the same time (8 sec), the average current consumption in 16 sec is (27 + 17) / 2 = 22μA.
Therefore, if the device is powered from a AAA size battery of capacity 1000mA·h, it will work non-stop for 1000 / 0.022 ≈ 45454 hours, or about 5 years. This analysis, however, does not take into consideration such factors as dropping the battery voltage during its lifetime (which leads to at least proportional increase of drawn current), battery self-discharge, and others. Anyway, one should expect the device to work from a single battery cell for several years. This time can be noticeably increased by using a AA size battery.
The next image shows a comparison of this device with two commercial devices manufactured by different companies. Thay are placed at a window and protected from behind with a black shirm that prevents them from heating by the sun. As it is seen, the results are very similar.
Humidity comparison test | Temperature comparison test | |
Last modified:Mon, Jan 23, 2023.