Zonnestroompanelen in Nederland

duurzaamheid achter de meter

(23) Constant monitoring/logging via a NodeMCU ESP8266 and the internet of central heating water flow temperature.


Most people in the Netherlands heat their homes in the winter season by way of a central heating (CH) system that consists of a heater (usually a gas furnace), pump, water pipes and radiators. For safety considerations the maximum allowed temperature of the circulating water in such systems is 80 oC. This temperature was fine and even desirable in the old days when home insulation was a farce or did not exist at all. It is still acceptable under conventional circumstances in episodes that there is frost in the air, but usually it is a little bit too high when the home is well insulated or kept warm with a floor heating system. I had a floor heating system installed two years ago in the living area of my home. Upstairs radiators still exist, but these have been retrofitted with thermostat-controlled valves. Heating of the floor occurs through tubes running in loops embedded in the concrete floor slab. Before entering the loops the hot CH water runs through a manifold placed strategically at the beginning of the tubing (figure 1). This manifold reduces floor loop water temperature by mixing water returning from the floor with a small amount of hot water supplied by the furnace. Attached to the manifold is a pump that forces the water through the tube loops.

Figure 1: Manifold and tubing belonging to the floor heating system. Picture taken before the cement floor slab was poured.

In 2018 the Dutch Government decided that in a period of thirty years natural gas as a heating and cooking fuel will be phased out. Needless to say that this decision will cause a turnaround in home heating. One of the proposed solutions to reach this goal is to replace gas CH furnaces by heat pumps. Operational water temperatures, however, in heat pump powered CH systems are significantly lower than those in gas-fired solutions. For me one question is whether my home can switch smoothlessly from the current high-temperature CH to low temperature CH. Can I replace my gas furnace with little effort and investment with a heat pump? Because of the floor heating, the thermostat governing the CH water temperature has already been set lower than the maximum anyway. How low can I turn that thermostat further down towards heat pump operational temperatures without losing comfort? The answer to this question will weigh heavily when the time comes to replace the CH furnace. Thus I needed insight into the dynamics of water temperature in the CH system. Apart from this specific question it is very interesting to know how the water temperature in the CH system behaves in time. These considerations inspired me to start a project to log water temperature in the CH system during the 7-month heating season (October through April). Logging is done with an IOT (Internet of Things) solution: a NodeMCU microcontroller board equipped with wifi, that sends logged data to a server on the internet.



1x Dallas DS18B20 temperature probe
1x NodeMCU ESP8266 microcontroller board
1x TM1637 4-digit 4-segment led display
1 x 4.7 kΩ resistor

1x ESP8266 base
box and wire, micro usb cable

Temperature sensor: Dallas DS18B20

The DS18B20 is a versatile device based on one-wire technology. One big advantage of this temperature sensor is that it can be mounted far away from the microprocessor board, up to a distance of at least 20 meters. This feature is vital since there are some considerations. First, the best spot in my home to position the sensor on a pipe carrying CH water is located some distance away from the nearest power supply. Second, the NodeMCU board has to stay within Wifi range of the internet router. Finally, the NodeMCU needs constant 5V power. This power can be drawn from the wifi router. Based on these constraints I decided to place the NodeMCU board close to the wifi router and bridge the distance to the temperature sensor (5 meters) with three-strand wire. A distance like that is no problem for a DS18B20.

The DS18B20 has an accuracy of 0.5oC. It is a small device (fig. 2; bare sensor). I have applied DS18B20 sensors in several projects. Details of this remarkable sensor are described in those projects.

I stuck a DS18B20 with tape to the CH pipe that supplies hot water to the floor heating manifold and wrapped device and pipe with 13 mm pipe insulation. Wires from the sensor to the NodeMCU were installed neatly out of view.

Microcontroller board: NodeMCU ESP8266

Previously I monitored temperatures in the floor loops in the living room live with an Arduino equipped with a TFT display. Data generated by the Arduino can be stored in several ways. An advantage of storing data in the cloud over a SD card is that instant monitoring can conveniently be achieved on a smartphone while at the same time the data are stored a server in the internet.

The NodeMCU ESP8266 microcontroller board is an economic and robust platform that easily connects via wifi with the internet. Because of its good compatibility with Arduino equipment and with the Arduino user interface, existing sensors can be used and existing sketches adapted to the specific monitoring. I purchased an additional base board for the NodeMCU because these are tidy devices and, most of all, they allow easy replacement of the microcontroller board if necessary. The assembly of microcontroller board / base board was placed inside a plastic container, with the display mounted on the lid of the box (figure 4). An opening had been cut in the wall of the box as well as a hole in the lid, to allow wires to get in and out.

Figure 3. Main components and basic wiring of the monitoring system: DS18B20 sensor, Lua NodeMCU microcontroller board, 4-digit 7-segment led display.


ThingSpeak is a service offered on the internet by MathWorks. According to its developers, “ThingSpeak is an open source IOT application with an API (application programming interface). ThingSpeak encompasses the creation of sensor logging applications, location tracking applications, and a social network of things with status updates” (source: wikipedia – search term <ThingSpeak>). In order to use ThingSpeak, one has to register to obtain an API key / password combination. Next, channels can be named and configured at thingspeak.com to receive and display data. In this example, data are exported from the NodeMCU board to a channel at ThingSpeak named ‘DS18B20’.

The instructions in the sketch consist of three groups:

  1. Connect via wifi to the local area network (SSID, password)
  2. Identify the microcontroller to ThingSpeak (API ID, password)
  3. Cycle through the routine of acquiring temperature data. Every minute the data is relayed via wifi, the router and the internet to a server run by ThingSpeak, and stored for later consultation.

After the assemblage

Figure 4 shows the completed design placed inside the electricity meter cabinet of my home, with various wires running to peripheral components. Typical logging data for March 4, 2018, extracted from a downloaded data file from the Thingspeak server, is also shown in the figure. That day was a cold day in my hometown, with a minimum temperature of -3.2 degrees Celsius and a maximum temperature of +2.0 degrees Celsius.

 Figure 4. Completely assembled and operational monitoring station


As can be seen in the registration in figure 4, on March 4, 2108 the (programmed) room thermostat switched the central heating on at 05:00 in the early morning. Water temperature in the CH supply pipe rose to 43.5 oC before leveling off. Apparently the furnace was triggered to supply more hot water when the temperature had dropped to 41 oC to supply hot water. Then a cyclic episode started in which water temperature stayed within a 1.5 degrees temperature range around 42 oC. The maximum water temperature in my CH system was that day programmed to be 50oC, and the room thermostat was set at 21 oC. Independent measurement of the temperature in the attic showed a stable 19 oC. The graph implies that the temperature of the water supplied to the floor tubing manifold hovered that (cold) day around 42 degrees and that a continuous demand for heat existed. Furthermore, in spite of the consideration that the temperatures of radiators in the rest of the home can not exceed that of CH water temperature, the home still kept comfortably kept warm. That is good news since a CH water temperature of 42 oC is manageable for a heat pump. Conclusion is therefore that I can replace my gas-fired CH system with a heat pump, without risking losing comfort in the home. To run the system with even lower CH water temperature it might be worth inspecting home insulation to further reduce heat loss.


The construction of a device that 24/7 monitors the temperature of water supplied by the CH furnace to the floor heating manifold was successful. There are two principal components: a DS18B20 temperature sensor and a NodeMCU board, and there is one auxiliary device just for the sake of convenience: the 7-segment led display for acute live monitoring. The wifi signal is strong enough to pass the lid of the plastic container that houses the NodeMCU (see figure 4). The wifi router is situated one shelf up in the same cabinet as the NodeMCU.

With one temperature registration logged every 60 seconds to the server at Thingspeak, while the server adds a timestamp and a sequential number, every 24h period will accumulate  24 x 60 x 3 = 4,320 data points. In one month, 4,320 x 31 = 133,920 data points will have been accumulated. Seven months of uninterrupted data collection would build up a file containing 937,440 data points. Importing such a massive amount of data into a spreadsheet can be problematic. To prevent the accumulation of data into unmanageable amounts, data files are downloaded to a local hard drive every month and subsequently cleared from the Thingspeak server.

Downloadable sketch: ESP8266_DS18B20_7sg_display_T_speak.ino (zip file)