Chapter 14: Analog to Digital Conversion, Data Acquisition and Control
Jonathan Valvano and Ramesh Yerraballi
As part of the edX online class, we made some interactive web pages to illustrate fundamental concepts
2. Fundamental Concepts | Number conversions |
5. Introduction to C | Flowcharts, C vs assembly |
6. Microcontroller Ports | Input/output, direction register |
7. Design and Development | Successive refinement, if-then, loops |
10. Finite State Machines | Vending machine and stepper motor |
11. UART Serial Interface | Blind, busy-wait, interrupt, serial port |
12. Interrupts | Mail box, context switch |
13. DAC and Sound | Sampling rate, precision, how a DAC works |
14. ADC and Data Acquisition | How an ADC works, Nyquist Theorem |
This tool allows you
to go through the motions of a ADC sample capture using successive
approximation. It is a game to demonstrate successive approximation.
There is a secret number between 0 to 63 (6-bit ADC) that the computer
has selected. Your job is to learn the secret number by making exactly
6 guesses.
You can guess by entering numbers into the "Enter guess" field and
clicking "Guess". The Tool will tell you if the number you guess is
higher or lower
than the secret number.
When you have the answer, enter it into the "Final answer" field and
click the "Submit answer" button.
The secret number is ???
The secret number is strictly less than these
guesses :
The secret number is greater than or equal to these guesses :
Discover the
Nyquist Theorem. In this
animation, you control the analog signal by dragging the handle on the
left. Click
and drag the handle up and down to create the analog wave (the blue
continuous wave). The signal is sampled at a fixed rate (fs
=
1Hz) (the red wave). The digital samples are connected by straight red
lines so
you can see the data as captured by the digital samples in the computer.
|
Exercise 1: If you move the handle up and down very slowly you will notice the digital representation captures the essence of the analog wave you have created by moving the handle. If you wiggle the handle at a rate slower than ½ fs, the Nyquist Theorem is satisfied and the digital samples faithfully capture the essence of the analog signal.
Exercise 2: However if you wiggle the handle quickly, you will observe the digital representation does not capture the analog wave. More specifically, if you wiggle the handle at a rate faster than ½ fs the Nyquist Theorem is violated causing the digital samples to be fundamentally different from the analog wave. Try wiggling the handle at a fast but constant rate, and you will notice the digital wave also wiggles but at an incorrect frequency. This incorrect frequency is called aliasing.
Reprinted with approval from Embedded Systems:
Introduction to ARM Cortex-M Microcontrollers, 2016, ISBN:
978-1477508992, http://users.ece.utexas.edu/~valvano/arm/outline1.htm
from Embedded Systems: Real-Time
Interfacing to ARM
Cortex-M Microcontrollers, 2016, ISBN: 978-1463590154, http://users.ece.utexas.edu/~valvano/arm/outline.htm
and from Embedded Systems: Real-Time Operating Systems for the ARM Cortex-M Microcontrollers , 2016, ISBN: 978-1466468863, http://users.ece.utexas.edu/~valvano/arm/outline3.htm
by Jonathan Valvano and Ramesh Yerraballi is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Based on a work at http://users.ece.utexas.edu/~valvano/arm/outline1.htm.