Solar Heating Control
Keywords: RaspberryPI, Home Automation, Temperature Sensor, AD converter, Relay, Solar, Heating, Ventilation, Control with Web Interface,Data Logging
no warranty for any of the provided information
When my heating control broke down I decided to create my own to
As heating setup I have one central hot water storage tank (550 l Water including 180 l tap water), which provides heat for warm water consumption and heating of my house.
1 Set up the RaspberryPi
You have to buy the RaspberryPI, a 5 V power supply and a (16 Gb) SD card - in total 46 EUR in my case.
First you have to format the SD card. My first attempt was to use gparted under openSUSE 12.x and I figured out that there is a problem with this version and than I used SDFormatter and it worked well.
Afterwards download the NOOBS_v1_2_1.zip to the SD card, unzip it being root and remove the zip-file.
To connect the RaspberryPI have a look into the quick-start-guide-v2_1.pdf - just for inital start it is helpful to have a USB keyboard and mouse and a monitor with HDMI connection to hand.
Choose Raspbian as operating system to be installed and have a cup of coffee...
After installation, to have the bash shell by default do
And since I like the GNU emacs for programming:
And to set the time zone:
And meld is a good tool to compare two file or directory versions
Update the system
If the Raspberry Pi is connected to the internet, you should apply an update regularly:
1.1 Set up the Web Server
To set up the web server, a good introduction I found is:
Find out the IP address of the device by
If you are working on some computer and would like to detect other available machines, try nmap
To use ssh to log in from some remote machine edit
192.168.2.103 raspberry 192.168.2.106 miraculix
From now on you can login to your RaspberryPI from any other computer in your network by
If your raspberry will be connected to the internet, better change the ssh port from 22 to anything else by
The essential sequence to set up the web server is:
iface eth0 inet static address 192.168.1.3 netmask 255.255.255.0 gateway 192.168.1.1nano /etc/resolv.conf #check: nameserver 192.168.1.1
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install php5-mysql #for data logging
To test the server start a browser (dillo) on your RaspberryPI and enter http://localhost/.
1.2 Access the Server via Internet
To make your RaspberryPI visible from the internet you have to open ports in your router (Speedport W723V) and direct them to the RaspberryPI. To have the web server available open port 80 and for the ssh connection port 22.
My first Heating Control PCB on a strip board
My RaspberryPi break out board. Additionally I added connectors for 5 V and Ground which are connected via two pins each to the RaspberryPi. This way they could be used as alternative voltage supply to the whole system and for control measurements I have these potentials easily accessible. The board is already prepaired to have a second AD converter to handle more signals.
For a more advaned approach, have a look to Electrical Connection of Sensores and Actuators.