I got some time over the holiday period to carry out my threat to start monitoring our gas consumpition. The setup is an Arduino Duemilanove with ethernet shield. I used the standard software for the shield that comes with the IDE, trying it in both client and server modes. In the end I decided it should log the current “reading” every 5 pulses. The pulses come from a contact closure on the meter fed into one of the Arduino’s inputs. This needs some debouncing.
The nice thing about making it a client rather than a server was that I did not have to mess around with firewall settings. As a rule I don’t like any incoming access and this wasn’t necessary. Should our broadband connection fail for a while you don’t lose any data beacuse the current “reading” is always stored while the unit has power. (Must remember to add battery-level monitoring next time I change the software.)
No so fast: The power consumption of this setup is too high for practical running off batteries. If this was to be used in a volume situation we’d need to be able to turn off the Ethernet circuitry when not in use.
I did find some problems with the IDE on Windows. The serial port is not always available for downloading. Moving to a less-cluttered machine solved this. Also, when the Arduino is commected via USB and Ethernet it sometimes resets itself. I think this is due to noise or a ground-loop as the problem goes away when running off battery with the USB disconnected. Connecting to the meter does not seem to create a problem as its contacts are also isolated.
How best to present the resulting information? For now I calculate a moving average of the pulse rate, graph the resulting information with SVG and present it on a web page. For security reasons I am not posting the link to that but will add sample here in due course.
Next challenge: Electrical power. I know this is easy with “Current Cost” but I may look at alternatives too.
Post-script: Had some issues with Arduino’s Ethernet shield – now solved and documented on that forum. Looked at optically sensing the rotating wheel on my electricity meter but the marking is too subtle. I’m now getting a more up-to-date meter as my first choice solution. If not feasible, then Current Cost must be the best option despite its more approximate nature.