Deep sleep and battery life
A battery device spends most of its life asleep. Awake, the ESP32 chip draws about 45 mA; in deep sleep only its real-time clock runs, at about 10 µA (ESP32 datasheet). But this is a DevKit board, not a bare chip: its red power LED and its USB-to-serial chip stay on the 3V3 rail while the ESP32 sleeps, and they draw almost a hundred times more than the chip.

Open this lesson in the labFree, in your browser, no account needed.
How it works
Awake (2 s): chip about 45 mA + the GPIO2 LED 2.2 mA + power LED 750 µA + USB chip (suspended) 80 µA = 48 mA
Asleep (8 s): chip 10 µA + power LED 750 µA + USB chip 80 µA = 840 µA. The power LED alone is 75 times the chip.
Average = (48 mA × 2 s + 840 µA × 8 s) / 10 s = 10.3 mA: 8.1 days on a 2000 mAh cell.
Fed through VIN instead, the AMS1117 regulator adds its own 5 mA all the time. Battery products use a bare module (or cut the LED), and a low-quiescent regulator such as the HT7333 (4 µA).
Try it on the bench
- Watch the ammeter jump between about 50 mA and under 1 mA.
- Use the variant to cut the power LED: the sleep current drops to about 90 µA.
- Edit the sketch to sleep 60 s instead of 8 s and recompute the battery life.
Parts on the bench
- Bench power supply
- Digital multimeter
- ESP32 DevKit
In the course
Zen’s Electronics Design Mastery, module “Microcontrollers & Embedded”.