Battery Life Estimator
Estimate how long an OpenMV camera will run on a battery, given an active / deep-sleep duty cycle.
1Pick your camera
2Pick a shield (optional)
3Pick a power input
4Duty cycle
Per cycle, how long the firmware is awake and processing vs. asleep.
5Battery
6Estimate
How the math works
The estimator uses a flat duty-cycle model on the system's power draw, not its current. Working in power means the runtime estimate stays correct across input voltages (USB at 5 V, LiPo at 3.7 V, alkaline stacks at 3 V, etc.) because the system's energy consumption is what's invariant—not the current at any one rail.
Pavg = (Pactive · tactive + Psleep · tsleep) / (tactive + tsleep)
That is, the time-weighted average of the active and deep-sleep power.
The battery's energy capacity is converted from mAh to Wh:
Ebattery = CmAh · Vbattery / 1000
And runtime is energy over power:
truntime = (Ebattery · kusable) / Pavg
where kusable is the usable-energy fraction (typically 0.85 for LiPo, 0.70 for alkaline) and Pavg is the average power above.
Caveats
The flat-derate model is intentionally simple. Real-world runtime is usually shorter than the headline number because:
- Discharge curve. A battery's terminal voltage sags as it empties. Datasheet capacity is rated to a standard cutoff voltage at a standard (low) discharge rate—the usable-fraction multiplier above is meant to cover the difference, but in practice it depends on how close your input regulator's brown-out threshold sits to that cutoff.
- Peak current vs. average. Batteries have non-zero internal resistance; if your active-burst current is high (radios, inrush at wake-up) the battery's terminal voltage may sag enough to trip the regulator, even though the average current is well within the battery's mAh rating.
- Temperature. Cold batteries deliver less capacity. Plan for 50–70% of nameplate at sub-freezing temperatures.
- Self-discharge and aging. A battery loses some charge over time even with the load disconnected, and loses total capacity over hundreds of charge cycles.
Treat the calculator's output as a starting point. Build a prototype and measure runtime under realistic conditions before committing to a battery / cycle design.