• Hey Robin, and yes - all 5 conditions for deep sleep should be met.

  • 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+Consumptio­n

    Does 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:

    http://www.espruino.com/Reference#Wifi

    Has the powersave parameter been supplied an argument to test that as an option?

    http://www.espruino.com/Reference#l_Wifi­_setConfig

    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.

    http://www.espruino.com/Power+Consumptio­n

    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/EspruinoBoar­d/blob/master/WiFi/pdf/espruino_wifi_sch­.pdf

    But, 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

  • Hi Robin, thanks for sticking with me on this.

    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?

    It can go from milli down to microamps.

    'You can call setSleepIndicator(LED1). LED1 will then be lit whenever the device is not sleeping'

    http://www.espruino.com/Power+Consumptio­n
    

    Does the Red LED1 illuminate ever?

    It does when I have the chip "doing stuff", but then does go off after setDeepSleep(1).

    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.

    Yes - thanks, had noticed this when trying to test sleep while connected through the Web IDE :-)

    '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.

    I see that the blue led is faintly lit on the top surface and another blue led on the undersurface. It does seem that there might be some ongoing power to the 8266 chip.

    I have tried reflashing the Espruino and then upgrading the Esp8266 chip. Has not changed the power consumption.

    http://www.espruino.com/Reference#Wifi
    Has the powersave parameter been supplied an argument to test that as an option?
    http://www.espruino.com/Reference#l_Wifi­_setConfig

    Interestingly, that is not an option for me. I get an error when trying to setConfig on wifi:

    >var wifi = require("Wifi");
    ={
      connect: function (a,b,c) { ... },
      disconnect: function (a) { ... },
      startAP: function (a,b,c) { ... },
      stopAP: function (a) { ... },
      scan: function (a) { ... },
      getIP: function (a) { ... },
      setIP: function (a,b) { ... },
      getAPIP: function (a) { ... },
      setAPIP: function (a,b) { ... },
      setHostname: function (a,b) { ... },
      ping: function (a,b) { ... },
      turbo: function (a,b) { ... },
      debug: function () { ... }
     }
    >wifi.debug()
    ={ wifiMode: 0, connected: 0,
      socks: [  ],
      sockData: [
        "",
        "",
        "",
        "",
        ""
       ]
     }
    >wifi.setConfig();
    Uncaught Error: Function "setConfig" not found!
     at line 1 col 6
    wifi.setConfig();
         ^
    

    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.

    Thanks - it looks like setDeepSleep might not be appropriately powering down the wifi, or the wifi leds.

    See note beneath heading 'Saving Power' regarding pinMode.
    http://www.espruino.com/Power+Consumptio­n
    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.

    Will certainly try this if no further progress. I suspect based on https://www.electro-tech-online.com/arti­cles/achieving-low-power-on-adafruit-tri­nket.830/ that this would only account for a few micro amps.

    Thanks again for your help. Hoping we can get to low power sleep at some point.

About

Avatar for Robin @Robin started