# Lesson 20 — Analog-to-Digital Conversion

<p class="block-synopsis">Sampling and Nyquist, aliasing, quantization, resolution, the digital output value and its error, and what a recording costs in bits.</p>

**Objectives covered**

- **2.5** — I can calculate the ADC sampling rate, voltage resolution, and digital output based on a given input voltage and the ADC's operational parameters, and determine the number of bits a required resolution demands.

<div class="block-toc">
  <a class="bt-card bt-reading" href="../Block2Reading/Obj05/ECE215_B2_Obj05_Reading.html">
    <span class="bt-kind">Reading</span>
    <h4>Analog-to-Digital Conversion</h4>
    <p>The course reading for Objective 2.5.</p>
  </a>
  <a class="bt-card bt-flashcards" href="L20_Flashcards.html">
    <span class="bt-kind">Flashcards</span>
    <h4>Review deck</h4>
    <p>Key terms, equations, and ideas from this lesson, in a self-test deck.</p>
  </a>
  <a class="bt-card bt-slides" href="../_static/slides/ECE_215_Lesson20.pdf">
    <span class="bt-kind">Slides</span>
    <h4>Lesson 20 deck</h4>
    <p>The slides used in class, as a PDF.</p>
  </a>
  <a class="bt-card bt-practice" href="../downloads.html">
    <span class="bt-kind">Practice Problems</span>
    <h4>Work these before the quiz</h4>
    <p>Ungraded problems with answers, on the downloads page.</p>
  </a>
  <a class="bt-card bt-demo" href="https://usafa-ece.org/apps/adc-demo/" target="_blank" rel="noopener">
    <span class="bt-kind">Demo ↗</span>
    <h4>ADC Demo</h4>
    <p>Analog-to-digital conversion with adjustable bit depth and rate.</p>
  </a>
</div>

## Demos

**Aliasing in the wild**

<video class="lesson-demo" controls preload="metadata" src="../_static/media/helicopter_rotor_aliasing.mp4"></video>

The camera samples the rotor at almost exactly its rotation rate, so the blades alias down to a near-zero apparent frequency and the rotor looks frozen. Same effect as sampling below Nyquist.

**Hearing quantization**

<audio class="lesson-demo" controls preload="metadata" src="../_static/media/quantization_audio_demo.mp3"></audio>

The same passage at decreasing bit depth. As resolution drops the quantization error grows until you can hear it as noise on the signal.

