# Achieve Low power consumption on Arduino Nano 33 BLE Sense

**URL:** <https://forum.arduino.cc/t/achieve-low-power-consumption-on-arduino-nano-33-ble-sense/1163527>\
**Category:** Nano 33 BLE Sense\
**Created:** [August 30, 2023, 9:42am UTC](https://forum.arduino.cc/t/achieve-low-power-consumption-on-arduino-nano-33-ble-sense/1163527 "2023-08-30T09:42:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andresoliva](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/andresoliva/32/996900_2.png) [@andresoliva](https://forum.arduino.cc/u/andresoliva)\
**Post date:** [August 30, 2023, 9:42am UTC](https://forum.arduino.cc/t/achieve-low-power-consumption-on-arduino-nano-33-ble-sense/1163527/1 "2023-08-30T09:42:47Z")

</div>

Hi, I am trying to reduce the power consumption of my arduino BLE sense by following this topic: [Low power consumption on the Arduino Nano 33 BLE Sense](https://forum.arduino.cc/t/low-power-consumption-on-the-arduino-nano-33-ble-sense/1013562)

I followed all the steps (like cutting the 3.3V bridge and adding custom code to turn down the default serial)

The curious thing is that when I call the delay function (so the module enters in sleep mode) It meassures a power consumption of 315 uA. But when I shutdown the module (by adding ) the power consumption is 5.2 uA, which is corresponding to the sensors and BLE module in deep sleep state.

I would like to know how to improve this and get the lower values of conumpsion that other people have mentioned in the cited post (arround 11 uA).

Here the code I had been using:

```arduino
//Ultra Low Power blink example. Tested on Arduino nano 33 BLE board and nRF528x (Mbed OS) V1.1.6 core
//https://forum.arduino.cc/t/low-power-consumption-on-the-arduino-nano-33-ble-sense/1013562
//Override the default main function to remove USB CDC feature - @farome contribution
//Summarizing, here's a very low power version of the blink example, without shutting down the main CPU (up to 11µA with all LEDs off - 4mA with power LED on).

//lower value got with delay: 315 uA for sleep in arduino nano 33 BLE sense board 
//lower value got with shutdown: 5.2 uA for shutdown in arduino nano 33 BLE sense board 
//https://forum.arduino.cc/t/nano-33-ble-sense-system-on-off-minimum-power-consumption/677478
//Note: If you add the shutdown function, you get 5.2uA as power consumption . This means 
//that there is an issue with the low power mode of the module (the delay function), and not with the hardware or sensrs
int main(void){
init();
initVariant();

//Disabling UART0 (saves around 300-500µA) - @Jul10199555 contribution
NRF_UART0->TASKS_STOPTX = 1;
NRF_UART0->TASKS_STOPRX = 1;
NRF_UART0->ENABLE = 0;

*(volatile uint32_t *)0x40002FFC = 0;
*(volatile uint32_t *)0x40002FFC;
*(volatile uint32_t *)0x40002FFC = 1; //Setting up UART registers again due to a library issue

//Removing USB CDC feature
//#if defined(SERIAL_CDC)
// PluggableUSBD().begin();
// SerialUSB.begin(115200);
//#endif

  setup();
  for(;;){
    loop();
//If you won't be using serial communication comment next line
// if(arduino::serialEventRun) arduino::serialEventRun();
  }
  return 0;
}

void setup(){
//pinMode(pin, OUTPUT) is already set for these 3 pins on variants.cpp
  digitalWrite(LED_PWR, LOW); // @pert contribution
//Pins are currently swapped. Lower current achieved if setting both pins to HIGH
  digitalWrite(PIN_ENABLE_SENSORS_3V3, LOW); //PIN_ENABLE_I2C_PULLUP - @pert contribution
  digitalWrite(PIN_ENABLE_I2C_PULLUP, LOW); //PIN_ENABLE_SENSORS_3V3 - @pert contribution
  //NRF_POWER->DCDCEN=1;//ENABLE BUCK CONVERTER, HELPS A LOT
}
void rtos_idle_callback(void)
{
  // Don't call any other FreeRTOS blocking API()
  // Perform background task(s) here
}
void loop(){
  digitalWrite(LED_PWR, HIGH);
  delay(5*1000);
  digitalWrite(LED_PWR, LOW);
  delay(10*1000); //332 µA USB
// NRF_POWER->SYSTEMOFF = 1; //5.3 uA, but shuts down all.

  delay(30*1000); //332 µA USB
  
}

```

Best Regards

Andres

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.arduino.cc/u/awneil)\
**Post date:** [August 30, 2023, 9:45am UTC](https://forum.arduino.cc/t/achieve-low-power-consumption-on-arduino-nano-33-ble-sense/1163527/2 "2023-08-30T09:45:20Z")

</div>

> [@andresoliva](#):
>
> the delay function (so the module enters in sleep mode)

It presumably has to keep doing something - not just sleep - to keep track of the delay?

---

<div class="post-metadata">

**Author:** ![andresoliva](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/andresoliva/32/996900_2.png) [@andresoliva](https://forum.arduino.cc/u/andresoliva)\
**Post date:** [August 30, 2023, 1:47pm UTC](https://forum.arduino.cc/t/achieve-low-power-consumption-on-arduino-nano-33-ble-sense/1163527/3 "2023-08-30T13:47:27Z")

</div>

The only thread running is the one with the delay loop . Then you have the RTOS running in the background but it should not consume so much power. I checked in other sites that other persons solved this issue by creating events an timers using RTOS features . The issue is that this functions, as far as i know, are not available.

I am open to any advice regarding on how to proceed in this case.

---

<div class="post-metadata">

**Author:** ![pommecannelle](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@pommecannelle](https://forum.arduino.cc/u/pommecannelle)\
**Post date:** [September 21, 2023, 11:48am UTC](https://forum.arduino.cc/t/achieve-low-power-consumption-on-arduino-nano-33-ble-sense/1163527/4 "2023-09-21T11:48:58Z")

</div>

Hi, I had the same issue here.

I solved it by installing the "[DEPRECIATED - Please install standalone packages] Arduino Mbed OS Boards" in version 1.1.3 in the board manager as mentionned by @farom is this post : [https://forum.arduino.cc/t/nano-33-ble-idle-power/624683/4](https://forum.arduino.cc/t/nano-33-ble-idle-power/624683/4)

I don't know the consequences of doing that but the sleep power consumption during the execution of the delay function is now really low.

Hope it could be helpful.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 19, 2024, 11:49am UTC](https://forum.arduino.cc/t/achieve-low-power-consumption-on-arduino-nano-33-ble-sense/1163527/5 "2024-03-19T11:49:50Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
