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

how to measure the coin cell battey voltage in real

Hello Everyone,

I am trying to measure the (3v)battery voltage by having proximity example as reference but intially it is showing 100percent later it is going to 13(percent) voltage approxmiatelry (after 120seconds) i dont understand why it is happening like this can anyone suggest me some possible ways to measure out by using multimeter how much voltage available on ADC pin ? so that i can able to make some idea about the battery level measurement§?

Parents
  • The proximity example in SDK 11 uses a app timer to measure the battery level. The first measurement is not performed until the first time it times out, and the timeout is 120 second (thus measurements are performed every 120 seconds). You can modify BATTERY_LEVEL_MEAS_INTERVAL and set it to a lower value in order to measure more often. You can also do the first measurement at startup, rather than waiting the full measurement interval before doing the first measurement.

    Also, if you are not using the DK you may have to change the value of DIODE_FWD_VOLT_DROP_MILLIVOLTS to reflect your hardware.

  • Thank you so much for your reply am using the NRF51DK(SDK10) providing 3V supply from the battery to the DK my aim is to see the exact battery value in the MCP but am not getting alteast around somewhere 90 percent but is is dropped to 12 percent so i configured the ADC something like this

    nrf_adc_config_t adc_config = NRF_ADC_CONFIG_DEFAULT;

    adc_config.scaling = NRF_ADC_CONFIG_SCALING_INPUT_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_2);
    

    after doing this i checked the voltage present on the ADC PIN number(p0.02i by using mulimeter it is showing 0 only alwyas can you suggest what mistake in my approach how can i checkt he voltage on the analo pin?and alos i changed the BATTERY_LEVEL_MEAS_INTERVAL from 120000 ticks(120seconds) to 1200 ticks but still seems it take quite long for the first time out is ther any other modifications do i have to do for changing the first time out?

Reply
  • Thank you so much for your reply am using the NRF51DK(SDK10) providing 3V supply from the battery to the DK my aim is to see the exact battery value in the MCP but am not getting alteast around somewhere 90 percent but is is dropped to 12 percent so i configured the ADC something like this

    nrf_adc_config_t adc_config = NRF_ADC_CONFIG_DEFAULT;

    adc_config.scaling = NRF_ADC_CONFIG_SCALING_INPUT_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_2);
    

    after doing this i checked the voltage present on the ADC PIN number(p0.02i by using mulimeter it is showing 0 only alwyas can you suggest what mistake in my approach how can i checkt he voltage on the analo pin?and alos i changed the BATTERY_LEVEL_MEAS_INTERVAL from 120000 ticks(120seconds) to 1200 ticks but still seems it take quite long for the first time out is ther any other modifications do i have to do for changing the first time out?

Children
No Data
Related