Autonomous heating via the Internet - ESP8266 + DS18B20

18/07/2020

Hi everyone, today I would like to introduce you to my project, which I created for 2 years, I added something to it from time to time and today I would like to introduce you to its full functionality. You will learn what the system knows, why it is autonomous, why I chose ESP8266 instead of Arduino and what technologies I used for this web-based heating project.

The system is able to control the heating in the house, originally designed for a cottage with a gas boiler.

The web interface is designed for use by laymen, so it is suitable for everyone, regardless of their experience working with a computer or web browser. What the user needs can be found on the page in the menu and on the individual sub-pages through which the system can be managed.

I use 6 temperature sensors DS18B20 on the OneWire bus to record the temperatures in the rooms and also for the water temperature in the radiators or in the boiler circuit.

The system allows to control two outputs - physical relays for:

  • Heating - boiler with optional hysteresis with optional temperature sensor for control, optional reference temperature
  • Circulation pump - selectable reference temperature, selectable temperature sensor for control, switches if the temperature is below the set - without hysteresis

I can control both of these outputs in two basic modes:

  • Automatic - works alone autonomously, with hysteresis (boiler), with reference temperatures, selected sensors
  • Manual - manual ON / OFF - hard indefinitely (user is notified)

I used the NodeMCU v3 Lolin development board with the ESP8266 chip due to wifi connectivity with a good reach to the AP. It supports encrypted HTTPS connections to the web, where it sells data to a server, which processes it further. In addition to sending temperatures, the board also plays an important role in running scripts that allow this system to be autonomous - it can control itself based on measured temperatures, hysteresis, reference temperatures.

Thus, the board runs system logic at regular intervals, which can change the states of the ON / OFF outputs (the user runs the same scripts in the background if there are AJAX calls on the web). The board also downloads up-to-date information on reference temperatures, hysteresis and, in the event of a wifi connection failure, or the website, the board also manages the autonomous household with the last known reference temperatures and hysteresis. When you connect to the site, it is immediately updated and governed by the site.

From the user's point of view, the web interface allows:

  • Change the names of thermometers, eg by room
  • Viewing real-time temperature data (Overview tab: data changes automatically in a table)
  • Control heating, circulation pump
  • View graphs in 24 hours for outputs with minute representation and for temperatures with 4 minute representation of measured data
  • Additional graphs with 7-day history
  • Remote board restart
  • Login system
  • Login log with IP address record (IPv4 and IPv6)
  • Log of changes in the system, when the microcontroller switched heating, switched off, etc.
  • Change login information to the site
  • Source code for the microcontroller directly on the web

The system is nimble, easy to maintain. The user can also see on the web the day and time when the board failed in the overview chart and also when the temperature was measured or when which output relay was active. The board can also send other important information to the web - processor time, signal strength of the Wifi hotspot, name of the wifi hotspot (possibility to select more in the program for NodeMCU).

These additional values ​​can help the system as such to plan for an automatic board restart after a month, a week, and so on. The entire web interface uses PHP scripts for functionality, AJAX calls for PHP scripts with user participation on the web, the ControlR template, the Bootstrap grid system.

You can find more about this project with the possibility of trying it out at: https://arduino.php5.sk/autonomne-vykurovanie.php

Photo gallery:

© 2021 Martin Chlebovec - Arduino Blog - . All rights reserved
Powered by Webnode Cookies
Create your website for free! This website was made with Webnode. Create your own for free today! Get started