We live in a house that has four heating and cooling zones in it with a Heat Pump that isn’t exactly cheap to run. The different zones makes the electric bill a little less painful in that we can only heat and cool the rooms we need to. For example at night, we keep our bedroom relatively chilly at 68f while I let my office warm up to 80f. While I’m working, I cool my office to 76f and let our bedroom warm up to 80f.
To enable this heating and cooling we have thermostats in each room and dampers that shut off the airflow to the different zones when we don’t need to heat and cool them. The brains for this is a small embedded controller. Our house was built in the early 90’s and the controller is the original one that came with the house. This means the user interface on this is very dated and setting it requires and engineering degree (we’ll not really but I’m the only that knows how to do it and it’s a major pain in the butt). Also since it is so difficult to set, I’m sure we are wasting considerable energy heating and cooling rooms that we don’t have to and really have no way of monitoring the usage.
In addition the only control we had was at the zone level. That means that to cool down one room we needed to cool down all the rooms in the zone. This was a problem in that my office has a lot of computers and takes more to cool down than my wives office. Her room was cold while my room was just relatively comfortable.
Of the past few months I’ve been building a new controller for this, I created my own board base on STM32F407 with the following features:
- Solid State Relays to Control the HVAC systems (cool, fan, compressor)
- Solid State Relays to Open and Close the Dampers for the zones
- Motor Controllers to control vents embedded in each room to heat/cool individual rooms
- Ethernet MagJack and Controller
- Real Time Clock
- MicroSD Storage
- Electric IMP
I have four Insteon wireless thermostats and have also hardwired a number of DHT22 Temperature Sensors so I could monitor temperatures in rooms without wireless thermostat.
So with all this hardware in place I needed some way to monitor the different room temperatures and determine when to turn on the HVAC system, open and close the dampers and vents. Originally my plan was to just program everything on the primary board, but want to make sure I get the kinks worked out of the system first. After all it gets very hot in the Florida summers and my wife wouldn’t appreciate any bugs in the software that would cause our house to get unbearably warm. So I decided to write the controller software in .NET and have something I can easily update and monitor. I needed a home for this and considered running on a PC on my network, but decided on putting this as an Azure Worker Role.
1) Worker Role talks to the controller board and pulls the temperatures
2) It then compares the temperatures to the setpoints at a room level
3) It then determines which rooms and zones need to be cooled
4) After it figures out what it needs to do, it sends commands back to the controller board to activate the heat pump and open/close dampers and vents.
Programming the System is accomplished with a Windows Phone 8 application. This updates the worker role, which in turn saves the settings to Azure Table storage as JSON.
You can take a live look at my system by going to http://lagovista.cloudapp.net:8095/
Over time I’ll add some additional parts to this post as I evolve my system, but feel free to contact me if you want more information or have questions.