Main Content

ESPmeter

ESPmeter helps monitoring domestic gas consumption; a small device captures data from the gas meter which is then sent to a server via HTTP; a web application allows visualizing daily gas consumption with a granularity up to 5 minutes.

Operating principle
For this device to work, we need a type of mechanical gas meter having a magnet installed on one of the digits of its counter. A probe equipped with a Hall effect sensor is placed near or on top of the counter; the digit revolves when the gas flows and so does the magnet which becomes periodicaly detectable by the sensor. Keeping track of revolutions over time allows to calculate the amount of gas consumed during a certain period. While this project has been designed with gas meters in mind, it could theoretically work with other meters, such as water meters, as long as they have a detectable magnet moving along one of the indicators.

Design
The device has been designed to be extremely easy to build, using a small number of very common components. Particular attention has been put into energy efficiency, trying to reduce consumption to the minimum to allow battery operation for (theoretically) more than a year.

The ESP8266 power absorption is too high to be used to directly sample pulses generated by the Hall effect sensor. Even using a Reed switch to wake-up the ESP at every pulse, consumption would be in the order of 15mA for the whole ESP boot time + software sampling routine to run, assuming Wi-Fi being turned off from the start. This is too much to achieve battery life in the order of years.

Instead, the ESP is coupled with an Tiny13, which takes care of the pulse recording part. The Tiny13 has a very low power consumption and can stay asleep for most of the time. The ESP would then communicate with the Tiny13 at regular intervals and then once per day would transmit data via Wi-Fi.”

Link to article