
What you need
Use saved ADC readings, the actual reference voltage and two or more known physical reference conditions.
Read the diagram as a data table
| Condition or component | V |
|---|---|
| Code 0 | 0 |
| Code 2048 | 1.6504 |
| Code 4095 | 3.3 |
The calculation
V_est ≈ code × V_ref / (2^N − 1) x = (V_est − b) / a
N is ADC bit depth; the first formula is endpoint-normalized. The sensor model is V=a×x+b with sensitivity a and offset b.
Worked example
For a 12-bit ADC and 3.3 V reference, code 2048 gives about 1.6504 V using this convention. A hypothetical sensor with V=0.5+0.1x yields x≈11.504 units. A 1% reference error propagates into the voltage estimate.
Try it step by step
- Confirm whether the ADC output is unsigned, signed or offset binary and record its actual reference and gain settings.
- Convert code to voltage with the datasheet convention, then apply the sensor’s transfer function with units.
- Measure known reference conditions to estimate offset and sensitivity rather than assuming nominal values are exact.
- Check saturation, invalid codes and out-of-range values before using the result in control.
How to check the result
Compare converted values with independent references across the intended range and report residual error, not just bit depth.
Common mistake to avoid
Resolution is not accuracy. Reference drift, sensor tolerance, noise and loading can dominate the nominal code increment.
Reference reading
Primary references for the underlying models, APIs or application context. The worked numbers and plots above are educational calculations, not results reported by these sources.


