The power optimization hardware design for the ESP32 is the cornerstone of achieving ultra-low power systems, requiring meticulous control over power architecture, peripheral circuits, PCB layout, and more. Below are hardware-level optimization solutions validated by engineering:
1. Power Topology Optimization
1. Efficient Power Conversion Solutions
| Scenario | Recommended Solution | Static Current | Conversion Efficiency | Key Models |
|---|---|---|---|---|
| Input Voltage >3.8V (Lithium Battery) | Synchronous Rectification Buck DC-DC | 1-15 μA | >95% | TI TPS62740, MPS MP2615 |
| Input Voltage 2.7~4.2V | Ultra-Low Static Current LDO | 0.6-1 μA | 70~85% | TI TPS70933, ADM7150 |
| Button Battery Power Supply (2-3V) | Hysteresis Boost Converter | 0.5 μA | >80% | TPS61222, MAX17222 |
Design Key Points:
- For lithium battery power supply, choose a DC-DC + LDO two-stage architecture: DC-DC handles high step-down ratios, and LDO performs post-stage filtering
- For button battery systems, disable the DC-DC switch (cut off with the EN pin), keeping only the pulse mode of the hysteresis boost
2. Key Circuit Module Design
1. Power Switch Circuit
┌───────────┐
VBAT ────┬─────►│ EN │
│ │ TPS22810 │─────► VCC_ESP (3.3V)
┌───┴───┐ │ │
│ 100kΩ │ └───────────┘
└───┬───┘ ▲
▼ │
┌──────┐ ┌──────┐
│ MOSFET│◄───────┤ ESP32│
│(Si2302) │ GPIO │
└──────┘ └──────┘
- Function completely cuts off the power circuit of the ESP32 and peripherals, eliminating μA level leakage current
- Selection Requirements
- MOSFET: Leakage current <1nA (e.g., Si2302)
- Load Switch: On-resistance <50mΩ (e.g., TPS22810)
2. Low Power Sensor Interface
// Dynamic control of sensor power
#define SENSOR_PWR_GPIO GPIO_NUM_15
void read_sensor() {
gpio_set_level(SENSOR_PWR_GPIO, 1); // Power on
vTaskDelay(50 / portTICK_PERIOD_MS); // Wait for stabilization
// Read sensor data...
gpio_set_level(SENSOR_PWR_GPIO, 0); // Power off immediately
}
- Power Saving Effect when off, the sensor leakage current approaches 0
3. PCB Layout Golden Rules
1. Power Layer Design
- 4-layer board structure
<span>TOP (Signal) ── GND ── 3.3V_PWR ── BOTTOM (Signal)</span> - Key Measures
- Power plane avoid segmentation, reduce impedance
- Place 10μF MLCC + 0.1μF ceramic capacitor next to the VDD pin of the ESP32 (distance <2mm)
2. High Interference Signal Isolation
┌───────────────┐
│ ESP32 │
│ │
RF Antenna ─┤ANT EN ├─► Shield Ground
│ │ │
DC-DC Noise Zone┼┤VIN VDD ├─┼─── 3cm spacing
│ │ │
Sensor Interface ─┤GPIO15 ADC ├─► π-type Filter
└───────────────┘
- Wiring Principles
- WiFi/BT RF traces 50Ω impedance control, away from DC-DC and crystal oscillators
- Analog signals (ADC, DAC, touch) should be wrapped with guard rings
4. Component Selection Black Technology
1. Passive Components
| Type | Optimization Direction | Recommended Model/Parameters | Power Saving Effect |
|---|---|---|---|
| Capacitor | Low ESR + High Capacitance | TDK C3225X7R1H106K | Reduce power ripple by 60% |
| Ferrite Bead | High-frequency noise suppression | Murata BLM18PG121SN1 | Reduce RF interference power consumption |
| Crystal Oscillator | Low power active crystal oscillator | EPSON SG-8101 | Save 20μA in standby |
2. Battery Interface Protection
Lithium + ────►│ P+ P- │◄─── Load
│ │
│ BQ27621 │
Lithium - ────►│ S- S+ │◄─── GND
└─┬───────┬──┘
│ │
100Ω 4.7kΩ
│ │
TS BAT_DET (to ESP32 ADC)
- Function accurately monitors battery level + over-discharge protection
- Solution Coulomb counter chip (e.g., TI BQ27621), power consumption only 45μA
5. Real-World Power Consumption Comparison
| Optimization Measures | Button Battery System (CR2032) | Lithium Battery System (1000mAh) |
|---|---|---|
| Basic Design (Unoptimized) | Standby 150μA → 2 months of battery life | Standby 50μA → 8 months of battery life |
| DC-DC + LDO Two-Stage Power Supply | Standby 25μA | Standby 15μA |
| MOSFET Full Power Cut Control | <1μA | <1μA |
| Dynamic Sensor Switching | Measurement +180μA | Measurement +200μA |
| Final Battery Life Improvement | 5 years → 10 years↑ | 8 months → 5 years↑ |
6. Pitfall Guide: Fatal Hardware Traps
-
GPIO Leakage Current
- Phenomenon Deep Sleep still has >5μA current
- Countermeasure Configure all unused GPIOs as input mode + disconnect external pull-up/pull-down
gpio_reset_pin(GPIO_NUM_X); gpio_set_direction(GPIO_NUM_X, GPIO_MODE_INPUT);
Incorrect LDO Selection
- Case Choosing AMS1117 (static current 5mA) caused the button battery to deplete in a few days
- Solution Switch to TPS709xx (static current 1μA)
PCB Parasitic Leakage
- Detection Method Apply insulating nano-coating (e.g., HumiSeal 1B73)
- Effect Leakage current in humid environments reduced from >50μA to <5μA
Ultimate Optimization Combination
- Power Path Lithium battery → TPS62740 (93% efficiency) → TPS70933 (1μA IQ) → ESP32
- Wake-Up Scheme ULP co-processor + touch sensor (wakes main CPU every 1 hour)
- Communication Protocol ESP-NOW point-to-point transmission (saves 70% more energy than Wi-Fi)
Design Maxim: Hardware power saving is a battlefield of “microamps must be fought for” —“Converters as quiet as snow, power switches as fast as knives, PCB traces as clean as water, leakage has nowhere to escape”