Recipe
Estimate a battery's life, best case
Use when: a circuit runs from a battery labelled in mAh and you know, or can measure, its average current
Goal: an upper bound on running time in hours, and the battery's energy in Wh
Taught in Power, energy, and heat · a later section extends this recipe with more cases
Quick recipe
-
1
Use a measured current where you can; otherwise add up the datasheet currents of everything that is on.
Example
An Uno R4 Minima running Blink: about 33 mA typical (Arduino datasheet), plus an LED at 6 mA, gives about 39 mA.
Why: the battery only cares about the total charge drawn per hour, which is the average current.
-
2
t = \text{mAh} / \text{mA}, in hours.
Example
A 2000 mAh pack: 2000 / 39 \approx 51 hours.
Why: mAh is milliamps times hours, so dividing by milliamps leaves hours.
-
3
\text{Wh} = \text{mAh} \times V / 1000.
Example
2000 mAh at 5 V is 10 Wh; 2000 mAh at 3.7 V is 7.4 Wh.
Why: only energy, not charge, compares batteries of different voltages fairly.
-
4
Say "at most about 51 hours", never "51 hours".
- the board runs from a converter between the battery and the board — expect noticeably less, since the converter wastes some energy.
- the battery is cold, old or a cheap unbranded cell — expect less again.
Why: the division assumes every milliamp-hour on the label reaches the circuit, which never happens.
Common mistakes
- Treating mAh as energy and comparing a 3.7 V pack with a 7.4 V pack by mAh alone.
- Using the current while the board sleeps, or while a motor runs, instead of the average.
- Mixing amps with mAh: 2000 mAh / 0.039 A is not 51 hours.