Data Converters: ADC & DAC

sampling

Sampling is how a digital system looks at a smoothly varying voltage: it does not watch it continuously, it takes quick snapshots at evenly spaced moments, like a movie camera capturing 30 still frames a second to fake smooth motion. Between snapshots the system is blind; it simply assumes nothing important happened. Each snapshot is one sample, and how many you grab per second is the sample rate.

Concretely, if you sample at 48,000 times per second (48 kHz, the sample rate used for audio), you grab one voltage reading every 1/48000 of a second, about every 20.8 microseconds. Each reading is a number that says how high the voltage was at that exact instant. String the numbers together and you have a digital recording of the waveform. The faster you sample, the more closely the snapshots trace out a fast wiggle; the slower you sample, the more detail falls through the cracks between samples.

Why this matters: sampling is the front door from the analog world into the digital one, and the sample rate is the first big decision in any data-acquisition design. Pick it too low and you miss fast changes or, worse, create false signals (aliasing) that no later processing can remove. Pick it far higher than you need and you waste storage, power, and processing for nothing. The Nyquist-Shannon theorem tells you exactly where the floor is: you must sample faster than twice the highest frequency present in the signal.

CD audio samples at 44.1 kHz: one number every 22.7 microseconds. That captures everything up to about 22 kHz, which covers the limit of human hearing (~20 kHz). A vibration sensor watching a slow machine might only need 1,000 samples per second.

A continuous wave becomes a string of evenly-spaced snapshots.

Sampling alone does not lose information IF you sample fast enough — that is the surprising promise of Nyquist. The damage comes from sampling too slowly, and from that there is no recovery.

Also called
sample rate取樣率抽樣