Close

Quick update

A project log for WiFi AC controller

WiFi-enabled controller for AC units which accept an analogue control signal.

maya-poschMaya Posch 12/01/2017 at 19:490 Comments

Some of those who have been following this project may have noticed that there haven't been updates for a while. There are two reasons for this.

The first reason being that this was a project that was being worked on during 'spare' time at the office and hence mostly shifted into my own spare time. The second reason involves me getting laid off due to changes in the focus of the company, making a primarily low-level, system developer - like yours truly - redundant.

At this point the three AC units (technically Fan Coil Units, or FCUs) have been hooked up to the system for a while, with a simple control service (written in C++ & POCO) controlling the fan speed. This has been working like a charm so far, but has also revealed the glaring weakness in this setup, namely the lack of control over the valves that regulate the water flow into the coils.

These FCUs being the two-pipe type (hot/cold intake and outlet) means that each FCU has a single valve controlled by a thermoelectric actuator (24 VAC), along with a set of valves elsewhere which control the water temperature in an entire section of the building. In order to effectively control this system the control service also needs to be able to:

To this end two more devices were assembled, in prototype form:

An MCP23008 i2c-based GPIO expander along with an ULN2003 are used to control up to 3 relays (limited by the number of physical connectors, the ULN2003 can do up to 7 outputs). These relays (one pictured here as well) then control the 24 VAC to each thermoelectric actuator.

With this little device hooked up to the i2c bus on the existing PCB (as pictured) three FCUs can have both their fans and valves controlled directly by the backend service.

In order to read out and control the water temperature in the entire section, the existing manual switch will be replaced with this little device:

This particular device was a bit of a doozy. Since the electrical box which it will be installed in does not have any wiring going into it other than the four signal wires (center, cooling/auto/heating), it was necessary to add a mains voltage SMPS module, for which a 230 VAC connection will be installed into the electrical box. Bit messy, but there you go.

For this circuit another ULN2003 along with a latching relay (2-coil) was used. The NodeMCU (dead one used for test-fitting pictured) ESP8266 device controls two inputs (1B, 2B) on the ULN2003, which switches the relay between its two positions on both sides.

One side of the relay performs the switching between heating/cooling, with the other side being used by the ESP8266 to read out the current state of the system (active low, with pull-ups enabled on the input pins).

The relay controller has been tested already and will be installed next week. The 'IoT switch', as I have come to call it, will be tested and hopefully installed next week as well. Theoretically that means that along with the updates to the control service the prototype system as a whole will be done: controlling every aspect of these three FCUs in one room.

As I will be leaving the company at the end of this month, I will only have time to complete things that far. The goal is however to also open source the (unified) firmware and related services, along with full documentation. I will endeavor to get all of this together as a complete package.

This includes the PCB design, software and documentation. Here the v1.1 board design is almost done, but untested. There is also the idea to make a more integrated version, with the relay controller on the PCB instead of having it as a separate device.

I would very much like to spend as much time on this project as I have over the past months, but until my life has stabilised itself somewhat, it is unlikely that I will have the opportunity to do so, barring me landing a paid job courtesy of this project or something equally unlikely :)

Discussions