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

Difference between battery measurement on ble_app_hrs and ble_app_proximity

Hello

I am working on the NRF51DK i would like to monitor the battery percentage and notifythe value over the air to the user and aslo alert the user if the battery levels fall below the certain percentage so i started testing the battery example on the SDK where the ble_app_proximity example always showing 100percent irrespective of whatever changes have been made on the program and i tried with the ble_app_hrs example it is showing the battery value (depending upon the charge present on the cr2032battery) i dont understand why the proxmity example always showing 100percent ? and how the ble_app_hrs is working? so i request can anyone give me some brief information about this point so that i can able to understand and proceed further for my application

Thank you

Parents Reply Children
  • Thank you so much for your kind reply i gone through those examples and i ahve tested with the battery CR2032(3v) where in the ble_app_hrs example showing 94 percent (for battery and 81percent (via USB supply) but in the ble_app_proximity example it is always showing 100percent irrespective of supply provided by battery or USB can you help me what should i do in order to measure the correct abttery level ? it is advisable to use ADC measurement or battery sensor simulator?

  • Thank you for your kind reply i am using CR2032 Battery i measured with the mulitmeter(it showedtht battery is providing 3 volts) and then i checked the voltage present at VDD pin on the developement kit it is showing 2.81volts so i hoope i am not crossing the maximum supply of 3volts to the circuit ? can i change the condition something like this is it possible?

    if (mvolts >= 3300) { battery_level = 100; }

  • The upper limit is 3.6 volts so no problem. You can change the limits for the different percentage levels in app_util.h starting from line 370. However I think you should leave the limits as is.

  • thank you for your kind reply could you please tell me where can i able to measure the adc ouput value in the developement kit i configured like this when i tried to measure the voltage on the pin number 3it is showing 0 volts only can you please tell me what procedure should i fiollow inorder to measure the ADC voltage on the respective pin

    nrf_adc_config_t adc_config = NRF_ADC_CONFIG_DEFAULT;

    adc_config.scaling = NRF_ADC_CONFIG_SCALING_SUPPLY_ONE_THIRD;
    
    nrf_adc_configure(&adc_config); 
    
    nrf_adc_int_enable(ADC_INTENSET_END_Msk);
    NVIC_EnableIRQ(ADC_IRQn);
    
    NVIC_SetPriority(ADC_IRQn, 3);
    
    
    nrf_adc_input_select(NRF_ADC_CONFIG_INPUT_3);
    
  • moreover i changed the limits and set the value like this but after that also it is continously showing 100 percent only i dont understand how this is working can you please give me some more information about the battery measurment

    if (mvolts >= 3200) { battery_level = 95; }

Related