---
html_class: wide-page
---

# ADC Demo

Follow one signal through all three stages of analog-to-digital conversion: sampling, quantization, and encoding. Use the tabs across the top to move between stages.

<div class="demo-frame">
  <div class="demo-frame__bar">
    <span>Interactive demo · Analog-to-Digital Conversion · Lessons 24–25</span>
    <a href="https://usafa-ece.org/apps/adc-demo/" target="_blank" rel="noopener">Open full-screen ↗</a>
  </div>
  <iframe
    src="https://usafa-ece.org/apps/adc-demo/"
    height="900"
    loading="lazy"
    title="ADC Demo"></iframe>
</div>

## Things to Try

- **Break Nyquist.** Lower the sample rate $f_s$ until it drops below twice the signal frequency. Turn on **Show Aliased Ghost** to see the lower frequency the ADC records instead.
- **Trade bits for error.** On the Quantization tab, step the number of bits from 1 to 6 and watch the number of levels $2^b$ and the step size $\Delta V$ change.
- **Clip the signal.** Raise the amplitude or gain until the signal leaves the range between $V_{min}$ and $V_{max}$.
- **Condition the signal (Lesson 25).** Start with a small signal that uses only part of the ADC range, then set the gain $K$ and bias $B$ (labelled b in the demo) so it fills the range without clipping. Add high-frequency noise and switch on the anti-aliasing LPF.
