Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Every way to stretch a battery

Budget the states, sleep deeper, wake less often, cut what never sleeps, and pick a regulator whose own draw is small. The power budget tells you which one moves the answer.

Always start with the power budget: list each state's current and time, find the average, and see which state's charge (current × time) dominates. Then attack that one.

  • The awake states dominate → shorten them (fewer, faster measurements; batch the radio) or wake less often. Duty cycling stops paying once the average gets close to the sleep current.
  • The sleep state dominates → sleep deeper: on the ESP32-S3 deep sleep draws far less than light sleep, at the cost of a restart at setup() and losing ordinary RAM (keep values in RTC memory).
  • The board draws far more asleep than the chip's datasheet says → the regulator's quiescent current, the power LED and the USB bridge never sleep. Choose a low-quiescent regulator, or a board without them.
  • A big drop from the battery voltage to the logic voltage at high current → a switching regulator wastes much less than an LDO, which burns (V_{in} - V_{out}) \times I as heat.
  • It must run forever outdoors → size a solar panel and battery for the worst month, not the average sun.

Derate the battery (about 0.7 to 0.8 of the label) and measure the real current before trusting any estimate.

Find where the charge goes

Section

Power budgets

Average current from a table of states, and life = derating × capacity / average current.

Symbol

I_{avg}

average current over a duty cycle (I_avg)
A table of each state's current and time, giving the average current.

Example

Asleep at 8 µA, awake 300 ms of every 60 s at 32.9 mA: about 0.17 mA on average, roughly 9,300 hours from 2000 mAh at k = 0.8.
Reducing a rating to allow for real-world losses.

Check the budget against the real board before trusting it.

Spend less time awake

Section

Duty cycling

Sample, act, sleep; include the boot time, and stop lengthening the period once the sleep current dominates.

Light sleep against deep sleep on the ESP32-S3, and the timer, ext0 and ext1 wake sources.

Waking briefly to work, then sleeping most of the time.
Low-power modes: light sleep pauses the CPU keeping RAM; deep sleep powers almost everything off and restarts on wake.

Cut what never sleeps

Why an ESP32-S3-DevKitC-1 sleeps far worse than the chip on it.

An LDO against a switching regulator, the dropout, and the heat a linear regulator turns out.

The current a regulator uses itself, even with no load.
A regulator that switches rapidly and stores energy in an inductor, wasting little as heat.

Bring energy in

Chemistry, capacity and the protection circuit, before any of the arithmetic above matters.

Sized for the darkest month, with days of autonomy, not for the average sun.

Formal. The power delivered to a part with voltage V across it and current I through it is P = V I. For a resistor, substituting Ohm's law gives P = I^2 R = V^2/R. With volts and amperes, P is in watts. Energy is power multiplied by time: E = P t.

In plain English. Power is how fast a part turns electrical energy into something else, usually heat. More voltage or more current means more heat.

Example. A resistor dropping 3 V while carrying 20 mA turns 3 \times 0.020 = 0.06 W (60 mW) into heat, comfortably under a ¼ W rating.

Why this formula exists. It tells you whether a resistor, transistor, or regulator will overheat, and how long a battery will last.