Lite / Independent Engineering Research / Week 24
Energy budgets and duty cycling
A soil sensor must run for two years on two AA batteries. It can only be awake about one second in every hundred. How do you design for that?
Why should I care?
Most deployed sensors, wearables and remote robots are energy-limited, not speed-limited. Duty cycling (sleep almost always, wake briefly) is the most powerful technique there is, and simple arithmetic tells you where every microjoule goes.
- Compute average power of a duty-cycled device from active and sleep power.
- Estimate battery life and identify which state dominates the energy budget.
- Compare energy per operation across computing choices and design a schedule that meets a lifetime target.
Predict
A node draws 10 mW for 10 ms every second and 5 µW asleep. What dominates its average power?
- Sleep
- Active
- They are about equal
- Neither: average power is zero
Guess first, then reveal
Active: 10 mW × 1% = 100 µW. Sleep: 5 µW × 99% ≈ 5 µW. Active dominates, so shortening the awake time (or the wake rate) is the lever. Make it wake once a minute and sleep would dominate instead.
Discover
In the Code Lab, model a sensor node as a list of states (sleep, wake-up, sense, compute, transmit) each with a power and a duration. Compute energy per cycle, average power and battery life. Then vary the wake interval from 1 s to 10 min and plot battery life. Where does the curve flatten, and why?
What the interactive shows (text version)
The derivation shows P_avg = D·P_on + (1 − D)·P_sleep. A node waking every 30 s for 50 ms at 24 mW and sleeping at 4 µW averages about 44 µW and would last about 9 years on a 1,000 mAh, 3.6 V cell in this ideal model.
Understand
Energy, not power
Batteries store energy (joules, or watt-hours). A task's cost is power × time, so a fast, power-hungry processor that finishes quickly and sleeps can use less energy than a slow, frugal one. Always compare energy per task.
Know your states
Real nodes have more than two states: deep sleep, wake-up (oscillator start, can be costly), sensing, computing, and radio transmit (often the most expensive per second). Measure or look up each, build a timeline, and add up the energy. The biggest slice is where design effort should go.
Computing less, or locally
Sending raw data by radio can cost far more energy than processing it locally and sending a short result. This is a key argument for embedded ML: a tiny on-device classifier that transmits only 'event detected' can extend battery life enormously, provided its own energy and false alarms are counted.
Explain it another way
Intuitive
A lighthouse that flashes for a moment every ten seconds uses far less than a lamp left on, yet ships still see it. Most of the time, being off is the job.
Technical
Microcontrollers offer several low-power modes trading wake-up latency against sleep current; real-time clocks and wake-up interrupts schedule activity. Peripherals and pull-up resistors left on are common hidden drains.
Mathematical
P_avg = D·P_on + (1 − D)·P_sleep. Sensitivity: ∂P_avg/∂D = P_on − P_sleep ≈ P_on. Halving t_on halves the active contribution; halving P_sleep matters only when (1 − D)·P_sleep is comparable.
Applied
Wildlife trackers and environmental monitors are commonly designed to run for months to years on small batteries by sleeping almost always and waking briefly to sense and transmit.
Derivation: Average power and battery life
Over one period T, the node is active for t_on and asleep for T − t_on. Duty cycle D = t_on / T.
Energy per period E = P_on·t_on + P_sleep·(T − t_on). Average power P_avg = E / T = D·P_on + (1 − D)·P_sleep.
Battery energy ≈ capacity (Ah) × voltage (V) × 3600 J. Lifetime ≈ E_battery / P_avg (ignoring self-discharge and temperature).
As T grows, D → 0 and P_avg → P_sleep: sleep power sets the ceiling on lifetime.
Example: P_on = 15 mW, t_on = 20 ms, T = 10 s, P_sleep = 3 µW: D = 0.002, P_avg = 30 + 3 ≈ 33 µW. Two AA cells (about 2.5 Ah at 3 V ≈ 27 kJ) last about 26 years by this ideal sum; self-discharge will end them much sooner.
Worked example 1
A node wakes every 30 s for 50 ms at 24 mW and sleeps at 4 µW. Average power and life on a 1,000 mAh, 3.6 V cell?
D = 0.05/30 = 0.00167. Active: 24 mW × 0.00167 = 40 µW. Sleep: 4 µW × 0.998 ≈ 4 µW. P_avg ≈ 44 µW. Energy = 1 Ah × 3.6 V × 3600 = 12,960 J. Life ≈ 12,960/44×10⁻⁶ s ≈ 2.95×10⁸ s ≈ 9.3 years (ideal).
Common mix-ups
The lowest-power processor gives the longest battery life.
✓ Energy per task decides it: a faster chip that sleeps sooner can win.Battery life = capacity ÷ active current.
✓ Use average current over the whole duty cycle, and allow for self-discharge, temperature and ageing.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Design a duty-cycle schedule for a gesture-detecting wristband that must last 14 days on a 150 mAh, 3.7 V cell. Use the inference energy you estimated in week 23, add sensing and a radio message per detected gesture, and show the budget table with every assumption labelled.
Reflect
Which state of your device would you measure first if its battery died early, and why?
Write your answer on paper or in your own notes. Lite never stores what you write.