I did some quick current consumption measurements on a Xenon, running the latest 0.9.0 DeviceOS, in different sleep modes. I measured the current consumed from the LiPo battery and no USB connected. The results have been verified by @rickkas7 so far.
Quick current measurements on Xenon running on battery only:
Mesh, no Cloud (status LED on) = 7.6ma
No Mesh, no Cloud (status LED on) = 3.7ma
STOP sleep w/System.sleep(D2, RISING, 30) = 46uA
STANDBY sleep w/System.sleep(SLEEP_MODE_DEEP) seems to shoot up slowly (5s) to about 170uA then slowly (8s) back down to 36uA and remains there.
The code I used for testing:
#include "Particle.h"
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(SEMI_AUTOMATIC);
void setup() {
Serial.begin(115200);
pinMode(D7, OUTPUT);
pinMode(D2, INPUT);
// Mesh ON but not connected, no cloud at this point (status LED is ON)
delay(5000);
digitalWrite(D7, HIGH);
delay(1000);
digitalWrite(D7, LOW);
// Mesh, no cloud at this point (status LED is ON)
Mesh.connect();
waitFor(Mesh.ready, 10000);
//Particle.connect();
//waitFor(Particle.connected, 10000);
delay(10000);
digitalWrite(D7, HIGH);
delay(1000);
digitalWrite(D7, LOW);
// Mesh OFF, no cloud at this point (status LED is ON)
Mesh.disconnect();
Mesh.off();
delay(10000);
digitalWrite(D7, HIGH);
delay(1000);
digitalWrite(D7, LOW);
delay(50);
// Mesh OFF, no cloud, going to STOP sleep
System.sleep(D2, RISING, 30);
delay(1000);
digitalWrite(D7, HIGH);
delay(1000);
digitalWrite(D7, LOW);
delay(50);
// Mesh OFF, no cloud, going to STANDBY sleep forever
System.sleep(SLEEP_MODE_DEEP);
}
void loop() {
}
@rickkas7 produced this graph of the STANDBY (deep sleep) mode sleep current profile:
Note that these early findings are showing that deep sleep and stop sleep differ by only 10uA! Given that stop sleep allows for pin and timed wake and does not reset the device, the 10uA “price” seems small vis-a-vis the functionality offered by stop sleep
Yes - Xenon
Let’s say it is awake long enough to read an I2C sensor - 5 seconds (ignore the sensor power)
Yes - ACK from the gateway on the Mesh - I assume this is possible within 5 seconds.
say 5 seconds at 14 mA then 60 secs at 46uA - average 1.119mA?
and
say 5 seconds at 14mA then 300 secs at 46uA - 0.274mA?
Maybe this means that deep sleep is not optimized enough and something more can be turned off? For comparison, two lowest-power ESP32 sleep modes are 10uA and 2.5uA (from here).
0.5ÎĽA at 3V System OFF mode, no RAM retention
1.5ÎĽA System ON mode, no RAM retention
0.7ÎĽA All peripherals in IDLE mode
0.03ÎĽA per 4kB RAM retention
It's quite possible that not all of the peripherals are disabled yet. Also, because we tested from the LiPo battery connector the losses in the regulator start to become an issue at these current levels.
The Xenon has a couple pads on the bottom to allow bypassing the regulator, typically when powering from a disposable lithium coin cell. I have not tried that yet.
I was trying to reproduce the results. I go into the 3.3V input and measure with a CurrentRanger. My results are about 25 uA most of the time when sleeping in STOP mode. It’s fluctuating quite a bit, though, up to short times of up to 180 uA. Quite encouraging, already. Although it would be cool, if with some optimization the current would go down even more!
Thanks @peekay123 and @rickkas7 for these quick tests. Can anybody do the same power usage tests on a Boron LTE? I’m seeing power usage around 12mA in either STOP or DEEP_SLEEP modes and I can’t determine whether it’s coming from the Boron or any other attached device.
I have an LSM6DS3 IMU attached to SPI bus and a power switch (Pololu #2810) controlled by A4 as digital output that I can’t disconnect from my system because they are soldered to the main PCB but it’s hard to believe these two can draw as much current, even in active status.
I just tested power when powering via the USB port at 5v and was seeing 111ma on startup and then it stayed at 28ma most of the time and jumped up to 40 and 54ma sporadically.
That’s a very efficient cellular connection if you ask me
The Xenons powered via USB are pulling 15mA which is great also.
@jsartori, I used a Siglent SDM3045X bench DMM. I measure current through an externally connected 2000mA/hr LiPo plugged into the LiPo connector on the board.
@peekay123: I tried to take similar measurements using a DMM, but my problem was that I have 2 current measurement terminals – one for low current (mA/uA) and one for high current (A). The microcontroller won’t start up unless the high current measurement terminal is used, but the low current measurement terminal is needed to perform the measurements. Do you know a way to get around this limitation, or do I just need a different DMM?
@jsartori, the DMM I have does that automatically. It also has a very low burden voltage meaning it does not affect the circuit being measured significantly. Your DMM may not provide this. I also have a uCurrent Gold which will work with any DMM to measure very low current.
If you’re not trying to get super-accurate measurements you can use your own burden resistors and measure millivolts… E.g. start with a 1 Ohm 1% resistor, then read mV = mA. When the device goes into low-power sleep use a 100 Ohm - 1K Ohm 1% resistor and measure 1 mV = 10uA, respectively 1 mV = 1uA. You may have to use a switch to switch from one to the other. Trick is not to disconnect while switching. What I do is always leave the 1 Ohm in place and add a 110 Ohm in parallel. You won’t get microamp accuracy but you will be able to tell whether you are achieving deep-sleep levels or not and if you make small changes whether they improve things or not.
FWIW, I don’t use Particle firmware but my own testing on the Xenon hardware with CPU off and one RTC running from the 32 KiHz crystal shows about 35 uA running from LiPo at 3.96V (measured with a uCurrent; numbers are very sensitive to supply voltage).
Powering from 3V3 directly with 3.0 V with XC9258 disabled by shorting CEn to ground I get about 22 uA (this configuration also removes power from the MX25L32). Anything lower than that would require mucking with solder bridges which is beyond me.
I’m pretty happy with 27 uA; my sensor apps spend about 99.92% of their time in sleep so that’s years of service life out of a decent sized LiPo.