The Raspberry PI board is used as a controller for the thermostat hardware module. A single Raspberry PI board has controls available to drive two zones. Each zone has the following components:
Relay Control Panel:The relay panel has a bank of 8 relays, each individually controlled by a single digital output of the Raspberry PI controller. These relays are capable of switching voltages upto 230 VAC/10A and are therefore suitable to drive the 24 VAC HVAC system controls. Use relay board with the commonly available active low-level control. The software module commands the Raspberry PI board to operate these controls as required to regulate the temperature of the respective zone. Optocoupled relays allow decoupling HVAC control circuitry from the Raspberry pi controls.
Temperature and Humidity Sensor: A HTU21D sensor serves as a temperature and humidity sensor to detect the zone's / outside temperature and humidity setting. The software module periodically commands the Raspberry PI board to obtain the temperature / humidity from this sensor. A Thermocloud thermostat may use one or more of these thermostat hardware modules. Each such module interfaces with the controlling Android device using bluetooth, wifi or a hardwired USB connection.
The Raspberry Pi can control hardware modules for two zones. Each zone in the hardware module controls a relay bank and sensors. A typical HVAC system control circuit comprises a step-down transformer that provides the 24VAC necessary to operate the HVAC system’s controls. The thermostat is responsible for activating and deactivating these HVAC system controls as required to regulate the temperature. The relays in the relay bank switches the 24VAC to the respective HVAC system control, thereby activating that aspect of the HVAC system. The following zone module schematic describes the hardware design of a zone in a hardware module.
In this schematic, the Raspberry Pi obtains its power through a 5V DC power supply. Each I/O pin is connected to the normally-open connector of the relay. This is also connected to the house HVAC system using a conventional thermostat wiring diagram. Each relay and HVAC system obtains its power from the 120 V HVAC power. Relay becomes active when Raspberry Pi GPIO pin is activated by pulled it to logic low level. When the Raspberry Pi gives the command to turn a particular relay on, it closes it’s state, thereby connecting the HVAC power to the required HVAC stage and turning on the stage.
In addition to the relays, the Raspberry PI controller’s I2C interface is used to read the temperature and humidity from the HTU21D sensor. An I2C multiplex is used to switch I2C bus for each HTU21D sensor, as an HTU21D sensor has a fixed slave 7-bit I2C slave address of 0x40. Because a single Raspberry Pi Zero board can only support one I2C sensor, a TCA9548A I2C Multiplexer Module is used to communicate with multiple sensors. To communicate with a particular sensor, the master writes to the control register of the multiplexer which results in switching the Pi I2C bus to the to the desired sensor’s I2C bus. After the multiplexer switches to the I2C bus to the appropriate sensor, Pi can then communicate normally using I2C commands with the appropriate sensor.
It must be noted that by opening up the I2C bus to the terminal block Vs, Ds, Cs, Gs, the hardware is designed to have great flexibility in using different number and types of humidity and temperature sensors in the future. The use of TCA9548A I2C Multiplexer is optional if all these sensors have a unique I2C slave address. If multiple sensors (such as HTU21D ) share the same address, then it is possible to use them using the TCA9548A I2C Multiplexer as described earlier.
The terminal block for a zone hardware module matches a standard HVAC terminal block. Here we list the details of the terminal block.
Name | Purpose |
Rh | Common Heat Supply |
Rc | Common Cold Supply. May be absent - same as Rh |
W1 | Heat Stage-1 relay. W for single stage systems. |
W2 | Heat Stage-2 relay |
W3 | Heat Stage-3 relay |
Y1 | Cooling Stage-1 relay. Y for single stage systems. |
Y2 | Cooling Stage-2 relay |
Y3 | Cooling Stage-3 relay |
G | Fan relay |
Z | Optional Equalizer Baffle |
C | Optional supply common.
Rc, C: 24VAC power for thermostat. |