Making a battery last a year
Why sleep current decides battery life, why rated capacity is optimistic, and how to design a duty cycle that survives contact with a real cell.
Sleep current is the whole design
Almost every disappointing battery life comes down to the same misplaced attention. People optimise the part of the cycle they can see — the radio burst, the sensor read, the LED flash — and ignore the part that occupies 99% of the time.
Take a sensor that wakes for two seconds every ten minutes. That is 0.33% of its life awake and 99.67% asleep. Suppose it draws 30 mA while awake. If the sleep current is 5 µA, the average works out at about 105 µA, and the sleep contributes only 5 of that. Now let the sleep current be 50 µA instead — still a small-sounding number — and the average becomes 150 µA. The device just lost a third of its life to a change in the part nobody was looking at.
Push the interval out to an hour and the effect gets starker: sleep current becomes almost the entire budget, and the radio burst you spent a week optimising barely registers. The rule that falls out of this is blunt.Below roughly one wake per minute, design the sleep state first and the active state second.
The battery life calculator separates the two deliberately so you can see which dominates, rather than reporting a single average that hides it.
Where the microamps actually go
A microcontroller datasheet promising 1 µA in deep sleep is describing the chip in isolation, on a bench, with peripherals off. Boards routinely measure ten to a hundred times worse, and the extra almost always comes from the same short list:
- The regulator's quiescent current. A common LDO burns 50 µA doing nothing at all. Low-quiescent parts exist at a few hundred nanoamps and cost slightly more — see theregulator calculator for the dissipation side of the same choice.
- Pull-up and pull-down resistors. A 10 kΩ pull-up held at the wrong level across 3.3 V draws 330 µA continuously. That single resistor can outweigh everything else on the board.
- Floating inputs. An unconnected CMOS input drifts near the switching threshold and lets both transistors conduct. Tie unused pins.
- Sensors and flash left powered. Many parts have a sleep command that is not the same as their power-on default, and some need their supply cut entirely.
- Indicator LEDs. A "low power" indicator at 2 mA is hundreds of times the sleep current of everything else combined.
The practical consequence is that sleep current must be measured, not calculated. Budget for that measurement in the schedule; it is where battery-powered projects are won and lost.
Rated capacity is a best case
Cell capacity is quoted under conditions that flatter it: a low continuous discharge, room temperature, down to a cutoff voltage lower than your circuit will tolerate. Real devices meet none of those.
Pulse current is the main offender. Every cell has internal resistance, and a current pulse drops the terminal voltage by I × R for the duration. A CR2032 has tens of ohms of it, so a 20 mA transmit burst can sag the terminal voltage by half a volt or more — enough to brown out a 3 V system while most of the chemistry is untouched. The cell recovers between bursts, which makes the failure intermittent and maddening to diagnose.
The standard fix is a bulk capacitor across the cell, sized to supply the burst so the cell only ever provides the average. A few hundred microfarads can be the difference between a design that works and one that resets whenever it transmits.
Cold makes it worse. Internal resistance rises sharply as temperature falls, so a device that is fine on a desk can fail outdoors in winter. If it lives outside, derate hard.
Your cutoff is not the cell's. If a capacity is quoted down to 2.0 V and your regulator drops out at 2.7 V, you never get the last part of that capacity. The capacity tablelists typical figures, but the usable fraction depends on your circuit.
Self-discharge sets the ceiling
There is a point past which reducing consumption stops helping, because the cell is discharging itself faster than the device is.
Lithium primary cells lose roughly 1% a year, so a ten-year design is plausible. Alkalines lose a few percent a year. Ordinary NiMH can lose 20% or more in a month, which is why low-self-discharge variants exist. If your device averages 2 µA and the cell leaks 5 µA, halving the device's consumption changes almost nothing.
Work out the self-discharge rate in the same units as your average current and compare them directly. That comparison tells you whether more optimisation is worth the effort or whether you should be choosing a different cell.
Trading interval against life
Reporting interval is usually the strongest lever available, and it is frequently set by habit rather than requirement. Going from one report a minute to one every fifteen cuts the active energy by fifteen — until sleep current becomes the floor and further stretching buys nothing.
That floor is the number worth finding early. Calculate life at your target interval and again at ten times the interval; if the two are close, you are sleep-dominated and the interval is not your problem.
Two refinements are often free. Send less — payload size drives airtime, airtime drives energy, and thedata usage calculator shows how quickly overhead dominates on small payloads. And send only on change— a temperature sensor reporting every fifteen minutes regardless transmits ninety-six times a day to say nothing happened.
Do the sum before building
Battery life is one of the few things in embedded work that is genuinely predictable in advance, and one of the most expensive to discover late. A device sealed into an enclosure and deployed to a hundred sites is not something you want to revisit because the arithmetic was optimistic.
Estimate first with datasheet numbers. Measure the sleep current on real hardware as soon as one exists. Then derate what the cell can deliver, not what it is rated at — and if the answer is close to your target, it is not close enough.