Track Your Water Usage with This DIY ESP32-Based Water Meter

Deangi built an IoT water meter to track their well water usage.

Depending on your financial situation and where you live, your water usage may feel trivial or it may be a very important consideration in your daily life. If the latter resonates with you, then you probably want some way to track your water usage. But that’s tricky if you use well water or if your utility company doesn’t give you access to the meter — you may receive a bill and simply have to trust that they’re getting accurate readings. To keep an eye on usage yourself in the easiest way possible, you may want to take a look at Deangi’s write-up on building a DIY web-enabled water meter.

Deangi’s home gets water from a well and they found that the well couldn’t keep up with their usage. They needed a meter to track that usage, but didn’t want to have to check an analog gauge regularly to calculate it. Their solution was to buy an inexpensive analog meter and then give it the IoT (Internet of Things) treatment for easy monitoring.

The water meter Deangi chose had a single wiring coming from it. Testing revealed that the wire connected to a magnetic switch tied to the analog gauge. It would go through one open-close cycle every 10 gallons. Ground appears to be the body of the meter.

To get results on a local network (and then to the wider internet, if desired), Deangi selected an ESP32 development board to take advantage of its built-in Wi-Fi and Bluetooth adapters. The circuit to read the meter signal is very simple: the meter’s singular wire connects to one of the ESP32’s GPIO pins with a pull-up resistor. It normally reads HIGH, but pulls LOW when the meter’s magnetic switch connects. The ESP32 counts the number of pulses and uses that to calculate usage, accurate to within 10 gallons.

Deangi programmed the ESP32 with the Arduino IDE, setting it up so it connects to the local Wi-Fi network and self-hosts a simple webserver. That lets the user see usage data any time they want through a computer or smartphone on the same network. It is also possible to make the information available from anywhere with internet access, if the user wants that ability.

Now Deangi can see exactly how much water they use. That will let them determine how much their well can supply and, in turn, let them moderate their use so the well doesn’t run dry.

cameroncoward

Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism

Latest Articles