Embedded Systems · Power Management
From Duty Cycle to Average Current and Battery Life
How charge accounting turns an active and sleep schedule into an average current, and where the resulting battery-life estimate stops being trustworthy.
A battery-powered device does not consume a constant current. It spends a few milliseconds at tens of milliamps, then a second or a minute at a few microamps, and the number printed on the cell is a charge in milliamp-hours that assumes none of that structure. Converting one into the other is arithmetic, and the arithmetic is easy to get right. What is not easy is knowing which terms the arithmetic silently ignores.
Charge, current, and the units that hide a factor of voltage
Battery capacity is quoted in amp-hours, which is charge, not energy. One amp-hour is 3600 coulombs. A 2000 mAh cell therefore holds 7200 C of charge, and if the load drew exactly 1 mA the cell would deliver it for 2000 hours in the ideal case. The word ideal carries most of the weight in that sentence.
Energy is the quantity that actually governs how long a device runs, and it is charge multiplied by voltage. A 3.7 V nominal lithium-ion cell at 2000 mAh stores roughly 7.4 Wh. If the load is a 1.8 V rail fed by a buck converter, the current drawn from the battery is not the current flowing in the 1.8 V domain: it is the load power divided by the battery voltage and then divided again by the converter efficiency. Mixing the two domains is a common source of estimates that are wrong by a factor of two.
For a load that runs directly from the cell, charge accounting is sufficient and simpler. For a load behind a regulator, energy accounting in joules or watt-hours is the honest unit, and the regulator’s own quiescent draw has to be added at the battery side.
Summing the schedule
The average current of a repeating schedule is the total charge moved per cycle divided by the cycle period:
$$I_{\text{avg}} = \frac{1}{T}\sum_k I_k , t_k , n_k$$
where each phase k runs at current $I_k$ for duration $t_k$ and occurs $n_k$ times per cycle. Because the sum is linear, phases can be listed in any order, and overlapping phases add their currents at the instants they overlap. The formula assumes the current within a phase is constant; when it is not, the phase should be split until it is, or the integral of current over the phase should be used directly.
A concrete schedule makes the magnitudes visible. A device that transmits at 12 mA for 20 ms, receives at 9 mA for 5 ms, runs its core at 0.9 mA for 100 ms, and sleeps at 6 µA for the remaining 875 ms of each second draws:
| Phase | Current | Duration | Charge per second |
|---|---|---|---|
| Transmit | 12 mA | 20 ms | 240 µC |
| Receive | 9 mA | 5 ms | 45 µC |
| Core active | 0.9 mA | 100 ms | 90 µC |
| Sleep | 6 µA | 875 ms | 5.25 µC |
The total is 380 µC per second, so the average current is 0.38 mA. Dividing 2000 mAh by that current gives roughly 5260 hours, or about 219 days. Two things about that table matter more than the final figure. The 20 ms transmit phase contributes 63 percent of the charge despite occupying 2 percent of the time, and the sleep phase contributes 1.4 percent despite occupying 87.5 percent of the time. Sleep current that looks negligible against an active phase can still dominate once the duty cycle is extreme, which is the subject of wake-up latency and its energy cost.
PHASES = [
# name, current in amps, duration in seconds, occurrences per cycle
("transmit", 12e-3, 0.020, 1),
("receive", 9e-3, 0.005, 1),
("core", 0.9e-3, 0.100, 1),
("sleep", 6e-6, 0.875, 1),
]
CYCLE = 1.0 # seconds for one repetition of the schedule
def average_current(phases, cycle):
charge = sum(i * t * n for _, i, t, n in phases) # coulombs per cycle
return charge / cycle
i_avg = average_current(PHASES, CYCLE)
capacity_c = 2.0 * 3600 # 2000 mAh expressed in coulombs
print(f"{i_avg * 1e3:.3f} mA, {capacity_c / i_avg / 86400:.0f} days")
The terms the sum leaves out
The first omission is the regulator. A low-dropout regulator with 1 µA of quiescent current, feeding a load that sleeps at 6 µA, adds 17 percent to the sleep current and nothing to the active current. At a 99 percent duty cycle of sleep, that 1 µA is a larger error than any rounding in the phase table. Switching regulators are worse in a different way: their efficiency at microamp loads can fall below 50 percent, and many have a low-power mode that changes quiescent current depending on load, so a single efficiency number cannot be applied across the whole schedule.
The second omission is everything attached to the pins. A 3.3 V line pulled to the rail through 100 kΩ draws 33 µA, continuously, whether or not the microcontroller is awake; at 10 kΩ the same line draws 330 µA. An external flash chip in standby, a level shifter with an enable pin left floating, an SD card that has not been put into its own sleep state: each contributes a term that never appears in the firmware’s power model. Measuring the assembled board in its deepest state, with the firmware halted, gives the floor that the schedule sits on top of.
The third omission is conversion loss when the battery voltage does not match the load. A boost converter delivering 100 µJ at 85 percent efficiency takes 118 µJ from the cell, and that ratio applies to every phase. Multiplied across a schedule, an efficiency assumption that is optimistic by ten points shortens the estimate by more than a tenth.
Why the capacity is not a constant
A milliamp-hour rating is measured at a specified discharge rate, usually a low one, down to a specified cutoff voltage. Drawing the same charge faster yields less of it, because the cell’s internal resistance converts more of the stored energy into heat and the terminal voltage reaches the cutoff earlier. For lead-acid cells this effect is pronounced enough to have its own empirical exponent, Peukert’s law, with an exponent typically between 1.1 and 1.4 for the common chemistries. Lithium-ion cells show a much weaker rate dependence, but they show a strong temperature dependence: capacity at 0 °C can be a large fraction below the room-temperature figure, and the internal resistance at low temperature causes voltage droop under pulse loads.
Self-discharge sets an upper bound regardless of the load. Lithium-ion cells lose a few percent of charge per month at room temperature, and the rate rises with temperature. A device whose average current implies a two-year life is really limited by self-discharge and by the shelf life of its passives long before the computed figure is reached.
End of life is a separate definition. A cell is usually considered exhausted at 80 percent of its initial capacity, and cycle count, depth of discharge, and charging voltage all move that point. The estimate produced by charge accounting is a fresh-cell estimate at a fixed temperature, and it should be labelled as such.
Pulses, droop, and the difference between average and peak
A schedule can average 0.4 mA and still fail, because the radio’s transmit pulse draws 30 mA for 2 ms. The average determines life; the peak determines whether the device works at all. A cell with 150 mΩ of internal resistance drops 4.5 mV at 30 mA, which is negligible; the same resistance at a 2 A surge drops 300 mV, close to a tenth of the terminal voltage. Cells near end of life and cells at low temperature have considerably more resistance than a fresh one, so a pulse the device survived when new can pull the rail below the brownout threshold and reset it.
The standard remedy is a capacitor close to the load that supplies the pulse and is refilled between pulses. The size follows from the tolerable droop:
$$C \ge \frac{I_{\text{pulse}} , t_{\text{pulse}}}{\Delta V}$$
For a 30 mA pulse lasting 2 ms with 100 mV of allowed droop, the capacitance is 600 µF. That is large enough to be a deliberate component rather than a decoupling afterthought, and its leakage becomes part of the sleep budget.
What the estimate is good for
An absolute lifetime figure derived this way is only as good as its inputs, and every input moves: capacity varies with temperature and age, efficiency varies with load, and the duty cycle in the field is not the duty cycle in the table. What the method does reliably is rank the contributors. If the transmit phase is 63 percent of the charge, halving its duration or its current is worth more than any amount of work on the sleep state, and the table says so before a single measurement is taken.
That ranking is the input to the rest of the design: which sleep mode to use, how aggressively to duty-cycle the radio, and whether the regulator is worth replacing. The subsequent articles in this cluster each attack one term in the sum, beginning with what a sleep mode actually turns off.
References
- Understanding Batteries — R. M. Dell, D. A. J. Rand; Royal Society of Chemistry, 2001
- Digital Integrated Circuits: A Design Perspective — Jan M. Rabaey, Anantha Chandrakasan, Borivoje Nikolic; Prentice Hall
- IEEE 485: Recommended Practice for Sizing Lead-Acid Batteries for Stationary Applications — IEEE