Smart Sensor Battery Life Calculator

A door sensor spends its whole life asleep. Out of 86,400 seconds in a day it is awake for maybe thirty, and for those thirty seconds it pulls two thousand times what it pulls the rest of the time. Both numbers matter, and which one dominates is not obvious from either of them on its own. A device that wakes sixty times a day can be sleep-limited or radio-limited depending entirely on how long a wake lasts, and the fix is different in each case.

mAh
From the cell data sheet or the pack, for the chemistry and size you actually put in. Rated capacity is measured at a gentle discharge and a mild temperature, which is roughly how a sleeping sensor drains a cell, so it is a fair starting point here.
%
A device stops working when its supply falls below what the radio needs, which happens before the cell is empty. If the product data gives a cutoff voltage, that fraction is what belongs here.
uA
What the device draws between events, in microamps. This is a manufacturer figure or a bench measurement; there is no default worth trusting across products, so use the one for yours.
Door openings, motion trips, button presses. Count what the device really sees, not what the room does — a sensor with a lockout period ignores some of it.
ms
Detect, transmit, wait for an acknowledgement, go back to sleep. A retry because the first transmission was not acknowledged can double this, which is why a device at the edge of coverage dies early.
The keep-alive or status report the device sends whether or not anything happened. Often adjustable, and often the single easiest thing to change.
ms
Usually shorter than a real event because there is less to say, but it still spins up the radio.
mA
The average over the whole awake period, not the transmit peak. Peak current matters for whether the cell can supply it at all, which is a different question from how long it lasts.
%/yr
What the cell loses sitting on a shelf. On a device that only draws a few microamps this is not a rounding error — it can be a tenth of the whole budget.
%
A cell in an unheated garage or on an outside door delivers less than the same cell in a hallway. Put your own allowance here; 0 leaves the rated figure alone.
%
Each retry repeats the awake period. Set this from what the hub reports if it reports it, and leave it at 0 if you do not know.
Sensor Battery Life Calculator: Months From a Duty CycleBuildFigure

Everything reduces to one average current

Battery life for a sleeping device is not complicated, it is just spread across four numbers that never appear together on a spec sheet. Whatever the device is doing at any instant, the cell only cares about the average, and the average is the time-weighted sum of the states it passes through. Sleep for almost all of the day at some microamp figure. Wake for a few hundred milliseconds at a few tens of milliamps, a certain number of times. Wake again on a schedule whether or not anything happened. And lose a little every year to the cell simply sitting there.

Convert each of those to microamps of average current, add them, divide the usable capacity by the total, and you have hours. The defaults on this page are a 220 mAh cell at 80 percent usable, an 8 uA sleep, 60 events a day of 400 ms and 24 check-ins of 250 ms at 18 mA awake, with 2 percent a year of self-discharge. That is 30 seconds awake out of 86,400 — a duty cycle of 0.035 percent — and it works out to an average of 14.75 uA and 16.3 months on a cell, or 1.36 years.

The interesting part is the split. Sleeping takes 8 uA of that, the wake events 5, the check-ins 1.25, and self-discharge about half a microamp. So a device that is asleep 99.965 percent of the time still spends over 42 percent of its energy budget on the 0.035 percent when it is awake. That ratio is the whole reason short awake periods matter so much, and it is why two devices with identical sleep currents can differ by a factor of three in service life.

Which knob is worth turning

Once the split is on screen the decision is usually obvious, and it is usually not the one people reach for first. Buying a bigger cell scales everything by the same factor. Cutting the check-in rate only helps if check-ins are a real share of the total — at 24 a day of 250 ms they are 8.5 percent here, so halving them takes the life from 16.3 months to 17.1, which is about three weeks. Halving the awake time per event is worth 20 percent on these numbers: 16.3 months becomes 19.7.

The other lever is not on the device at all. A sensor that has to retransmit because the first attempt was not acknowledged pays the whole awake cost again. Set the retry share to 30 percent and the same device drops from 16.3 months to 14.5. A device sitting at the edge of coverage is not just unreliable, it is expensive, and the fix is a routing device closer to it rather than a bigger battery. Coverage geometry belongs on the access point coverage calculator.

The figure at the bottom is the one to argue with

The last line shows what the device would manage if the radio never woke at all — sleep current and self-discharge only. On the defaults that is 28.3 months. No amount of tuning events, check-ins or retries gets past it, because it is what the design costs before it does anything useful. If a product claims a life well beyond that line for your cell, either its sleep current is lower than the figure you entered or the claim is measured under conditions you are not going to reproduce.

Two caveats worth being blunt about. Rated capacity is measured at a gentle discharge at a comfortable temperature, and a cell on an outside door in January is neither; the cold write-off field exists so you can put your own number on that rather than pretend it is zero. And a coin cell that can supply 18 mA when it is fresh may not be able to supply it at 70 percent depleted, which is why devices sometimes fail at a capacity the arithmetic says should still be fine. That is a peak-current question, not a capacity question, and this page does not answer it.

Questions people ask

Why does my sensor die in six months when the box says two years?

Almost always one of three things, and the split on this page tells you which. The device is waking more often than the rated figure assumed, because the room is busier than the test bench. The awake period is longer than assumed, usually because transmissions are being retried at the edge of coverage. Or the cell is colder than the rating was measured at. Put your real event count and a retry share in and the two-year figure usually collapses to something close to what you are seeing.

Does a bigger battery just fix it?

It scales the answer linearly and nothing else. Twice the capacity is twice the life at the same average current, which is genuine but expensive and often not physically possible in the device. Halving the awake time per event, or cutting a needless check-in schedule, costs nothing and can be worth as much. Look at which line in the split is biggest before spending anything.

What sleep current should I put in if I cannot find the number?

There is no honest default across products; sleep currents for devices that look identical range over more than a decade of magnitude. Look for a quiescent or standby current in the product data. Failing that, work backwards: if the maker claims a life for a known cell and you know roughly how often it wakes, this page run in reverse tells you what sleep current that claim implies, and whether it is plausible.

Is self-discharge really worth including?

On a device drawing microamps, yes. Two percent a year of a 220 mAh cell is 4.4 mAh, which is about half a microamp of continuous equivalent draw. Against a total of under 15 uA that is a few percent of the whole budget, and on a very low-power design that only wakes a few times a day it can be a fifth of it. It is the one term that gets larger as the device gets better.

Why is the peak transmit current not asked for?

Because it does not affect how long the cell lasts, only whether the device works at all. Life depends on the average current over the awake period, which is what this page asks for. Peak current decides whether the cell can hold its voltage during a transmission, and a cell that is fine at that on day one may not be at 70 percent depleted. That is a separate failure mode and this page does not model it.

Related