Benutzer-Werkzeuge

Webseiten-Werkzeuge


heating_control_system_with_webinterface

Dies ist eine alte Version des Dokuments!


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

  • The overall goal is to keep the temperature in my office at a nice temperature when I'm there, and so save energy, when I'm not there.
  • Control the central heating system with the circulation pump for the radiators.
  • Very simple local user interface with LCD and push-buttons.
  • Webinterface, where I can set the temperature set point for now and for the future.
    Perhaps a plot of the temperature curve would be nice.
  • The regulator-algorithm should be local in the office. So it will work without any internet connection. But the system will have to relay on a working WiFi connection.

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

Webrequest

When you request a website by entering a url in your web browser, the web server gets a message via TCP. I've tested this with the simple software tool SocketTest from Akshathkumar Shetty.
I've opened a TCP server listening to port 8080. When I enter

http://localhost:8080/relay1=1&relay2=0

, I get this message on the TCP server:

GET /relay1=1&relay2=0 HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive

The server also knows, which IP address wants to connect to it.

heating_control_system_with_webinterface.1414773730.txt.gz · Zuletzt geändert: 2014/10/31 17:42 von karl