Heating damper control using ESPHome & Simple PID

Tired of uneven heat/cooling in your house? Let’s replace that dumb Honeywell motor that either fully opens and fully closes our HVAC damper with a smart ESP32 module with a Trinamic controlled coupled to a stepper motor allowing us to set a damper to any position between 0 and 90 degrees. This project includes details on the hardware (ESP PCB, stepper motor, and 3d files) as well as the yaml code to get it running.

This is a work in progress as I fine-tune the PID gains to work for both heat and cool cycles. Advice, questions, comments and critique welcomed.

1 Like

Let’s see if I understand. You adjust the damper so that just the right amount of air flow provides the same temperature in two zones. The air flow itself may be different in the two zones, but that’s what it takes to get the temperature balanced.

And only one thermostat is controlling the HVAC.

What will you do if you want to close off one zone to reduce energy usage? If you had a second damper you could have different temperatures. The program would be exponentially more challenging because you would have to avoid the pole (resonant frequency) of the control system.

So I got lucky in that one large duct that feeds the main bedroom & bathroom has the single damper in it. The remaining, smaller ducts independently feed the 2 guest bedrooms and her office (former bedroom). Main has 3 ceiling vents,while other rooms each have a single vent. So when we have guests or she’s working, I balance using PID by using occupancy sensors in these rooms to detect (Aqara FP300 & a Ecobee remote). I now take the lowest value of these guest rooms and substract it from the main bedroom to get the error.

So you bring up the energy reduction question which is a complex problem but one that we need to solve. At the moment our only option is to disable PID altogether (the HACS simple PID can do this) which keeps the damper wide open and directs 50% of the air to main. What I most want to avoid is to have a situation where forced air has nowhere to go (mostly closed vents) as the back pressure would be damaging to not only the fan but gosh what else? But I can imagine a situation where you could build a inline damper that includes all of the components - imagine a number of flexducts with such a damper controlled by HA… I think it would be pretty efficient.

Here is this morning’s temperatures - it’s only day 2 of tuning but we’re getting there!

As one ventures into the HVAC control rabbit hole, lessons are learned. For starters, a real control system will have a damper for each zone as well as a system to prevent damage due to back flow pressure (either a bypass duct or a variable speed fan motor that senses pressure). Since I am working only with a single damper on a single zone, I’m sort of faking temperature control but I do have options, 3 of them to be specific:

  1. Use PID to balance the temperature between the 2 zones
  2. Close the damper to divert all air flow to Zone 2
  3. Open the damper to have Zone1 as much air as possible.

If you couple these options with presence detection, you have 8 scenarios:

Master Bedroom Office Guest Room Damper Position
Vacant Vacant Vacant Open
Vacant Vacant Occupied Closed
Vacant Occupied Vacant Closed
Vacant Occupied Occupied Closed
Occupied Vacant Vacant Open
Occupied Vacant Occupied PID
Occupied Occupied Vacant PID
Occupied Occupied Occupied PID

Now time to write an automation that handles all 8 ‘scenes’.

Automation for managing the 8 different presence scenarios is written and in the git repo.