Home Blog Blog Details

How to Convert Analog to Digital: Step-by-Step

September 12 2025
Ersa

Inquiry

Global electronic component supplier ERSAELECTRONICS: Rich inventory for one-stop shopping. Inquire easily, and receive fast, customized solutions and quotes.

QUICK RFQ
ADD TO RFQ LIST
Step-by-step A2D guide: anti-alias filter, sampling rate, drivers, Vref decoupling, MCU readout, and quick validation.

How to Convert Analog to Digital (Correctly)

Converting analog to digital follows three clear steps. Sampling takes time-aligned snapshots of the signal at a fixed rate. Quantization rounds each snapshot to the nearest discrete level. Coding then represents that level as a binary number your MCU/FPGA can read. Below we give safe defaults (sampling rate, anti-alias filter, drivers, Vref) and a 10-minute bring-up check so small-batch builds just work. Want “What is an ADC?” Read the definition →

Three-step ADC diagram: sample-and-hold the signal, quantize into discrete levels, then encode to binary.

Step 1 — Define the Signal & Goals

Before filters or ADC choice, write down four facts about the signal—amplitude, DC offset, highest effective frequency (fmax), and dynamic range / required resolution. This sets the engineering bounds for every step that follows.

Amplitude (Vmin…Vmax)
Range at the ADC input (after any gain).
DC Offset / Common-mode (Vcm)
Shift into the ADC’s allowed input window.
Highest Effective Frequency (fmax)
Bandwidth of useful content or fastest edge.
Dynamic Range / Required Resolution
Smallest meaningful change vs full-scale.
Example (filled):

Pressure sensor 0–4 V with 2 V bias; care about ~800 Hz content ⇒ take fmax≈1 kHz; smallest change ≈2 mV ⇒ start at 12–14 bit. Choose fs=2.5–5 kHz. Source 5 kΩ ⇒ add buffer (lower source impedance for S/H).

Resolution vs dynamic range (rule-of-thumb): 12-bit ≈ 74 dB, 14-bit ≈ 86 dB, 16-bit ≈ 98 dB. If your smallest meaningful change is ~1/1000 of full-scale, ≥10–12 bit starts to make sense.

Finding fmax: for narrowband signals, use the top of the useful band; for pulses/fast edges, treat the steepest edge as high-frequency content.

Offset & window: confirm the ADC’s input common-mode window and polarity (unipolar/bipolar); shift the signal if needed.

Common pitfalls
  • Chasing the datasheet maximum sampling rate while ignoring the useful bandwidth and anti-alias headroom.
  • Forgetting DC offset / common-mode → codes look “valid” but map to the wrong window.
  • No budget for temp drift / Vref noise / ground bounce—pursuing high resolution that the layout/power can’t support.
30-second check
  • Do you have Vmin…Vmax, Vcm, fmax, and the smallest meaningful change written down?
  • Is fs ≥ 2.5× fmax?
  • Is ADC-seen input impedance ≥ 10× source? If not, plan a buffer/driver.
A concise specification canvas that captures amplitude, DC offset, highest effective frequency, and dynamic range for ADC planning.

Step 2 — Anti-Aliasing & Front-End Filter

Aliasing reminder: anything above half the sampling rate (fs/2, Nyquist) folds back into baseband as a realistic-looking but false tone. Once sampled, no digital filter can restore it.
Aliasing: signal content above Nyquist (fs/2) folds back into baseband; a pre-ADC low-pass filter suppresses it.

Where to place the filter: for single-ended signals, use a series R and a shunt C to ground. If you buffer, put the RC after the buffer and before the ADC IN. For differential inputs, use symmetrical RC on both legs and maintain common-mode. Keep the capacitor’s return at a clean local ground near the ADC (avoid split-plane crossings).

Mind the ADC’s sample-and-hold: too large a series R can prevent the internal sampling capacitor from charging within the aperture/hold window.

Common pitfalls
  • Relying on digital filtering to fix aliasing—once folded, it cannot be undone.
  • Putting the RC at a far location (edge of the board/probe side), letting the trace pick up new noise and spikes.
  • Choosing an overly large series R so the S/H capacitor never fully charges; or using the wrong capacitor dielectric for stability.
2-minute check
  • Sweep a sine toward fs/2 and compare spectra: with vs without RC, alias peaks should drop clearly.
  • Feed a square/pulse and observe edge rounding; if high-frequency “texture” remains in codes, reduce fc (e.g., 0.3×fs) or go 2nd-order.
  • Re-check the S/H charge time constant vs your sampling aperture/hold; adjust series R or add a buffer.

Step 3 — Choose ADC Architecture & Resolution

  • Low–mid speed, general accuracy → choose SAR. (Often built into MCUs; simple, low latency.)
  • High dynamic range / audio-grade linearity → choose ΔΣ. (Oversampling + digital filtering; tolerate latency.)
  • High bandwidth, ultra-low latency → choose Pipeline/Flash. (Higher power/cost; FPGA-friendly interfaces.)
Trade-offs (quick scan)
  • SAR: low power & latency; needs low source impedance/driver for S/H; performance tied to clean Vref/layout.
  • ΔΣ: excellent linearity & dynamic range; bandwidth/latency set by digital filter; jitter/reference noise reduce ENOB.
  • Pipeline/Flash: extreme speed & low latency; higher power/cost; strict clocking/layout; interfaces often FPGA-oriented.
When not to choose
  • ΔΣ for tight closed-loop control (ms/µs latency budget) → not suitable.
  • SAR with high source impedance and no buffer at high sampling rates → likely distortion/settling issues.
  • Pipeline when budget/power are tight but bandwidth demands are modest → overkill risk.
2-minute check
  • Is your priority dynamic range/linearity or bandwidth/latency?
  • What latency can the system tolerate (ms vs µs)?
  • Can the front-end drive the chosen ADC (low source impedance, adequate GBW)?
  • Do target bits align with realistic ENOB/SNR given Vref and noise budget?
Architecture map showing SAR for low-to-mid speed, delta-sigma for high dynamic range with latency, and pipeline/flash for high bandwidth and low latency.

Step 4 — Driver & Input Matching

An ADC isn’t an ideal voltmeter—the sample-and-hold (S/H) capacitor draws current during the sampling aperture. Without a proper driver and input match, you’ll see under-settling, distortion, or outright clipping.

Make sure energy actually arrives: the source + Rseries and the ADC’s internal S/H capacitor form a time constant. It should settle within the sampling aperture to well below a fraction of an LSB—higher source impedance demands a stronger driver and/or smaller Rseries.

Common-mode & input window: confirm polarity (unipolar/bipolar) and the allowed common-mode range. Apply bias/shift after the buffer so that the instantaneous sampling voltage always stays in range.

Stability: the driver + RC can ring; slightly increase Rseries or add a small output cap (pF-level) if you see overshoot.

Input protection & robustness
  • Clamp & limit: Rseries + diodes to AVDD/AGND (or Schottky to a reference rail) to absorb transients/over-voltage.
  • EMI/ESD: consider TVS / RC snubbers at the connector; keep return loops tight near the ADC analog ground.
  • Layout: shortest path from RC to ADC pin; capacitor returns to a clean local ground (avoid split-plane crossings).
Common pitfalls
  • High source impedance driving a fast SAR → S/H never fully charges; distortion and INL/THD degrade.
  • No input protection → probe/plug transients punch the ADC pin beyond rails.
  • Common-mode out of range (VOCM mis-set on differential inputs) → codes look “valid” but are biased or clipped.
2-minute check
  • Before power-on: VOCM, supply rails, and input window verified? RC located right at the driver/ADC with a clean local ground return?
  • Step test: feed a small step/square; watch for under-settling or ringing in codes—reduce Rseries, increase driver GBW, or move to a 2nd-order RC if needed.
  • Sine sweep: raise frequency/amplitude; check for clipping and rising THD—if present, revisit source impedance and bias window.
Front-end chain: sensor into anti-alias RC and buffer/fully differential driver, then a small series resistor into the ADC sample-and-hold, with local Vref decoupling and single-point ground.

Step 5 — Reference (Vref) & Decoupling

The reference is the ruler for every code. If Vref is noisy or drifting, effective resolution collapses—even when sampling and front-end are correct.

Local Vref decoupling (10 μF ∥ 0.1 μF) placed next to the Vref pin with a short return to AGND and a single-point tie to DGND.

Supply & topology:

  • MCU internal ADC: start with the internal reference; upgrade to an external 2.5 V/4.096 V reference if noise/linearity demand it. Still place 10 µF ∥ 0.1 µF near Vref/Vdda.
  • External ADC: reference IC → (optional small R/FB bead if allowed) → Vref pin. Use differential reference where supported for better PSRR.

Placement & parts: 0.1 µF = C0G/NP0; 10 µF = X7R. Keep caps adjacent to the pin, same layer, with a tight return to AGND. Keep references away from hot/noisy switchers and clocks.

Intuitive thresholds
  • Ripple at Vref pin: < 10 mVpp as a minimum bar for 12-bit designs (tighten for higher resolution).
  • Startup: wait for the reference to settle (datasheet ms-scale) before calibration/measurement.
  • Code histogram: with a static input, distribution should be tight with no odd missing-code gaps.
Common pitfalls
  • Sharing USB/digital rails for Vref — ripple and spikes map straight into LSBs.
  • Decouplers placed far away or returning across split planes — large loop inductance → jitter and coupling.
  • Ground bounce from digital high-current paths contaminating the analog reference loop.
2-minute check
  • Are 10 µF ∥ 0.1 µF on the same layer right next to Vref, with a short return to AGND?
  • Is Vref sourced from a clean LDO/reference (not a noisy digital rail), and tied to DGND only at a single point?
  • Scope the Vref pin: ripple < 10 mVpp? No switching texture? If not, fix supply/placement before chasing higher ENOB.

Step 6 — Sampling Clock & Jitter

High-frequency inputs are extremely sensitive to clock jitter: more RMS jitter → lower SNR/ENOB. To keep effective bits, prioritize a clean clock source and disciplined routing.

Quick jitter budget (rule-of-thumb)

Jitter-limited SNR follows SNRjitter ≈ −20·log10(2π·fin·σt). Use these total RMS jitter targets to roughly preserve ENOB:

  • At 100 kHz input: 12-bit ≲ 320 ps, 14-bit ≲ 80 ps, 16-bit ≲ 20 ps.
  • At 1 MHz input: 12-bit ≲ 32 ps, 14-bit ≲ 8 ps, 16-bit ≲ 2 ps.

Total jitter = √(source² + distribution/buffer² + ADC aperture²). Fix the source first.

Common pitfalls
  • Assuming digital filtering can recover jitter loss — it cannot; jitter corrupts the sampling instant.
  • Using an MCU PLL as the primary sample clock without dedicated clean power/decoupling.
  • Clock traces that cross split planes or meander near Vref/analog paths, increasing phase noise and coupling.
2-minute check
  • Before power-on: clock source on a clean LDO with local 10 µF ∥ 0.1 µF? Traces short, no plane crossings, proper terminations?
  • After power-on (sine sweep): increase fin; if SNR drops earlier than expected, swap to a lower-jitter XO/module and re-check.
Higher clock jitter spreads sampling instants on a fast signal edge, reducing SNR and effective resolution.

Step 7 — Interface Readout & MCU Variant

With the front-end and sampling in place, the last mile is moving codes reliably into your controller or FPGA. First size the throughput, then pick and wire the interface, and finally confirm the code format.

Throughput (size this first)

throughput ≈ bits × channels × fs / efficiency

  • bits = effective frame width per sample (include status/alignment bits if present).
  • channels = simultaneous channels (account for interleaving rules).
  • fs = per-channel sampling rate.
  • efficiency = protocol & framing overhead (typ. 0.6–0.95 for real sustained streaming).

Compare the result to your MCU/FPGA’s sustained link limits (SPI mode/CS gaps/DMA service time), not just headline MHz.

SPI (MCU-friendly)
  • Continuous DMA stream & circular buffers; minimize CS toggles & gaps.
  • Match CPOL/CPHA to ADC edge; verify MSB/LSB and left/right alignment.
  • Keep lines short; add small series terminations (10–33 Ω) at the source if needed.
LVDS (parallel/serial)
  • Respect lane mapping & frame/clock alignment.
  • Differential pairs length-match; continuous reference plane; proper termination.
  • Good for higher throughput with fewer pins and lower noise.
JESD204 (B/C)
  • Account for coding losses (8b/10b or 64b/66b) in efficiency.
  • Implement SYSREF/LMFC deterministic latency alignment.
  • Best with FPGAs for multi-channel high-speed capture.
Frame sync & buffering
  • Lock to the ADC’s frame header/status bits; verify channel order for interleaved streams.
  • Use FIFO/DMA with a circular buffer. Size guard-band: buffer_bytes ≈ throughput (B/s) × guard_time (s).
  • Prefer hardware timers to trigger conversions for stable time-base.
MCU internal ADC (quick start)
  • Single-ended: Sensor → RC → Buffer → ADC_IN; small series R (10–100 Ω) before S/H.
  • Differential (if supported): Symmetrical RC + differential driver; set common-mode per datasheet.
  • Code formats:
    • Straight (natural): read as unsigned.
    • Offset-Binary: convert to signed: signed = code − 2^(N−1).
    • Two’s-Complement: ensure sign-extension and correct left/right alignment; confirm MSB-first.
  • Data movement: use DMA (circular). Interrupts handle watermarks/flags only; avoid CPU polling.
  • Oversampling/Averaging: reduces noise but changes data rate/bandwidth — include in throughput budgeting.
Compute throughput from bits, channels, and sampling rate, then choose SPI, LVDS, or JESD204 accordingly and stream via DMA or FIFO with proper frame sync.
Common pitfalls
  • Using headline link MHz without sustained throughput budgeting → dropped samples.
  • Wrong SPI mode/edge, bit order, or alignment → shifted/unstable codes.
  • Misreading code format (Offset-Binary vs Two’s-Complement) → polarity/zero offset errors.
  • No FIFO/DMA → CPU stalls cause intermittent data loss, especially multi-channel.
  • Multi-channel interleave channel order not verified → cross-talk misinterpretation.
2-minute check
  • Before power-on: compute bits × channels × fs / efficiency, compare to sustained link limits, leave 20–30% headroom.
  • SPI: confirm CPOL/CPHA, bit order, alignment, frame length; pre-configure DMA circular buffer.
  • After power-on: logic analyzer one frame — verify header, bit order, frame length, channel order.
  • Feed a ramp/step: check monotonicity and correct sign/zero; toggle oversampling to confirm expected throughput/noise change.

Step 8 — Quick Calibration & 10-Minute Self-Check

Validate that Steps 1–7 actually come together. In ten minutes you’ll verify zero/full-scale, aliasing, distortion/jitter, missing codes, and Vref health—then record a go/no-go.

Minimal tool kit
  • DMM (for rails/offsets), oscilloscope (probe Vref ripple directly at the pin)
  • Signal generator (sine & step), known reference (short/precision divider/reference IC)
  • Logic analyzer (optional, to confirm frame/header/bit order)
00:00
10:00
03:00
06:00
09:00
00:00–01:00 Wiring sanity
  • Ground/common-mode per datasheet; VOCM set (diff ADCs).
  • Vref decouplers at pin (10 µF ∥ 0.1 µF); AGND/DGND single-point tie.
  • Sampling clock present; interface idle without errors.
01:00–03:00 Static: zero & full-scale
  • Action: short input or apply a known reference (0 V / Vref/2 / near full-scale).
  • Pass: zero within ±2–3 LSB; full-scale not clipped; monotonic ramp.
  • If fail: offset → check bias/common-mode/Vref; clipping → input window/driver.
03:00–06:00 Dynamic: sine near fs/5
  • Action: inject single tone; capture ≥4k samples; FFT or spectral view.
  • Pass: clean main lobe; no obvious alias peaks; THD ≳ −60 dB (12-bit baseline).
  • If fail: aliasing → Anti-alias; distortion → source impedance/driver/RC/GBW; early SNR drop → clock jitter.
Single-tone test near one-fifth of the sampling rate shows a clean spectrum without significant aliasing or unexpected spurs.
06:00–08:30 Code histogram
  • Action: feed a stable DC or stepped input; build a code histogram (bin auto or 2N/16~2N/8).
  • Pass: tight distribution, no missing codes, no weird double peaks; shorted-input width σ ≲ 0.5–1 LSB.
  • If fail: missing codes/steps → INL/DNL/under-settling; excessive width → Vref noise/ground bounce.
An ADC code histogram revealing whether there are missing codes or abnormal jitter under a stable input.
08:30–09:30 Vref ripple
  • Action: scope directly at the Vref pin (short ground lead).
  • Pass line: Vref ripple < 10 mVpp (12-bit+ starting point; tighten for higher resolution).
  • If fail: move decouplers next to the pin, fix ground return, isolate from USB/noisy rails, use a low-noise LDO/reference.
Measured ADC Vref ripple is below 10 mVpp when probed directly at the reference pin with a short return.
09:30–10:00 Decide & record
  • Log: zero/full-scale offset (LSB), SNR/THD, aliasing seen?, histogram notes, Vref ripple, any interface drops.
  • If any item fails, jump to the corresponding step/page below.

Step 9 — Safe Recipes (Examples)

Not sure where to start? Use one of these safe starter recipes to light up your build. Tweak later after you verify bandwidth, noise, and codes with the 10-minute self-check.

Slow sensors (≤ 1 kHz)

Temperature / pressure / position sensing; low-power logging.

  • Sampling: fs = 2.5–5 kHz (≥ 2.5× fmax).
  • Filter: 1st-order RC, fc0.4× fs, parts placed next to driver/ADC.
  • Resolution: 12–14-bit start.
  • Driver: single-ended buffer if source ≥ 5–10 kΩ; series R before S/H = 10–100 Ω.
  • Vref: local decoupling 10 µF ∥ 0.1 µF; clean LDO or internal ref.
  • Clock: board crystal or MCU timer trigger.
  • Interface: SPI + DMA circular buffer.
Slow sensor recipe: single-ended buffer feeding a first-order RC into the ADC with local Vref decoupling.
Power-on checks
  • Zero/full-scale within ±2–3 LSB; histogram has no missing codes.
  • Vref ripple < 10 mVpp at pin; no alias peaks on a sine near fs/5.
Mid-speed DAQ (≤ 100 kHz)

Multi-channel capture, motor/power measurements, lab DAQ.

  • Sampling: fs250 kHz (≈ 2.5× a 100 kHz band).
  • Filter: 2nd-order RC (dual pole or op-amp LPF).
  • ADC: SAR 12–16-bit.
  • Driver: FDA differential; symmetric RC; set VOCM to ADC common-mode.
  • Power/Ref: ADC & reference on a clean LDO; Vref 10 µF ∥ 0.1 µF at pin.
  • Clock: external XO or quality clock module.
  • Interface: high-speed sustained SPI or LVDS (per throughput).
throughput ≈ bits × channels × fs / efficiency
Size for sustained streaming (eff. 0.6–0.95) and keep 20–30% headroom.
DAQ recipe: fully differential amplifier with second-order RC, low-jitter XO, and SPI or LVDS streaming.
Power-on checks
  • Sine near fs/5 shows no strong aliasing; THD ≲ −60 dB (12-bit baseline).
  • Logic analyzer confirms frame/header/bit order; no FIFO/DMA overruns.
Audio / precision (20 kHz BW)

Audio capture, instrumentation/bridge precision, high dynamic range.

  • ADC: ΔΣ 24-bit (actual ENOB limited by noise/jitter).
  • Sampling: fs = 48/96 kHz with matching digital filter bandwidth.
  • Reference: low-noise reference + buffer; Vref decouplers at the pin.
  • Clock first: low phase-noise XO/module on clean LDO; short, straight routing.
  • Front-end: FDA differential drive; symmetric RC; correct common-mode.
  • Interface: I²S (audio SoC) or SPI/LVDS for external precision ΔΣ.
Audio and precision recipe: delta-sigma ADC with low-noise reference, low-jitter clock module, and differential front-end.
Power-on checks
  • SNR/noise floor close to datasheet; clean 1 kHz tone with low harmonics.
  • Zero offset stable; histogram shows no missing codes; clock jitter not limiting SNR.

FAQ

Quick answers that match what people actually search for. Expand any item below.

What are the 3 steps of analog-to-digital conversion?
The three steps are Sampling (take timed snapshots), Quantization (round to discrete levels), and Digital coding (emit binary words). We add anti-alias filtering so out-of-band energy doesn’t fold back and keep Vref quiet so codes are stable. These steps apply to SAR, ΔΣ, and pipeline converters. Read more → How an ADC works
Is this process called modulation?
No. Modulation moves a signal’s spectrum or encodes information onto a carrier. ADC conversion discretizes time and amplitude—sampling + quantization—and then formats the result into codes; it isn’t AM/PM/FM. Still, front-end filtering is critical to prevent aliasing artifacts. Read more → How an ADC works
How do I pick a safe sampling rate?
Start with fs ≥ 2.5× fmax as a conservative baseline; increase margin for steep edges or multiple tones. Set your anti-alias low-pass near fc ≈ 0.4× fs, and check jitter limits when fmax is high. Verify with a single-tone near fs/5. Read more → Anti-aliasing filter
What Vref decoupling should I start with?
Begin with 10 µF ∥ 0.1 µF right at the Vref pin, same layer, shortest loop to AGND, powered from a clean LDO or precision reference. Aim for Vref ripple < 10 mVpp (tighten for higher resolution). Keep digital rails and switching noise physically separated. Read more → Front-End & Vref
How do I read codes in a microcontroller?
Confirm the code format: Straight (unsigned), Offset-Binary (signed = code − 2^(N−1)), or Two’s-Complement (sign-extend; check alignment and MSB-first). Use DMA with a circular buffer; verify SPI mode, bit order, and frame length. Test with a ramp to confirm monotonicity. Read more → ADC code formats

Send your specs — get 3 safe options in 48 hours

Each option includes indicative lead time, price range, and brief notes on front-end/Vref so your build lights up the first time.

What you get
  • 3 vetted IC options with pros/cons
  • Lead-time & price range (indicative)
  • Front-end/Vref notes for quick bring-up
  • Cut-Tape / Partial Reel / AEC-Q available
  • Lifecycle check (avoid NRND/EOL)
What to include (helps us answer fast)
Signal type & range
fmax & target fs
Resolution / ENOB goal
Source impedance / buffer
Interface (SPI/LVDS/JESD204)
Supply/Package constraints
Lead time / budget band
AEC-Q or alt brands?

We keep shared BOMs confidential. NDA available on request.

Ersa

Anastasia is a dedicated writer who finds immense joy in crafting technical articles that aim to disseminate knowledge about integrated circuits (ICs). Her passion lies in unraveling intricate concepts and presenting them in a simplified manner, making them easily understandable for a diverse range of readers.