adafruit / adafruit/Adafruit_nRF52_Arduino

More on Power consumption

Open
#165 101 comments 2 reactions 0 assignees View on GitHub
Dominant language
C
Stars
699
Forks
570
PR merge metrics
No merged PRs in 30d

Description

Since long time I am fighting to lower power consumption using this library to the levels reachable with Sdk examples!
I have run several examples, testing the uA level in different type of code.
If we don't use BLE libraries uA are very near to the one expected , normally few uA when we are in low power mode.
But if we use BLE consumption get well above 1mA so about 100 times more that expected!
I have used the dual role BLE uart example and these are my findings:
-to enter low power mode you have to add delay() in the main loop , the longest the milliseconds the lowest the power drain.
-all Ble central related functions are taking quite a bit of mA
-keeping only BLE peripheral functions, with delay(100) will give about 600uA that is about what is expected (100 uA+500uA for Serial uart)
-taking out all Serial.begin and Serial.print from the example INCREASE the power drain to about 2mA while should be reduced by 500uA

I think this strange behaviour may only be due to some Serial debug statement present on the BLE libraries.
In theory Serial debug should be fully controlled by the Tools menu setting and with debug=0 slould not be executed!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the dual-role BLE UART example and measuring low-power consumption with and without Serial.begin and Serial.print, as described in the report. Compare peripheral-only and central-related behavior, then determine whether debug output accounts for the excess drain; done means the cause is identified and the expected low-power behavior is documented or verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, c
Domain
embedded-iot, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.