Excessive power draw in deepsleep under certain circumstances in esp32
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- embedded-iot, networking
Research direction
Start by reproducing the reported interaction between network.WLAN.scan(), esp32.wake_on_ext0(), and machine.deepsleep() using the supplied ESP32 script and current-draw measurements. Trace the ESP32 deep-sleep, wake-source, and networking entry points, then confirm that the reported configuration reaches the expected low sleep current without regressing the wake behavior.
Written by the indexing model from the issue text.
Description
This one is pretty obscure, but I might as well report it after isolating it this far...
We have been running a bare ESP32 (no regulators or populated breakout board) from a power supply that measures current draw very accurately.
If you run the following, then the 3 seconds of deepsleep will be drawing a consistent 1.4mA:
import machine, network, esp32
w = network.WLAN()
w.active(1)
w.scan()
p = machine.Pin(2, machine.Pin.IN, machine.Pin.PULL_DOWN)
esp32.wake_on_ext0(p, esp32.WAKEUP_ANY_HIGH)
#w.active(0)
machine.deepsleep(3000)
However, if you comment line 4, or comment line 6, or uncomment line 7, then the current draw reverts to 0.006mA during the deepsleep duration, which is well within the parameters of the datasheet.
I don't know how these two factors could be interacting in this way, but they are.
(My application is an esp32 running from a battery and being woken by a change in a rocker switch, whereupon it connects to the wifi and reports the state. I can report that if the rocker switch is closed so that the condition is instead esp32.wake_on_ext0(p, esp32.WAKEUP_ALL_LOW) then the current draw is 0.086mA, which corresponds to internal pull-down resistors of about 40kOhms.)
- Dominant language
- C
- Stars
- 22.1k
- Forks
- 9k
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micropython/micropython
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
micropython/micropython#19704 ·
-
bug port-stm32
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
micropython/micropython#19668 · 1 comment ·
-
bug port-esp32
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
micropython/micropython#19667 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
micropython/micropython#19509 · 12 comments ·
-
bug port-esp32
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
micropython/micropython#19456 ·
All issues in micropython/micropython
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100