Close

V2 Prototype - Power Measurements

A project log for YDrip

An open source water meter that detects leaks and measures usage

ydripydrip 06/30/2023 at 22:430 Comments

It can be difficult to estimate battery life for IoT devices, but it's still a good idea to take measurements during development to see if you're even in the ballpark. Commercial water meters that are used by cities last 10-20 years. Some can even use the rotation of the magnet to harvest energy. YDrip won't have that advantage due to the farther mount distance. WiFi will also be a challenge because it wasn't designed for low power, however WiFi 6 and the new ESP-C6 may help with that in the future. For now, I'm targeting months of usage on a single battery. Let's see if that's possible.

The first measurement shows the current draw (at 4.5V) while the ESP32 wakes up from sleep and transmits the water usage. Average current is 110mA over 6 seconds with fast connect enabled. This is fairly high and will limit how many times the device can update the server, but this is expected. There is lots of room to optimize here.


Next is a plot of the current draw while sleeping over an arbitrary length of time. Only 55uA! This is great considering YDrip is able to count magnet revolutions in this state. This value includes the ESP32 deep sleep current, 3.3v regulator quiescent current, magnetometer current and everything else. The main reason for the low current is due to the custom digital logic circuit that is duty cycling the magnetometer. A general purpose CPU would draw much more current to do the same task, which is why I chose not to use the Ultra Low Processor in the ESP32. It draw about ~300uA. I'll go into more detail on the design in a later post.


Plugging these numbers into this great online battery life calculator give an estimated life of 880 days or 2.4 years. I assumed a transmit time of 30 seconds per day, which is about 5 transmissions per day. This does not affect how fast a user is notified of a leak and only reduces how real-time the water usage is.

The website author does nifty things like take the discharge curve of AA batteries into account, but real life is always more complicated. Still we're on a good track.

Discussions