In this project we designed and built a temperature+humidity sensor that could be locally accessed with buttons and remotely accessed via a web interface. The purpose of the sensor is to monitor the temperature and humidity of a solar system's battery pack. The sensor maintains 24 hour history (minimum and maximum) for temperature and relative humidity. The design features the following hardware components:

Software Design

The system runs on the Parallax Propeller chip. The Propeller chip is an 8 core, no interrupts, shared memory cpu. The project software is written in C (other languages supported by the Propeller include Spin, assembler, and BlocklyProp). The software design takes advantage of multiple cores to accomplish tasks concurrently. The functionality is divided among the cores as follows:

The temperature and humidity is sampled every 2 seconds. The current temperature and humidity as well as the 24 hour maximum and minimum temperature and humidity are displayed on both the OLED and via a web page. Since the design does not include a RTC, we use a cog as a software timer/clock for managing the 24 hour history (we divide the system oscillator which is running at 80 MHz). Buttons on the board are used to reset the 24 hour history, display the temperature history, and display the humidity history. LEDs indicate when the temperature is updated, humidity is updated, when a history reset is requested, and when the sensor is active (heartbeat). The PIR sensor is used to determine when the display should be on or sleeping (screen saver). The 802.11 b/g/n device is configured as an access point with a RFC 1918 address. All of the temperature and humidity data is available on a web page served over WiFi.

Printed Circuit Board (pcb)

front of pcb
Front of pcb (revision A)
back of pcb
Back of pcb (revision A)

Assembled board

completed sensor pcb completed sensor pcb
Front of completed temperature humidity sensor Back of completed temperature humidity sensor

Component datasheets & Schematic

Bill of Materials

Item Description
CPU Parallax Propeller, 40 pin QFP
Motion sensor Panasonic PIR sensor, 5M, Digital
Resistor 47K, 1%, 1/4W
Temperature/Humidity CM2302 Digital temperature/humidity sensor
Resistor 4.7K, 1%, 1/4W
Display SSD1331 OLED, 95x64
Oscillator (clock) 5 MHz 20pf crystal, PTH
Non-volatile memory 256Kb I2C EEPROM
Resistors 10K resistor, 1%, 1/2W (5)
OLED connector Molex 8 pin, right angle connector
Temp/Humid connector Molex 4 pin, right angle connector
WiFi module ESP8266
Power supply 7.5 VDC, 2A, 15W wall wart
Power jack DC power barrel connector
Power regulation LDO Voltage Regulator, 5V, 1A
Power regulation LDO Voltage Regulator, 3.3V, 1A
Power regulation 4.7 uf, 25V, 10%, MLCC (4)
Push button 6mm button, PTH (4)
Resistors 150 Ohm, 1%, 1/2W (4)
Status indicators LED, SMD orange (4)
Resistors 100 Ohm, 1%, 1/2W (4)

Copyright © 2019 James Jerkins, Ph.D, CISSP

08/03/2019