Early-2019 note: Still alive! Living in an apartment so not much home hacking to do. I shall return.
A small project to monitor and control my HVAC system. Designed a PCB... need to get it critiqued!
- Arduino code running on a single WeMos D1 Mini.
- Monitoring of the air temperature coming into my HVAC unit (return air) and temperature of air after it's cooled/heated (supply air), including a Blynk notification if the unit isn't performing. All temperature sensors are Maxim/Dallas DS18B20... a mix of probe-style and bare TO-92 package sensors.
- Monitoring of HVAC run status. This is done by tapping the 24VAC t-stat with relays (NTE R14-11A10-24(11)) to give the WeMos dry contacts to monitor. The Blynk app displays if the HVAC is on or off, and how long it's been on or off.
- Sending RA/SA temps and run status to a Phant server on a Raspberry Pi in lieu of data.sparkfun.com (which had uptime issues):
- Install Raspbian and Node.js using Dave Johnson's fantastic guide.
- Install Phant with
sudo npm install -g phant
- Because of this issue:
- Run
sudo git clone https://github.com/stoto/phant.git
to download fixed files (thanks stoto!) - Run
gksudo pcmanfm
to open file manager as root, allowing for drag and drop. - Copy/overwrite the content of stoto's
/phant/lib
into/usr/lib/node_modules/phant/lib
. If this folder doesn't exist, check/usr/local/lib/node_modules/phant/lib
. - Run
phant
. - Edit home.handlebars at '/usr/lib/node_modules/phant/node_modules/phant-manager-http/views' if you'd like to keep your streams from prying eyes.
- Run
- All data that needs to survive a hardware reset is stored to Blynk virtual pins, then synced back after a reset.
- OTA Updates: Using BasicOTA. Learned from this post that a complete power down is required after uploading BasicOTA for the first time. Weird, but whatever. Thank you Ivan!
- 4-channel DC 5V relay switch module (source) providing control of cooling, heating and fan-only modes.
- Future: Replace 24VAC dry contact relays with current monitoring via a SCT-013-030 current transformer (for HVAC run status).
- Future: Air quality monitoring with a true laser particle counter (ideally 2 size ranges (>0.5 & >2.5 microns)). Either in-unit to monitor filter efficiency, and/or exterior (outdoor) and indoor AQMs that prompt for fan-only HVAC operation to utilize MERV 13 filter for air cleaning.
Title | Include | Link |
---|---|---|
Time | Timelib.h | https://github.com/PaulStoffregen/Time |
SimpleTimer | SimpleTimer.h | https://github.com/jfturcot/SimpleTimer |
blynk-library | BlynkSimpleEsp8266.h, WidgetRTC.h, TimeLib.h | https://github.com/blynkkk/blynk-library |
OneWire | OneWire.h | https://github.com/PaulStoffregen/OneWire |
Arduino-Temperature-Control-Library | DallasTemperature.h | https://github.com/milesburton/Arduino-Temperature-Control-Library |
ESP8266 board mgr | N/A | json & instructions |
Many thanks to all the library authors. I know nothing. They do.
HW Pin | GPIO† | Purpose |
---|---|---|
A0 | A0 | Available (todo: current transformer). |
D0 | 16 | Fan control relay (green wire††). |
D1 | 5 | Cooling control relay (yellow wire††). |
D2 | 4 | Heating control relay (white wire††). |
D3 | 0 | T-stat control bypass relay.††† |
D4 | 2 | Available.††† |
D5 | 14 | HVAC fan-only run state. |
D6 | 12 | DS18B20 array. 4.7KΩ pullup. |
D7 | 13 | HVAC cooling/heating motor run state. 10KΩ pullup. Future: Split these two states. |
D8 | 15 | Available.††† |
† ESP8266 GPIO: The pin number used in the IDE.
†† Wire colors correspond to standard HVAC thermostat 4-wire system.
††† About ESP GPIOs and boot modes.
From friend
:
Cool, man.
From kids
:
What is that?
From wife
:
That's nice, honey.
From me
:
It's great to have historical data on outside temperatures and see how they impact the inside, as well as notifications if the return air/supply air delta temperature drops too low or is trending that way. I can at least get a jump on possible refrigerant loss, compressor overheat, or other service issue. I can also set any room's temperature sensor to be a virtual thermostat... from my phone. ZONES! Go team.