JLCPCB …never used this …long way ahead of me
Update: To use power_on sleep I need to use softdevice which uses bluefruit library, but bluefruit library is compatible with v.1.0.0 for board manager. This version is toggling with the IMU sensor on the board. Can I have any other way to not use softdevice and put the device in system on sleep mode to save the data. Something similar to NRF_POWER->SYSTEMOFF = 1 command.
Thanks in Advance
Hmmm, Not that I’m aware of maybe someone else can comment, I would think the QSPI flash is where you can store the data before a sleep and system reset as the only wakeup method? I use only Mbed afaik it’s the only way to get BLE and IMU together and patch or hack Battery reading and Sleep mode lameness.
I’m looking toward getting RTC low power INT generated and save data in Flash for my next push. The BLE IMU data notify and connectivity to the MIT AI2 is very good and reliable for me. It’s battery reading and sleep ALL or nothing that SUCK. Nordic has it figured out and so does adafruit, SEEED ?
HTH
GL
PJ
Hey @PJ_Glasso ,
Thanks for a lead.
Tired to first test using a basic QSPI flash code present in SEEED_nRF52840_QSPI/QSPI_New.ino at main · PMCheetham/SEEED_nRF52840_QSPI · GitHub , got the expected output but unfortunately whenever I try to use flash of the seeed studio board it is getting bricked meaning I can’t detect the board on serial port anymore.
So i guess it’s a risk to toggle with flash memory of the board. Any other solutions or resources by yourself or anyone else is highly appreciated.
Hi!
I wrote a very simple code to check the current in sleep mode, measured the current - 8 µa.
According to the manufacturer’s specification, you can get less current.
How to do this ?
Who was able to get a current of less than 8 µA ?
my test code:
void setup()
{
delay(10000);
NRF_POWER->SYSTEMOFF = 1;
}
void loop()
{
}
Here is a rough demo program that draws approx 1uA when idle.
Seeed XIAO nRF52840 (not sense).
LEDs a turned on after a couple of push button switches are polled in Setup after switch interrupts.
Program needs an expert to comment and tidy up.
Hi !
Thank you for your advice.
My project uses a bare nRF52840 chip (there is no spi flash on the board and there is no microphone and there is no sense module).
But the current in sleep mode is still 8 µA.
Here are a couple my of tests and current results following NRF52 simple code for shutdown:
// Basic_Shutdown_20230522_01.ino
// 3.2 volts on 3V3 to GND
// current 21.2 uA during Delay
// current 18.0 uA after Delay
//
void setup()
{
delay(10000);
NRF_POWER->SYSTEMOFF = 1;
}
void loop()
{
}
// Basic_Shutdown_20230522_02.ino
// 3.2 volts on 3V3 to GND
// current 4.4 uA during Delay.
// Current 1.1 uA after Delay
//
#include <bluefruit.h>
#include <Adafruit_FlashTransport.h>
//
void setup()
{
//
Adafruit_FlashTransport_QSPI flashTransport;
Bluefruit.begin();
flashTransport.begin();
flashTransport.runCommand(0xB9);
flashTransport.end();
//
delay(10000);
NRF_POWER->SYSTEMOFF = 1;
}
void loop()
{
}
Thank you very much!
I 'll check it tonight !
AdamM68, Gordy7 !
Thank you very much for your help !
Everything worked out, the current is less than 1 µA!
When I run this, I get 733.77uA during the delay and 731.69uA After. Any Idea what I might be missing? Nothing else is attached.
I am not familiar with the Data Logger you are using.
I used a DMM on the uA range connected between the 3.2v battery and the 3V3 terminal on the XIAO nRF.
I was careful to make sure that the USB connection to the XIAO was removed.
Some questions regarding your set up but not sure if these will help:
- You have applied 4.097V but Gordy7 only applied 3.2V
- Gordy7 applied the voltage across 3V3 and GND pins
The Xiao board can only accept voltage > 3.6V at the battery pins, if you apply 4.097V at 3V3 pin you will be stressing your board.
Has anyone checked this issue ? :
- how do You connect xiao for making measurements ?
Maybe there is an issue when You power the xiao board via different paths
1: USB port with 5v
2: battery port with 3,6 - 4,2 v
3: 3v3 pin
(this is for whoevery wants to do internal RTC wakeup with out external interrupt)
So i have read the whole thread and tried everything, and i can tell that these 2 functions are totally useless and they probably are the default power mode for the chip , and the wait function is the same as using delay(***) whatever number , so if you need a program to wake up internally every couple of seconds , just use delay() in loop and You are all set.
sd_power_mode_set(NRF_POWER_MODE_LOWPWR);
sd_app_evt_wait(); // puts the nrf52 to sleep when there is nothing to do
Small note: the turning off external flash code saves around 18micro amps
BTW, as a first step to low power, I want to use the demo provided by seeedstudio : Power Consumption Verification. I opened deep_sleep.ino in arduino IDE (1.8.18). I can’t compile it:
low_power:81:12: error: 'class Adafruit_SPIFlash' has no member named 'deepPowerDown'
81 | if(flash.deepPowerDown() == false){
| ^~~~~~~~~~~~~
Any tip?
Better to use the 3V3 pin for lowest power consumption.
Seems like powering through the battery adds ~2uA (guessing quiescent from the 3V3 LDO, no part number given in schematics).
Powering through the USB-C port adds an additional 750uA, due to the active supply current of the BQ25100 Lipo Battery Charger IC.
This sounds like a good idea, I’m also struggling with trying to setup a sleep and wake feature using a XIAO and SAMD.
Hi there,
and Welcome, Lots of solutions to that problem here,
For the lowest power use the non-mbed BSP(board support Package) i.e. 1.1.1 or current 1.1.8
as opposed to the Embed version, that has slightly higher power draw ver, 2.9.0 or 2.9.2
HTH
GL PJ