Yes, this is an important note! In tests, I’ve found that current with Led Off is around 600uA (at 5V).
Driving the WS at 5V actually requires a level shifter between the XIAO and the WS, which is a bit of a hassle.
Correct. That is “normal practice” for mosfet switches…
Depending on the project and power requirements I tend to use a “smart” switch, viz RT9742… low(ish) cost but with built in protection and 100nA standby current.
@grobasoz @msfujino thank you both for the input! I got some P-channel mosfets and they fixed the issue for me. I’m now seeing 2.4uA in deep sleep.
With the LED disabled and connected to a device over BLE, I am seeing about 390uA - does that sound reasonable or might there be more power savings on the table?
The LED seems to be working fine off 3.3V, could running it off the 3v3 pin lead to any issues down the line on either the LED side or nRF side?
Excellent news! I have had the WS2812’s running fine with a 3V3 supply but that is “out of specified parameters” as mentioned by @msfujino.
@msfujino will also be able to answer the standby power consumption ![]()
The following links may be helpful.
’ System_ON_Sleep of XIAO BLE - #31 by msfujino
Hi all - I have read through some of the power consumption threads related to sleep and am looking for a list of what is actually being disabled behind the scenes. The reason is, I am using a rust-based library, ArielOS, with my xiao nrf52840 plus so I am trying to reproduce the power savings provided in the Arduino world, but that means I need to disable some things on my own (presumably just replicate whatever the sleep functions are doing in the Arduino libraries). Currently my code only draws 7uA avg on my nrf52840dk, but the same code on my xiao draws ~600uA so trying to find the “extras” that I need to disable. Thanks!
Hi cgc17, I have some questions.
- Where on XIAO are you applying what voltage to measure the current?
- Have you tried the method described in the attachment Flash_Light_Deep_Sleep.zip in Post #1?
- Please tell us the method you are implementing when the current is 600uA.
Thanks for your reply!
- I am supplying 3V to the 3v3 pin directly with ppk2
- Not yet, it looks like primarily it is disabling the QSPI flash which I will work out how to do on my side. Is it likely that the flash is taking up ~550uA or more?
- I have a simple sleep loop - sleep for 1s, wakeup, go back to sleep.
Here are 2 screenshots for the Xiao (first one I highlighted 1 second, and the second one I zoomed in to highlight the 20ms spikes and just to show that the baseline is > 500uA):
And here is one showing the same code running on the nrf52840dk:
And this may not really be that useful, but just to show the simplicity of the code I’m using to test:
#![no_main]
#![no_std]
use ariel_os::time::Timer;
#[ariel_os::task(autostart)]
async fn main() {
loop {
Timer::after_millis(1000).await;
}
}
Hi there,
If you look at those threads closely , You will see the Vbat needs to be 3.6-3.85vDC from the battery so set your PPK2 accordingly and you will see the same numbers as you disable Flash, LDo , GPIO’ ,etc.
HTH
GL
PJ ![]()
- Is REG1 set to DCDC mode?
- The flash memory current is at most 20uA.
- I have absolutely no idea why the current is lower with the same code on the nRF52840DK.
- On the Arduino nRF52840, the RTOS should be minimizing system activity during sleep via delay(). You might need to analyze the RTOS delay() function.
thanks for the replies. I’ve decided to switch over to arduino since there is support for the Xiao out of the box (plus I need the LPCOMP from nrf.h) and so that I can interact better with the community here using similar setups! so with that I can work with the code already provided above… if I have any issues I will post along with the sketch for review, but I imagine it should just work now. thank you for that @msfujino ![]()
I have just started working with this board and do not have much experience with the XIAO boards. Even after applying the codes provided above by @msfujino, I am unable to achieve the expected low power consumption (around 5 µA).
When I use the code exactly as provided by msfujino, I do get a current consumption of less than 5 µA. However, when I modify the code for my own use case, the current consumption in sleep mode becomes significantly higher.
From my observations, the issue occurs when I add the Bluefruit library and actually use it to connect to a device and send data. Simply including the library does not cause the problem, but when I initialize and use it in the setup (for example using statements like Bluefruit.begin(), Bluefruit.setName(), etc.), the current consumption during deep sleep increases drastically to around 9–10 mA. I think i am not correctly closing the ble connection or something.
If someone could provide or point me to a basic example where deep sleep is implemented along with BLE (not just including the library, but actually using BLE), it would be very helpful. I believe such an example exists somewhere in the forum, but I may have missed it.
Thanks in advance.
In the attachment to Post #1 of this thread, there is a sketch showing how the peripheral and central units communicate. You might find it helpful.


