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
@PJ_Glasso @AdamM68 @Citric @fe7565 @devmonkey @daCoder
I would love to connect with you people on linkedin my id linkedin/in/swapnil-surule
Friends i struggling from week to implement reset functionality via RTC
i am able to achieve deepsleep mode but cant wake it up with RTC,
with sd_app_evt_wait() i am unable to go in sleep following is my snipet please suggest header file and library
#include <nrf52840.h>
#include “Wire.h”
#include <bluefruit.h>
#include <Arduino.h>
// Function to configure RTC to generate interrupts at regular intervals
void configureRTC(unsigned long seconds) {
NRF_RTC2->TASKS_STOP = 1; // Stop RTC2
NRF_RTC2->TASKS_CLEAR = 1; // Clear RTC2
NRF_RTC2->PRESCALER = 327; // 32.768 kHz clock, 1 tick per millisecond
NRF_RTC2->CC[0] = seconds * 1000; // Set compare value (in milliseconds)
NRF_RTC2->EVTENSET = RTC_EVTENSET_COMPARE0_Msk; // Enable compare event
NRF_RTC2->INTENSET = RTC_INTENSET_COMPARE0_Msk; // Enable compare interrupt
NVIC_EnableIRQ(RTC2_IRQn); // Enable RTC2 interrupt
NRF_RTC2->TASKS_START = 1; // Start RTC2
}
// Interrupt handler for RTC wake-up
extern “C” void RTC2_IRQHandler() {
if (NRF_RTC2->EVENTS_COMPARE[0]) {
NRF_RTC2->EVENTS_COMPARE[0] = 0; // Clear the event
}
}
void setup() {
Serial.begin(115200);
Serial.println(“Communication…”);
configureRTC(10); // Configure RTC to trigger an interrupt every 5 seconds
}
void loop() {
Serial.println(“Wake up…”);
delay(2000);
sd_power_mode_set(NRF_POWER_MODE_LOWPWR);
sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
__WFE();
__WFI();
sd_app_evt_wait();
Serial.println(“sleep…”);
delay(2000);
}
Did achieved any of system on sleep with claimed power ? if yes can you pls share the snipet… i am ok with even 3uA with RTC wakeup?
BRO how can we get system on sleep with shuch low power , even my snipet is drawinding approx 1mA
i am using softdevice and sd_app_evt_wait(); and also _WFI , _WFE, SEV, my QSPI is off and DCDCEN . i can afford max 5uA un System on Sleep
I’m not sure …but does Xiao nRF52840 has RTC ?
Gemini says :
The Xiao nRF52840 itself doesn’t have a built-in Real-Time Clock (RTC). However, you can add an external RTC module like the PCF8563T to provide this functionality. 1 This module communicates with the Xiao via I2C, allowing you to keep track of time even when the board is powered off.
[
- Seeed XIAO Expansion board | The Pi Hut
](Seeed XIAO Expansion board | The Pi Hut)
HI Swapnil_Surule,
According to the datasheet “5.3.3 System OFF mode”, XIAO_nRF52840 cannot be waken up from System OFF mode DeepSleep) using RTC.
To wake up XIAO_nRF52840 with RTC, System On mode(LightSleep) must be used.
do You have a link to this datasheet ?
It can be found in the Resourece section at the bottom of the Wuiki link below.
‘Getting Started with Seeed Studio XIAO nRF52840 Series | Seeed Studio Wiki’