TheCommiser
Posts: 8
Joined: Wed Apr 10, 2013 9:47 pm

Pi Central Heating (PiCH)

Sat Jan 04, 2014 9:55 pm

Hi all,

I've been working on a central heating control system project with a friend, which all started after a discussion along the lines of 'Would'nt it be awesome if we...'.

We're not professional programmers or hardware designers or anything like that, but we've somehow managed to get to the stage where we have some hardware and software that works. There's a couple of parts to the project, but we'd like to gather some feedback and see if anyone has any suggestions, or is interested in helping us take this a bit further.

All the important stuff is at http://davegreen.github.io/PiCH/, so have a look there for more details. All of the source code and hardware designs are available on GitHub and the entire project is open source. We'll be adding a few images of current and past designs and some more about how we got to where we are now fairly soon. We are more than happy to receive pull requests or discuss PiCH if anyone wants to help out, it's a pretty good system when it's up and running.

Thanks!

harvy
Posts: 92
Joined: Mon Nov 26, 2012 1:49 pm
Location: London - UK

Re: Pi Central Heating (PiCH)

Sun Jan 05, 2014 1:02 pm

Are you able to provide any more info re the hardware side? I'm looking to use the pi to replace my thermostats and programmer, making it a bit more intelligent so to speak but am having difficulties on how to control 240v...

How have you attached this to the heating system itself?

TheCommiser
Posts: 8
Joined: Wed Apr 10, 2013 9:47 pm

Re: Pi Central Heating (PiCH)

Sun Jan 05, 2014 1:33 pm

My 240v thermostat works in effect like a switch. My understanding is that the programmer works in the same manner, and the thermostat is effectively a switch wired in series.

As it stands, I have not taken the legacy programmer out of the equation and have just connected the Pi in parallel to the analog thermostat, so as to have a guaranteed backup.

This is done through a relay board and a transistor on the breakout board. If you take a look at the eagle files, it should make a fair bit of sense, but if you would like a wee bit more detail, just shout.

harvy
Posts: 92
Joined: Mon Nov 26, 2012 1:49 pm
Location: London - UK

Re: Pi Central Heating (PiCH)

Sun Jan 05, 2014 2:23 pm

I had a look at my boiler and thermostat - its 240v that is switched hence i need a relay that can switch a 240v supply, using 3.3/5v from the pi. Can you send me a link to the relay board and transistor setup? *(sorry i cant seem to find the eagle board layouts)

TheCommiser
Posts: 8
Joined: Wed Apr 10, 2013 9:47 pm

Re: Pi Central Heating (PiCH)

Sun Jan 05, 2014 3:21 pm

The board layouts are all on GitHub, you can download the files directly from https://github.com/davegreen/PiCH/tree/master/board, or download the project zip or tarball and look in the board folder. There is also a set of gerber files in there that were exported from eagle to create our current set of boards, so they would do the job too.

As for the relay, I'm pretty sure the one we use is this one: http://www.rapidonline.com/Electronic-C ... ay-60-1486, although there are probably plenty of alternatives that would do the job.

TheCommiser
Posts: 8
Joined: Wed Apr 10, 2013 9:47 pm

Re: Pi Central Heating (PiCH)

Thu Jan 09, 2014 10:12 pm

We've added some images of the boards, click for bigger pictures.

First up, the breakout board. This fits directly over the RPI GPIO pins and lets us get to the temperature board through the RJ45 connector. There are also connections for the display and button controls when we get around to it. RLYHE connects us to the relay board.
The display hasn't had any menu code written yet, but connects to a nokia type LCD, that will be controlled from the buttons board (no image).
Image

Here's the bottom of the breakout board:
Image

This is the relay board, the breakout board connects to it at JP3. This board is the simple one as all it does is trigger the relay.
Image

Due to a bit of mislabeling in this version, the temperature sensor sits at IC1, the jumpers and transistors are for power injection, which it turns out we didn't really need, even with a 10M Ethernet cable used between the first and second temperature board. (there's also a small problem there that needs an added resistor to stop the second board going a bit crazy).
Image
Image

Hopefully this makes the eagle files make a little more sense, we had to compromise on readability to get it all on one board, so we could get it made for the prototype. This means the eagle file may not be the easiest thing to understand, although the wiring diagram in eagle should be better.

Mohannad Mahjoub
Posts: 5
Joined: Wed Jan 15, 2014 8:55 pm

Re: Pi Central Heating (PiCH)

Wed Jan 15, 2014 9:02 pm

Hello Mr, I really liked your project and I think its really brilliant. I'm doing my final year project and I was wondering if this system can be transformed into Pi Central Air Conditioning, considering that temperature here is high and we need no heating system.
Wondering if you can help me with that :)
Thanks a lot.

stratus
Posts: 3
Joined: Sun Jan 12, 2014 11:29 am

Re: Pi Central Heating (PiCH)

Thu Jan 16, 2014 11:21 pm

hi guys cool project if you added a few more sensors you would be able to see how efficient the system is over a period of time
out door sensor
flow and return water temperature to the boiler/furnace
with these and some calculations on the pi you could see how good the heating system is
and maybe even a sensor to record when the boiler/furnace is burning fuel and how long
would like to help if i could but im just at the very early stages of trying to learn python :oops:
but work in the plumbing and heating trade in the UK
John

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Pi Central Heating (PiCH)

Fri Jan 17, 2014 1:38 am

I have always considered residential HVAC controls to be archaic at best. What is needed is a ethernet based way to control a furnace, AC unit, or heat pump. Once that occurs, then it is a simple matter to control that HVAC unit from anywhere.

Work that needs to be done:
Protocol defined. ASCII based command structure mandatory.
RFC published
Working models created and tested for various HVAC units.

Special considerations:
Things that also have to be considered are hot water systems, Heat pumps, and alternative fuel systems.

Having said all that, there may already be ethernet based controls for new furnaces.

Now if you want to come up with a really DIY cool thermostat, I would use the NEST model. www.nest.com
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

User avatar
chrisryall
Posts: 155
Joined: Wed Nov 27, 2013 11:45 am
Location: Wirral UK
Contact: Website

Re: Pi Central Heating (PiCH)

Fri Jan 17, 2014 4:23 am

The recent German "self installable" Tado controller looks interesting for Europeans and has a very new approach, basically looking at internet weather forecasts and tracking resident smartphones as they come and go. As the sensor is wifi it can go anywhere! only one though.

tech page http://www.tado.com/de-en/tech

a review http://www.insideci.co.uk/news/tado-sma ... he-uk.aspx

Seems several more competitors are on the way, hopefully might keep prices down?

thienson30
Posts: 26
Joined: Mon Jul 08, 2013 7:53 am

Re: Pi Central Heating (PiCH)

Sat Jan 18, 2014 7:37 am

TheCommiser wrote:Hi all,

I've been working on a central heating control system project with a friend, which all started after a discussion along the lines of 'Would'nt it be awesome if we...'.

We're not professional programmers or hardware designers or anything like that, but we've somehow managed to get to the stage where we have some hardware and software that works. There's a couple of parts to the project, but we'd like to gather some feedback and see if anyone has any suggestions, or is interested in helping us take this a bit further.

All the important stuff is at http://davegreen.github.io/PiCH/, so have a look there for more details. All of the source code and hardware designs are available on GitHub and the entire project is open source. We'll be adding a few images of current and past designs and some more about how we got to where we are now fairly soon. We are more than happy to receive pull requests or discuss PiCH if anyone wants to help out, it's a pretty good system when it's up and running.

Thanks!

Check out my video... it has HVAC functionalies.
http://www.youtube.com/watch?v=5dmvT6vTV2w

TheCommiser
Posts: 8
Joined: Wed Apr 10, 2013 9:47 pm

Re: Pi Central Heating (PiCH)

Sun Jan 19, 2014 12:43 pm

Mohannad Mahjoub wrote:Hello Mr, I really liked your project and I think its really brilliant. I'm doing my final year project and I was wondering if this system can be transformed into Pi Central Air Conditioning, considering that temperature here is high and we need no heating system.
Wondering if you can help me with that :)
Thanks a lot.
The system is pretty simple, I imagine it would be very easy to add an 'inverted' mode for use with cooling applications, instead of heating. Most of the code change would be in the thermostat control file, but obviously there would also need to be other changes made so that things like the status report correctly when being used for cooling. If you do get anywhere with adding the functionality, please let us know, that sounds really good!
Richard-TX wrote: I have always considered residential HVAC controls to be archaic at best. What is needed is a ethernet based way to control a furnace, AC unit, or heat pump. Once that occurs, then it is a simple matter to control that HVAC unit from anywhere.
As I've said we are very much amateurs at this, building a project to fit our needs. Obviously it would be nice if we could conjure a simple protocol for heating, cooling and whatever else people want to throw at it, but that stuff is HARD and takes a lot of work to achieve.

We are looking to add functionality similar to NEST or TADO over time, but we have been aiming this project as a low cost alternative to these systems, for people with a little bit of computer know-how and an interest in home automation.

A couple of examples of the kinds of features we would like to add include:
Temperature history graphing
Preheating before the start of a schedule
More types of sensors (Outside, heat in/outflow, etc)
Better schedule rule sets
Multi-zone heating support

Most of this is something that will be done over time, but we appreciate any help we can get, even if you have little or no experience, as we were in that situation not too long ago and we've already got this far!

Mohannad Mahjoub
Posts: 5
Joined: Wed Jan 15, 2014 8:55 pm

Re: Pi Central Heating (PiCH)

Thu Jan 30, 2014 11:18 pm

Of course i'll keep you guys posted with where i reach on this functionality. I was wondering if you could list the components you used in the design cause i couldn't find a full list of that on the site.

josar
Posts: 41
Joined: Sun Jan 19, 2014 1:29 am

Re: Pi Central Heating (PiCH)

Fri Jan 31, 2014 9:33 pm

TheCommiser wrote: A couple of examples of the kinds of features we would like to add include:
Temperature history graphing
Preheating before the start of a schedule
More types of sensors (Outside, heat in/outflow, etc)
Better schedule rule sets
Multi-zone heating support
Hi, nice project. In my house I replaced the thermostat with Sainsmart relay board. It works with RPi directly.
http://www.sainsmart.com/arduino-pro-mini-2.html

For the software part I'm using the REX Control System for controlling the heating. It's not open source but you get a lot for the price of the Raspberry Pi itself. Once you get it running, history graphing happens automatically, no hand-coding is necessary. Lot of function blocks for filtering the signals, logic operations are available. Even the PID controller.
http://www.rexcontrols.com/rex-control- ... spberry-pi

tony1
Posts: 4
Joined: Sun Mar 31, 2013 10:35 am

Re: Pi Central Heating (PiCH)

Mon Mar 10, 2014 12:30 pm

I am a new beginner with Raspberry, but would love to be able to create my own PiCH. An important function is to get something similar to Tado. i,e using an android phone as a geo fence so switch off the relay when out of the house. (or use bluetooth/wifi detection).

I am up for helping as much as I can.

jemtaylor
Posts: 20
Joined: Sat May 25, 2013 1:37 pm

Re: Pi Central Heating (PiCH)

Mon Aug 18, 2014 4:50 pm

Hi,

I've built my own home-brew CH controller with a Pi which I wired into the existing controller. This makes it easy because I don't need to deal with mains voltages or anything like that. I've recently added temperature control using wireless temperature sensors. The Pi presents a web page from which I can monitor and control the heating from anywhere.

I've written up the project here:

http://fudgetech.blogspot.com/2013/09/p ... ating.html

cheers

Jeremy

mike_p
Posts: 30
Joined: Fri Aug 01, 2014 2:35 pm
Location: Surrey, UK

Re: Pi Central Heating (PiCH)

Sun Dec 21, 2014 9:41 am

Hi

Seems I'm late to the party!

I wasn't aware of this project and have gone and built my own version.

I use a Pi, a cheap two relay board (£2), a DS18B20 thermal probe (£1), an LCD 16 x 2 display (£1.29) and two push button switches for manual override.

Some people will question the use of a cheap relay board, but I have checked out (i.e. disassembled) the relays used in two common major manufacturer heating controllers, both of which used lower spec relays. The actual relays are used to control the motorised valves that let water flow in the heating and hot water circuits. The relays on the cheap boards are 240v 5a and opto-isolated. The typical motorised valve uses a 240v 5W motor : a fraction of 1 amp!

The LCD display shows the time, the temperature and the status of the heating(CH) and hot water(HW) controls. It updates every minute.
I record the temperature in a log file every ten minutes and any change in the status of the CH or HW circuits and when the program stops and starts. (I use logrotate to manage the log). Sample output:

Code: Select all

21 Dec 08:10 - temp = 16.2°C
21 Dec 08:20 - temp = 16.2°C
21 Dec 08:30 - temp = 15.1°C
21 Dec 08:40 - temp = 16.7°C
21 Dec 08:50 - temp = 17.4°C
21 Dec 08:56 - SIGTERM received
21 Dec 08:56 - program stopped
21 Dec 08:56 - program started
21 Dec 08:56 - CH button pressed 0
The main control program has a loop that checks for a date/time change in a little file (/etc/heating.cfg). If the file has changed, it reads the file to determine whether the CH and HW should be on or off.
I have set up a cron job that writes this file. So using cron, I can set as many on/off events as I like.I have written a small c application (setboiler) that cron uses to write heating.cfg. Heating.cfg simply contains two lines
for example

Code: Select all

CH=1
HW=0

setboiler is called with two parameters eg "setboiler 1 0" tells the pi to switch the CH on and HW off.
Setboiler can also be called using PHP, so I can easily use a web page to control my heating remotely.

It is all now funcitonal but I have not yet connected it to the heating system: but am testing it over several days because I don't want it to fail during a cold spell! I also need to build a nice box to house it somewhere where the LCD and override buttons can be conveniently viewed.

If anyone wants more detail (and photos), please ask!

Return to “Automation, sensing and robotics”