High power use during System.sleep for Argon

I was testing out sleep modes on an Argon with a USB power meter and it appears to be using far more power when sleeping than not. Roughly 20mA when connected and looping and 70mA when sleeping. Does the power saving benefits of sleep not work when using USB power? The device does appear to sleep, the light goes off and checking sleepResult after shows an RTC wake.

Here’s a simplified example that stays awake for 60sec then sleeps for 60sec.

unsigned long lastWakeTime = 0;
void loop() {
    if (millis() - lastWakeTime > 60000) {
        System.sleep({}, {}, 60); 
        lastWakeTime = millis();
    }
 }
1 Like

I repeated this test on the Xenon and a Photon and both worked as expected, dropping to <1mA on my meter.

I submitted the issue via Github: https://github.com/particle-iot/device-os/issues/1738

Hi

I can confirm that this is the behaviour of the Argon. As far as I have understood it, the Wifi module is not powered down during sleep and maybe the Wifi module gets confused when the host processor stops responding. However measuring the Power use with an Otii Power Usage Analyzer gives a graph like this

where the left part is while the Argon is running and the right part of the graph is while its asleep.

1 Like

@Fragma, the Particle folks are aware of some race conditions when going into sleep on Gen 3 devices, that may leave the NCP in a powered state. The fix will most likely be released in an upcoming release along with other power reduction enhancements.

Good to know. Perhaps that should be added to the known issue list @will: [Updated 3/21/19] Gen 3 known issues

FYI, this is still happening on 1.1.0 and 1.2.1-rc.1 firmware

Any update? Just confirmed this is still an issue with 1.2.1. Having my device use a 1min on / 5min sleep cycle resulted in double the power use of 100% on.

Found a workaround is to add this just before sleep:

        WiFi.off();
        delay(250);

Oddly you don’t need to turn it back on after sleep, at least not in the default mode. I’m not sure if there’s a way to do this dynamically but after trying different delays it looks like it takes ~180ms to shut off the wifi completely, so I figured 250ms was a safe bet to allow for some variation.

We have seen the same, although we made it a bit more complicated for us. After disconnecting from tha cloud and shutting off WiFi we got the sleep power consumption to be as low as 600uA, but that came to the cost of a memory leek, see Memory leak in Argon doing WiFi.off() / WiFi.on() and Boron doing Cellular.off() / Cellular.on() .
This has been fixed after adding a delay for 15s after shutting off the WiFi, before going to sleep. We will look further into optimizing this.

2 Likes

Still seeing this issue with firmware 1.5.0, even if I use the new apis; eg:

        SystemSleepConfiguration config;
        config.mode(SystemSleepMode::STOP).duration(60s);  //60 sec
        System.sleep(config);

The prior workaround still works though I must now call WiFi.on(); after sleep to reconnect.

Does anyone know if this has been resolved in 1.5.1 or 1.5.2? I have looked at the release notes, but don’t see a specific reference to a fix.

Nope, just confirmed it’s still an issue with 1.5.2