5.5.4 · D3Embedded Systems & Real-Time Software

Worked examples — ADC - DAC — resolution, sampling rate, Nyquist

2,858 words13 min readBack to topic

This page is the drill-ground for the parent topic. We take every kind of situation the ideas of resolution, sampling rate, and Nyquist can produce — and we work each one out loud, from zero. Nothing here uses a symbol the parent note did not build, and where a new one appears we re-earn it.


The scenario matrix

Every problem in this topic is really one of a small number of shapes. Here they are.

# Cell (the kind of case) What makes it tricky Covered by
A Resolution — normal plain LSB / code arithmetic Ex 1
B Resolution — boundary / full-scale the " vs " trap at the top code Ex 2
C Resolution — degenerate (1 bit, tiny signal) signal smaller than 1 LSB → dead code Ex 3
D Sampling — below Nyquist (aliasing) frequency folds back Ex 4
E Sampling — above Nyquist (safe) verify no folding, find margin Ex 5
F Sampling — exactly at (the limiting value) boundary is NOT safe Ex 6
G Multiple tones / choosing must clear the highest frequency Ex 7
H Real-world word problem translate words → numbers → filter choice Ex 8
I Exam twist (SNR ↔ bits, backwards) solve the 6.02N formula in reverse Ex 9
J DAC reconstruction — staircase zero-order hold, images above Ex 10

We will hit A → J in order. First, a shared picture of the two axes every problem lives on.

Figure — ADC - DAC — resolution, sampling rate, Nyquist
Recall The three formulas we will reuse (all from the parent)

Full-scale range split into codes with gaps ::: Code from a voltage ::: Nyquist rule ::: ; Nyquist frequency Alias frequency ::: SNR ceiling :::

Here is the number of bits (the count of yes/no switches), is the reference voltage (the top of the input range), is a signal frequency in hertz, and is the sampling rate in samples per second. Nothing else is assumed.


Cell A — Resolution, the normal case


Cell B — Resolution at the boundary (the trap)


Cell C — Degenerate: signal smaller than one LSB


Cell D — Sampling below Nyquist → aliasing

Figure — ADC - DAC — resolution, sampling rate, Nyquist

Cell E — Sampling above Nyquist (safe) + margin


Cell F — The limiting value: sampling at exactly


Cell G — Multiple tones: choose the sampling rate


Cell H — Real-world word problem


Cell I — Exam twist: run the SNR formula backwards


Cell J — DAC reconstruction & the staircase

Figure — ADC - DAC — resolution, sampling rate, Nyquist


Connections

  • ADC - DAC — resolution, sampling rate, Nyquist (index 5.5.4) — the parent topic
  • Quantization Noise & SNR — the ceiling used in Ex 9
  • Anti-Aliasing Filters — the fix for cells D and H
  • Zero-Order Hold & Reconstruction — the staircase of Ex 10
  • Fourier Transform & Frequency Domain — why images and folding exist
  • Successive Approximation vs Sigma-Delta ADC — how these numbers become hardware
  • Sensor Interfacing on Microcontrollers — the dead-code fix from Ex 3