Вы находитесь на странице: 1из 26

Analog-to-Digital and Digital-to-Analog Conversion

 The vast majority of signals in the world around us are analog. Most physical variables such as temperature, pressure, light intensity, audio signal, flow rate, speed, position etc. are analog in nature and can take on any value within a continuous range of values. For example, the output voltage of a thermocouple is analog because each possible value corresponds to different temperature  On the other hand digital signals are represented by waveforms, which make abrupt transitions between two values. For example, a TTL circuit will assume logic 0 for voltage values between 0 V to 0.8 V and logic 1 for voltage values between 2 V to 5 V  During the transmission of time varying output voltage (analog signal) of a microphone to a distantly located loud speaker, random unpredictable disturbance (known as noise) are superimposed on the actual analog signal. A most effective way of suppressing noise is to transmit the signal digitally
S. Kal, IIT-Kharagpur

 Any information that has to be inputted to a digital system must first be put into digital form. Similarly the outputs of any digital system are always in digital form. Thus, to process any physical analog signal in any digital system, the conversion of signal from analog to digital (A/D) is absolutely necessary  After the digital processing is completed, reconstitution of an analog output signal is required to get back the original physical quantity through a suitable transducer. This reconstitution of analog signal is accomplished by the operation of digital-toanalog (D/A) conversion  Now a days, digital computers are used widely to monitor and/or control a physical process. So we must deal with the difference between the digital nature of the computer and the analog nature of the process variables.  Thus, knowledge of conversion of analog signal to digital and vice versa is absolutely necessary in modern electronic instrumentation and data acquisition system
S. Kal, IIT-Kharagpur

Interfacing of Computer with Physical Variable

 

The first block is a transducer that converts the physical variable to an electrical variable The signal from the transducer is then converted to its digital equivalent in the second block, known as analog Analog to Digital Converter (ADC). The digital output consists of a number of bits that represents the value of the analog input
S. Kal, IIT-Kharagpur

Interfacing of Computer with Physical Variable

The digital representation of the process variable is transmitted from the ADC to the digital computer (third block), which stores the digital value and processes it according to a program of instruction that it is executing The digital output from the computer is connected to a subsequent block known as Digital-to-Analog Converter (DAC), which converts it to a proportional analog voltage or current The analog signal from the DAC id often connected to some device or circuit that serves as an actuator (fifth block) to control the physical variable Thus ADC and DAC work as an interface between the analog world and a completely digital system
S. Kal, IIT-Kharagpur

  

Basic principle of Analog to digital (A/D) Conversion


 The conversion of analog signal to digital form depends on sampling and quantization process

An analog voltage signal is divided at equal intervals along the time axis (t0, t1, t2, t3 etc.). At each of these time instants the magnitude of the signal is measured they are known as samples and the process is known as sampling
S. Kal, IIT-Kharagpur

Basic principle of Analog to digital (A/D) Conversion


 The samples are continuously varying analog voltages. Now if we represent the magnitude of each of the signal samples by a number having a finite number of digits, then the signal amplitude will no longer be continuous; rather, it is said to be quantized, discretized, or digitized. The process of digitizing samples involves making an approximation. This process of approximation is known as quantization  Among the number systems in digital electronics, binary number system results in the simplest possible digital signals and circuits. If we use N binary digits (bits) to represent each sample of the analog signal, then the digitized sample value can be expressed as D = b020 + b121 + b222 + b323 + . + bN-12N-1 Where b0, b1, b2, b3 .. bN-1, denote the N bits and have values of 0 or 1. The greater the number of bits (i.e., the larger the N), the closer the digital word D approximates the magnitude of the analog sample
S. Kal, IIT-Kharagpur

 Here b0 and bN-1 are represented as least significant bit (LSB) and most significant bit (MSB) respectively and this binary number is conventionally written as bN-1bN-2 . b0. It is to be noted that such a representation quantizes the analog sample into 2N levels In the figure decision points occur at 1.25 V, 2.50 V,., and 8.75 V The analog quantization size Q is defined as the full scale range of the A/D converter divided by the number of output states: Q = (Vmax Vmin) / N. It is a measure of the analog change that can be resolved by the converter. For this example, the analog quantization size is 10 V/ 8 = 1.25 V. This means that the amplitude of the digitized signal will have an error of at most 1.25 V. Sometimes resolution is used to refer to the analog quantization size
S. Kal, IIT-Kharagpur

An illustration of digitizing an analog waveform

The signal S(t) is regularly sampled at times indicated by the dots on the waveform. The anticipated peak-to-peak range R is 7 V extending from 3.5 to +3.5 V
S. Kal, IIT-Kharagpur

An illustration of digitizing an analog waveform


We have allowed eight quantization levels located in such a manner that maximum possible instantaneous quantizition error is 0.5 V Since there are 8 levels, 3 bits are required. Following common practice, we have assigned a set of binary digits to each level The binary digits can now be transmitted or processed serially or in parallel. With serial processing and with three digits, as in the present case, the processing of each digit may occupy nominally one-third the interval between sampling times. With parallel processing, the entire interval is available for each bit
S. Kal, IIT-Kharagpur

10

Methods of Analog-to-digital (A/D) Conversion


 Some of the A/D conversion techniquea are successive approximation, flash or parallel coding, single and dual slope integration, switched capacitor, and delta sigma  The conversion rate and accuracy of conversion are largely controlled by basic principles  The A/D conversion process is generally more complex and time-consuming than the D/A process. Several important ADC schemes use a DAC as part of their circuitry  All A/D converters employ one or more comparators, which may be implemented using operational amplifier
S. Kal, IIT-Kharagpur

11

General Block Diagram of ADC

 The control unit contains the logic circuitry for generating the proper sequence of operation in response to start command, which initiates the conversion process. At a rate determined by the clock, the control unit continually modifies the binary number that is stored in the register
S. Kal, IIT-Kharagpur

12

 The binary number in the register is converted to an analog voltage, VAD, by the DAC.  The op-amp comparator has two analog inputs and a digital output that switches states, depending on which analog input is greater. The comparator compares VAD with the analog input VA. As long as VAD< VA, the comparator output stays high. When VAD exceeds VA by at least an amount = VT (threshold voltage), the comparator output goes LOW and stops the process of modifying the register number. At this point, VAD is a close approximation of VA  The digital number in the register, which is the digital equivalent of VAD, is also the approximate digital equivalent of VA, within the resolution and accuracy of the system  The control logic activates the end-of-conversion signal, EOC, When the conversion is complete
S. Kal, IIT-Kharagpur

13

Specifications of Analog to Digital Converters


Analog to digital resolution: Analog to digital resolution is defined as the necessary change in input voltage for one bit change in the output and is expressed in percentage. For example, if a 10 bit analog to digital converter has an input voltage of 5 to +5V, the resolution is given by % resolution = [ 1/(210 1)] v 100 $ 0.1 Analog to digital accuracy: The accuracy of A/D converter includes quantization error, digital system noise, deviations from linearity, etc. Analog to digital speed: Analog to digital speed is defined in two ways, namely, the time necessary to perform one conversion, or the time between conversions at the maximum possible rate. Typical conversion times vary from 50 Qs for moderate speed units to 50 ns for a very high speed device.
S. Kal, IIT-Kharagpur

14

Specifications of Analog to Digital Converters


Analog input voltage: This is the maximum allowable inputvoltage range. Typical values are 0 to 10 V, s 5V, s 10 V, etc Input impedance: Typical input impedance of ADC lies in the range of 1k; to 1M;, depending on the type. The input capacitance is in the range of tens of pico-farads. Analog to digital gain, drift and stability: Polular versions of ADCs include digital-ramp (counter-type) converter, successive-approximation converter, flash counter, up/down digital-ramp converter, Parallel comparator ADC, voltage-to-frequency ADC, dual-slope ADC etc Successive-Approximation ADC  Successive approximation A/D converter is relatively fast and cheap  Conversion time is fixed and is not dependent on the analog input
S. Kal, IIT-Kharagpur

15

Basic block diagram of successive approximation converter (SAC)  It uses a DAC in a feedback loop and successive approximation
register to provide the input to the DAC

 After start signal is applied,


the control unit begins an iterative process where the digital value is approximated, converted to an analog value with the D/A converter, and compared to the analog input with the comparator The control logic thus modifies the contents of the register bit by bit until the register data are the digital equivalent of the analog input VA within the resolution of the converter
S. Kal, IIT-Kharagpur

16

Digital to Analog (D/A) Conversion


Digital to analog conversion is a process of converting digital code ( binary or BCD ) to a voltage or current proportional to the digital value

The digital inputs Q3, Q2, Q1, Q0 are usually derived from the register of a digital system. For each of 24 = 16 input binary numbers, the D/A converter output voltage is a unique value. This value could be same as decimal equivalent of binary number or there could have been other proportionality factor
S. Kal, IIT-Kharagpur

17

Digital to Analog (D/A) Conversion


In general, analog output equals K times digital input where K is the proportionality factor and is constant for a given DAC. The analog output can be voltage or current and consequently K will be in voltage or current unit respectively The analog output voltage VA of an N-bit straight binary D/A converter is related to the digital equation

V A ! K(2 N  1QN  1  2 N  2 QN  2  y y y  21Q1  20 Q0 ) ! K 2 j Q j Q j ! 1 if j th bit of input ! 0 if j th bit of input is 1 is 0 j ! 0 to (N  1)


S. Kal, IIT-Kharagpur

18

Digital to Analog (D/A) Conversion


The outputs of a DAC takes on only specific values and is technically not an analog quantity. However, the number of different possible output values can be increased and the difference between successive values decreased by increasing the number of input bits. This will allow us to produce an output that is more and more like an analog quantity that varies continuously over a range of values. The contribution of each digital input are weighted according to their position in the binary number. Thus, Q0, which is the LSB, has a weight of 1 V, Q1 has a weight of 2 V, Q2 has a weight of 4 V and Q3, the MSB, has the largest weight of 8 V. The weights are successively doubled for each bit, beginning with the LSB VOUT is considered to be the weighted sum of the digital inputs. For example, for a digital input 0101, we can add the weight of Q2 and Q0 to obtain VOUT as 4 V + 1 V = 5 V
S. Kal, IIT-Kharagpur

19

Specifications for D/A Converter


Resolution: The resolution of digital to analog converter is defined as the smallest observable change in the analog output that can be effected by a single step change in the digital input and is calculated as Resolution = V / (2N 1) where V is the difference in voltage of two logic levels (0 and 1). It is dependent on bits. D/A speed or conversion rate: Digital to analog speed or conversion time is the amount of time necessary to settle to a desired accuracy. The operating speed of a DAC is usually specified by its settling time, which is the time required to go from zero to full scale as the binary input is changed from all 0s to all 1s. Typical values for settling time range from 50 ns to 10 Qs Linearity, Accuracy Temperature sensitivity
S. Kal, IIT-Kharagpur

20

Binary-Weighted Resistor D/A Converter


 A simple 4-bit DAC circuit uses op amp summing amplifier with binary-weighted resistors

 The inputs Q0 (LSB), Q1, Q2, Q3 (MSB) are binary inputs which are assumed to have values either 0 (logic 0) or say 5 V (logic 1). The operational amplifier produces the weighted sum of these input voltages. The input resistors are binarily weighted, i.e, starting with MSB resistor, the resistor value increases by a factor of 2.
S. Kal, IIT-Kharagpur

21

In a binary-weighted resistor D/A converter circuit, VOUT = - [(Rf / R) VQ3 + (Rf / 2R) VQ2 + (Rf / 4R) VQ1 + (Rf / 8R) VQ0 = Rf / R [ VQ3 + ( ) VQ2 + ( ) VQ1 + ( 1/8 ) VQ0 ] or, VOUT = - [ VQ3 + ( ) VQ2 + ( ) VQ1 + ( 1/8 ) VQ0 ] ( for Rf = R = 1 k;)  The summing amplifier passes the voltage at Q3 input without attenuation. But the inputs at Q2, Q1, and Q0 will be attenuated by , and 1/8 respectively. Thus the summing amplifier output is an analog voltage which represents a weighted sum of the digital inputs  The output is evaluated for any input condition by setting the appropriate inputs to either 0 (logic 0) or 5 V (logic 1). For example, if the digital input is 0001, then VQ3 = VQ2 = VQ1 = 0 V and VQ0 = 5 V. Thus, VOUT = 0.625 V, which corresponds to LSB
S. Kal, IIT-Kharagpur

22

Binary-Weighted resistor D/A converter


 For N bit D/A converter, the output of DAC may be generalized as VOUT = - Rf /(2N-1 R)[ 2N-1 VQN-1 + 2N-2 VQN-2 + .. + 21 VQ1 + 20 VQ0 = - K [ 2N-1 VQN-1 + 2N-2 VQN-2 + .. + 21 VQ1 + 20 VQ0 ] where K = Rf / ( 2N-1 R)  The conversion accuracy of the DAC primarily depends on two factors: (i) the precision of the input and feedback resistors and (ii) the precision of the input voltage levels.  The resistors can be made accurate by trimming, but the input voltage must be handled differently. It should be clear that the digital inputs cannot be taken directly from the outputs of FFs or logic gates because the output logic levels of these devices are not precise values like 0 V and 5 V but vary within given ranges
S. Kal, IIT-Kharagpur

23

Four bit D/A converter Circuit with Precision Reference Supply


 A modification has been done in the DAC circuit as shown here. Each digital input controls a semiconductor switch. When the input is high, the switch closes and connects a precision reference supply to the input resistor; when the input LOW, the switch is open. The reference supply produces a very stable, precise voltage needed to generate an accurate analog output
S. Kal, IIT-Kharagpur

24

Resistor Ladder D/A Converter


Practical limitations of the DACs with binary-weighted resistors
1. It uses large difference of resistor values between the LSB and MSB, especially in high-resolution DACs (i.e., many bits). For example, if the MSB resistor is 1 k; in a 12-bit DAC, the LSB resistor will be over 2 M; The IC fabrication technology does not permit to fabricate resistance values over a wide range that maintains an accurate ratio especially with variations in temperature. Thus, it is preferable to have a circuit that uses resistance that are fairly close in value
S. Kal, IIT-Kharagpur

2.

25

Resistor Ladder D/A Converter


 The resistor (R/2R) ladder network uses resistance values span a range of only 2 to 1. A resistor ladder network is connected to an inverting summing op-amp. This particular converter is a 4bit R-2R resister ladder network consisting of two precision resistance values (R and 2R). VOUT = Q3 VOUT3 + Q2 VOUT2 + Q1 VOUT1 + Q0 VOUT0
S. Kal, IIT-Kharagpur

26

Вам также может понравиться