Pi Pico Calculates Water Usage

Modern WiFi-enabled microcontrollers have made it affordable and easy to monitor everything from local weather information to electricity usage with typically no more than a few dollars worth of hardware and a little bit of programming knowledge. Monitoring one’s own utility data can be a little bit more difficult without interfering with the metering equipment, but we have seen some clever ways of doing this over the years. The latest is this water meter monitoring device based on a Raspberry Pi Pico.

The clever thing here isn’t so much that it’s based on the tiniest of Raspberry Pis, but how it keeps track of the somewhat obscured water flow information coming from the meter. Using a magnetometer placed close to the meter, the device can sense the magnetic field created as water flows through the meter’s internal sensors. The magnetic field changes in a non-obvious way as water flows through it, so the program has to watch for specific peaks in the magnetic field. Each of these specific waveforms the magnetometer detects counts to 0.0657 liters of water, which is accurate for most purposes.

For interfacing with a utility meter, this is one of the more efficient and elegant hacks we’ve seen in a while. There have, of course, been other attempts to literally read the meter using web cams and computer vision software, but the configuration for these builds is much more complex than something like this. You can interface with plenty of utility meters other than water meters, too, regardless of age.

18 thoughts on “Pi Pico Calculates Water Usage

  1. Get an esp and a rf coil and I can just get that data by placing a coil on top of my water meter, and also get power consumption for each circuit in the house and approximately the global power consumption and kwh of the entries house, and wireless send all off it to my phone over the internet…

  2. ” Using a magnetometer placed close to the meter, the device can sense the magnetic field created as water flows through the meter’s internal sensors. ”

    Interesting. Ours is a buried smart meter already with a cable coming out going to a disc-shaped paddle. Already quite a distance from the house. Good to measure because leaks can end up expensive.

  3. I ended up with an almost identical solution for my (UK) watermeter, but using an ESP32 to send the data as MQTT. I used the three axis magnetometer (part of a 9 axis breakout board from the “must do something with this someday” box.) Running it for a bit, I found that one of the axis had a nice strong sine with a frequency corresponding to the flow rate- the other axes were similar but lower amplitude and different phase. Didn’t seem to get the harmonic components present in this write up, so the processing was much easier- DC offset removal and frequency estimation.

  4. Flume already has a ready to install sensor array, hub, and (free) webpage offered at a substantial discount by the LADWP. I’ve already got an Echo 15 in the home information center to pull up their Silk browser and display current daily and current month by day usage. I’d be interested in a project that keeps the Flume sensor and hub but offers non-cloud reading and logging of water usage.

  5. In my old house (20 years ago) my water meter had a receptacle that accepted a reed switch module. The reed switch was then wired to a counting circuit or whatever. Now that I know how it works it would be trivial to fabricate my own, or just place a reed switch close to any meter to see if it would work.

    My new house is in a rural area. I have a meter box in the ground, but the only thing in there is a cutoff valve. In some ways I’m annoyed about that, because I love data. But in many other ways it’s fine.

  6. I did something very similar a few years ago, but I was able to sandwich a hall effect sensor between the actual meter and the plate it snaps on to with a rotating magnet inside. Hooked the sensor up to a Moteino, along with a temperature sensor taped to and insulated around the pipe coming into the meter to give a rough idea of incoming cold water temperature.

  7. At least here in Europe, many mechanical water meters have moving reflective or white/black features on the face, either in a separate disc or on the least significant digit. a LED+Photodiode combo glued to the case reads one liter increments in mine.

Leave a Reply to AndrewCancel 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.