4.3 Analog-to-Digital Conversion overview including timing considerations block diagram of a device using a DAC and comparator example of a digitized spectrum number of data points required to describe the signal aperture time of the ADC and signal distortion sample and hold circuit reduces the aperture time digitization artifact and signal distortion the Nyquist sampling theorem and aliasing using the frequency accordion to predict aliasing 4.3 : /
The Conversion Process assume an 8-bit device with a range of. to.2 V the least significant bit (LSB) is then.4 V a user adjustable clock determines the sampling rate the maximum sampling rate is controlled by the time it takes the ADC to generate a binary pattern (conversion time) the clock can be synchronized with external events the clock sends a logic signal to the ADC to begin conversion once the conversion is done, the ADC sends a logic pulse to tell the computer to read the digital pattern synchronization.5 V signal 25 = clock/sampling rate ADC computer/memory 4.3 : 2/
ADC Using a DAC and Comparator this is more a "teaching device" than an item of commerce - it's too slow! the trigger starts the digital sequencer the sequencer controls an 8- bit DAC the DAC output as a function of time is a staircase going from. -.2 V in steps of.4 V the staircase voltage is compared to the signal when the staircase equals or exceeds the signal, a logic pulse stops the conversion the computer is then notified that a digital pattern is ready trigger stop comparator signal C C C DAC 52 256 28 64 6 32 8 4 4.3 : 3/
Example Digitized Spectrum amplitude (V).2.8.6.4.2 2 4 6 8 time (s) time 2 3 4 5 6 7 8 voltage..3.26.35.433.842.993.7.38 ADC decimal 7 34 8 2 248 78 77 ADC binary 8-bit resolution with.4 V LSB 9.8 2 the peak was digitized at one data point per second.3 3 the ADC output becomes an array of integers that have to be properly scaled by the user (divide by 255 and multiply by.2 V) the position in the array (subscript) corresponds to time, and this has to be determined by the user or computer program 4.3 : 4/
Required Number of Data Points.2.2 amplitude (V).8.6.4 amplitude (V).8.6.4.2.2 2 3 4 5 2 4 6 8 if the functional form of the signal is unknown, sufficient data points are required to define accurately all features the effect of the number of data points is clearly shown above where a decrease from 5 to almost eliminates the first peak if the functional form is known a smaller number of data points can be combined with curve fitting to recover the data Fourier transformation of signals often requires very large data sets so that all frequencies are adequately described 4.3 : 5/
Aperture Time Errors.2 the length of time that an ADC examines a signal is called the.8 aperture time if the signal changes.6 during the aperture.4 time, the digital value will be erroneous.2 in inexpensive ADCs the aperture time is the same as the conversion time in the figure the ADC is triggered every millisecond the horizontal line is the maximum voltage measurable the diagonal lines are the voltage ramps of the DAC inside the ADC the digitized value is that where the ramp crosses the signal the error is the difference in voltage between the blue and red markers amplitude (V) 2 4 6 8 4.3 : 6/
Sample and Hold Circuit a sample and hold circuit minimizes aperture time errors by decoupling the aperture time from the conversion time the transistor switch starts in the open position when the ADC is told to sample the signal (via the trigger logic), the transistor switch is closed connecting the input to the capacitor after 3-5 RC time constants the transistor switch is returned to the open position input trigger - + switch driver follower transistor switch - + follower since the capacitor is connected to a voltage follower it can hold the signal for very long periods of time while the sampled signal is being held at the output, the ADC performs its conversion on a constant signal it is possible to obtain sample and hold times as short as 7 ps the ADC conversion time still determines the minimum temporal data spacing R C output 4.3 : 7/
Digitization Artifact the analog to digital conversion process converts a continuous signal into one that has only discrete values this is particularly noticeable when the maximum signal is near the LSB voltage the discrete values become steps when many data points are taken before the signal changes an amount equal to the LSB the process of averaging spectra will not remove the artifact since it is a nonrandom error the artifact can be removed by adding random noise to the signal and averaging signal (V) ADC output (decimal).6.48.36.24.2 Analog Signal 35 37 39 4 43 45 wavelength (nm) 5 2 9 6 3 Digitized Signal 35 37 39 4 43 45 wavelength (nm) 4.3 : 8/
The Nyquist Theorem and Aliasing the Nyquist theorem states that a signal has to be sampled at a rate twice its highest frequency conversely, the highest frequency (Nyquist frequency) that can be measured by an ADC is half the sampling frequency sampling converts all frequencies above the Nyquist frequency into lower frequencies - this process is called aliasing the figure shows a 9 Hz 9 Hz Signal with 2 Hz Sampling signal sampled at 2 Hz. the digitized signal is indistinguishable from Hz unfortunately, an infinite.55 number of cosines above the Nyquist frequency will be aliased to Hz a major measurement problem is distinguishing real.55 from aliased frequencies noise will also be aliased signal (V). 2 4 6 8 4.3 : 9/
Frequency Accordion Graph the top line runs from zero to the Nyquist frequency the left edge of the graph has even multiples of the sampling frequency the right edge has odd multiples of the Nyquist frequency to determine how a frequency will be aliased 2 Hz 4 Hz n@f s 9 2 39 4 Hz or f N 3 Hz 5 Hz P locate the actual frequency and draw a vertical line P the intersection of the vertical and top accordion lines gives the aliased frequency value to determine all the frequencies that will give an observed value P drop a vertical line from the observed frequency P possible frequencies are those at every intersection, e.g., 9, 2, 39, 4, etc. Hz 4.3 : /
Further Aliasing Examples 2 Hz Signal with 2 Hz Sampling 39 Hz Signal with 2 Hz Sampling...55.55 signal (V) 2 4 6 8 signal (V) 2 4 6 8.55.55.. 4.3 : /