| README.md | ||
mUART Failsafe Interposer
This repository contains firmware and hardware designs for PCBs that can be used with the mUART components in ESPHome. The PCBs provide interfaces for the UART links to the heat pump/air handler and thermostat (using CN105-style connectors), and implement a 'failsafe' mode ensuring that the HP/AH and the thermostat can communicate with each other even if the ESPHome 'host' is not operating properly (or not connected at all). They are designed to be interposed between the heat pump/air handler and the thermostat.
Design
The 'failsafe' feature is implemented by using four analog multiplexer chips (each chip can route either of two signals to its input/output). These are used to either connect the UART TX/RX signals between the HP/AH and thermostat (the 'bypass' mode), or to connect them to the GPIOs on the ESPHome device (the 'host' mode, so that the mUART software can communicate with the HP/AH and thermostat). At power-up, two of the multiplexers connect the UART signals in 'bypass' mode and the other two multiplexers are disabled.
In addition to the multiplexers there is an MSP430 microcontroller running a very small program (see Firmware below). The MSP430 can switch the multiplexers into 'host' mode or allow them to fall back to 'bypass' mode, depending on whether it receives periodic 'alive' signals (pulses on a GPIO) from the ESPHome device. By default it requires the ESPHome device to send at least one pulse every four seconds; if no pulse is received during a four-second period, the multiplexers will switch back to 'bypass' mode. As long as the ESPHome device's software is operating correctly and sending periodic pulses, it will be able to communicate with the HP/AH and the thermostat. This also means that the ESPHome device must send an initial pulse when it starts up in order to switch the multiplexers into 'host' mode; the example configuration below shows one way to do that.
Firmware
The firmware is a C program which runs on the MSP430. It can be used with any variant of the MSP430 low-cost mixed-signal MCUs (FR2000, FR2100, FR2110, or FR2111) with no code changes.
Hardware
Olimex UEXT Adapter


The Olimex UEXT Adapter board is designed to be used with an Olimex ESP32-based host board that has a UEXT connector. However, since the host connections are standard header pins, it can be used with any ESP32-based board by using jumper wires.
The board contains the above-mentioned CN105-style connectors, the analog multiplexers and MSP430, 3.3V-to-5V level shifters, and various status LEDs.
ESPHome Example Configuration
(coming soon)
Credits
"Standing on the shoulders of giants" could not be more true than it is in the open source hardware and software community; this project relies on many wonderful tools and libraries produced by the global open source hardware and software community. I've listed many of them below, but if I've overlooked any please do not be offended :-)
