I got a Nest Thermostat recently and it was installed (for free) by my Electricity Supply company. Initial reactions were good, however as time goes on, I’m less and less happy with it. This article covers my initial attempts at getting around some of it’s shortcomings, and future articles will cover more.
One major problem is the control of the circulation pump that’s part of my central heating system. The problem is that when the Nest gets to temperature, the relay in the HeatLink (the part of the Nest system that sits on the front of the boiler and does the AC switching) turns off, and cuts the power to both the pump and the burner. This is not ideal, as the closer radiators to the burner will be at a higher temperature, and the farthest rads will not get any of that heat once the pump is cut off, resulting in a very unbalanced system. One room gets so little hot water, that it’s almost always stone cold. Ideally, the Nest should just control the burner, and the circulation pump should keep going until the temperature of the water going to the radiators drops below a certain value. The other option is to separate the pump AC, and leave it running 24/7, another non-option. So, on the suggestion from my plumber, I devised a system that would measure the flow pipe coming out of the boiler and turn on the pump when the temperature is over a particular value. The plumber actually suggested a temperature difference between flow and return pipes, but I’d only got one spare sensor at the time, and decided to do a prototype with just the one sensor.
There was also an additional issue in that I couldn’t just rely on the temperature of the flow pipe, I also had to turn on the pump when the burner starts, to avoid having no circulation when the burner initially starts, so that requires an extra input to the system, we’ll get to that later.
So, I hooked up a DHT22 temperature sensor to a NodeMCU board (ESP8266 MCU based), loaded up the application to read the temperature every 10 seconds. On attaching the DHT22 to the flow pipe, I could see the temperature get to about 40 degrees C when the burner was on, and when the burner was off, the temperature would drop slowly to 20-25 degrees C over several hours. When the pump was on, this drop was much faster, as the hot water in the system was being pushed around to the colder radiators.
So after the initial measurement phase, I wired up an AC relay board to the NodeMCU, and connected in the circulation pump after disconnecting it from the Nest HeatLink. So the Nest was now free to start and stop the burner, and my new MCU setup was doing the circulation control. I initially set it up just based on temperature. Once the temperature went above 30 degrees C, I’d start the pump, and when the temperature dropped below 28 degrees C, I’d stop the pump. That all seemed to work fine first go.
But there was a concern, and that was what was happening to the system when the burner kicked in from cold, and that effect that would have on the burner until the temperature got to 30 degrees C. A quick text to my plumber and he confirmed my concerns, the pump needs to come on whenever the burner is on, as well as staying on after the burner stops to keep the hot water circulating.
So, I added a 240V to 5V DC power supply onto the output of the Nest HeatLink, and fed the 5V from that into a GPIO pin on the NodeMCU. That acted as a kind of override, so forced the pump on regardless of the temperature. Then after a few minutes, the flow pipe would get up to temperature, and when the power to the burner was eventually killed by the Nest, the temperature algorithm could take over.
if 5V from burner,
the burner is on, turn on pump .
if temp > 32
turn on pump
if temp < 28
turn off pump
So the inputs the the NodeMCU board are
1. DHT22 temperature one-wire sensor
2. GPIO input for 5v PSU from burner
Here’s a picture of the prototype Circulation Pump Controller:
The DHT22 is out of picture top left, cable-tied to an exposed part of the flow pipe. Most of it is covered in grey insulation material.
The temperature graph of the Flow pipe looks something like this:
The sharp rises and falls are when the circulation pump is active, and you can see then the temperature drops below 28 degrees, the rate of fall is much slower, as the pumps is off, and the water just sits where it is.
Note: The DHT22 is not giving an accurate measurement of the water in the pipe, which is more likely to be 60-70 degrees C, but the measured relative temperature is good enough for switching on and off the pump.
The firmware I’m using is a modified version of the Sonoff-MQTT-OTA-Arduino firmware for Sonoff switches
(modified slightly so it will work on NodeMCU boards). Here’s a screen shot:
This excellent software gives me a web interface into the device, and it publishes it’s telemetry at regular intervals to an MQTT topic for storage in my energy monitoring system (EmonCMS running on an AAEON Up-Board).
Although the functionality is available to toggle the pump on and off via the web interface, I rarely use it. I leave the on/off decisions to the sketch running on the NodeMCU board.
Next issue to address is the issue that the Nest thermostat is woefully inadequate at keeping up with the rapid temperature changes in my house. So the rooms get too hot before the thermostat switches off, and too cold before it switches on again. I’m going to have to go behind it’s back and control the burner myself based on the actual temperature in the kitchen as measured by a DHT22 (far more accurate and responds quicker to temperature changes). But that’s for another article. 🙂