Argon sleep current, once again

Once again I am having issues getting the Argon to sleep properly. According to the docs, I should be in the neighborhood of 80uAmps but I am seeing 960uAmps. An order of magnitude too high. Here is my code. Note I am really just wanting to wake using the RTC. The code below shows also waking via a GPIO but I included this to see if it made any difference. It does not.

SYSTEM_MODE(MANUAL)
SYSTEM_THREAD(ENABLED)

SystemSleepConfiguration config;

void setup() {
  config.mode(SystemSleepMode::ULTRA_LOW_POWER)
    .gpio(WKP, RISING). // this can be removed and I still get same power consumption measurements
    .duration(10min);
}

void loop() {
  delay(5000);
  System.sleep(config);
}

Duplicated with both os 4 and the latest general release of 5.
I have also tried this on 2 different Argons (one brand new out of the box)

Any thoughts about what I am doing wrong?

I’m not positive the Argon exhibits the same behavior, but the Boron will not go into the lowest power mode after a cold boot if you do not turn on the network first, and I think the Argon may exhibit the same behavior.

Basically, the problem is that in order to put the network processor into full sleep mode, it needs to be on to receive the commands to turn it off. But after a cold boot, it’s in a mostly, but not entirely, off state. In the normal use case of cold booting and turning networking on, you’d never notice this situation because when you go to sleep after that, the device will go into sleep properly.

If you really have a need to be able to go into sleep immediately after a cold boot, you may need to add a special case of checking retained memory to see if this is a cold boot or not, and power on and off the networking.

This isn’t necessary on wake from sleep, or reset after the modem has already been fully powered down, so it’s really just the one case of cold boot and go directly to sleep where you see this behavior.

I’m not positive that this is the problem you are seeing, but it’s a possibility.

Thanks for this @rickkas7. I will give this a try today. So, in theory, from a cold boot, we would only need to do this once, not every time we re-awake from sleep? I’ll see what I experience today in the lab and report back.

Yes, that is correct, only once on cold boot.

1 Like

Hey @rickkas7. Tried the following code but still getting 967uA in sleep.

SYSTEM_MODE(MANUAL)
SYSTEM_THREAD(ENABLED)

SystemSleepConfiguration config;

void setup() {
  BLE.on();
  delay(2000);
  BLE.off();
  WiFi.on();
  delay(2000);
  WiFi.off();
  config.mode(SystemSleepMode::ULTRA_LOW_POWER)
      .duration(10min);
}

void loop() {
  delay(10000);
  System.sleep(config);
}

I’m not sure why you’re getting the higher readings. I tried your original code with Device OS 5.1.0 on an Argon and I’m getting 82.7 µA once the Argon goes to sleep.

so this is without futzing with the radios? I’ll try on a third Argon.

Also, in case it is relevant.

My Argons are unclaimed. I basically remove them from the box and then follow this procedure.

  1. Set the local WiFi via the CLI
  2. Put the device in DFU mode
  3. In Particle Workbench compile both application and device os against 5.1
  4. Flash both application and device OS. (with SYSTEM_MODE(MANUAL))
  5. When the device boots it wants to jump onto the net despite the SYSTEM_MODE(MANUAL). It appears to be maybe downloading a new boot loader compatible with OS 5.1?
  6. Then device reboots and runs blynk or whatever I give it properly.

But at this point I am not seeing proper sleep numbers.

@rickkas7 Here is my setup in action.

Hey @rickkas7. So I ran particle doctor and also let it reconnect to wifi to do an update. I run particle serial inspect and this is my results.

Platform: 12 - Argon
Modules
  Bootloader module #0 - version 2001, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 5004, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Radio stack module #0 - version 202
      Bootloader module #0 - version 2001
  User module #2 - version 6, main location, 262144 bytes max size
    UUID: DC23CB29D2D085314CFCC277BDE8B9CBB91C66A00D19B91B059C1BFB019F1A9D
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 5004
  NCP module #0 - version 5, main location, 1536000 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  Radio stack module #0 - version 202, main location, 192512 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

Interestingly, it looks like it drops to about 90 uAmps for a split second but then jumps to 980uA steady.

Really not sure what could be wrong at this point.

Hey @rickkas7 Any other ideas? Should I issue a support ticket.

Also, is it true that particle doctor does not work correctly for Argons? I am having issues trying to get it to update to the latest release thinking that my approach of using Particle Workbench to get everything up to date might be inducing the power sleep mode issue.

Workbench should absolutely not be used to upgrade the Device OS version. From this page in the Workbench docs, scroll down a little and expand “More about changing the Device OS version” for an explanation of why and how to do it instead.

The best way to initialize large numbers of Argons is using a SWD/JTAG debugger. This will make sure all dependencies are updated properly, but there are many other ways.

The particle doctor only works on the E Series, Electron, Photon, and P1. It doesn’t work on any other devices.

Ugg. So what is the proper way to upgrade a brand new, out of the box, Argon if you don’t have a SWD/JTAG debugger? And I don’t want to onboard it through the mobile app, just plug into computer and set it up. I have about 100 of these to do for a major client. Maybe if I get this process down, my sleep issues current issues will be resolved.

If you don’t have a SWD debugger, the next best way is Device Restore DFU with the custom binary option with your firmware.

Cool. I’ll give this a try and see where I land.

@rickkas7 Well unfortunately same issue. Sleep starts out at around 90uA and then in a perceived split second jumps to +900uAmps. Really not sure what other things to try. This is with 3 Argons now all experiencing the same issue. Also, tested on two different work benchs with different measurement tools, one at my lab at work and one at home. Not sure what else to try.

Are the Argons bare, or in your circuit board? I was wondering if current leaking in from a GPIO could be a cause.

If you checkout my video I posted in this thread you will see how the Argon is setup. @rickkas7 Let me know if that helps. Actually here is the link again to the video.

Also, I should note that I believe I see the power initially drop to about 90 uAmps right when it goes to sleep but immediately pops up to +900uAmps. I tried to record this with my Siglent SDM 3055 with fast sample mode but it appears to miss it in the trace export to an xls file.
I have also tried this code and wiring D5 to GND to see it is a floating GPIO that might be waking it up if one doesn’t supply a .gpio argument to the config.mode call but I still got the same results.
I have also reverted to 3.3 with same results.

SYSTEM_MODE(MANUAL)
SYSTEM_THREAD(ENABLED)

SystemSleepConfiguration config;

void setup() {
  config.mode(SystemSleepMode::ULTRA_LOW_POWER)
      .gpio(D5, RISING)
      .duration(10min);
}

void loop() {
  delay(10000);
  System.sleep(config);
}

For what it’s worth, same issue when using HIBERNATE

SYSTEM_MODE(MANUAL)
SYSTEM_THREAD(ENABLED)

SystemSleepConfiguration config;

void setup() {
  config.mode(SystemSleepMode::HIBERNATE)
      .gpio(D5, RISING);
}

void loop() {
  delay(10000);
  System.sleep(config);

@Colleen - mind tracking this one?

1 Like