Inhaltsverzeichnis

Heating Control System with Webinterface

31.10.2014

Starting Situation

In my new office I have to add a simple heating controller to the central heating system.
Therefore I have to switch 2 realys, which tell the central heating to heat with high or low power, and if any heating is required.

My main competence is in electronics hardware development, embedded programming and application programming on a PC. But until now, I never got to deep into webdevelopment. So here you can read about my progress of understanding the techniqes, which I can use to implement the heating control system with webinterface.

Project Goal

Hardware Overview

All the communication between the different hardware parts will be established via WiFi, so I do not need a long cable between the office-room and the central heating system.

Sensor Box

Arduino Nano Board with a digital temperature sensor DS18B20 and a WiFi module. It will have an LCD and some buttons for a local user interface. If we use the heating controller without a internet conntection we will need a local time. Therefore a real-time-clock is needed. It will be the DS1307. Due to the high current consumtion of the WiFi module batteries will not last very long, so a mains power supply is needed.

Relay Box

Here I will use a Arduino Nano board with a relay module with 2 relays on it and the WiFi module. A separate power supply is also needed here.

ADSL Modem with WiFi Router

This will be a normal router from my internet service provider. I think it's a Thomson device, I will get it next week. Important here is, that I can set port forwarding to the temperature sensor and the relay box.

Webhosting Server

I'm renting a webhosting-server (http://www.world4you.com) where I want to host the webpage for the online user interface. Here should run a PHP website, which can do encrypted communication with the Sensor Box.

Communication

HTTP

For the communication simple HTTP messages will be used, to tranfer data between the different nodes in the network. Please have a look to HTTP GET vs. POST, where I explained the two different message-types.

First Implementation - WiFi-Relay-Board

16.12.2014 The first version, which has the most important feature - remotly turning on the heating system - has been implemented the last days.
I built the Wifi-Relay-Board. The firmware is very simple. It fetches every 30 seconds a text-file from my webserver, which tells the relay-board, when the heating system has to be enabled and disabled. Here is a link to the text-file: text file
This file I can edit with the online text editor, written in PHP. Many thanks to Simon Thorpe, which has written this nice web-application. Github

Here you can download the software and documentation: tar.gz-file