GPIO-24 analog-to-digital converter can measure input voltage from VRefLow up to VRefHi. The reference voltage is software selectable and can be internal or external.
So, VRefLow can be:
negative supply voltage (VSS) – internal;
the voltage level on the C.5 pin – external.
VRefHi can be:
positive supply voltage (VDD) – internal;
the voltage level on the C.6 pin – external.
If you use the external reference voltage, the following requirements must be met:
reference voltage range must be no less than 3V:
upper reference voltage must be more than VSS and less than VDD:
lower reference voltage must meet the following requirement:
recommended impedance of analog voltage source must be less than 2.5k:
With external reference voltage you can achieve better accuracy of measurement than with USB-I/O adapter supply voltage. USB-I/O adapter supply voltage depends on the voltage level of USB port. When using the external reference voltage, keep in mind that any analog input voltage must not exceed VRefHi.
An inexpensive way to generate VRef is by employing a Zener diode:
Most common Zener diodes offer 5% accuracy. Reverse bias current may be as low as 10 μA. However, larger currents (1-20 mA) are recommended for stability, as well as for lower impedance of the VRef source.
Finally, various reference voltage generator chips (typically using on-chip band-gap reference) are available. They are more accurate.
You can measure larger range of voltage levels if you connect the analog input to the output of a voltage divider. In theory, you can measure an indefinitely large DC and AC voltage with the help of resistive dividers. But keep in mind that GPIO-24 adapter does not have galvanic isolation from the PC. The improper connection to the source of high voltage (or current) can damage both the USB-I/O adapter and the PC.