Presentation

rWCHC is a project aimed at implementing a versatile weather-compensated central heating controller. The goal is to provide smart, accurate and optimal temperature control based on outdoor temperature variations, building structure and occupant habits, in order to maximize comfort and reduce power usage (minimize both the impact on the environment and the energy bill). The system is designed to be scalable and remote operable (via internet connection).

This project is composed of two parts: a custom-designed hardware module (the topic of this page) to perform the actual power control on heating appliances, and a software module (described here).

The software module is meant to run on a Raspberry Pi host to perform all computations and enhanced logic control. The rPi host also provides power to the hardware module which doesn’t need an external power supply.

This project stemmed from my need for a reliable and highly configurable controller after having had a bad experience with a brand-name device.

Licensing

This project falls under a different licensing scheme than the rest of this website. Please read this section carefully.

  • The hardware part (incl. firmware) of this project is currently all rights reserved.
  • The software part (excl. firmware) of this project is currently all rights reserved.

I am still considering suitable licensing schemes at this time. If you are interested in this project feel free to get in touch.

Disclaimer

The information and methods described herein are provided “AS-IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. Use the concepts, examples and information at your own risk. There may be errors and inaccuracies, that could be damaging to your devices. Proceed with caution, and although it is highly unlikely that accidents will happen because of following advice or procedures described in this document, the author does not take any responsibility for any damage claimed to be caused by doing so.

Design goals

My design goals are simple. The system should be:

  • Safe
  • Reliable
  • Versatile
  • Affordable
  • KISS design

This is reflected in the list of hardware features.

The system is geared toward a “set and forget” approach, only requiring some attention at initial setup time.

Hardware

The hardware design guidelines reflect several constraints:

  • Safety: the hardware must be safe to use and have safe failure modes
  • Reliability: the hardware must have a long service life (hence favoring solid-state throughout the design)
  • Power budget: the hardware must be entirely powered from the rPi’s power rails, which have a limited capacity
  • Efficiency: the hardware must consume as little energy as possible, in both the logic section and the power control section
  • Robustness: the hardware must cope with interferences (including high energy transients), in particular coming from the mains
  • Flexibility: the hardware must be adaptable to a variety of installation configurations
  • Form factor: the hardware must be small to reduce production costs and associated costs (casing), yet easy to install

For the current prototype, the choice of THT with a limited number of SMT devices has been made for greater ease of assembly. This prototype uses common components (which are easy and cheap to procure), with the exceptions of a specific high performance analog switch, a level-shifter IC for interfacing with the rPi’s GPIOs, and a PIC microcontroller.

Hardware features

The current prototype hardware features:

  • Up to 15 freely assignable RTD 2-wire sensor inputs
  • Up to 12 freely assignable Triac output channels, single phase with a maximum current budget of 5A total (fuse protected)
  • Up to 2 freely assignable Relay output channels, potential free (rated 5A/250VAC max each)
  • 1 2x16 alphanumeric LCD display with PWM backlight control, fully R/W addressable
  • 2 freely assignable tactile switches
  • 1 piezo buzzer for audible feedback (switch click and alarm)
  • 1 raspberrypi-compatible header connector for interfacing with any model of Raspberry Pi
  • Automatic failsafe fallback in case of disconnection from the host controlling software
  • Host powered (no external power supply)

Layout

Here’s a compact two-sided through-hole prototype layout that fits on 150 x 100 mm PCB.

board

Comments

Since I’m not quite clear yet on the licensing of this device I’ll keep this section short.

This is a prototype layout, so the focus has been put on ease of hand-assembly and testing.

Two distinct sections are clearly separated: the “high” voltage control section, at the bottom (galvanically isolated from the control section via optocouplers and relays), with thick, short traces to handle the rated amperage and sufficient inter-trace spacing to avoid arcing. Because the mains voltage feed trace is both a bit narrower and longer than ideal for the chosen copper thickness (1oz), I arranged to bring the mains into that trace at midpoint: not necessarily very elegant, but effective nonetheless. In a more refined design, the mains voltage section would probably live on its own PCB (with a thicker copper layer and a more adequate layout).

On the triac side, the PCB has room for a snubber network for each triac, in case the selected snubberless triacs proved not capable of operating without it. The two relays also have a spot for a MOV suppressor.

The upper part of the PCB handles the user interface, the digital control logic circuitry and the analog sensor measurement circuitry. Again, due to the prototyping constraints, tradeoffs had to be made, but special attention has been paid to limit as much as possible noise pollution on the analog side: a separate VCC feed and separate ground plane are used, and the incursion of digital signals into the analog section is kept to the bare minimum. Fast switching signals (including the PIC MCU, the 2x16 LCD and the RaspberryPi GPIO interface) are placed as far as possible from the analog signal processing part. Attention has also been paid to return currents in the ground plane and plane disruptions have been carefully evaluated.

On the analog side, besides a high performance analog switch, the circuitry is kept to a minimum with a current source and a filter to remove coupled noise caught into the – typically unshielded – sensor wiring (e.g. mains-induced 50Hz and switching noise).

Due to the space, accessibility and safety constraints, components are placed on both sides of the PCB. This also reflects ventilation requirements for the triacs which are not heat-sinked in this prototype, and the design requirement that the user interface be straightforward, legible and safe to use (the PCB was designed from the start for integration in an acrylic case).

Finally, the design can operate correctly with 26-pin raspi GPIO header (original Rev1 “A” and “B” models).

Software

The brain of the system lives in a software daemon that is now described on its own page.

Picture of a completed unit

This prototype unit has 4 (“snubberless”) Triac channels and 2 Relay channels implemented and is fitted in a custom-made clear acrylic case.

front
back

Nylon spacers are used on the top side for extra safety.