Sub topic 11
Estimating Battery Runtime Realistically
Assume you understand voltage, current, resistance, and how to upload an Arduino sketch. This chapter focuses on turning a battery rating and a current budget into a useful runtime estimate.
Start with a current budget
A current budget lists every load and its average current. The average matters because an Arduino project may sleep, wake, measure, transmit, and then sleep again.
| Load | Active current | Average current |
|---|---|---|
| Arduino board | 25 mA | 25 mA |
| Sensor | 10 mA | 5 mA |
| Radio, active part of the time | 80 mA | 20 mA |
| Total | — | 50 mA |
Add the average currents, not only the largest active current. Also account for regulator losses. A switching regulator draws more current from the battery than the load receives because its efficiency is below 100 percent.
For a regulator with efficiency η:
Battery power = Load power / η
For a battery voltage Vbattery and load voltage Vload:
Battery current ≈ (Vload × Iload) / (Vbattery × η)
A linear regulator is different. It passes approximately the same current as the load, but it wastes the voltage difference as heat.
Use the simple runtime estimate
Battery capacity is usually written in milliamp-hours, or mAh. A 2000 mAh battery could theoretically supply 2000 mA for one hour or 100 mA for 20 hours. Real projects get less because of regulator losses, temperature, battery age, discharge-rate effects, and the cutoff voltage.
Use a derating factor for an early estimate:
Runtime hours ≈ capacity mAh × derating factor / average battery current mA
A factor between 0.6 and 0.8 is a reasonable starting point when you do not have test data.
def runtime_hours(capacity_mah, avg_current_ma, derate=0.7):
"""Estimate usable battery runtime."""
if capacity_mah <= 0 or avg_current_ma <= 0:
raise ValueError("Capacity and current must be positive")
return capacity_mah * derate / avg_current_ma
print(runtime_hours(2000, 50)) # 28.0 hoursThis calculation assumes that avg_current_ma is the current drawn from the battery. If 50 mA is the regulated 5 V load from a 9 V battery and a 90 percent efficient converter, first estimate the battery current:
(5 V × 0.050 A) / (9 V × 0.90) ≈ 0.031 A
That is about 31 mA before adding the converter's own idle current.
Include peaks and cutoff limits
Average current predicts energy use, but current peaks can still reset a project. A radio transmitting at 200 mA may cause battery voltage sag even when the average is only 40 mA. Check the battery's maximum discharge current, regulator peak rating, wiring, and capacitor recommendations.
The project stops when the battery reaches the system cutoff voltage. A battery may still contain energy at that point, but the regulator can no longer produce a stable output.
Exercise
A 1200 mAh battery supplies a project that averages 80 mA. Using a derating factor of 0.7, what runtime should you expect?
Show answer
Runtime = 1200 × 0.7 / 80 = 10.5 hours. Actual runtime may be shorter because of peaks, regulator losses, temperature, and cutoff voltage.