A Temperature/Humidity Datalogger Using the P8X32A

The Thermo-Prop system consists of three modules, all utilizing a Parallax P8X32A (Propeller) microcontroller for a ‘brain’. This project originally started as an upstairs/downstairs thermostat, but has morphed into a data logger. I may eventually add a fourth module to interface to my home HVAC system. Currently the system logs temperature & humidity from the outside and the upstairs of my house, and temperature only from the downstairs of my house. Data is communicated wirelessly via XBee and logged to a microSD card every 15 minutes.
The master unit, Thermo-Master, is located upstairs and contains the microSD card which is used to store the collected data. The Thermo-Master has a DS3231 Real Time Clock with battery backup (BR1225) and uses a Sensirion SHT11 module to read the temperature and humidity. An XBee Wireless RF module is utilized to communicate with the remote units. The user interface consists of a single pushbutton, to set the date and time, and a 4-line by 20-character LCD displaying collected information in the following format:
Thermo-Master 4-line display
The outside unit, Thermo-Slave, is mounted to an outside wall of my house (with a Velcro strip). A location was chosen that is shielded from direct sunlight. The module is powered by 3 AA batteries; typical battery life is on the order of 90 days. A Sensirion SHT11 temperature/humidity sensor is used to measure the outdoors conditions. An XBee Wireless RF module transmits the locally collected data to the Thermo-Master unit. Since it is battery powered, this unit spends most of its time in low-power mode, only ‘waking up’ every 10 minutes (roughly) to take a reading and transmit the data. Without the power-down, the batteries will only last 7-8 days!
The downstairs unit, Thermo-Down, is, obviously, located downstairs. The downstairs unit does not measure relative humidity, only temperature. A DS18B20 One-Wire Digital Thermometer is used for the temperature sensing. An XBee Wireless RF module is employed for communication with the Thermo-Master unit. The user interface consists of a single pushbutton, which requests the current date/time and outside temperature from the Thermo-Master unit, and a 2-line by 16-character LCD with the following information:
Thermo-Down 2-line display
As mentioned, pressing the pushbutton will display the date/time and outside temperature for 5 seconds:
Thermo-Down 2-line display
When reset, the Thermo-Master unit will display the current date and time, updated every second, and the local temperature and humidity, updated every 5 seconds. The downstairs 'DN' and outside 'OUT' data will be blank.
The outdoors unit is the key to the data exchange between the various modules. In the battery-powered Thermo-Slave unit, the Propeller and XBee are put into a low-power mode, with the Propeller doing a slow count. Approximately every 10 minutes, the Propeller powers-up, wakes up the XBee, gets a reading from the SHT11, and transmits the temp/humidity to the Thermo-Master unit. The Propeller then puts the XBee back to bed, and returns to low-power mode.
When the Thermo-Master receives the data from the outside unit, it stores it internally and updates the data on the LCD. It then sends its own (upstairs) temperature to the Thermo-Down unit. The Thermo-Down module will store this information and update the data on its own LCD. It will then transmit its local (downstairs) temperature back to the Thermo-Master unit. The Thermo-Master again stores the data and updates the LCD display.
Every fifteen minutes, on the quarter-hour, the currently stored information is written to a text file on the microSD card; the values are comma-separated, stored in a .CSV file. At midnight, a new file is created, with the filename in the format of yy-mm-dd.csv. When the new file is created, a header line is also written. A small example of a log file:
Date,Time,Upstairs (F),Humidity (%),Downstairs (F),Outside (F),Humidity (%)
02/13/14,00:00, 73.5, 24.8, 68.7, 35.5, 89.8
02/13/14,00:15, 73.8, 24.6, 68.7, 35.3, 89.3
02/13/14,00:30, 74.1, 24.3, 68.6, 34.8, 88.8
02/13/14,00:45, 74.3, 24.0, 68.4, 34.6, 89.6
02/13/14,01:00, 74.5, 23.9, 68.3, 34.2, 90.5
02/13/14,01:15, 74.4, 23.7, 68.3, 34.1, 90.7
02/13/14,01:30, 74.1, 23.8, 68.1, 33.8, 90.4
02/13/14,01:45, 73.9, 23.9, 68.0, 33.5, 90.5
I copy the log files from the microSD card, usually once a week. Data is copied to an Excel workbook (each workbook contains one month of data) with a tab for each day of the month and a summary page at the front. Each day page is identical. A button is provided on the first page to activate a macro to rename the day tabs ('Feb-12', 'Feb-13', etc.). The data file is copied into the appropriate worksheet day. The worksheets are constructed to extract minimum/maximum data, and produce line graphs of temperature and humidity related to time of day, as below:
Thermo-Prop Graphs

Hardware & Software Details:
Thermo-Master Details
Thermo-Slave Details
Thermo-Down Details


 [ Home ]


Last updated:  14 Feb 2014
Web Author:  John Locke
Copyright © 2014 IdleTime Industries - ALL RIGHTS RESERVED