Electron Deep Sleep current when powering from VIN without LiPo

Hi

I’m powering my electron from VIN with a 12V power source without a LiPo connected. I run in MANUAL mode.
In deep sleep the electron still uses ~2mA.
So I wonder why since it is much more than the 130 µA the data sheet states for deep sleep from LiPo?

When I started my electron actually used even more than 10mA in deep sleep. I found the following two improvements in the forum and applied it to my code the get down to the 2mA:

My code looks like this


#include "Particle.h"

STARTUP(System.enableFeature(FEATURE_RETAINED_MEMORY));
SYSTEM_MODE(MANUAL);

//===
retained uint8_t  sState = 0;
retained uint32_t sLoopCounter = 0;
//===

int sBlueLed = 7;
Serial1LogHandler sLogHandler(115200,LOG_LEVEL_ALL);

void setCharging(bool enable);
void measure();

void setup() {
  Log.info("*** setup [%u]  ***",(uint16_t)sState);
  pinMode(sBlueLed, OUTPUT);
  digitalWrite(sBlueLed, LOW);

  if (sState == 0) {
     Log.info("First boot ... ");
     Log.info("  - Cellular off ");
     Cellular.on();
     Cellular.off();
     Log.info("... First boot DONE ");
     sState = 1;
  }

  Log.info("Charging off ... ");
  setCharging(false);
  FuelGauge().sleep();
  Log.info("... Charging off DONE");

}

void loop() {
   digitalWrite(sBlueLed, HIGH);
   sLoopCounter++;
   Log.info("loop %lu ... ", sLoopCounter );
   measure();
   Log.info("... loop %lu DONE ", sLoopCounter );
   Serial1.flush();
   digitalWrite(sBlueLed, LOW);
   System.sleep(SLEEP_MODE_DEEP, 2);
}

// just some placeholder will actually do some I2C sensor reads
void measure() {
   delay(20);
}

void setCharging(bool enable) {
   PMIC pmic;
   // DisableCharging turns of charging. DisableBATFET completely disconnects the battery.
   if (enable) {
      pmic.enableCharging();
      pmic.enableBATFET();
   }
   else {
      pmic.disableCharging();
      pmic.disableBATFET();
   }

   // Disabling the watchdog is necessary, otherwise it will kick in and turn
   // charing at random times, even when sleeping.

   // This disables both the watchdog and the charge safety timer in
   // Charge Termination/Timer Control Register REG05
   // pmic.disableWatchdog() disables the watchdog, but doesn't disable the
   // charge safety timer, so the red LED will start blinking slowly after
   // 1 hour if you don't do both.
   byte DATA = pmic.readChargeTermRegister();

   if (enable) {
      DATA |= 0b00111000;
   }
   else {
      // 0b11001110 = disable watchdog
      // 0b11000110 = disable watchdog and charge safety timer
      DATA &= 0b11000110;
   }

   // This would be easier if pmic.writeRegister wasn't private (or disable
   // charge safety timer had an exposed method
   Wire3.beginTransmission(PMIC_ADDRESS);
   Wire3.write(CHARGE_TIMER_CONTROL_REGISTER);
   Wire3.write(DATA);
   Wire3.endTransmission(true);
}

It’s also interesting that the stop mode sleep uses 2.5 mA. So if there is no way to get the current lower in deep sleep the deep sleep makes no sense if you sleep for short periods. In my setup I would use less power with the stop mode than in deep sleep because it adds a time and current overhead to wake up in contrast to the stop mode.

Deep Sleep

Means it sleep for 2000ms at 2mA and runs for about 125ms at ~23mA = 6857 mA*ms

Stop Mode Sleep

Means it sleep for 2000ms at 2.5mA and runs for about 40ms at ~21mA = 5800 mA*ms

I would appreciate any insights in the deep sleep when powering from VIN without LiPo and hints on how to get the current lower than the 2 mA I already reached.

Thanks

3 Likes

Let me ping someone that might be able to help, @rickkas7 are you able to assist?

Kyle

Same issue here. Can’t seem to go under 2.1mA with assumedly nothing else drawing current.

For the note, I’m using MANUAL mode and SYSTEM_THREAD disabled. I switch everything off (cellular+fuel gauge) before SLEEP_MODE_POWEROFF.

Some help, Particle team?

How are you measuring the current draw?
What system version are you running?

I used a INA219 High Side DC Current Sensor (see this breakout) to measure the current used when powered by a 12V power supply.

I run firmware release 0.6.2 when I did the measurements.

Would still appreciate any insights to get the Deep Sleep current down, although I’m currently working on other parts of my project.

I’m pretty sure you have to power the Electron from the 3.3v pins to see the low current draw your looking for.

I'm pretty sure you have to power the Electron from the 3.3v pins to see the low current draw your looking for.

Are you sure, the datasheet states something else:

3V3 PIN

This pin is the output of the on-board 3.3V switching regulator that powers the microcontroller and the peripherals. This pin can be used as a 3.3V power source with a max load of 800mA. Unlike the Photon or the Core, this pin CANNOT be used as an input to power the Electron.

1 Like

Yea your right.

In the link below another guy was feeding 7+v to Vin and that caused the higher sleep currents, I'm assuming it's extra overhead from the PMIC bucking the higher voltage down to the Electrons operating voltage.

So that means the PMIC has quite a large overhead (~20mW) or bad efficiency (2.5%) for the deep sleep mode:

VIN  => 12V * 2mA = 24.0mW
LiPo => 4.2V * 0.13mA = 0.6mW

I was hoping that the large current comes from something I forgot to disable.

I'd think the 130 µA current draw stated in the docs only refers to the draw from the LiPo/Li+ and not while going through all the stages of voltage regulation and charghing circuitry.

https://docs.particle.io/datasheets/electron-(cellular)/electron-datasheet/#lipo-battery

I’m in the situation referenced above by @RWB, feeding the electron on VIN with a non-rechargeable battery, so that may explain the higher than expected current…

2 Likes