Sleep Mode Optimizer
Sleep Mode Optimizer
Tune IoT sleep and wake choices, then see how current, latency, and duty cycle change battery life.
Sleep Mode Optimizer
Explore how wake, sensing, reporting, and sleep contribute charge over a repeated device schedule. The tool estimates average current and load-only battery life. It does not by itself verify RAM retention, wake-source support, battery pulse capability, or real-board current.
Battery life depends on how long the device stays in each state, not only the lowest current number.
Deep modes may save current but add wake delay, reinitialization time, and missed-event risk.
Short sleep current gains can be overwhelmed by frequent high-current transmissions.
Datasheet currents are starting points; peripherals, pull-ups, sensors, and firmware change real sleep current.
Wake
The clock or event source brings the device out of sleep, with mode-specific latency.
Sense
The MCU and sensor are active while data is sampled, checked, or buffered.
Transmit
Radio bursts are short but usually draw much more current than sensing.
Sleep
The device waits in the selected low-power mode for most of the cycle.
Validate
The strategy is judged against battery life, latency, and break-even time.
Controls
Field sensorWake/sleep cycle
charge use across one interval| Mode | Profile source | Schedule | Average current | Wake/restore | Latency check |
|---|
Diagnosis
balancedAverage Current
Average current is the charge used by every state divided by the full schedule duration.
Iavg = Σ(Istate × tstate) / TsupercycleBattery Life
This is a load-only estimate. Usable capacity is an explicit planning assumption, not a universal 80% rule.
life hours = usable mAh / IavgPhysical Batching
One full report occurs every N sensing cycles; the timeline never draws a fractional transmission.
Qsuper = (N − 1)Qnormal + QreportBreak-even
A deeper mode pays back only after extra wake/restore charge is recovered through lower sleep current.
sleep time > extra transition charge / saved currentSleep Mode Quick Reference
These are mode families, not universal MCU specifications. Mode names, retained state, wake sources, current, and wake time differ by device and configuration.
| Mode family | Qualitative state | Design question | Required evidence |
|---|---|---|---|
| Idle or wait | CPU execution pauses while many clocks or peripherals may remain powered. | Is near-immediate response required? | Named-device current, enabled clocks, peripheral state, interrupt latency. |
| Retention or light sleep | Selected state and domains remain powered. | Which RAM, clocks, and wake sources must survive? | Retention configuration, wake-source matrix, measured resume time. |
| Deep sleep or standby | More power domains are disabled. | Is restart and reinitialization acceptable? | Retained state, wake cause, boot/restore charge, board sleep current. |
| Shutdown or hibernate | Only a minimal always-on domain remains. | Can the system recover from a restart-like wake? | Off current, allowed wake pins, state recovery, startup reliability. |
Wake Source Selection
A wake source is valid only when the selected device mode, pin or peripheral configuration, and firmware path support it. Confirm the wake-source matrix in the named device reference manual and verify it on the real board.
- Timer or RTC wakes suit periodic sensing.
- GPIO wakes suit buttons, reed switches, alarms, and simple external events.
- Accelerometer wake can save MCU current but adds sensor standby current.
- Continuous receive, periodic listen windows, protocol paging, preamble sampling, and a separate wake-up receiver have different power behaviour; “radio wake” is not one universal mechanism.
Technical Accuracy Notes
- Average current is calculated from every state’s current multiplied by duration, then divided by the full N-cycle supercycle.
- Reporting every 10 cycles means nine sensing cycles without radio and one cycle with the full entered radio duration. The model does not derive packet length or protocol airtime from batch size; the entered radio duration defines the complete physical report cost.
- Wake/restore current and duration are explicit inputs. Real traces may contain separate entry, oscillator, sensor warm-up, and restore states.
- The usable-capacity factor is visible and editable. The optional self-discharge input is a constant percentage of nominal capacity per year, not exponential decay or a chemistry model. Battery chemistry, temperature, pulse current, cutoff voltage, regulator dropout, and aging can change real results.
- The break-even result is a wake-only comparison against the independently sourced Light profile. Each profile has its own sleep current, wake/restore current, and wake/restore duration. Entry energy, oscillator start-up, sensor warm-up, and other restore states remain outside this approximation unless included in those entered values.
Implementation Checklist
- Measure sleep current with real firmware and all peripherals connected.
- Check wake sources still work in the selected mode.
- Verify wake latency against event timing and communication windows.
- Batch transmissions where the application permits stale data.
- Test brownout and recovery behavior near end-of-life battery voltage.
Find The Break-even Point
Set the wake interval to 2 seconds and compare Light, Deep, and Hibernate. Notice when Hibernate’s wake cost is paid too often.
Radio Dominates
Select Asset Tracker, set Report Every to 1, then increase radio time. Notice how sleep-current gains become less important.
Wake-Latency Constraint
Select Door Alert and lower Maximum wake/restore latency. Hibernate becomes a poor choice even though its sleep current is lowest.
Which sleep state is cheapest for this wake interval?
Compare retained standby with cold shutdown across oscillator start, state restore, useful work, and the remaining sleep window.
Try the chooser
Edit one mode profile
Observe the evidence
Iactive = Istatic + slope × f
trun = 1000 × (work + restore)/(f × 10^6)Ecycle = Eosc + Erun + Esleep
Iaverage = 1000 Ecycle/(V × interval)T = 1000(KA − KB)/(Psleep,B − Psleep,A)