# Electron Deep Sleep current when powering from VIN without LiPo

**URL:** <https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965>\
**Category:** Troubleshooting\
**Created:** [September 12, 2017, 9:16pm UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965 "2017-09-12T21:16:27Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bittailor](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bittailor/32/7293_2.png) [@bittailor](https://community.particle.io/u/bittailor)\
**Post date:** [September 12, 2017, 9:16pm UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/1 "2017-09-12T21:16:27Z")

</div>

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:

- [Electron SLEEP\_MODE\_DEEP tips and examples](https://community.particle.io/t/electron-sleep-mode-deep-tips-and-examples/27823)
- [Disabling the Electron red charging LED when not using the LiPo](https://community.particle.io/t/disabling-the-electron-red-charging-led-when-not-using-the-lipo/26604)

My code looks like this

```cpp

#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**

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/1/11b1af8d9a9c055c31c4192c16703b5c397bb685.png)

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

**Stop Mode Sleep**

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/4/45058e755e32c8d65bd385e71210c6810193d3fb.png)

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

---

<div class="post-metadata">

**Author:** ![KyleG](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kyleg/32/11077_2.png) [@KyleG](https://community.particle.io/u/KyleG)\
**Post date:** [September 14, 2017, 1:31am UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/2 "2017-09-14T01:31:14Z")

</div>

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

Kyle

---

<div class="post-metadata">

**Author:** ![peergum](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peergum/32/7184_2.png) [@peergum](https://community.particle.io/u/peergum)\
**Post date:** [December 10, 2017, 4:59pm UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/3 "2017-12-10T16:59:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [December 10, 2017, 5:06pm UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/4 "2017-12-10T17:06:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bittailor](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bittailor/32/7293_2.png) [@bittailor](https://community.particle.io/u/bittailor)\
**Post date:** [December 10, 2017, 6:36pm UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/5 "2017-12-10T18:36:20Z")

</div>

I used a [INA219](http://www.ti.com/lit/ds/symlink/ina219.pdf) High Side DC Current Sensor (see this [breakout](https://www.adafruit.com/product/904)) to measure the current used when powered by a 12V power supply.

I run [firmware release 0.6.2](https://github.com/spark/firmware/releases/tag/v0.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.

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [December 10, 2017, 7:07pm UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/6 "2017-12-10T19:07:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bittailor](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bittailor/32/7293_2.png) [@bittailor](https://community.particle.io/u/bittailor)\
**Post date:** [December 10, 2017, 7:19pm UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/7 "2017-12-10T19:19:08Z")

</div>

> 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](https://docs.particle.io/datasheets/electron-(cellular)/electron-datasheet/#3v3-pin) 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.

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [December 10, 2017, 8:03pm UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/8 "2017-12-10T20:03:38Z")

</div>

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.

> [@Particle drawing 180mA from battery while in deep sleep mode](https://community.particle.io/t/particle-drawing-180ma-from-battery-while-in-deep-sleep-mode/28389/17):
>
> @NST1992 If you want to see the under 1mA current consumption during deep sleep them mimic this code and supply 3.7v to the vBat pin and Gnd. #include "Particle.h" // This behaves the same for SEMI\_AUTOMATIC and MANUAL SYSTEM\_MODE(MANUAL); SYSTEM\_THREAD(ENABLED); int ledPin = D7; // LED connected to D1 void setup() { pinMode(ledPin, OUTPUT); // Sets pin as output } void loop() { //The 6 lines of code below are needed to turn off the Modem before sleeping if your usin…

---

<div class="post-metadata">

**Author:** ![bittailor](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bittailor/32/7293_2.png) [@bittailor](https://community.particle.io/u/bittailor)\
**Post date:** [December 10, 2017, 9:24pm UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/9 "2017-12-10T21:24:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [December 11, 2017, 6:42am UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/10 "2017-12-11T06:42:39Z")

</div>

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](https://docs.particle.io/datasheets/electron-(cellular)/electron-datasheet/#lipo-battery)

> [@](#):
>
> Typical current consumption is around 180mA and up to 1.8A transients at 5VDC. In deep sleep mode, the quiescent current is 130uA (_ **powered from the battery alone** _).

---

<div class="post-metadata">

**Author:** ![peergum](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peergum/32/7184_2.png) [@peergum](https://community.particle.io/u/peergum)\
**Post date:** [December 16, 2017, 3:18am UTC](https://community.particle.io/t/electron-deep-sleep-current-when-powering-from-vin-without-lipo/35965/11 "2017-12-16T03:18:43Z")

</div>

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…
