-
I don't have any boards right now with me, but in #4 I measured the "idle" and "blink" power consumption of ESP32 & MicroPython board.
In "idle" - connected to the REPL via USB - no code running, but ready for input, I measured 48mA.
With the "blink" code from #1 withtime.sleep_ms(1000)
, I measured 50mA.
That's ~1/3 of Espruino's power consumption.Looked at Espruino's ESP32 code, and as far as I can tell, Espruino does not go to sleep mode with the ESP32 port at all. In ESP32 jshardware.c
jshSleep
does nothing. In other boards it does a bunch of checks, and goes to sleep if nothing is going on. For example nRF52Not sure what MicroPython does so far, and don't have a real micropython board to check their power consumption. But reading the docs, it looks like it doesn't go to sleep by default as much as an nRF Espruino, you have to explicitly send to sleep if you want to achieve really low power. "Just idles".
But what is not right: According to the ESP32 datasheet, the power consumption in "modem sleep" with dual cores running at 240MHz should be 30-68mA. (the highest without radio). MicroPython is in this range. But in my measurements Espruino by default is well over this range. Ok, I must admit, I can't reliably switch off BLE and Wifi the same time. Goes into an endless reboot loop, and only reflashing helps. (I will post the console output later).
So my hunch is the Espruino ESP32 maybe doesn't turn off the radio? Ok, probably does not make any difference if you are using Wifi...
@pankleks, to understand what you are stating:
Both micro python codes of post #1 and post #16 produce the same temperature of 51 C?
If so, is a mystery to me too, because as you say: you go not to sleep, you just check time over and over until satisfied.
This makes me conclude 2..3 things: