-
Sat 2020.02.22
Thank you @narath for the images as they provide immense confirmation. That said, I'm with you on this one, with your attention to detail following the tutorial, and am a bit baffled myself.
Up to date firmware. Check Running on battery, not USB. Check - okay.
Do we know the limits on the current measuring meter. Do we have a spec sheet indicating it's limits? e.g. can it measure down beneath milliamp to microamp?
From post #1 L2 setSleepIndicator(LED1);Beneath heading 'Debugging Sleep'
'You can call setSleepIndicator(LED1). LED1 will then be lit whenever the device is not sleeping'
http://www.espruino.com/Power+ConsumptionDoes the Red LED1 illuminate ever? (and it's opposite state)
' (also tested it with USB power breakout - with the same result)'
As it was indicated that all five bullet items, post #4 were confirmed, it is known that power save mode will not work using USB.
'to instruct to power down (like explicitly telling the wifi to power down)'
This may be the clue, although I am not able to say definitively, as I'm unable to locate specific documentation on the Blue LED and it's indication under battery usage.
Nothing jumps out from the programmability side of things:
Has the powersave parameter been supplied an argument to test that as an option?
The note that followed indicated for ESP8266, so maybe disregard?
Fifth bullet item below 'Features'
Three on-board LEDs (2x user programmable, 1x WiFi activity) and one button
http://www.espruino.com/WiFi
Typically, the user defined ones are LED1 and LED2, Red and Green. I'm making the assumption, and I feel that from your comment above you are in agreement, that the Blue LED is indicating the WiFi is attempting to turn on. As we know LED's can be power hogs, even when dimmed, this is likely causing the high current draw. But I'm not able to provide a solution on how to resolve that, just yet.
See note beneath heading 'Saving Power' regarding pinMode.I suppose it might be possible that one or more of the output pins are taking on a state, not being explicitly defined. Maybe (a bit redundant though) setting every pin to a known state might provide a bit more peace of mind.
Hang in there, I'm sure someone with a bit more knowledge or even been down this path will now have enough information to provide the answer.
EDIT:
Checking the schematic, there is a note referring to 'Debug output' on the Blue LED line, also limited by a 100 ohm resistor.
https://github.com/espruino/EspruinoBoard/blob/master/WiFi/pdf/espruino_wifi_sch.pdfBut, that must be for full on, as:
3.3 / 100 = 33ma
which is much higher than the value that was mentioned earlier. Also, I thought that maybe the 10K might be 'on' all the time, but that doesn't appear to be the case either:
3.3 / 10 000 = 0.000 330
Hey Robin, and yes - all 5 conditions for deep sleep should be met.