How do I monitor battery voltage with nRF51 series?
How do I monitor battery voltage with nRF51 series?
To monitor battery voltage you can either use the ADC or the Power-fail comparator.
The power fail comparator mechanism will generate an event when the battery voltage drops below a certain threshold, configurable from 2.1V to 2.7V. The comparator consumes 10 uA but is only enabled while the CPU is awake, which makes the comparator consume less than a uA for most BLE applications, because the CPU will be asleep most of the time.
An ADC measurement for the battery voltage is typically connected with a timer to periodically measure battery voltage. The ADC should be used with a 16MHz external crystal clock source in order for ADC measurements to be within ADC accuracy specification given in the nRF51822/nRF51422 product specification. The ADC can also be used with the internal RC 16MHz clock but that may cause ADC measurements to be outside the specified accuracy.
Current consumption greatly differs for the two clock sources. An example of typical current consumption numbers for the ADC are:
The battery voltage is normally measured at regular intervals using an ADC measurement that is linked to a timer. For ADC measurements to fall within the ADC accuracy criteria stated in the nRF51822/nRF51422 product specification, an external crystal clock source of 16MHz must be utilized. The ADC may also be utilized using the on-board RC 16MHz clock, albeit doing so may result in less-than-accurate ADC readings.
The battery voltage is normally measured at regular intervals using an ADC measurement that is linked to a timer. For ADC measurements to fall within the ADC accuracy criteria stated in the nRF51822/nRF51422 product specification, an external crystal clock source of 16MHz must be utilized. The ADC may also be utilized using the on-board RC 16MHz clock, albeit doing so may result in less-than-accurate ADC readings.