Searching for a new heating system is a complex process. Without outside help, it can be hard to choose the right technology for your building. Help can come from a trusted heating engineer or an energy consultant. The recommendations obtained in this way are sometimes more suitable and sometimes less suitable for the existing building fabric. In the case of relatively new buildings, they are usually accurate. However, if the building is more than 40 years old, it is difficult to recommend the right measures. Due to a lack of knowledge, radical solutions such as installing underfloor heating are often recommended. While this will certainly make the old building warm, the costs can quickly run into five figures.

In order to select the right technology, simply monitor and record the flow and return temperatures delivered by the old heating system. This will quickly tell you what the new system needs to deliver. In addition, a second device can record room and outside temperatures and relate them to the flow temperature. This is precisely the area in which the following project comes in: the automation of the process of acquiring data. This is because old heating systems only have analogue thermometers, if they have any at all, which makes temperature measurement complicated.
Effort
Suitable for: Beginners with soldering experience and good Arduino knowledge
Cost: approx. 35.– € without housing
Time required:
- PCB assembly/wiring: 2 hours
- PCB production: 1 hour
- Software installation: 15 minutes
What you need:
- Parts list (reichelt shopping basket) excluding mechanical parts (housing, screws, etc.)
- Project file download:
- Tools:
- Soldering iron, screwdriver and side cutters
- Equipment for circuit board production (image exposure unit, etching equipment) or assembly on a breadboard
- Sprint Layout Viewer (freeware version) & layout file from the download directory
- Software
- Arduino IDE 1.8.19 incl. libraries according to sketch
- Sketch from the download directory incl. data
- WinSCP (FTP client)
- Spreadsheet or Mathplot (Python)
Software
D1 MINI
The heart of the circuit is the D1 MINI. This component combines an ESP8266 processor with additional components that connect the processor to the outside world via the IO ports, through which signals are sent and received. The D1 MINI also has bootloader software that can be used to import your own programmes via a micro USB connection. This requires a programming environment; in this case, the widely used Arduino programming environment (version 1.8.19, for example) can be used. However, a few libraries must be added to the environment for this project:1. NTP-Client
The exact time is required for the timestamp of the measurements, which is obtained from a round-robin server group on the internet in Germany. Round-robin means that if one server fails, another server takes over its tasks. The round robin list specifies which server this is. No additional library needs to be installed to use this service, as the function is part of the Arduino environment.
2. FTP server
Communication software is required to retrieve measurement data from Arduino memory. In our case, the FTP protocol is used, which has been added as an extension to the Arduino environment.
This software can be downloaded from the internet via the following link: https://github.com/xreef/SimpleFTPServer. The Arduino environment is extended with this function using the command: #include <SimpleFTPServer.h>
Tip: Data can be transferred to a PC for further use via a programme such as WinSCP. Communication is password-protected via port 21. The password is located in the software’s source code and can be changed there.
3. Web server
As with the FTP server, the web server must be installed. This is done with the following command: #include <ESP8266WebServer.h> The required software can be downloaded here:
The SSID and password must be entered directly into lines 56 and 57 of the source code, as a Wi-Fi manager cannot be used due to memory constraints. Information on programming the web server can be found in the source code.
4. Little FS file system
The next important feature is the file system for managing measurement data. In the Arduino environment, this software is called Little FS. It manages the data and transfers it to an FTP server for transmission to a PC. The link to the software is here:
https://randomnerdtutorials.com/install-esp8266-nodemcu-littlefs-arduino/
Installation is slightly unusual, so here is a brief explanation for Windows PCs:
- Go to https://github.com/earlephilhower/arduino-esp8266littlefs-plugin/releases and click on the ESP8266LittleFS-X.zip file to download it.
- Sketchbook location: In Arduino IDE, go to File > Preferences and check your sketchbook location.
- Then, in the sketchbook location, create a folder called ‘tools‘.

- Next, unzip the downloaded .zip folder. After opening it, copy the ‘ESP8266LittleFS’ folder to the ‘tools’ folder that was created in the previous step. The folder structure should look something like this:
C:\Sketche\tools\ESP8266LittleFS\tool - Restart the Arduino IDE.
To check whether the plugin has been installed successfully, open the Arduino IDE and select the ESP8266 board. The ‘ESP8266 LittleFS Data Upload‘ option should now be available in the ‘Tools‘ menu.

As the system is complex, you can use the source code to familiarise yourself with it. The original documentation is, of course, important.
5. OTA software update (Over the Air)
The OTA function is not directly related to the project itself; it is more of a convenience feature during programming. This is because it enables software updates via Wi-Fi. Therefore, a USB cable connection to the D1 MINI is only required once at the beginning.
In order to use the OTA function, the Python programming environment must first be installed on the Arduino computer. This is available here: https://www.python.org/downloads/. Version 2.7.14 is required.

You then need to restart the computer. The Arduino environment includes examples, such as a test programme that can be used to check the installation is working correctly. You don’t need to program anything else for the heating control project, as everything is already included in the source code. Adding #include <ArduinoOTA.h> activates the OTA function.

Once the installation is complete, you can select the web server from the list of ports.
How it works
Two temperature sensors measure the flow and return temperatures of the old heating system. This data is then sent via Wi-Fi to any web browser.

The FTP server can be used to retrieve the recorded data in CSV format and then import it into any spreadsheet program. To do this, start recording either by pressing the button on the module or via the website. Once you have stopped recording, you can read the recorded data using WinSCP. A maximum of 2 MB of data can be recorded. Measurements are taken every 60 seconds. The CSV separator is the semicolon.
The record structure:
Sensor1;Sensor2;Difference;Time;Date
26.06;26.75;-0.69;17:44;11.8.2024
26.06;26.56;-0.50;17:45;11.8.2024
26.13;26.63;-0.50;17:46;11.8.2024
Power is supplied via a USB charger (5V); as only 70 mA is required, a basic charger will suffice. The device can be connected via the micro USB socket on the ESP8266 module or a screw terminal.
Hardware
The circuit can be built in two versions. The easiest way is to send the layout data to a circuit board service provider for processing. Alternatively, the very simple design can be built on a breadboard.



The core of the circuit is a D1 MINI. This controls all the functions necessary for data recording.
Two sensors inserted into metal sleeves measure the two temperatures. These sensors are mounted on the two pipes of the heating circuit. Data is transmitted via a one-wire bus from Dallas Instruments. This can be up to 100 metres long, but this is not required for this project.
The OLED display shows the currently measured temperatures. As this display technology tends to burn in and become ‘blind’ during continuous operation, it is not permanently switched on. The display only lights up when the circuit is switched on and turns off after 15 seconds. It is controlled via the I²C bus. Particular attention must be paid to the power supply, as displays on the market have different GND and Vcc assignments. They are also available in 0.96″ and 0.98″ sizes. The decisive factor is the 128 x 64 pixel resolution.

The three buttons have the following functions:
- Button S1 resets the processor
- Button S2 turns the display on for 15 seconds
- Button S3 starts and stops data recording
Summary
The data collected in this project makes it easier to decide on the right heating technology. The second part of the guide will cover the further processing of the data and how to arrange the measurements correctly.











