Screenshot 2014-01-05 00.21.12

Over the last couple of weeks I have been working on a solution to the timer for our heating as the timer with the heating system not working. The thermostat however does work when set to always on. The heating system in question is the Johnson & Starley J25-32 MK3 Modairflow.

I set about investigating how the thermostat works and found that all it has a direct 12V connection to the heating and the thermistor in the thermostat varies this voltage, with the heating coming on when the voltage drops below 4V. Knowing that it was a pretty simple control method I decided to look how I could control the voltage with my Raspberry Pi.

From looking over the forums for the Pi I came across a post about someone wanting to control a 12V train track. The process they used was a MOSFET with the control pin connected to a PWM pin on the Pi. I used the same process and connected it to the thermostat input to the heating. I also extended the original thermostat cable down to the Pi and used a relay to be able to switch between the original thermostat and my Pi control.

The next step after getting it to control the heating was to be able to set up a control interface. I created this as a webpage which then updates files based on what is changed on the form. After that I went about creating the part which was the main reason for this project: creating a timer for the heating control.

It has the ability to have five different timer events and it reads in each timers settings to decide how much the heating comes on and for how long.

The final step to this was to add temperature sensors so that I could monitor the temperature and be able to make it turn the heating off at certain times rather than just setting the heater to be on at a certain value, it now looks to see what the temperature is and the timer has a temperature that it gets to and keeps it at that temperature.

This has given me a much better heating control system than it would have been had the timer function worked. As the timer would only have one temperature value set on the thermostat and then would come on at the times on the timer. However, with what I have written it now can have five different times to come on or off at five different temperatures. The other part was to allow the monitoring of different rooms and to allow the thermostat to be set for different rooms instead of just the living room.

I am now looking at reading the Gas Meter to monitor how much the gas is used when the heating is on. I will also be looking at RF sensors as well to make it easier to add other sensors. As so far I have 3 of the 5 areas I want to monitor cabled up as I ran out of cable to do the rest. The sensors currently monitor temperatures in the Bedroom, Living Room, and Kitchen. I want to add some to monitor Outside, the Porch and also the Bathroom.