---
title: ADC and DAC architectures
heading: How data converters trade speed against resolution, the flash ADC's bank of comparators, the successive-approximation ADC's binary search, pipeline and delta-sigma converters, effective number of bits, the kT/C noise that sets a minimum capacitor size, and binary-weighted, R-2R and current-steering DACs
eyebrow: D7 · Lesson 5 · ADC and DAC architectures
xp: 40
---

::: hook
Every sensor reading, every received radio sample and every note of digital audio crosses between analog and digital through a data converter. There's no single best design, because converters trade speed against resolution and power. A flash ADC compares the input against every threshold at once and answers in one step, but needs a comparator for every level. A successive-approximation ADC finds the answer one bit at a time by binary search with a single comparator. A delta-sigma ADC uses one crude bit at a very high rate and lets digital filtering recover the resolution. Each wins somewhere.
:::

::: play
- A successive-approximation ADC converting an input (as a fraction of full scale) with N bits. At step k it tries the next bit, setting its DAC to the trial value shown, and keeps the bit if the input is above it.
- The trials close in on the input by halving the remaining range each step, so N bits take N comparisons.
- The readouts give the final code and the size of one step.
:::

```sim plot
view: graph
x: k = 1..12
y: v = 0..1
slider: x = 0.01..0.99 step 0.001 = 0.6
slider: N = 4..12 step 1 = 8
plot: x + 0*k | dashed | color: ch3 | label: input, fraction of full scale
plot: (floor(x*2^(k - 1))/2^(k - 1) + 2^(-k))*step(N + 0.5 - k) | stems | label: trial DAC value at step k
readout: final code = floor(x*2^N) | digits: 5
readout: one LSB, fraction of full scale = 2^(-N) | digits: 4
```

::: predict
## A 12-bit SAR ADC samples 1 million times per second. At least how fast must its internal bit clock run, ignoring the time spent sampling?

- [ ] 1 MHz
- [ ] 4096 MHz
- [x] 12 MHz
- [ ] 24 MHz

::: reveal
Each conversion makes one comparison per bit, 12 per sample, so 12 million decisions per second: a 12 MHz clock, more once the sampling phase is included. A 12-bit flash converter would answer in one step but need 4095 comparators.
:::
:::

::: nameit
## ADC architectures

- **Flash**: $2^N - 1$ comparators against a resistor ladder decide every bit at once. Fastest (gigasamples per second), but power and area double with each bit, so flash stops at about 8 bits.
- **Successive approximation (SAR)**: a sample-and-hold, a DAC (usually a capacitor array), one comparator and logic that tries each bit from the top: N comparisons per sample. Efficient at 8 to 18 bits up to tens of megasamples per second; the commonest ADC in microcontrollers.
- **Pipeline**: a chain of stages, each resolving a few bits and passing an amplified residue on, for high speed at 10 to 14 bits.
- **Delta-sigma**: a 1-bit (or few-bit) quantizer in a feedback loop running at many times the Nyquist rate, which pushes quantization noise to high frequencies where a digital filter removes it (S7). Each doubling of the oversampling ratio gains about 9 dB with a first-order loop, 15 dB with a second-order one. Used for audio and precision measurement at 16 to 24 bits.

## Effective bits

Real converters fall short of their nominal resolution because of noise and distortion. From the measured signal-to-noise-and-distortion ratio,

$$\text{ENOB} = \frac{\text{SINAD} - 1.76}{6.02}$$

## kT/C noise

Sampling onto a capacitor C freezes a random thermal noise voltage of RMS $\sqrt{kT/C}$: 64 µV at 1 pF and room temperature. To keep it below the quantization noise $\Delta/\sqrt{12}$, a high-resolution converter needs a large sampling capacitor, which costs speed and power.

## DACs

- **Binary-weighted**: currents or capacitors in ratios 1, 2, 4, ...; fast but hard to match at many bits.
- **R-2R ladder**: only two resistor values, 2N resistors in all.
- **Current steering**: arrays of unit current sources switched to the output, often thermometer-coded for the top bits so that every step adds one source, which makes the output monotonic.

Errors are measured as **DNL** (how far each step is from one LSB) and **INL** (how far the transfer curve wanders from a straight line).
:::

::: example
## A 12-bit ADC measures a SINAD of 68 dB. How many effective bits does it have? What capacitor keeps kT/C noise below its quantization noise for a 1 V range?

::: solution
1. **Effective bits.**
   $$\begin{aligned} \text{ENOB} &= \frac{68 - 1.76}{6.02} \\ &= 11.0\ \text{bits} \end{aligned}$$
2. **One LSB.**
   $$\begin{aligned} \Delta &= \frac{1\ \text{V}}{4096} \\ &= 244\ \mu\text{V} \end{aligned}$$
3. **Quantization noise.**
   $$\begin{aligned} \sigma_q &= \frac{\Delta}{\sqrt{12}} \\ &= 70.5\ \mu\text{V} \end{aligned}$$
4. **Capacitor.** $kT/C < (70.5\ \mu\text{V})^2$ needs
   $$\begin{aligned} C &> \frac{4.14 \times 10^{-21}}{(70.5 \times 10^{-6})^2}\ \text{F} \\ &= 0.83\ \text{pF} \end{aligned}$$

**Answer:** 11.0 effective bits, and a sampling capacitor of at least 0.83 pF.
:::
:::

::: example
## What code does an 8-bit converter give for an input at 60% of full scale, and how many steps does a SAR take?

::: solution
1. **Code.**
   $$\lfloor 0.6 \times 256 \rfloor = 153$$
   binary 10011001.
2. **Comparisons.** A SAR decides one bit per comparison, so it takes 8.
3. **The first trials.** The first trial is 0.5 (keep, since 0.6 > 0.5), the second 0.75 (reject), the third 0.625 (reject), and so on.

**Answer:** code 153 (10011001 in binary), found in 8 comparisons.
:::
:::

::: example
## A 12-bit SAR ADC must convert a million samples a second, taking two clock periods to sample and one per bit. What clock does it need?

::: solution
1. **Clocks per conversion.**
   $$12 + 2 = 14$$
2. **Clock rate.** A million conversions a second:
   $$14 \times 1\ \text{MHz} = 14\ \text{MHz}$$
3. **Flash comparison.** An 8-bit flash converter at the same rate would need 255 comparators but only one clock per sample.

**Answer:** a 14 MHz clock.
:::
:::

::: check
given: N = 4 | 6 | 8 | 10
answer: 2^N - 1
tolerance: 0.4

## How many comparators does an {N}-bit flash ADC need?

::: right
Right. $2^N - 1$ = {answer}.
:::

::: misses
- [2^N] One fewer: the comparators sit at the boundaries between $2^N$ codes.
- [N] That's a SAR's number of comparisons.
- [any] Not yet. One comparator per threshold.
:::
:::

::: check
given: s = 66 | 74 | 86 | 98
answer: (s - 1.76)/6.02
unit: bits
tolerance: 0.5%

## A converter measures a SINAD of {s} dB. What's its effective number of bits?

::: right
Right. $(\text{SINAD} - 1.76)/6.02$ = {answer} bits.
:::

::: misses
- [s/6.02] Subtract 1.76 dB first.
- [any] Not yet. Invert $6.02N + 1.76$.
:::
:::

::: check
given: C = 0.1 | 1 | 10; T = 300 | 350
answer: sqrt(1.380649e-23*T/(C*1e-12))*1e6
unit: µV
tolerance: 0.5%

## A sampling capacitor of {C} pF at {T} K freezes how much RMS noise?

::: right
Right. $\sqrt{kT/C}$ = {answer} µV.
:::

::: misses
- [1.380649e-23*T/(C*1e-12)*1e6] Take the square root: kT/C is a mean-square voltage.
- [any] Not yet. $\sqrt{kT/C}$.
:::
:::

::: check
given: N = 8 | 10 | 12; x = 0.2 | 0.37 | 0.81
answer: floor(x*2^N)
tolerance: 0.4

## What code does an ideal {N}-bit ADC output for an input at {x} of full scale?

::: right
Right. floor(x × 2^N) = {answer}.
:::

::: misses
- [any] Not yet. The number of whole steps below the input.
:::
:::

::: check
kind: parts
given: N = 8 | 10 | 12 | 16; S = 50 | 62 | 74

## An {N}-bit ADC measures a SINAD of {S} dB.

::: part
answer: (S - 1.76)/6.02
unit: bits
tolerance: 0.5%

### What is its ENOB?

::: misses
- [any] $(\text{SINAD} - 1.76)/6.02$.
:::
:::

::: part
answer: N - (S - 1.76)/6.02
unit: bits
tolerance: 1%

### How many bits short of its nominal resolution is it?

::: misses
- [any] N − ENOB.
:::
:::
:::

::: check
kind: parts
given: N = 8 | 10 | 12; V = 1 | 2

## A converter has {N} bits over {V} V.

::: part
answer: V/2^N/sqrt(12)*1e6
unit: µV
tolerance: 0.5%

### What is its rms quantization noise?

::: misses
- [any] LSB/√12.
:::
:::

::: part
answer: 4.14e-21/(V/2^N/sqrt(12))^2*1e12
unit: pF
tolerance: 0.5%

### What sampling capacitor brings kT/C noise down to that level?

::: misses
- [any] $C = kT/\sigma^2$.
:::
:::
:::

::: check
kind: parts
given: N = 8 | 12 | 16; r = 0.1 | 1 | 5; k = 1 | 2

## A SAR ADC of {N} bits converts {r} million samples a second, taking {k} clocks to sample and one per bit.

::: part
answer: (N + k)*r
unit: MHz
tolerance: 0.5%

### What clock does it need?

::: misses
- [N*r] Add the sampling clocks.
- [any] $(N + k) \times$ sample rate.
:::
:::

::: part
answer: 2^N - 1
tolerance: 0

### How many comparators would a flash converter of the same resolution need?

::: misses
- [any] $2^N - 1$.
:::
:::
:::

::: check
kind: parts
given: x = 0.3 | 0.6 | 0.85; N = 4 | 8

## An {N}-bit converter sees an input at {x} of full scale.

::: part
answer: floor(x*2^N)
tolerance: 0

### What code does it give?

::: misses
- [round(x*2^N)] A SAR converter truncates.
- [any] $\lfloor x2^N\rfloor$.
:::
:::

::: part
answer: N
tolerance: 0

### How many comparisons does a SAR make?

::: misses
- [any] One per bit.
:::
:::
:::

::: explain
## Why does a SAR ADC need only one comparator while a flash ADC needs thousands?

::: model
A flash converter decides the whole code at once by comparing the input against every possible threshold in parallel, so it needs a comparator for each of the boundaries between codes, which doubles with every extra bit. A successive-approximation converter instead runs a binary search: it holds the input steady, compares it against the midpoint of the remaining range using a DAC, keeps or discards that half, and repeats. Each comparison settles one bit, so a single comparator, used once per bit, finds the code in as many steps as there are bits. The SAR trades the flash converter's speed for an enormous saving in power and area.
:::
:::

::: practice

::: check
given: s = 40 | 50 | 62 | 74 | 86 | 98 | 120
answer: (s - 1.76)/6.02
unit: bits
tolerance: 0.5%

## ENOB at {s} dB SINAD?

::: misses
- [any] $(\text{SINAD} - 1.76)/6.02$.
:::
:::

::: check
given: N = 6 | 8 | 10 | 12 | 14 | 16; x = 0.05 | 0.123 | 0.3 | 0.618 | 0.77 | 0.95
answer: floor(x*2^N)
tolerance: 0.4

## Code for {x} of full scale, {N} bits?

::: misses
- [any] floor(x × 2^N).
:::
:::
:::
