close-circle
Close
0%
0%

WiFi AC controller

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

Similar projects worth following
close
The basic requirement for this project was to develop a solution based around an ESP8266 module which would allow for the AC units at work to be individually controlled. This to replace the existing and highly inadequate 'solution'.

What this new controller offers is room for a NodeMCU board. Four pins of the ESP8266 are used for PWM output, which are each passed through two RC filter stages to smooth it to a DC signal. This signal is then amplified by an LM324D quad opamp.

The board also provides room for an MH-Z19 CO2 sensor, a BME280 temperature sensor breakout board onboard and a further I2C connector to allow for a second, external BME280 sensor.

A 12VDC input is used to power the board. A 5VDC DC-DC converter module down-converts to the input voltage required for the NodeMCU board and the MH-Z19.


The system in its glorious v1.0 version is currently being installed at the office building, with a v1.1 revision being created.

Basic feature list:

  • 12 VDC powered.
  • Based around NodeMCU module.
  • MH-Z19 CO2 sensor option.
  • Internal BME280 sensor option.
  • External BME280 sensor option.
  • Internal HC-SR501 motion sensor option.
  • Four 0 - 10 VDC output channels for AC units.
  • Breakouts for other GPIO pins.
  • Shaped to fit into CamdenBoss CBRS01VWH sensor enclosure (wall/ceiling mount).
  • Dimensions (roughly) 80x80 cm.

The NodeMCU (ESP8266) is an integral part of the board. It handles the WiFi (obviously), and reads out the CO2 and temperature sensors. It also controls the PWM output which drive the four output channels for the AC units.

For our purposes, the ESP8266's firmware uses an MQTT-based solution (based around the Sming framework), which communicates over a TLS-secured connection with a backend which provides the actual intelligence. An active loop is maintained to ensure that each controller unit is performing as intended.

The temperature readings are integrated into the backend logic which controls the AC units, to allow for the optimal temperature to be maintained by careful manipulation of the 1 - 4 AC units connected to a single controller.

There is also an option to add a motion sensor (HC-SR501) to this setup, using the +5 VDC and GPIO pins on the PCB, slotting the motion sensor board into the cut-out in the PCB after cutting an appropriate hole in the enclosure.

  • First node successfully installed

    Maya Posch10/12/2017 at 18:31 0 comments

    Earlier today we had this:

    Which now looks like this:

    That's the first WiFi AC controller node (of 5 total) installed in an open plan office room. Initial tests show that the installed sensors (CO2, temperature, etc.) are functioning as expected, with the three connected AC units being supplied with an analogue signal.

    Outstanding issues at this point with the controller itself are some remaining (software) issues with the PWM routine (causing too much noise and a 1.5VDC lowest output on the controller), and a regression with the TLS handshake, causing an out of memory situation.

    As a result of this the connected AC units are supplied with at least 1.5VDC at the moment, causing their fan to keep spinning, albeit at a slow speed. It's expected that fixes to the firmware to get the PWM frequency at the target 1 KHz will fix this. Ideally an OTA update to the installed unit will suffice to fix this.

    Similarly for the TLS issue. This issue has been reported to the Sming project and I'm looking into it myself as well. Maybe it's going to be as simple to solve as the i2c bus issue which I was dealing with a few days ago, which turned out to be just swapped pin parameters in the i2c initialisation function.

    Another big remaining TODO is the lack of any kind of backend to control and drive the WiFi AC nodes with. This will be rectified over the coming days, so that one no longer has to manually send binary messages via MQTT to the target node :)

    Once this has been completed, and things are more or less working, I'll start working on open sourcing the board design (the v1.1 redesign) and the accompanying software. Stay tuned.


  • First big integration test coming up

    Maya Posch10/03/2017 at 10:30 0 comments

    After a few months of work, planning, learning to love KiCad and the intensely joyful experience of logistics concerning infrastructure in an office building, the first controller nodes will be installed soon. So far one signal wire has been connected to an AC unit (Sabiana SkyStar-ECM), with the following exciting result:

    Thrilling, right? :)

    Also interesting is a comparison with the old (wall-mounted) units that these new units are replacing:

    Old unit is on the left. Obviously.

    In this image the WiFi AC controller unit is controlling the AC unit in the same room, using the wiring the old unit normally connects to. Of note is that the old unit has two outputs (switchable between PWM/analogue) for driving a maximum of two AC units (or multiple chained, as happens in the main room of the office). The new unit can drive four AC units directly.

    During this and next week the last wiring will be installed and the six boards that were assembled so far tested and validated before being put up into their position on the ceiling. Fingers crossed :)

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates