Loading header...

Voltage References and Input Conditioning

An ADC result is a comparison between the input voltage and the reference. If the reference is noisy, drifting, overloaded, or poorly routed, the digital code will be wrong even if the ADC itself is excellent. Input conditioning makes the sensor signal safe, scaled, filtered, and settled before conversion.

Learning Objectives

By the end of this lesson, you should be able to:

  • explain how reference voltage sets ADC code scale;
  • choose between supply, internal, and precision external references;
  • scale and protect ADC inputs;
  • estimate RC filter cutoff and source impedance effects;
  • identify layout practices that protect measurement accuracy.

Reference Voltage

For an ideal unipolar N-bit ADC:

$$
\text{LSB}=\frac{V_\text{REF}}{2^N}
$$

and approximately:

$$
V_\text{IN}=\frac{\text{code}}{2^N-1}V_\text{REF}
$$

If V_REF changes by 1%, the measured voltage scale changes by 1%. Reference accuracy, drift, noise, and load regulation directly affect conversion accuracy.

Reference Choices

Reference source Strength Watch out
MCU supply simple and cheap noisy, changes with load and battery
internal reference convenient limited accuracy and drive
external precision reference best stability cost, layout, startup, load current
ratiometric sensor supply cancels supply variation only works when sensor and ADC share ratio

Ratiometric measurement is useful for resistive sensors. If a bridge or divider is excited by the same voltage used as ADC reference, supply variation can cancel from the ratio.

Scaling the Input

A resistor divider maps a larger voltage into the ADC range:

$$
V_\text{ADC}=V_\text{IN}\frac{R_2}{R_1+R_2}
$$

For measuring up to 24 V with a 3.3 V ADC, choose a ratio below 3.3/24 = 0.1375. R1 = 180 kOhm and R2 = 27 kOhm gives:

$$
V_\text{ADC}=24\frac{27}{180+27}=3.13\ \text{V}
$$

Check resistor tolerance, ADC leakage, input impedance, power, and voltage rating.

Buffering and Source Impedance

A SAR ADC usually charges an internal sampling capacitor during acquisition. If the source resistance is too high, the sampling capacitor does not settle to the true input voltage before conversion.

Use an op-amp buffer when:

  • the sensor or divider impedance is high;
  • the ADC sample time is short;
  • multiple channels are multiplexed quickly;
  • an anti-alias filter needs a low-impedance driver;
  • the signal requires gain or level shifting.

RC Input Filters

A simple RC low-pass filter reduces high-frequency noise and provides some anti-aliasing:

$$
f_c=\frac{1}{2\pi RC}
$$

Example: R = 1 kOhm, C = 100 nF:

$$
f_c=\frac{1}{2\pi(1000)(100\times10^{-9})}=1592\ \text{Hz}
$$

flowchart LR SENSOR["Sensor"] --> SCALE["Divider or gain"] SCALE --> PROT["Clamp and series limit"] PROT --> FILT["RC low-pass"] FILT --> BUF["Optional buffer"] BUF --> ADC["ADC input"] REF["Reference"] --> ADC

Protection

ADC inputs must never exceed absolute maximum ratings. Typical protection includes series resistance, Schottky clamps, TVS diodes, RC filtering, and firmware plausibility checks. Protection must be designed so normal operation remains accurate.

For mains, batteries, motors, and industrial wiring, use proper isolation, creepage, clearance, fusing, and certified design practices. Do not rely on an MCU clamp diode as a safety barrier.

Layout Guidance

  • Put reference decoupling at the reference pin.
  • Keep analog return currents away from switching load currents.
  • Route high-impedance nodes short and clean.
  • Place RC filters close to the ADC input.
  • Avoid sharing the reference trace with pulsed loads.
  • Follow the ADC datasheet layout notes before copying generic advice.

Common Mistakes

  • Using a noisy digital rail as a precision ADC reference.
  • Building a high-value divider that cannot settle the ADC input.
  • Adding a large filter capacitor that overloads a weak sensor or op amp.
  • Ignoring reference startup time before first conversion.
  • Clamping inputs without checking injection current limits.

Summary

The ADC measures input voltage relative to its reference. Stable references, correct scaling, low enough source impedance, suitable filtering, and safe protection are as important as the ADC bit count. Design the analog input so the ADC sees a valid, settled, in-range voltage at the instant it samples.

Further Reading

Mind Map

mindmap root((ADC Conditioning)) Reference Sets code scale LSB equals Vref over 2 power N Noise becomes code noise Drift becomes gain error Ratiometric option Input scaling Divider ratio Gain stage Level shift Protection clamps Voltage limits Filtering RC low pass fc equals 1 over 2 pi R C Anti alias role Settling time Practical checks Source impedance Sample time Reference decoupling Ground return Startup delay Common mistakes Noisy Vref Weak divider drive Unsafe clamp current Poor layout