Nano 33 IOT power consumption > 22mA in sleep

I have a semi-large BLE project also involving a SIM7000 data/gps module all powered from a 2000mAh 5v battery and I'm trying to get the average battery consumption < 13ma. I power the arduino with 5v through VIN.

Currently with the NINA module turned on the power consumption is 85mA. When I power down the NINA module and put the arduino in LowPower.idle(), consumption is 25mA. This isn't ideal so I've been searching for other solutions.

Minimum Power Requirements:

  • Need to turn on the BLE module for a second every 10 seconds
  • Turn on gps for 20 seconds every 15 minutes
  • Turn on cellular transmitter every 30 minutes for an HTTP POST so I also need some sort of clock, millis() makes things easy

I have tried sleep() in a blank sketch from both ArduinoLowPower and Adafruit SleepyDog Library but neither drops consumption below 22mA.

I have also tried setting GCLK 0 to the 32khz crystal as mentioned here Reduce SAMD21 clock speed? - #3 by MartinL and that increased power consumption to 30mA

Does anyone have any other suggestions? I'll try anything but I feel kinda stuck

Hi @baconcheese13

The millis() and other Arduino timing functions will stop during sleep since they're derived from the microcontroller's 48MHz Digital Frequency Locked Loop (DFLL48M) clock source.

To keep time when asleep it's probably best to use the RTC. Arduino have written a library for this called RTCZero:

@baconcheese13 Also, I'd just though I'd mention that any active interrupts will also wake up the microcontroller. This can often resulting in a higher current consumption than expected.

Ah, that solves the timing issue!

Any idea what could be keeping the power consumption so high? I've tried with 2 nano 33 IoTs just to make sure it wasn't an issue with the board. And it's only connected through VIN and GND.

I tested it with 3.3v instead of VIN and now I'm measuring 3mA

If remove LED (solder carefully) possible to reduce power consumption even more.

Figure I'd put an update here about where I ended up in case someone else needs this.

ArduinoLowPower worked great for the basic LowPower.idle() but for better RTC and interrupt functionality I switched to the RTCZero library. This worked pretty well but still consumed around 8mA in deep sleep and 60mA while scanning with ArduinoBLE. My 10Ah battery lasted 9 days

I also had a few Nano 33 BLE's, an ESP32, and Seeed Xiao nRF52....so decided to measure their consumption.

The ESP32 was super high with a blank sketch, do didn't do much else with it, but the Nano 33 BLE scanned at 26mA and the Xiao at 10mA... So I decided to port my project to the Xiao.

I was using ArduinoBLE, ArduinoJson, ArduinoOTA, FlashStorage, and ArduinoLowPower. With the nRF52840 ArduinoBLE crashes when scanning in places with many BLE devices, there is no Arduino OTA DFU solution, and FlashStorage isn't compatible.

For persistent storage it's an easy refactor to KVStore.

For BLE I switched from the Arduino nRF52 platform core to the Adafruit nRF52 platform core, which comes with Bluefruit and uses SoftDevice. This library has been wayyyyy more reliable, customizable, and power efficient, at the cost of being less intuitive to use, running on closed-source software, and using more memory, but I can scan indefinitely without reliability issues and consume less than 2mA with continual scanning. It immediately goes into sleep when calling delay(), so power consumption during a delay() is around 20uA.

For ArduinoLowPower there isn't really a reason to need explicit power saving code now, so I'm just using delay()

For OTA DFU there wasn't any Arduino solution, but Adafruit claimed to support it so I gave it a try but was unable to get it past the initial reset to the bootloader. Unfortunately (imo) the OTA DFU code is one line with Adafruit, enableOTADfu() so I can't just implement the BLE transport myself and just pass the byte array to FlashStorage.write(). And the Xiao isn't technically a supported module for the Adafruit platform core, so there's no way to know if it's supposed to work.

At this point I started wondering if it was even worth it to stick to Arduino-compatible devices, seeing that using the nRF52840 SoC with nRF Connect SDK has OTA DFU support out of the box, and the BLE API is similar to Bluefruit's. It'd probably be smarter to just port my code into C than to deep dive into the internals of the Adafruit OTA DFU functionality to eventually implement it myself and consequentially, maintain it.

So that's where I am now, getting the nRF52840 dev kit setup and preparing to port over the rest of the project after testing BLE and OTA DFU

1 Like

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