I’ve been using R1 and C1 values of 122k Ohms and 47u F for the 555 timer, to trigger an output pulse that’s just long enough to get transmitted by the CurrentCost development board (~6 seconds). I may yet tinker with the timing to make it long enough for three transmissions; the time between pulses on the gas meter is long enough and it might make receiving pulses more reliably.
Thanks to Mark and Andrew for some ideas for laying out a circuit on strip board, here’s what I hope is the same circuit using VeeCAD:
Might get the soldering iron out next time Jo’s away!
Now I’m much more familiar with messing about with software, not all this messy hardware stuff, so I’m really hoping to get some feedback to improve this early prototype!
So, my theory is that the stuff on the left will trigger the timer on the positive edge of the pulse from the gas meter. R1 and C1 control the 555 timing; more on that in a second. And the stuff on the right (LED and the CurrentCost dev board) should be triggered whenever the gas meter is running and emitting pulses. It all seems to work, except that I can’t seem to get the timing quite right. The gas meter takes about 1m40s between pulses, and I can choose values for R1 and C1 that trigger the output for the right length of time when a single pulse is detected, unfortunately subsequent pulses don’t keep the output on as I was hoping. The best I’ve managed is with R1 = 3M ohms and C1 = 100uF, which does stay on as long as there are pulses from the meter… unfortunately just for a little too long at 5 minutes. Still, at least the CurrentCost Envi will get a reading all the time the boiler is running, and it won’t get stuck on if the meter stops on the portion of the dial where the reed switch is closed.
Any comments with glaring errors, small problems, improvements, or a completely different way to do it?!
Updated: looks like I was having problems with left and right in my first description! Hopefully I’ve got them the right way round now! (2 July 2009)
Update: an on/off indicator for the boiler hasn’t been all that useful. Instead, to count pulses, I’ve now modified the circuit to simply trigger an output pulse that’s long enough to get transmitted by the CurrentCost development board (~6 seconds). The circuit is described in the 8. More about triggering section of this 555 timer page, with R1 and C values of 122k Ohms and 47u F. (25 January 2010)
It’s a 555 timer circuit (using a low power 555 chip) which I’m hoping will keep the CurrentCost dev board transmitting a value as long as the gas meter is running. I’ve since added a capacitor to trigger on an edge so it shouldn’t keep transmitting if the meter stops on the ‘pulse’ position, which is probably around 1/8th of the time on my meter.
I wasn’t quite sure everything was working when I finished last night, but it does seem to do what I want when I was showing Jo this morning, so hopefully all I need to do is get the timing right for the gas meter, rather than me hitting a button every few seconds. More details to follow if it does work.
Richard has already hooked up his gas meter to Pachube but for a few reasons I have slightly different plans. Firstly, my gas meter is not the same. Possibly better and worse for this kind of exercise at the same time: it has an RJ11 socket for counting pulses… but it is covered and declares that only approved equipment should be used. Maybe not a huge deal, but it is gas and we did have three van loads of people looking for a gas leek in the meter cupboard recently, so kind of keen to avoid any… mistakes! Though I suspect that an optical solution, leaving the meter untampered, would not be any safer but would be easier to overlook next time the meter is read. Not that it has any reflective spot on the dials as far as I’ve seen so far. (Any recommendations from someone with experience counting pulses on a Schlumberger R5 meter, or similar, would be great.)
Second difference is that I’d like to go wireless, and if possible avoid needing an arduino. The gas meter is pretty much outside the other side of the house to my home server, with no power supply. So a wireless transmitter, like the one attached to the electricity cable, would be great. It just so happens I have one of those as well now- handy!
Thirdly, having a single display with all the meter readings on has to be the smart thing to do. The display I already have, and the one which will pick up signals from that transmitter, is the Current Cost. Perfect if I didn’t want a server running to connect up to Pachube/the internet, and also perfect if it’s already connected.
So all I need to do is:
decide how to read pulses on the gas meter (peel off that cover, or come up with some Heath Robinson alternative)
count the pulses and produce a pulse for the Current Cost transmitter development kit at the appropriate increments
find out how to pair the transmitter as a gas channel, instead of an appliance channel (if that’s possible)
use some gas
Update: after a bit more investigating I think I’ll be using the socket on the gas meter; I’m hopeful a repurposed spare cable from one of the many modems TalkTalk sent will do the trick. I was also wondering about simplifying the gas meter monitor to just register when I’m using gas, rather than worry about the rate. Some sort of 555 timer based circuit to keep the Current Cost dev board input 2 on between pulses maybe? The only thing that runs on gas is the boiler, so a simple on/off signal should be good enough to work out what I’m using. Dale’s recent roundup of HomeCamp 2 has some tantalizing hints of gas monitoring as well. (22 May 2009)
Over lunch we were discussing how it would be handy to know whether a paycut would be covered by cost savings of a shorter commute. A mushup to do the calculation for you seemed pretty doable, and you could use the same thing to find out how much money you’d save working at home a couple of days a week. Oh yes, and the environment etc.!
Well, it seems that there are at least a couple ofmashups already that do part of the job. Unfortunately both these examples are a bit US-centric and don’t take in to account PAYE (so now I’m being UK centric!) but they’re a good demonstration.
I also discovered that the OS now have an API! Looking through their FAQ, they (or more likely their lawyers) have some funny ideas about how the web works, but still, better than not supporting mashups at all.