Terminology (5)Terms used in this lesson
Term on the front, definition on the back. Paste with tabs between fields and a new line between cards, or import the download in Anki as Basic.
- Power and energy
- Power is a rate (watts); energy is power over time (joules, or watt-hours).
- Watt-hour
- One watt for one hour, 3,600 joules; battery Wh = mAh × volts / 1000.
- Duty cycle
- The fraction of each period a device spends active.
- Voltage
- Power = voltage × current, so the same mA at a lower voltage is less power.
- Battery budget
- The average power a battery can supply to last a target time.
Why this matters
Battery-powered devices, from trackers to phones, spend most of their time asleep and most of their energy in short bursts. Settings that change how often they wake, which are often controlled from a backend, decide their battery life. The arithmetic needs units kept straight: charge, energy and power are different quantities.
This lesson assumes rates, unit conversion and weighted averages.
Charge, energy and average power
Power is the rate of energy use, so energy is power multiplied by time. Battery charge in milliamp-hours becomes energy only when combined with voltage. Regulator efficiency then relates the power delivered to the electronics to the larger draw from the battery.
A duty cycle is the fraction of a repeating period spent in an active mode. Recall the weighted average: multiply each mode’s power by its time, add the contributions and divide by the whole period. Combining that average with usable energy estimates lifetime; the report interval must also allow sequential activities to finish.
01Average over the whole cycle
Average over the whole cycle
Your company’s shipment trackers report their location once an hour and last about five months on one charge. Product wants a report every five minutes. The first estimate said the battery would still last for months; trackers in the pilot went flat in under two weeks.
To isolate time weighting, first use a reduced single-current model at a fixed supply: each hourly report is active for 20 s at 120 mA; the rest of the hour it sleeps at 0.05 mA. The average is (120 × 20 + 0.05 × 3,580) / 3,600 = 0.716 mA, and a 2600 mAh cell lasts 151 days. Leaving out the sleep current gives 0.667 mA and 162 days: a tiny current, running 179 times longer than the burst, costs 11 days.
A fleet console in Node.js can compute the expected life for each proposed interval before pushing the setting to devices.
02mAh is charge, Wh is energy
mAh is charge, Wh is energy
Predict both lines.
// The same 2600 mAh rating on a 3.6 V lithium cell and a 1.2 V NiMH cell, powering the hourly tracker.
const draw = (100 * 30 + 500 * 10 + 0.1 * (3600 - 40)) / 3600 / 0.9; // average mW from the battery
for (const volts of [3.6, 1.2]) {
const wh = (2600 * volts) / 1000;
console.log(
`${volts} V: ${wh.toFixed(2)} Wh, ${((wh * 1000) / draw / 24).toFixed(1)} days`
);
}
A milliamp-hour rating counts charge. Energy is charge times voltage: 2600 mAh at 3.6 V is 9.36 Wh, at 1.2 V only 3.12 Wh. That current-only probe does not describe the full 40 s reporting sequence below. To compare different cells and regulator losses, use the measured mode powers instead. Device datasheets often give power in mW for each mode, so convert the battery to mWh before dividing; dividing mAh by mW is off by the voltage.
03The regulator takes its share
The regulator takes its share
| Report every | From battery | Life |
|---|---|---|
| 60 min | 2.579 mW | 151.2 days |
| 5 min | 29.726 mW | 13.1 days |
The electronics run from a regulated supply, and the regulator wastes part of what it draws as heat. At 90% efficiency the battery supplies the load divided by 0.9. A GPS fix at 100 mW for 30 s and an LTE-M upload at 500 mW for 10 s cost 8,000 mW·s per report; twelve reports an hour instead of one is most of the difference.
04How often can it report?
How often can it report?
Turn the question around. With 80% of the capacity usable, 90 days allows an average of 7,488 mWh / 2,160 h = 3.467 mW from the battery. The load can use 0.9 ×3.4667 =3.12 mW of that. Its 0.1 mW sleep baseline runs all the time, leaving 3.02 mW at the load for extra activity. The modes replace 40 s of sleep, so extra energy per report is(100 −0.1) ×30 +(500 −0.1) ×10 = 7996 mW·s. For period T, load average is0.1 +7996/T; requiring this ≤3.12 gives T ≥ 7996/3.02 ≈ 2647.7 s, about 44 minutes. Reports run sequentially, so T must also be at least 30 + 10 = 40 s; a looser energy budget cannot make a report overlap itself.
05What the budget leaves out
What the budget leaves out
06Set the report interval
Set the report interval
Check the reduced current budget, then price the full report’s energy through its regulator. The fleet setting needs an interval that meets the usable-energy target and still leaves enough time to finish each report.
A fleet of shipment trackers
Average the duty cycle, convert to energy, then budget the interval.
In the frontend An interval picker with expected life in Next.js and Svelte Optional
The fleet console can show the expected battery life next to the interval, so the trade-off is visible before the setting reaches devices.
// The fleet console: show the expected battery life before an operator changes the report interval.
type Tracker = {
wh: number;
eff: number;
sleepMw: number;
reportMj: number;
reportSeconds: number;
}; // reportMj: extra energy per report, mW·s
export function IntervalPicker({
t,
minutes,
onChange
}: {
t: Tracker;
minutes: number;
onChange: (m: number) => void;
}) {
const period = minutes * 60;
const valid = Number.isFinite(minutes) && minutes > 0 && period >= t.reportSeconds;
const drawMw = (t.sleepMw + t.reportMj / period) / t.eff;
const days = (t.wh * 1000) / drawMw / 24;
return (
<label>
Report every{" "}
<input
type="number"
min={1}
value={minutes}
onChange={(e) => onChange(Number(e.target.value))}
/>{" "}
min
<output>
{valid
? `about ${Math.floor(days)} days per charge`
: `Choose an interval of at least ${t.reportSeconds} seconds.`}
</output>
</label>
);
}
Check this idea later
Sources
- LTE-M and its power saving mode
- Nordic Semiconductor: Power Profiler Kit II
- BIPM: the SI brochure (units of energy and power)
Values above were run in Node 22, Go 1.27, Rust 1.99 and Apple clang 17. The tracker and its figures are a worked model.
Sign in to keep your read marks on every device. Sign in
Was this helpful?