3.1.4.1 System Voltage Measurement

The AVR-IoT Cellular Mini board has a system voltage measurement circuit using the MIC94163 switch and a voltage divider connected to an ADC pin on the AVR128DB48, enabling on demand measurement and preventing leaking power through the voltage divider.
Table 3-4. System Voltage Measurement Pins
AVR128DB48 PinFunction
PE0ADC0 (AIN8) - System voltage measurement
PB3GPIO - System voltage measurement enable
The system voltage is available as an input on PE0 and is divided by four. To measure the system voltage, follow these steps:
  1. Configure the voltage reference for the ADC.
  2. Set PB3 high to enable the voltage divider.
  3. Set PE0 as input for the ADC.
  4. Run a single-ended ADC conversion.
  5. Calculate the voltage using the following equation:
    1. V=ADC Result x VREF x 4ADC Resolution
Tip: For power conservation, disable PE0, PB3 and the ADC after the measurement.