This is a project that have been in the planning stages for the last couple of years, as I wanted to "modernize" our floor heating system, from an electromechanical switch to something MySensorized.
The old thermostat consists of a electrically operated valve, and a sensor that contains a relay, the temperature is controlled by a small screw on top, and it is hard to hit the right values as just a notch to the wrong side it is either too cold, or too hot.
One of the things that had kept me back, was actually the building phase, as soon as I have to build a birdsnest of something (like using regular arduino, and add wires to connect the radio etc.) I tend to keep my self from doing it, it's too much hassle and I have too many projects going on :)
I had an early prototype of the sensebender gateway laying in the parts bin, so I used that to build my setup.. (probably way overkill, but it has the radio connector LDO regulator etc. in place for the radio). One of the added advantages of using the gateway (SAMD based) is that it has an RTC onboard, which makes timing a lot easier, I use the RTC for determining when I report temperatures, and also in the statemachine when I have states that run for a specific time.
The following hardware parts is used:
Relays are connected to MYSX_D3_INT and MYSX_D4_INT, while onewire bus is connected to MYSX_A1. I have chosen to use all 3 pins on the DS1820's, so I have constant power to them.
The DS1820 sensors are attahced to various points in my heating system,
The two relays are used to control the valve for letting hot water into the loop, and for controlling the circulation pump.
The enclosed sketch implements a simple statemachine, with 6 states:
All of the above is now controlled via domoticz, measurement data is also stored in an influx database, so I can create nice graphs with grafana
Name | Size | # Downloads |
---|---|---|
heatState.cpp | 4.31 kB | 547 |
heatState.h | 2.18 kB | 484 |
heatcontroler.ino | 6.42 kB | 613 |