Elk M1 Gold as a HVAC Zone Controller

In order to save money on energy and increase the comfort level in my house, I wanted to temperature control multiple zones. Through my research, I found that a complete 5 Zone installation can be quite expensive: http://www.cocoontech.com/index.php?showtopic=4150

Some items like controllable dampers are necessary, but costs incurred from others like the zone controller and extra thermostats could be avoided. I wrote up code for my Elk M1 Gold to basically replace the zone controller and multiple controllable thermostats. I've been running this code on my home system for a few months now and thought that others may want to try it out. This code saved me over $1000 in hardware.

I have 2 HVAC units (one for each floor). The downstairs is mostly open space, so zoning won't really help. I have zoned my upstairs (one bedroom per zone) and with this code I control all 6 zones (1 for downstairs and 5 bedrooms). Currently I am using only 2 controllable thermostats (RCS TR16) and temperature probes for each bedroom. I haven't installed dampers yet.

It was challenging to create a state machine given the limited language of the Elk control panel. Although this code is fairly stable (I haven't made any changes to it in a long time), you should consider this beta code. I haven't fully tested out everything (for example, I don't have the dampers installed yet). If you choose to use this code and experience unexpected behavior, please debug it. You can use the Ethernet module to email you on triggered events or perhaps use CQC to log the changes in outputs and temperatures.

1) Elk M1 Gold with some space for these additional rules. The amount of space that this code takes up depends on a number of things like the number of zones and how many windows you have and what features you want to implement. My system is at about 50% usage including some non HVAC control code.
2) 1 controllable thermostat per HVAC unit. I'm using a RCS TR16.
3) ELK-M1XSP - Elk Serial controller to control the thermostat.
4) 1 temperature sensor per zone. I'm using an ELK-M1ZTSR in most zones. One zone uses a keypad for its temperature sensor.
5) Hardware to control normally opened Dampers. I haven't done this yet, so I don't know what is required here.

1) Each HVAC unit is controlled by one controllable thermostat. Each zone uses a temperature probe (cheaper).
2) The entire floor can go into economy mode when not occupied or via rules. This is independent of zone temperature controls.
3) When a zone needs to be temperature controlled, it can request it.
4) Dampers only close when the zone is within set points and does not need any more cool air or heat or when temperature control is not needed for that zone.
5) Economy Mode is on by default for the floor. Zone comfort control takes over for each zone. This ensure a lowest or highest possible temperature at the thermostat.
6) Heat requests have priority.
7) You can use automation software like CQC to monitor and control the system.
8) Keep physical thermostats synced with controller code. I've had too many failed commands to the thermostats, so I repeat the commands every 5 minutes. I think this might be a bug in the Elk serial interface, so I compensate with my code.
9) Opening windows will shut off the HVAC.
10) HVAC can be controlled by a schedule that is defined on the Elk control panel or via tasks or via arming modes or via presence (motion detectors).
11) Minimum HVAC runtime is defined by the thermostat. The RCS TR16 defaults to 4 minutes.
12) The rooms will continue to receive hot and cold air for 70 seconds after reaching the set point.

Known problems/limitations:
1) If the control panel or software fails while a zone is being heated or cooled, the thermostat may be stuck at a very high or low set point range. Restarting the control panel will reset the thermostat. If the control panel is down while the thermostat is in the heat or cool mode, you will have to manually reset the thermostat's set points. This is a limitation of the architecture.
2) Need to find a way to get the temperature in the return duct. Don't know if the M1ZTSR will work in ducts. Add code to shutoff heat/cold if the return duct exceeds a threshold. Keep the fan running to bring the temperature back to an acceptable range.
3) Need to refine the damper control code to open close dampers if the zone call matches the current HVAC call. We don't want to close dampers while the air is blowing so leave current zones open until the entire HVAC call has ended.

Download and rename the file to *.mht.


  • Elk_HVAC_Zone_Controller.mht.txt
    75.4 KB · Views: 375
I did this in 2006 and posted to the Elk forums so can I claim copyright :D
here's the posting and sorry about loss of formatting but I'm sure you'll figure it out.
"Posted by djenkins6 on 06/20/2006 07:56
I used one RCS TR16 thermostat and temperature sensors in each room connect to the ELK M1 because it's a lot cheaper than a thermostat in each room. I found during heating season I can set the temperature at the thermostat in the centre of the house to 19 degrees C and can still keep the edges of the house at 21 degrees C. heat vents are around the edges of the house with center cold air returns. When I started off in cooling season temperature was going down to 16 degrees upstairs so I had to raise the temperature of the thermostat! I have an additional two temperature sensors, one stuck into the ductwork near the furnace (but not in the plenum because I was afraid of it melting) which is called 'available air' - another one under the insulation of the pipe coming from the A/C coil (the A coil in the plenum) so that it senses if the A/C coil is about to freeze and turns of the cooling. I also fitted bypass dampers so that if most dampers are closed they relieve the pressure and air goes from supply to to the return air duct. Rules I have Set counters to the values of the sensors... 21 WHENEVER EVERY 1 MINUTE THEN SET Up Bedroom (Counter 1) TO TEMPERATURE OF Up Bedroom (Zn 14) THEN SET Up Den (Counter 2) TO TEMPERATURE OF Up Den (Zn 15) THEN SET Dining (Counter 3) TO TEMPERATURE OF Dining Room (Zn 12) THEN SET Living (Counter 4) TO TEMPERATURE OF Living Room (Zn 11) THEN SET Main Bed (Counter 5) TO TEMPERATURE OF Main Bedroom (Zn 10) THEN SET Kitchen (Counter 6) TO TEMPERATURE OF Kitchen (Zn 13) each damper needs four rules, and these work whether in heating or cooling mode 22 WHENEVER EVERY 1 MINUTE AND Up Bedroom (Zn 14) ACTUAL TEMPERATURE IS GREATER THAN Up Bed Rqd (Cust Set 1) AND Avail Air (Zn 16) ACTUAL TEMPERATURE IS LESS THAN Up Bedroom (Counter 1) THEN ACTIVATE OpenUpBed (Task 3) 23 WHENEVER EVERY 1 MINUTE AND Up Bedroom (Zn 14) ACTUAL TEMPERATURE IS GREATER THAN Up Bed Rqd (Cust Set 1) AND Avail Air (Zn 16) ACTUAL TEMPERATURE IS GREATER THAN Up Bedroom (Counter 1) THEN ACTIVATE CloseUpBed (Task 4) 24 WHENEVER EVERY 1 MINUTE AND Up Bedroom (Zn 14) ACTUAL TEMPERATURE IS LESS THAN Up Bed Rqd (Cust Set 1) AND Avail Air (Zn 16) ACTUAL TEMPERATURE IS GREATER THAN Up Bedroom (Counter 1) THEN ACTIVATE OpenUpBed (Task 3) 25 WHENEVER EVERY 1 MINUTE AND Up Bedroom (Zn 14) ACTUAL TEMPERATURE IS LESS THAN Up Bed Rqd (Cust Set 1) AND Avail Air (Zn 16) ACTUAL TEMPERATURE IS LESS THAN Up Bedroom (Counter 1) THEN ACTIVATE CloseUpBed (Task 4) Repeat above for each damper... Finally these two rules stop the A/C coil freezing, and email me, so I know if we have a problem, if it's turning off A/C too often means low pressure in freon or something else wrong. 46 WHENEVER EVERY 1 MINUTE AND AC Coil (Zn 9) ACTUAL TEMPERATURE IS LESS THAN 36 DEG. F. (2 DEG. C.) THEN SET RCS Stat (Tstat 1) OFF THEN SET RCS Stat (Tstat 1) FAN TO ON THEN TURN Output 208 ON THEN SEND EMAIL MESSAGE 1 TO (Email 1) 47 WHENEVER EVERY 1 MINUTE AND Output 208 STATE IS ON AND AC Coil (Zn 9) ACTUAL TEMPERATURE IS GREATER THAN 41 DEG. F. (5 DEG. C.) THEN SET RCS Stat (Tstat 1) TO COOL THEN SET RCS Stat (Tstat 1) FAN TO ON THEN SEND EMAIL MESSAGE 2 TO (Email 2) THEN TURN Output 208 OFF "