Optimising Micropython energy consumption on ESP32 boot from deepsleep #10153
Replies: 2 comments 8 replies
-
Thanks @glenn20 this is really interesting! The CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP option in particular. Do you have any thoughts on whether we should change this by default...? The PPK II is really cool hey :) |
Beta Was this translation helpful? Give feedback.
-
I trying to speed up boot time after deep sleep on ESP32-C3 module
to I checking boot time inside Thanks for any help |
Beta Was this translation helpful? Give feedback.
-
For anyone interested in optimising use of micropython on ESP32 devices for energy consumption (especially for sensors which deepsleep), I have posted the results of some initial experiments using the Nordic Power Profile Kit II (PPK2) to measure timing (https://github.com/glenn20/upy-esp32-experiments). Some simple optimisations (many already well known) can reduce energy consumed by at least an order of magnitude from the naive implementation.
The intended use case is a battery operated ESP32 using WAKE_ON_EXT0/1 to count digital pulses and periodically sending an update to an mqtt server (or espnow gateway).
Comments, criticisms, suggestions and requests are welcome (here or on the experiments repo).
Highlights
Measuring time to wake ESP32-S3 and ESP32 devices from deepsleep, boot micropython and return to deepsleep:
ESP32 Wake Stubs are a promising option - and I am looking into making these useful for micropython apps.
Beta Was this translation helpful? Give feedback.
All reactions