This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Relationship between ble_stack_init() and current consumption

Hello devzone!
I am using translation.

I'm trying various things in a continuation of my previous post, but I do have one question.

I set NRF_LOG_ENABLED to 0 at ble_app_blinky of SDK15.3.
When ble_stack_init(), gap_param_init(), gatt_init(), services_init(), avoiding_init(), conn_params_init(), avoiding_start() were commented out and the current was measured, it was about 420uA, but when only ble_stack_init() was enabled and the current was measured, it was about 5uA.

How does ble_stack_init() affect the current consumption?

Best regerds.

Parents
  • Dear Daichi,

    For power consumpiton there are too many parameter to you should care :)

    First of all, you should divide your scenario into two parts.

    1) Before connection (We call this advertising)

    2) After connection (We call this connection )

    There are two differents settings for above 2 parts.

    1) Before connection, All Ble examples comes with this parameters

    #define APP_ADV_INTERVAL 40 

    APP_ADV_INTERVAL : time for advertising period. It's unit is 0.625ms. So we can calculate 40*0.625ms = 25ms
    Its mean,  At the advertising scenario (Part 1 above) your project can broadcast every 25ms. You can imagine that it will consume too much power
    When i use tool for calculating power consumption ( https://devzone.nordicsemi.com/nordic/power ) When i set advertising period to 25ms. It calculated 305uA. It almost similar with your power consumption. When you deactivate ble_stack_init() it will not advertising, so it will not consume power. But, it is not solution :)

    Solution 1: Try to increase APP_ADV_INTERVAL, for example in my project this value is 8000. It's mean 8000*0.625ms = 5000ms = 5sn.
    My device advertising at every 5sn. And power consumption will decrease from 305uA to 3.8uA.
    (Warning :when you try to search your device with phone or PC just wait while a moment because it will report his name at 5sn)

    2) After connection, most ble examples comes with this parameters.

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(500, UNIT_1_25_MS)
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS) 
    #define SLAVE_LATENCY 0
    #define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS)

    MIN_CONN_INTERVAL  and MAX_CONN_INTERVAL  are data updating times for after connection. 
    SLAVE_LATENCY  : How many times your device will reject to answer to the central
    CONN_SUP_TIMEOUT  : After your device connection lost, after how many seconds your central will recognize there is connection lost.

    These all parameters connected to each others. You cannot change one of them randomly.

    For example, in my project

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS)
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) 
    #define SLAVE_LATENCY 50
    #define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(32000, UNIT_10_MS)

    Its mean, my device will update if there is data to send in 100ms, When there is no data my device will select to reject 50times to give answer to the centra. If my device will go out of range or if i will turn off device power, my central will recongnize after 32second there is connection lost.

    In this settings my consumption is  3.1uA.

    You should try to change and see what will happen.

    Best regards 

  • Dear Ekmekci,

    Thanks for your reply.
    I apologize for the delay in replying.

    Your explanation has helped me to understand the BLE connection better.

    In my case, I think it falls under

    ble_stack_init() it will not advertising, so it will not consume power

    It was 5uA when only ble_stack_init() was active, but it is 420uA when all are disactivated.
    I think both of them are not advertising and connection, am I wrong?

    Best regards.

  • Actually my meaning,

    if you are not activate Radio, it consumes low power.

    If you activate Radio, it is starting to consume higher power. Higher mean it depend your settings.

    For example,
    int main()
    {
    while(true)
    {
    // Wait for an event.
    __WFE();
    // Clear the internal event register.
    __SEV();
    __WFE();
    }
    }

    if you try this. you can measure your Custom board power consumption. Because it normally consumes around 5uA current.

     

    log_init();
    timers_init();
    buttons_leds_init(&erase_bonds);
    power_management_init();
    ble_stack_init();
    conn_evt_len_ext_set();
    gap_params_init();
    gatt_init();
    services_init();
    // advertising_init();   deactivate
    conn_params_init();

    even you try this it still consumes around 5uA

    When you activate advertising_init(); it starts consume higher current. Because i already tried to explain above.

  • I understand that the active radio is related to the increased current consumption.

    Does advertising_init(); make the radio active?

    If so, that's not match what I measured result.
    Activating advertising_start(); will increase the current, but activating advertising_init(); and deactivating advertising_start(); will still be about 5uA.

    What I want to know is what causes the current consumption to increase if you don't do ble_stack_init();.

    Is there a mistake in the current measurement method?

    The SB40 of the DK board (PCA10056) is disconnected and the multimeter is connected to P22.
    4V is supplied to VIN_3-5V of P20 from a stabilized power supply.

  • ohh, sorry for my typing mistake,

    i was mentioned about advertising_start();   not advertising_init();

    i just wonder, why you want to disable ble_stack_init();?

    on the other hand,
    for correct measurement yo need to use power profiler kits.

    Because, if you use https://devzone.nordicsemi.com/nordic/power/

    you can see,

    Pre-processing : Current : xxmA, length : xxuS
    Crystal ramp-up : Current : xmA, length : xxuS

    so you have to calculate all currents and all lengths for measurement.

Reply Children
No Data
Related