Analog Signals Signals that vary continuously throughout a defined range. Representative of many physical quantities, such as temperature and velocity. Usually a voltage or current level.
Digital Signals Signals that take on specific values only. Required for operation with digital logic. A representative of physical quantities by a series of binary numbers.
Advantages of Analog Representation Varies continuously, like the property being measured. Represents continuous values. See Figure 12.2
Advantages of Digital Representation Values are limited to specific discrete segments. Not subject to the same distortions as an analog signal. Can be easily copied and stored.
Analog Voltage Sampling A sample is an instantaneous measurement of an analog voltage. Sampling frequency is the number of samples taken per unit time. See Figure 12.3
Accuracy of Digital Representation Depends on sampling frequency and quantization. Quantization is the number of bits used to represent an analog voltage as a digital number. Resolution is the analog step size.
Resolution of a Digital Representation The difference in analog voltage corresponding to two adjacent digital codes. Directly proportional to the reciprocal of 2N where N is the number of bits used in the digital code.
Digital-to-Analog Conversion Uses a circuit that converts a digital code at its input to an analog voltage or current. Called a D-to-A converter, D/A converter or DAC.
DAC General Operation Uses digital inputs to control proportionally weighted currents. Currents are binary weighted the MSB has the largest, the second LSB has ½ the current, and so on. Currents feed an op-amp that converts current to voltage.
DAC Output Voltage If Va is the output, Iref a fixed reference current, RF the op-amp feedback resistor, then for n bits: bn-12n-1 +... + b121 + b020 Va = IrefRF 2n
DAC Characteristics The maximum output is always one least significant bit less than full scale. An n-bit converter has 2n input codes, ranging from 0 to 2n 1.
Weighted Resistor D/A Converter Uses a parallel network of binary-weighted resistors to feed the op-amp. Seldom used since a wide range of resistor values is required for a large number of bits. Difficult to achieve accuracy for a high number of bits.
R-2R Ladder DAC Produces an analog current that is the sum of binary-weighted currents. Uses only two values of resistors. Easily modified to add additional bits each new bit requires 2 resistors, values R and 2R. See Figure 12.6
MC1408 Integrated Circuit DAC Popular, inexpensive 8-bit multiplying DAC. Also designated DAC0808. Output is proportional to the reference voltage. See Figure 12.11
Operation of the MC1408 Requires an external op-amp to increase the output voltage and current. Can be wired to produce a bipolar output voltage, that is, voltages that have both positive and negative values. See Figure 12.13
DAC Performance Specifications I Monotonicity means that the magnitude of the output voltage increases every time the input digital code increases. Absolute accuracy is the measure of the DAC output voltage with respect to its expected value.
DAC Performance Specifications II Relative accuracy is the deviation of the actual from the ideal output voltage as a fraction of the full-scale voltage. Settling time is the time required for the outputs to switch and settle within ±½ LSB when the input switches form all 0s to all 1s.
DAC Performance Specifications III Gain error occurs when the output saturates before reaching the maximum output code. Linearity error is the deviation from a straight line output with increasing digital input codes.
DAC Performance Specifications IV Differential nonlinearity is the difference between actual and expected step size when the input code is changed by 1 LSB. Offset error occurs when the DAC output is not 0 V when the input code is all 0s.
Analog-to-Digital Conversion Uses a circuit that converts an analog signal at its input to a digital code. Called an A-to-D converter, A/D converter, or ADC.
Flash ADC Uses a resistive voltage divider, comparitors and a priority encoder to produce a digital code. Conversion occurs in one clock cycle. See Figure 12.21
Disadvantage of Flash ADC Requires 2n resistors and 2n-1 comparitors for an n-bit output. For any large number of bits, the circuit becomes overly complex.
Successive Approximation ADC The most widely used ADC. Finds the digital representation using a binary search. Sometimes called a SAR. See Figure 12.23
Binary Search - I Step 1 set the MSB of the digital representation to 1, all other bits to 0. Step 2 compare the analog value produced in the first step to the voltage being converted. Step 2A if the test voltage is higher than the voltage being converted, reset the MSB and set the second MSB.
Binary Search - II Step 2B if the test voltage is less than the voltage being converted, leave the MSB set and set the second MSB. Step 3 repeat Steps 2, 2A and 2B until all the bits have been tested.
Successive Approximation ADC Characteristics Final answer is always less than the input voltage. Conversion always requires a fixed number of clock cycles. Conversion requires n clock cycles where n is the number of bits in the digital representation.
Dual Slope ADC Based on an integrator, a circuit whose output is the accumulated sum of all previous input values. Circuit relies on storing charge representing current flow in a capacitor.
Dual Slope ADC Characteristics High accuracy. Relatively slow conversion time. See Figure 12.27
Sample and Hold Circuit Required to sample an analog signal at periodic intervals and hold the value long enough for the ADC to convert it to a digital code. Generally consists of an input voltage follower, a hold capacitor and an output voltage follower.
Track and Hold Circuit Used in cases where large changes in signal levels between samples are expected. Samples the analog signal continuously, minimizing charging delays of the hold capacitor. See Figure 12.29
Sampling Frequency A signal must be sampled at a high enough frequency so that no information is lost. Aliasing occurs when an unwanted lowfrequency component is produced by too slow a sampling frequency.
Nyquist Sampling Theorem To preserve all information in a signal, the signal must be sampled at a rate of twice the highest-frequency component of the signal. fs > 2fmax.
Sampling Frequency Examples Since the range of human hearing is 20 Hz to 20 khz, the sampling frequency for compact disks is set at 44.1 khz. Since the classic telephone bandwidth is 300 Hz to 3300 Hz, telephone-quality signals are sampled at 8 khz.
Filtering An anti-aliasing filter is used to remove unwanted high frequency components. The filter is a low-pass filter with the corner frequency set to 2fs. See Figure 12.34
ADC0808 Integrated Circuit ADC Successive approximation ADC. Able to convert analog information from up to eight channels. Can form the basis of a data acquisition network. See Figure 12.35