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

Consumption in nRF51822

Hi,

I'm using the nRF51822 for a beacon and following the ble_app_beacon example (SDK 8.0.0) with some modification in order to measure the battery level through the ADC.

I'm using a CR2032 coin cell battery and reading the ADC every 40min aprox and advertising every 400ms (The battery level is included in the advertising). The problems I'm facing is that the battery only last only 2 days.

I've followed this post: devzone.nordicsemi.com/.../

to see how to reduce the consumption... but without any achievement.

You can find attached the code. ble_app_beacon.rar

Thank you in advance,

Javier

    1. What is your idle current between advertisements?

    2. How much capacitance do you have on Battery line?

    3. What is the IR of the cr2032 before and after it dies?

  • Hi,

    The IR of the battery is almost 0 (less than 200m). The capacitance on battery line are two 100nF capacitances and one of 1nF. I´ve used the same design you give in the PS document. Also the resistance in the battery line is almost negligible.

  • Hi Javier

    I think the best first step is to figure out if this is a hardware problem or a software problem. I have added text to the "Measuring Current Consumption" section in the current consumption guide in order for you to analyze the current consumption on your board, both with and without softdevice enabled. I have also added to the Troubleshooting section, so perhaps look at that section again. Try first to flash the standard current consumption test examples that do not use the softdevice, and see what current consumption you get. Then move on to something with the sotfdevice, and have a long advertising interval, in order to measure the current consumption of a BLE example between BLE advertising events, as explained in the current consumption guide.

    Update 28.1.2016 I looked at your code and quickly did not realize why the code consumes that much current, but the 4.5mA indicates that the nRF51 is either not entering System On low power mode or it is repeatedly waking up from System On low power mode. Anyway, I modified your code a little to use the ADC interrupt and then I could see normal current consumption. The modified code is attached. Your code was quite messy and I did not clean up, it is still quite messy ;)

    ble_app_beacon_Nordic_modified.zip

    I also modified the advertising interval to 4 seconds, so to see more responsive advertising, just change the advertising interval to e.g. 100ms

  • Generally you'll probably want to use alot capacitance then those designs show. Generally for a coin cell battery the IR ranges from 10 - 100Ohms depending on capacity. I'd recheck that part.

    What is your idle current betwen Advertising peaks?

  • Hi Stefan,

    Thank you a lot for the help. I have been testing the board following some of the tips you gave and the comsumption in the Power profiling application in System On low power mode is around 0.4uA.

    Also I was measuring the consumption of the board with my code. The consumption is around 4.5mA. However the problem is the ADC, as soon as I configure the ADC and I enable the module the consumption raise from 10uA to 4.5mA. I guess the problem is because I leave the ADC module enabled: void ADC_CONF(void){

    //uint8_t Beacon_Bat;
    
    NRF_ADC->INTENSET = ADC_INTENSET_END_Msk; 
    
    // Configure ADC - set reference input source to internal 1.2V bandgap 
    NRF_ADC->CONFIG = (ADC_CONFIG_REFSEL_VBG << ADC_CONFIG_REFSEL_Pos);
    // Configure ADC - set input source to VDD/3 
    NRF_ADC->CONFIG |= (ADC_CONFIG_INPSEL_SupplyOneThirdPrescaling << ADC_CONFIG_INPSEL_Pos);
    // Configure ADC - select 8 bit resolution 
    NRF_ADC->CONFIG |= (ADC_CONFIG_RES_8bit << ADC_CONFIG_RES_Pos);
    
    // enable ADC   
    NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Enabled; /* Bit 0 : ADC enable. */   
    	
    

    } So, I was wondering if I should disable the module, when to do it and if after disabling it, the configuration will remain the same.

    Thank you for your help,

    Javier

Related