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
  • So, looking at the examples from SDK10 and 11. The proximity example is actually using the ADC to measure the battery voltage. While the heart rate example is using a sensor simulator to update the battery value. Please look for the ble_bas_battery_level_update function.

  • 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);
    
Reply
  • 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);
    
Children
No Data
Related