Skip to content

BLE Power consumption after BLE.end() #149

@oRMMo

Description

@oRMMo

Hi,

Related to #65 and the fix #92, BLE.end() still draw around ~0.5 mA on NANO 33 BLE Sense.

@facchinm mentioned that the CordioHCIHook doesn't shut down the radio (#65 (comment)).
So I tried inserting NRF_RADIO->TASKS_STOP = 1; or/and NRF_RADIO->TASKS_DISABLE = 1; after BLE.end() with no success (wishful thinking I believe :)).

This sketch is around ~ 1.562 mA


#include <ArduinoBLE.h>

BLEService serv("19B10010-E8F2-537E-4F6C-D104768A1214");
BLEByteCharacteristic charac("747ce3a8-3588-11eb-adc1-0242ac120002", BLERead | BLENotify);


void setup() {
  
  digitalWrite(LED_PWR, LOW);
  
  Serial.begin(9600);
  while(!Serial);
  
  if (!BLE.begin()){
    Serial.print("NO BLE");
    while(1);                                                                        
  } else {
    Serial.println("BLE Started");  
  }
  
  BLE.setLocalName("TEST_BLE_Power");
  BLE.setAdvertisedService(serv);
  serv.addCharacteristic(charac);
  BLE.addService(serv);
  BLE.setAdvertisingInterval(1600);
  BLE.advertise();
  BLE.end();
}

void loop() {
  delay(1000);
}

The same sketch without the BLE.begin() (without starting then stopping back BLE) is around ~1.067 mA

#include <ArduinoBLE.h>

BLEService serv("19B10010-E8F2-537E-4F6C-D104768A1214");
BLEByteCharacteristic charac("747ce3a8-3588-11eb-adc1-0242ac120002", BLERead | BLENotify);


void setup() {
 
 digitalWrite(LED_PWR, LOW);
 
 Serial.begin(9600);
 while(!Serial);
 
 /*if (!BLE.begin()){
   Serial.print("NO BLE");
   while(1);                                                                        
 } else {
   Serial.println("BLE Started");  
 }*/
 
 BLE.setLocalName("TEST_BLE_Power");
 BLE.setAdvertisedService(serv);
 serv.addCharacteristic(charac);
 BLE.addService(serv);
 BLE.setAdvertisingInterval(1600);
 BLE.advertise();
 BLE.end();
}

void loop() {
 delay(1000);
}

If I run the same sketches without Serial.begin() & no USB cable connected the consumption goes down of course but the BLE.end() "cost" stays the same.

I am trying to get as much low power consumption as possible for my project and I am actually down to around ~205uA without radio. With radio on only for TX when needed, everything would be set for months on battery. Still need to find a solution for the BLE Off power draw.
I tried digging in the Arduino BLE library but it is way beyond my knowledge & skill.

Any ideas how to go about this? Any help is welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy