High energy consumption when using machine.lightsleep #12882
-
Dear community, As my first MicroPython project, I've connected a Waveshare eInk display with a RP2040 and display some temperature data (see here). It works nicely, so I started digging deeper and bought an USB stick to measure the Raspi's power consumption, which confuses me a little bit. Here you can find the complete MicroPython code, but the process looks like this:
This code runs in a What makes me wonder is that after calling |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The only reason, that I can think of, for using lightsleep on the ESP32 is that you can retain program state, ie pin hold. It is like a pause. Yes, you need to do a If you are not wanting to hold any output ports then deepsleep could save you more current. Be aware, if you are using a dev board with a USB to UART chip on it that it sucks current as well. |
Beta Was this translation helpful? Give feedback.
-
I found an interesting behavior with the Pico W. If I just start it and call machine.lightsleep, the current drops to ~13mA. If I call
the current drops to < 1mA. That even valid when WiFi is not used otherwise. With wlan.deinit() the LED turns off, which alone contributes to ~5 mA current. |
Beta Was this translation helpful? Give feedback.
The only reason, that I can think of, for using lightsleep on the ESP32 is that you can retain program state, ie pin hold. It is like a pause. Yes, you need to do a
sta.active(False)
before going to lightsleep and then asta.active(True)
when waking-up.If you are not wanting to hold any output ports then deepsleep could save you more current. Be aware, if you are using a dev board with a USB to UART chip on it that it sucks current as well.