Building Ultra Low Power with MicroPython #12111
Replies: 13 comments 49 replies
-
I have been moving all my solar-powered remote sensors to LoRa.
This is news to me ... which bits of hardware stay powered-up? Have you read this: |
Beta Was this translation helpful? Give feedback.
-
This is not true. The micropython docs are terse, yes, but other sources of information are
I really have no idea why so many people seem to expect that uPy docs should cover every possible hardware configuration under the sun. |
Beta Was this translation helpful? Give feedback.
-
@volkerjaenisch I suggest looking at the FeatherS3. The ESP32-S3 has extremely low deepsleep current (unlike ESP32) and the board is well designed. I haven't managed to get a measurement of deepsleep current for the entire board powered from LiPo, but it's below 1μA. See also this doc from @glenn20 who has done a lot of work on minimising energy use on boot. |
Beta Was this translation helpful? Give feedback.
-
For instance I2C can be initiated by Micropython but there is no corresponding deinit() function as there is for other components like e.g. WLAN or UART. This asymmetry I do not understand. Cheers, |
Beta Was this translation helpful? Give feedback.
-
With a ESP32-WROOM DevkitC board, 3v3 regulator removed and the supply cut to the CP2102 I am under 1mA in deepsleep. |
Beta Was this translation helpful? Give feedback.
-
But what costs the sentence "If you set your board to deep-sleep, please make sure that all components you have invoked are shut down first." in the documentation.
And yes, you are right. I have only a physics diploma but I have no deep electronics knowledge. And therefore I come from a different context. And we all know how important context is. I am a Programmer for 40+ year starting with machine language on a SHARP PC1500 and I am now developing applications. And my context knowledge is that when I enter a deep-sleep on e.g. my linux-system the OS will shut down the hardware. And I wrongly assumed that MicroPython would do the same thing on a ESP.
For that bold and absolute statement you gave zero reason. Can you please be in the future a bit more constructive. Cheers, |
Beta Was this translation helpful? Give feedback.
-
Dear @glenn20 !
That is quite impressive. Many thanks for your demonstration. Now I only need a distributor that sells/ships a FeatherS3 in/to Germany. Any hints anybody? Pimoroni where I bought Adrafruit products in the past is "out of stock" and also their product pictures for the FeatherS3 do not show the second Stemma QT-Port. Are there different variants/versions of the FeatherS3? Cheers, |
Beta Was this translation helpful? Give feedback.
-
Dear @glenn20
The esp8266 was a bad buy (never trust amazon - I ordere a DFrobot ESP32 but got a 8266), but since it also utilized the RT9080-33GJ5 I gave it a try. But as @davefes found out the voltage regulator is not the problem on this board but probably the CP2102. Just ordered a FeatherS3 for eye watering 34EUR via Amazon.uk. Will be a fortnight to get it delivered. Cheers, |
Beta Was this translation helpful? Give feedback.
-
@volkerjaenisch I ship directly to DE from Australia - Either from my website, or from Lectronz (that handle the VAT/Fees for you). Issue shipping from Australia is the insane postage prices since Covid that unfortunately will never go back down :( BTW, Pimoroni have the correct pictures for the FeatherS3 on their site - maybe you were looking at the FeatherS2 instead? Cheers :) |
Beta Was this translation helpful? Give feedback.
-
The FeatherS3 should be able to get down to < 30uA deep sleep - but it depends on what you have connected to it, and how you are waking it. I've had it as low as 20uA @ 3.3V, and 26uA at 4.2V, both with nothing connected to it. But honestly, anything under 50uA it perfect for deep sleep current - The biggest cost is always going to be when the board is awake and the radios are either calibrating, or you are transmitting data. A super low deep sleep current is only helpful if you plan on having the board sleep for days at a time without waking, and then you have the issue of RTC drift with the internal ESP32 RTC :( |
Beta Was this translation helpful? Give feedback.
-
exp-tech.de have them on their web site. You have to register as company first, and then they ship it. They stopped shipping to non-commercial customers. Maybe they got tired of people shipping back their purchase. Note: I had bad experience with shops from the US promising to handle VAT/customs for you. That failed, and I had to pay VAT/Customs twice + handling fee. You can reclaim that, but it is a formal process which takes weeks. That whole customs stuff only worked for me with Aliexpress, Mouser & Digikey. |
Beta Was this translation helpful? Give feedback.
-
The log output was from the TX/RX on the header. I will look into this - but its 4:00 local time - time to sleep. Cheers, |
Beta Was this translation helpful? Give feedback.
-
I've also got a UART issue related to power management on the ESP32-S3 that looks very similar to this. I've tracked it down to the UART changing baud rates when the frequency is set to 40 MHz. If pm config is set to max freq 160 MHz, min freq 80 MHz, then the UART works just fine. Set it to max 160 and min 40, then it stops working. It's not entirely broken, some data comes through, especially when code is running, like at boot up. But at an idle repl prompt when BLE or wifi is not enabled, it doesn't work at all. Except it does work, the baud rate is just half what it should be! I haven't checked to see if I can replicate this in a pure ESP-IDF based app or if it only happens in micropython. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How to achieve the lowest possible power consumption with MicroPython?
Probably there is such a topic already out there - then please give me a pointer.
The above question seems a bit naive since it depends on ... a lot of things.
Motivation:
The project that made me open this topic is building a solar powered low cost digital moisture sensor with WiFi (or LoRa) out of widely available components.
The components are IMHO straight forward:
Problems:
Status:
With my current code I am able to quench the current down to 0.4mA on a DFRobot ESP8266 Firebeetle in deep-sleep. But is this the limit?
Goals:
Let us document what hardware in combination with what code achieves the minimal current.
Cheers,
Volker
Beta Was this translation helpful? Give feedback.
All reactions