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

nRF52832 SAADC: How to monitor ADC pin with certain threshold?

Hello All,

I am just facing an issue w.r.t monitoring the ADC pin with certain threshold voltage. I am able to read the voltage level using SAADC driver on that pin and even can monitor the ADC value using some timers.

But using the periodic timers to monitor the ADC voltage is bit costly on battery! So is there any driver modules or library from nRF to monitor the change in voltage in this ADC pin to trigger the application using callbacks?

Basically saving power is main concern we are facing!

  • Hello,

    But using the periodic timers to monitor the ADC voltage is bit costly on battery! So is there any driver modules or library from nRF to monitor the change in voltage in this ADC pin to trigger the application using callbacks?

    There are multiple ways to go about checking a pin voltage against a reference. Most prominently is the SAADC, which you already are using. However, the nRF52832 also has a Comparator and a Low-Power Comparator peripheral that could be used to monitor the the crossing of a threshold - however, their applicability depends on the requirements for the measurements.
    The LPCOMP peripheral does not have an internal static reference - it uses fractions of VDD - which makes it unsuited to supervise VDD, since it will fluctuate in tow.
    The COMP peripheral does however have 3 available internal references, so it may be used for this - but its power draw will be over that of a current optimized SAADC.

    I therefore would suggest proceeding with the SAADC.
    What is your current configuration and power draw of the SAADC? How often are you sampling?
    Please see this Low Power SAADC example, to see how you may optimize your SAADC's power consumption.

    Best regards,
    Karl

Related