ADC Scaling
Turn raw ADC counts into engineering voltage with firmware constants.
Formulas
k = R2 / (R1 + R2); D = 2ᴺ or 2ᴺ − 1
Vpin = raw × Vref / D
Vmeasured = (Vpin − Voffset) / (k × G)
Input volts per count = Vref / (D × k × G)
Maximum reconstructed input = [(2ᴺ − 1) × Vref / D − Voffset] / (k × G)
Model & assumptions
Signal chain: input → divider → amplifier → offset → ADC. Maximum measurable input is defined here as the value reconstructed at the highest code.
The full-scale pin boundary maps to (Vref − offset) / (k × G). ADC transition locations, noise, INL, and device-specific coding are excluded.
Example with default inputs
- Reconstructed measured voltage
- 9.15 V
- ADC pin voltage
- 1.65 V
- Input voltage per count
- 4.46777 mV
- Maximum measurable input
- 18.2955 V
- Minimum measurable input
- 0 V
- Nominal full-scale boundary
- 18.3 V