Lecture 21 Analog to Digital Conversion (ADC) Theory and Examples 1 DIGITAL SIGNAL ACQUISITION Removes unwanted components picked up by the Transducer Amplification needed to raise voltage to 0-5 V range Physical Variable Transducer Analog quantity: example Acoustic Pressure Wave (Sound) Amplifier Example: Microphone converts ACW to Voltage (mV) Filter Analog To Digital Converter (ADC) D0 D . 1 n-bit Digital . Output . Dm-1 For example: removes higher frequency background noise when capturing speech 2 INTERFACING WITH mP PCIAs 3 ANALOG VOLTAGE SIGNAL CONTINUOUS IN TIME, CONTINUOUS IN VOLTAGE • Has an infinite number of instances of time. • Has an infinite number of different voltages within the range (0 – Vmax). 4 DIGITIZATION PROCESS 1. Sample the analog signal at discrete points in time, usually at periodic intervals. 2. For each sample taken, round off the analog voltage value to a discrete voltage value. 5 TIME DOMAIN SAMPLING • Analog signal is sampled at discrete points in time (Domain Quantization) • For example: the signal may be sampled at each second: 6 VOLTAGE QUANTIZATION • Analog voltage sampled at discrete time t is rounded off to nearest discrete voltage value. • For example, the signal may be rounded off to one of 8 discrete levels: 7 DIGITAL REPRESENTATION • Each level is assigned a digital code, and the signal is represented as a sequence of digital codes. • Can store the sequence of digital samples in memory for future processing. • For example, for a 3-bit converter: 101, 111, 111, 111, 101, 011, 010, 010, 011, 100, 100, 100, 011, 010, 010 8 VARIOUS N-BIT ADCs • The analog voltage range may be split into a power-of-2 different levels, and a digital code is assigned to each level: For examples: Analog Signal Vmax 0.0 3-bit Converter 8 7 111 6 110 5 101 4 100 3 011 2 010 1 001 0 000 4-bit Converter 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000 … 8-bit Converter 256 240 224 208 192 176 160 144 128 112 96 80 64 48 32 16 0 11111111 11110000 11100000 11010000 11000000 10110000 10100000 10010000 10000000 01110000 01100000 01010000 01000000 00110000 00100000 00010000 00000000 … 9 WHAT IS PRECISION? • The greater is the number of bits, the greater is the precision of the ADC 4-bit Converter 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000 … 8-bit Converter 256 240 224 208 192 176 160 144 128 112 96 80 64 48 32 16 0 11111111 11110000 11100000 11010000 11000000 10110000 10100000 10010000 10000000 01110000 01100000 01010000 01000000 00110000 00100000 00010000 00000000 … Analog Signal Vmax n-bit precision Infinite precision 0.0 10 ROUND-OFF ERROR (AKA: QUANTIZATION ERROR) • Round-off error cannot be recovered • Amount of round-off error decreases with increasing number of bits used in the ADC • How much error is acceptable? • What is the smallest size (grains of) sugar you can discern? • One grain, one teaspoon, or other? • The application determines the number of bits to use in the ADC • Music: 16-bits • Telephone quality speech: 8-bit 11 QUANTIZATION ERROR Q: Analog input must change by Q units before output changes to next code. 12 3-BIT BIPOLAR EXAMPLE (LACKS A DIGITAL ZERO REPRESENTATION) Full Scale (FS) Range: 8.0 V Precision: 3-Bit, 8 Possibilities Q FS 2n Resolution (Quantization Step Size, Q): FS Range/Number of Steps 8.0/8 = 1.0 V 13 3-BIT UNIPOLAR EXAMPLE (HAS DIGITAL ZERO REPRESENTATION) Full Scale (FS) Range: 8.0 V Precision: 3-Bit, 8 Possibilities Resolution (Quantization Step Size, Q): FS Range/Number of Steps 8.0/8 = 1.0 V Q FS 2n 14 SAMPLING RATE • What is the minimum rate a signal should be sampled to produce an accurate digital representation of it, so that the original signal can be reconstructed from the digital sampled version? • Intuitively, we expect the required sampling rate to be related to the rate at which the signal changes (e.g., DC signal, erratic heart rate) 15 EX: SAMPLING A SINUSIOD Time (s) 0 1 • Maximum frequency component of signal fc = 9 Hz (9 cycles per second) • Sampling rate fs = 72 S/s (72 samples per second, or 8 samples per period) 16 Not Enough Samples Time (s) 0 1 • The reconstructed version appears to have changed frequency to 3 Hz (Alias) • In general both phase and frequency will be altered if not sampled at a sufficient rate • Aliasing: the change of frequency (and phase) due to insufficient rate of sampling 17 NYQUIST-SHANNON SAMPLING THEOREM NYQUIST RATE f s 2 fc Sampling Frequency Highest Frequency Component In Signal “If a continuous signal containing no frequency components higher than fc is sampled at a rate greater than 2fc, then the original signal can be completely recovered from the sampled version without any error, except for the voltage quantization error (round-off error).” 18 ADC IMPLMENTATIONS • There are many different implementations of ADCs: – Flash – Feedback Type of Converters • Successive Approximation • Ramp Conversion – Sigma Delta, Dual Slope, and Others 19 FLASH ADC Analog Voltage Range 7/8 FS … 8/8 FS 6/8 FS … 7/8 FS 5/8 FS … 6/8 FS 4/8 FS … 5/8 FS 3/8 FS … 4/8 FS 2/8 FS … 3/8 FS 1/8 FS … 2/8 FS 0/8 FS … 1/8 FS • • • Example: FS=8.0 V 7.0 … +∞ 6.0 … 7.0 5.0 … 6.0 4.0 … 5.0 3.0 … 4.0 2.0 … 3.0 1.0 … 2.0 -∞ … 1.0 Digital Code 111 110 101 100 011 010 001 000 Fast since the conversion time is equal to propagation gate delay Same (uniform) conversion time for each possible input amplitude Expensive, since the number of components grows exponentially with the number of bits • 8-bit flash converter requires 256 resistors, 255 comparators, and a 255 to 8-bit digital encoder 20 DIGITAL TO ANALOG CONVERTER (DAC) • A digital to analog converter converts a digital representation of some quantity to analog form • • • • Digital representation is a discrete form of some quantity Analog form is a continuous quantity representation of some quantity Converts a vector (string of binary bits) to a scalar (analog quantity (voltage)) Example, 4-bit DAC: b3 b2 b1 4-bit DAC Analog Output b0 21 DAC CONCEPT • The analog output is determined by summing the voltage weights where the coefficient is a ‘1’, For example, for a 4-bit DAC (VR = 1V): 01001 = 8V + 1V = 9V 22 ADC AND DAC PROCESS ADC STORED SAMPLES 101, 111, 111, 111, 101, 011, 010, 010, 011, 100, 100, 100, 011, 010, 010 STORED SAMPLES DAC 101, 111, 111, 111, 101, 011, 010, 010, 011, 100, 100, 100, 011, 010, 010 23
© Copyright 2026 Paperzz