Occupancy Detection for Heating Control

Since I’ve been tinkering with control systems in general I have been thinking about new ways of interconnecting them to get additional functionality out. One of my main interests in the heating control project is trying to reduce the amount of gas the system is consuming and thus the overall cost of the heating. I’m also trying to improve the overall efficiency of the system by trying to match the heating supply to the demand.

I’ve wondered for a long time about the time the house is unoccupied, and what the best thing is to do with heating. In the past I have tried using the time clock to turn the heating off during times of absence, but this doesn’t really work because it isn’t that easy to accurately time periods when the house is empty. So if you are in when you are meant to be out the house is cold, and vice versa.

However once I installed the Texecom panel  I realised that of course one can easily derive simply occupancy data from whether the alarm is set or not. We always set the alarm when we go out, so if I could read the status of the alarm and use this to adjust the heating control it would give me a 100% reliable trigger and so the risk of sitting in a cold house or heating an empty one would be reduced.

There are numerous means of getting an output from the panel. and Fhem (which controls the heating) is pretty good at monitoring events and doing something as a result. However it wasn’t immediately obvious how best to do it.

I settled in the end on using an Arduino with the Firmata  fimware. I’d never heard of this before, but it is directly supported by Fhem and allows direct access to the various inputs and outputs on the Arduino into Fhem. I bought a very cheap Arduino Nano clone from ebay for about £3:ArduinoNanoFront_3_sm

Then I loaded the Firmata firmware on to it using the usual Arduino software. I won’t go into the detail of this as it’s extensively covered elsewhere but will answer any questions about this.

The next thing to do was to get a signal from the panel into the Nano. This is quite simple, as the panel has a number of programmable outputs. These are highly configurable via Wintex and the output can be set high (or pulled low) in a whole range of different conditions. All I need is for it to change an output when the panel is set.

The Arduino has loads of inputs and outputs, and for this you need a digital input – either on or off to represent armed or disarmed. I was initially unsure about how this would work, especially as it runs at 5V and the alarm panel is based on 12V. I am using the ‘panel outputs’ of which there are two on the Premier Elite 48 (and more on the bigger panels) – labelled ’12’ below:

outputs

The fact that they are labelled with a ‘-‘ sign is significant, and indicates that they are so-called ‘open collector‘ inputs. This means that rather than switching 12V on to the line, instead it allows ‘sinking’ a voltage from the board. So you can connect the output to one of the digital output lines on the Arduino, and the voltage differential doesn’t matter because it is not putting 12V into it.

So what I have done is to connect one of the digital inputs (so I have used D1) to OP1- on the panel above. I’ve not got a great picture of it, but it just a single wire linking soldered to the D1 point on the Arduino to the OP- screw terminal. I’ve fixed the Nano inside the alarm box along with the other bits.I do now have quite a few USB cables coming out of the alarm box… it might be good to have a USB hub in there but I’m running out of space!

That’s the hardware side done – next post I’ll address the software side using Wintex and FHEM.

Advertisements

Intelligent Heating Control – First Steps

As promised I’m now turning my attention to a different project. For a long time I have wanted to handle control of my heating system much more intelligently than just relying on a single thermostat. My house is a fairly large Victorian terrace spread over three floors, and the rooms are large with high ceilings. At the moment the thermostat is in the hall, and this is supposed to take account of the heat in all the rooms of the whole house. It seems a very blunt instrument and I’m sure I’m wasting a lot of heat.

This sort of thing is topical and there have been products such as the much-vaunted Nest thermostat. However, I’m really unimpressed with this – because no matter how fancy it is it only samples heat from one place. If you live in a small flat then that’s fine – but it doesn’t help my situation.

As well as having more sampling points, you should also have more control over how the heat is distributed. Nest etc only control whether the boiler / heat source is on or off – not where the heat is going. My house uses standard gas-fired heating with radiators and thermostatic radiator valves (TRVs) but I’ve never been very satisfied with these. Also of course they don’t provide any control of the boiler.

It seems I’m not alone in this – there are a small number of products out there which address this issue, and the most recent and most consumer friendly is the Honeywell EvoHome system.

honeywell_evohome_connected_thermostat_pack_atp921r3100_hr924uk_radiator_controllers

This does look very interesting but I’m not pursuing it for various reasons (mostly because I don’t want to have to start again with a new system). There does seem to be a lot of discussion about it in the AutomatedHome forum

The basic idea is that you have one or more replacement TRVs which are motorised and have a temperature sensor. The valves report back their temperature to a central control point, which is then able to control the boiler to switch on as the need to heat each radiator arises. This feedback is the big plus over a normal TRV (which really only regulate maximum heat) as it allows them to regulate minimum heat too. When heat is called for, only the radiators which need it will be on and so the heat is much more efficiently transferred to where it is needed.

I’ve been looking at these systems for quite a few years now. When I first started about 5 years ago, the only thing out there was the FHT range. This is based on the FS20 protocol, which seems to be very well-established in Europe and particularly Germany. There is an enormous range of FS20 kit available, far more than any equivalent system used in the UK. However, it seems little known about here. The FHT system involved a separate valve motor (FHT 8V) and room thermostat. The motor adjusted the valve depending on the temperature, and a separate boiler interlock (FHT 8W) which listened to the settings of the valve motors, and when they reached a certain level it triggered the boiler. The FHT 8W is a remarkably overengineered piece of kit – I bought one at great expense (about £80) but I don’t think many other people in the UK did.

fht8w_heatrelay_1

I had this system (two or three thermostats and the boiler switch) in my old house which was much smaller, and it did seem to work quite well. I discussed this quite a bit at the time on various forums and blogs (see discussion with Jack Kelly who goes into the whole subject in some detail). However, when I moved house the FHT kit remained very expensive and I rather lost interest in the whole idea as other more pressing work took over.

The other thing which I did get from my first attempt was computer control of the system. I was not satisfied with just the kit, I wanted to monitor and control it much more closely. Once again, I found that the Germans were very far ahead of us. Through reading various forums (thank goodness for Google Translate) I learned about FHEM. This is very mature and well established home automation control system. I’ve been following home automation for years (and I have a developing Z-Wave system for lights etc which I’ll talk about some other time) and am aware of various software systems.

However FHEM stands out for a number of reasons – it is unashamedly geeky and flexible (hence it suits me well), it is extremely well supported (if you speak German) and has support for the widest number of different systems that I’ve ever seen. To get it to talk to the FS20 system I needed a CUL1101 device. At the time I got mine the only place you could get them was from busware which is another German company. It was rather expensive (about 50 Euros although they are more now) but gave me what I needed to interface FHT with FHEM and read out the data to plot some graphs. However I never got much beyond this and I was aware I hadn’t really made the most of it.

This is pretty much where I got up to before I picked it up again recently – which I’ll cover in the next post.