Electronics and Raspberry Pi

Battery Life

Estimate how long a device runs on a battery, even if it mostly sleeps (deep sleep).

What does this mean?

The runtime is roughly capacity × usable portion ÷ average current. For a device that is always on, that is simple. A sensor with an ESP32 sleeps most of the time: the average current is then the weighted average of the active and the sleep current. A small change in how often it wakes up makes a big difference in the runtime.

This is an estimate. In practice, cold temperature, the age of the battery, self-discharge, and the voltage at which your device shuts down all play a role. With a usable portion of 70 to 80%, you usually calculate safely. The sleep current of an entire board (with voltage regulator and USB chip) is often much higher than that of just the chip.