Electricity, Gas and Water – three resources that are vital in our daily lives. Monitoring them using modern technology helps with conservation, but the real impact comes when we use the available data to reduce wasteful usage over time. [Sébastien] was rather embarrassed when a problem was detected in his boiler only during its annual inspection. Investigations showed that the problem occurred 4 months earlier, resulting in a net loss of more than 450 cubic meters, equivalent to 3750 liters per day (about 25 baths every day!). Being a self professed geek, living in a modern “connected” home, it rankled him to the core. What resulted was S-Energy – an energy resource monitoring solution (translated) that checks on electricity, gas and water consumption using a Raspberry Pi, an Arduino, some other bits of hardware and some smart software.
[Sébastien] wanted a system that would warn of abnormal consumption and encourage his household folks to consume less. His first hurdle was the meters themselves. All three utilities used pretty old technology, and the meters did not have pulse data output that is commonplace in modern metering. He could have replaced the old meters, but that was going to cost him a lot of money. So he figured out a way to extract data from the existing meters. For the Electricity meter, he thought of using current clamps, but punted that idea considering them to be suited more for instantaneous readings and prone for significant drift when measuring cumulative consumption. Eventually, he hit upon a pretty neat hack. He took a slot type opto coupler, cut it in half, and used it as a retro-reflective sensor that detected the black band on the spinning disk of the old electro-mechanical meter. Each turn of the disk corresponds to 4 Watt-hours. A little computation, and he’s able to deduce Watt-hours and Amps used. The sensor is hooked up to an Arduino Pro-mini which then sends the data via a nRF24L01+ module to the main circuit located inside his house. The electronics are housed in a small enclosure, and the opto-sensor looks just taped to the meter. He has a nice tip on aligning the infra-red opto-sensor – use a camera to check it (a phone camera can work well).
The Water Meter was more difficult. It has a mechanical counter with a set of 8 digits that increment as water is used. His solution was to use the Raspberry-Pi and its associated camera module. The Pi camera is fixed focus to infinity, so he had to adjust the lens to make it in to “macro” mode. And he needed some LED’s for illumination since the meter is in a dark area.
The Gas meter was the easiest since it could be retro-fitted with a pulse counter. The Raspberry-Pi receives the camera pictures, the pulse data from the gas meter (via a LAN cable hack), and a nRF24L01+ module to receive data from the electric meter. He then goes on to describe his “Constellation” software – a project that he hopes to open source soon. There’s some interesting bit about using OpenCV to decode the water meter digits – especially when the digits are in transition. If there is an error in decoding, he receives an email with the relevant snap shot. All this culminates in a nice HTML page that shows the data graphically. He also does a lot of other data processing to generate graphs and tables.
The system keeps him well informed about usage, especially when he moves out of the house. Like the Washing machine turning on, for example. He also did some Audio integration (using another of his software projects called S-Sound), which now announces the amount of water used while showering, for example. This is useful feedback in helping slowly cut down on consumption.