To check and test the new connectionless power management features in ESP IDF v5.0.2.
-
Usage:
e.config(pm=(window, interval))
:- every
interval
milliseconds the radio will be turned on forwindow
milliseconds to listen for incoming messages (interval
should be a multiple of 100ms). Incoming messages will be lost while the radio is off. Example:
e.config(pm=(75, 200)) # equivalent to WLAN.config(pm=WLAN.PM_PERFORMANCE) e.config(pm=(75, 300)) # equivalent to WLAN.config(pm=WLAN.PM_POWERSAVE)
- every
Based on my micropython
espnow-50-pm
branch:
- Pull Request at micropython/micropython#11890.
ESPNOW pm setting | Duty Cycle | Current (mA) | Power (mW) | % of max |
---|---|---|---|---|
OFF | 100% | 100 | 330 | 100% |
pm=(75, 200) |
38% | 56 | 185 | 56% |
pm=(75, 300) |
25% | 47 | 155 | 47% |
pm=(50, 500) |
10% | 36 | 119 | 36% |
pm=(10, 500) |
2% | 31 | 102 | 31% |
Radio OFF: Current = 28.9mA (95mW) Radio ON: Current = 100mA (330mW)
ESPNOW pm setting | Duty Cycle | Current (mA) | Power (mW) | % of max |
---|---|---|---|---|
OFF | 100% | 103 | 340 | 100% |
pm=(75, 200) |
38% | 67 | 221 | 65% |
pm=(75, 300) |
25% | 57 | 188 | 55% |
pm=(50, 500) |
10% | 50 | 165 | 49% |
pm=(10, 500) |
2% | 45 | 149 | 44% |
Radio OFF: Current = 43.8mA (145mW) Radio ON: Current = 104mA (343mW)
ESPNOW pm setting | Duty Cycle | Current (mA) | Power (mW) | % of max |
---|---|---|---|---|
OFF | 100% | 73 | 241 | 100% |
pm=(75, 200) |
38% | 41 | 135 | 56% |
pm=(75, 300) |
25% | 35 | 116 | 48% |
pm=(50, 500) |
10% | 27 | 89 | 37% |
pm=(10, 500) |
2% | 23 | 76 | 32% |
Radio OFF: Current = 22.2mA (73mW) Radio ON: Current = 73.0mA (241mW)
These measurements are based on my micropython espnow-50-pm
branch at:
- https://github.com/glenn20/micropython/tree/espnow-50-pm
- based on micropython master branch revision: [v1.20.0-246-gc2ea8b2f9]
- Pull Request at micropython/micropython#11890.
which includes support for setting the ESPNOW wireless power saving parameters.
- DFRobot Beetle ESP32 module
- FeatherS3 device from UnexpectedMaker feathers3.io
- FeatherS2 device from UnexpectedMaker feathers2.io
- Power Profiler Kit
II
to measure power consumption of device during experiments.
- Also supports visualisation of timing pulses from device pins.
- Cables, computer.
These measurements are made with the PPK2 operating in PSU mode to power the ESP32 devices via the GND and 3.3V pins (some other components will also be powered).
Measurements are made with module running the following main.py
:
import time, network, espnow
sta = network.WLAN(0)
e = espnow.ESPNow()
sta.active(1); e.active(1)
pm_values = ((75, 200), (75, 300), (50, 500), (10, 500), (1000, 500))
while True:
for p in pm_values:
e.config(pm=p)
time.sleep(2)
Radio OFF: Current = 28.9mA (95mW) Radio ON: Current = 100mA (330mW)
ESPNOW pm setting | Average Current (mA) | PPK2 Screenshot |
---|---|---|
pm=(1000, 500) (disabled) |
100 | |
pm=(75, 200) |
56 | |
pm=(75, 300) |
47 | |
pm=(50, 500) |
36 | |
pm=(10, 500) |
31 |
Radio OFF: Current = 43.8mA (145mW) Radio ON: Current = 104mA (343mW)
ESPNOW pm setting | Average Current (mA) | PPK2 Screenshot |
---|---|---|
pm=(1000, 500) (disabled) |
103 | |
pm=(75, 200) |
67 | |
pm=(75, 300) |
57 | |
pm=(50, 500) |
50 | |
pm=(10, 500) |
45 |