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

About ADC

I'm using 3.6v battery and I want to read the battery voltage, can I get the power ping directly to the any ADC pin of nrf52833 ? Or it cause any damage to the ic ?

Parents
  • Hello,

    If you wish to sample the VDD of the device, I would recommend defining a channel to monitor the VDD bus of the device, using the drivers internal define.
    The SAADC peripheral example demonstrates how to setup the SAADC peripheral and have it monitor the AIN0 pin.
    By changing the argument of line 153 in main.c from NRF_SAADC_INPUT_AIN0 to NRF_SAADC_INPUT_VDD you will be measuring the device VDD instead.
    You will also need to make some changes to ensure that the range of the SAADC is correct with regards to the voltage you are measuring - please see the SAADC peripheral documentation's Reference section to read about how prescaling and reference choice affects available measuring range.
    Bear in mind that the samples written to the serial terminal is the raw SAADC output - not scaled and converted to millivolts.
    To see a demonstration of how to measure battery voltage, you could take a look at the BLE proximity peripheral example, where it is demonstrated in the battery level service update handler.

    Best regards,
    Karl

Reply
  • Hello,

    If you wish to sample the VDD of the device, I would recommend defining a channel to monitor the VDD bus of the device, using the drivers internal define.
    The SAADC peripheral example demonstrates how to setup the SAADC peripheral and have it monitor the AIN0 pin.
    By changing the argument of line 153 in main.c from NRF_SAADC_INPUT_AIN0 to NRF_SAADC_INPUT_VDD you will be measuring the device VDD instead.
    You will also need to make some changes to ensure that the range of the SAADC is correct with regards to the voltage you are measuring - please see the SAADC peripheral documentation's Reference section to read about how prescaling and reference choice affects available measuring range.
    Bear in mind that the samples written to the serial terminal is the raw SAADC output - not scaled and converted to millivolts.
    To see a demonstration of how to measure battery voltage, you could take a look at the BLE proximity peripheral example, where it is demonstrated in the battery level service update handler.

    Best regards,
    Karl

Children
No Data
Related