An ESP Will Read Your Meter For You

As home automation starts to live up to its glossy sci-fi promise there remains a deficiency when it comes to interfacing between the newer computerised components and legacy items from a previous age. A frequent example that appears in projects on Hackaday is the reading of utility meters, and in that arena [jomjol] has a very neat solution involving an ESP32 camera module and a software neural network to identify meter readings directly.

The ESP and camera sit at the top of a 3D-printed housing that fits over the meter. The clever trick comes as each photo’s orientation is determined, and not only is OCR used to read digits but also figures are derived from small dial meters and other indicators on the meter face. It’s a very well-thought-out system, with a web-based configuration tool that allows full customisation of the readable zones and how they should be treated.

This project makes full use of the ESP32’s capabilities, and the attention to detail that has gone into making it usable is particularly impressive. It certainly raises the bar against previous OCR meter reading projects.

[Thanks for the tip Sascha]

16 thoughts on “An ESP Will Read Your Meter For You

  1. This is great! I have the same module in front of my gas meter but am running basic software and have to read the results off an upside down jpeg :) of course I could have a ‘smart meter’ but I’m ideologically opposed to them…

    1. Gas meter is easier…. if you have an BK-G4 meter it is already equipped with magnet on smallest wheel; can trigger reed-switch… simple ESP32… :-)
      This water solution is nice…. I found other solutions on the web with LED and photo-transistor but that lead to algae growth. That cam solution should be enough to single flash something like every 4 hours.

  2. a total cool approach that uses OCR. might be handy if you’re looking for a non-intrusive method. that cover is absolutely necessary, there can be zillion of small things that might interfere with the images and mess up character recognition. (hope no one would charge you with measurement equipment tampering though)
    but there might be a way easier solution that only involves a reed switch. it works well with my gas meter and i suppose it also would with the water meter. in fact there are ready-made water meters with potential free contacts, you just have to hook on your favourite micro.

  3. Something for the new wireless smart meters would be more interesting which can catch and decode the radio transmission of the data it sends even better if it could spoof the data keeping your electricity bill close to zero when they come to read it down :)

  4. A neat solution, but how backwards is your country or energy company if it does not have modern meters that both can call home to the energy company and supply a digital output so local systems like solar or home automation can interface with it.

    I am on my third smart meter model, all installed by the energy company without needing to ask. Also the energy company is required by law to provide the usage data to third party by means of an API, so for example solar platforms can integrate it. Access by third-party is after my permission to be clear.

    The gas meter is connected to the smart electricity meter, the only non-smart meter is the water meter….

  5. Nice project and nice platform and idea. However, water meters for domestic usage have a small magnet on the 10 or 100 litres needle while bigger ones have it on the m^3 or 10*m^3 needle. Retrofitting solutions, instead of changing the measuring plant, usually produce a dial which can be installed aligning the magnetic sensor with the correct needle and converting them in pulses or directly integrating the smart-meter (which knows the litre-per-pulse constant).
    They usually come also with a reverse-flow and anti-tampering detection, respectively by monitoring the direction and presence of the mag field under the sensor.
    The proposed approach suffers from a common “bug” found in rolling numbers detection which is mostly seen when the dial is halfway the number labels (for the tote measurement). The mag approach also enables consistent battery savings. Moreover, as already pointed out, common water meter dial and glass ages quickly, rendering the solution pretty useless aside proof-of-concept ideation.

  6. Thanks for reviewing my approach. I’m the designer and programmer of this device. It started as a testing of what CNN you can do on a “edge”-device like a cheap ESP32. It turned out to be very usefull as well :-).
    Let me comment on the speed of recognition: the limit is not the neural network calculation, this can be easily done within 1 to 2 seconds per digit / counter. The most CPU time is needed for the alignment. Meanwhile a fast recognition algo is implemented, allowing altogehter a reading every 30 seconds.

    Best regards,
    jomjol

    P.S.: in the article [Sascha Kloß] is mentioned as the author, that is not me. If you want to contact me, you can post an issue on GitHub and I will reply to this.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.