Valentin Schröter's Calculator Shows You How Long Your IoT Project's Battery Will Really Last

Clever web app lets you assign varying phases of operation to get a runtime estimate based on real-world usage rather than averages.

Maker Valentin Schröter has released a tool that aims to make it easy to figure out how long the battery in your microcontroller project will last — based on realistic estimations of load, rather than a simple worst-case scenario.

"[This is] a small web tool to estimate battery lifetime of microcontroller/IoT [Internet of Things] devices from a realistic load profile (sleep + periodic active phases)," Schröter explains of the project. "It helps you answer questions like: how long will my node run on a 1500 mAh cell; which phase dominates my consumption (TX vs sensor vs sleep); what happens if I reduce TX frequency or shorten wake time?"

Looking to get to grips with your project's battery usage? Valentin Schröter's web app (top) is a smart calculator, with full source available (above). (📷: Valentin Schröter)

The browser-based app works by having the user describe their setup's measured or estimated current draw across a series of phases — which can include deep-sleep modes, active processing modes, radio reception and transmission modes, and for devices with a user interface even screen-on modes. Each of these is assigned a frequency of operation plus duration for each activation, which is then used to calculate overall power usage over time.

The final part of the calculator involves the battery itself. While it's possible to use the tool by simply putting in the battery's rated energy storage capacity, you can get improved results by including a measured usable capacity — which reduces over the lifetime of the battery — and an optional self-discharge current, the power lost by the battery even when there is no active load. Finally, you hit the "Calculate" button to see how long your battery is likely to last under the given workload — and you can export both the results and the settings used to reach them for later reuse or analysis.

The web app is available for live use on a GitHub page, with source code available in a repository under an unspecified open-source license.

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles