Lezione 7 Conversione analogico digitale Introduzione Campionamento di segnali analogici e Aliasing Porte di campionamento e di mantenimento Quantizzazione segnali analogici Ricostruzione del segnale analogico Specifiche del convertitore di dati Circuiti di conversione analogico digitale
Introduction Digital techniques have several advantages with respect the analogue methods: They are less affected by noise Processing, transmission and storage is often easier However, analogue signals often are produced and used so there is the need to translate analogue signals into digital signals or the contrary. These two operations are performed by data converters : Analogue-to-digital converter (ADC) Digital-to-analogue converter (DAC) DACs and ADCs are important electronic subsystems which interface sensors (e.g. temperature, pressure, light, sound, cruising speed of a car) to digital systems such as microcontrollers or PCs.
Introduction Figure shows a data acquisition and control system in which the ADC and DAC are used to interface a computer to the analog world so that the computer can monitor and control a physical variable. Phys. Var. Sound Pressure, mass, force Temperature Distance Acceleration Light Biopotentials Transducer Microphone Strain gauge, force sensitive resistor Thermistor, thermocouple, Doppler ultrasound, lasers, infrared light Accelerometer Camera Electrode
Example Introduction
Introduction In communication applications two DAC are used to generate I and Q baseband signals for wireless transmitter. Motor Control System
Analog Signal Sampling To obtain the whole description of the analog signal it is necessary to take regular measures of the signal. This process is called sampling To get a useful sampling, to rebuild the analog signal, the Nyquist theorem has to be satisfied. Nyquist sampling theorem: the sampling rate must be greater than twice the highest frequency present in the signal being sampled (Nyquist rate) The sampling rate is determined by the highest frequency present in the signal, not the highest frequency of interest. If a signal contains unwanted high frequency components these can be removed, before sampling, using a low-pass filter (anti-aliasing filter). It is common to sample at about 20% above the Nyquist rate for imperfect filtering.
Sample and hold gates It is often useful to be able to sample a signal and then hold its value constant this is useful when performing analogue-to-digital conversion so that the signal does not change during conversion it is also useful when doing digital-to-analogue conversion to maintain the output voltage constant between conversions This task is performed by a sample and hold gate Typical devices require a few microseconds to sample the incoming waveform, which then decays (or droops) at a rate of a few millivolts per millisecond High speed devices, such as those used for video applications, can sample an input in a few nanoseconds, but may experience a droop of a few millivolts per microsecond
Analog Signal Quantization Supposing that an analog signal (from 0 to 9V) has to be converted into a 4-bit digital signal. A 4-bit binary number can represent 16 different values from 0 to 15. The resolution of the conversion is 9V/15 = 0.6V. If the analog value is equal to n 0.6V (n=0 15) the conversion is direct. When the voltage value is between two successive incremental levels. The nearest level is assumed and the related code is selected. For instance, 6.2V an analog level between 6V and 6.6V, it is closer to 6 V so the code 1010 corresponding to 6 V is assumed. This process is called quantization and errors are introduced in this process; such errors arecalled quantization errors. Using more bits to represent an analog signal reduces quantization errors but requires more complex circuitry. 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000 0.0 Digital code 0.6 1.2 1.8 2.4 3.0 3.6 4.2 4.8 5.4 6.0 6.6 7.2 7.8 8.4 9 Analog input (V)
Signal reconstruction In many cases it is necessary to reconstruct an analogue signal from a series of sample (after they have been processed, transmitted or stored). This requires the removal of the step transitions in the sampled waveform Reconstruction is achieved using a low-pass filter (reconstruction filter) to remove these unwanted frequencies.
Data converter specifications Resolution of data converters A lot of converters is available, each providing conversion to a particular resolution. The resolution determines the number of used quantization levels. An n-bit converter uses 2 n discrete levels e.g. an 8-bit conv. uses 2 8 or 256 levels and gives a resolution of about 0.4% where greater accuracy is required converters with up to 20-bit resolution or more are available Speed of conversion The conversion into analog or digital signal takes a finite time. This time is referred to as the conversion time or settling time of the converter. Conversion time depends on the converter. DACs are usually faster than ADCs.
Digital-to-analogue converters (DACs) Available with a wide range of resolutions and, in general, conversion time increases with resolution. A typical general-purpose 8-bit DAC has a settling time between 100 ns and 1 s. A typical 16-bit converter has a settling time of a few milliseconds. For high-speed converters the settling times are few nanoseconds. A video DAC has resolution of 8 bits and maximum sampling rate of 100 MHz.
Binary-weighted resistor DAC This form of DAC is a development of the current-to-voltage converter. Each input controls a switch that connects a resistor to a constant reference voltage, V ref. These switches are closed when the corresponding bit is set to 1. V R b b b b V.. R 2 2 2 2 F n 1 n 2 1 0 o Ref 0 1 n 2 n 1 This DAC is implemented using electronic switches (transistors). This method uses a small number of resistors, but requires a broad spread of values. Resistors with different values tend to have unequal temperature coefficients, consequently the ratios between them changes with temperature. This limits the temperature stability of this technique.
R-2R resistor chain DAC The R 2R method also makes use of the current-to-voltage converter arrangement, but does not require a broad spread of resistor values. The circuit is arranged so that the currents flowing through each of the resistors, connected to the switches, see a resistance of 2R looking in either direction along the resistor chain. Therefore, half current will go in each direction. Similarly, currents flowing up the chain see equal resistances in either direction at each node and will again be split. Each switch provides a contribute of current equal to half of the above switch, consequently, at each node the contributes of current are halved. Therefore, the currents generated by the switches are binary weighted, as in the previous method, but without the use of a wide range of resistor values.
Analogue-to-digital converters (ADCs) Available in a range of resolutions and speeds A typical 8-bit converter might have a settling time between 1 and 10 s a typical 12-bit converter might have a settling time from 10 to 100 s high speed converters can exceed 150 million samples per second
Each voltage increment is connected to a separate comparator that compares it with the input voltage. Combinational logic is then used to determine the value of the input voltage from this pattern. The great advantage of this method is its high speed of conversion, all the comparisons are performed simultaneously. This allows a conversion times of only a few nanoseconds. However, an n-bit converter requires 2n comparators, so the hardware is significantly more complicated than other techniques. Parallel or flash ADC The parallel or flash converter is the fastest of the various forms of ADC. It operates by comparing the input voltage with every discernible voltage step within the converter s range. The various voltage steps are produced using a precision resistor chain from a reference voltage source. Analog input Digital output
Counter or servo ADC The heart of the converter is a DAC connected to the parallel outputs of an up counter. The output of the DAC is compared with the analogue input signal using a comparator. The output of the comparator is used to generate a stop control for the counter. Initially, the counter is zeroed and the counter starts to count up. As it does so, the output from the DAC increases. When the DAC voltage becomes equal to the analogue input signal, the output from the comparator will change state, stopping the counter. DAC output This signal is also used to generate a conversion complete control signal. At this stage, the digital equivalent of the analogue input signal can be found by reading the parallel output from the counter.
Counter or servo ADC When external equipment has read this value, the counter is set to zero and the process begins again. The counter ADC is one of the simplest forms of converter, but is relatively slow in operation. For each conversion, the counter must increment from zero, allowing sufficient time after each count for the DAC and the comparator to settle. Settling times of the order of a few milliseconds are typical.
Successive approximation ADC The successive approximation ADC is similar in many respects to the counter ADC, except that the simple counter is replaced by logic circuitry. The DAC is driven by a digital word produced by the successive approximation logic (SAL). The DAC is driven by a digital word produced by the SAL. Initially, all the bits of this word are set to 0 and then the first bit is set to 1. This input word is converted by the DAC into an analogue signal corresponding to half of the full range of the DAC. The value is compared with the analogue input signal using a comparator and the result is fed back to the control logic If the comparison shows that the DAC output is less than the analogue input, the first bit will be left at 1; if not, it will be reset to 0.
Successive approximation ADC Successively, the second bit is set to 1 and, again, the output of the DAC is compared to the input signal. If the comparison shows that the DAC output is less than the analogue input, the second bit will be left at 1; if not, it will be reset to 0. In this way, each bit of the DAC input is checked and its correct state determined. The conversion is completed when all the bits of the DAC input have been set correctly. Typical successive approximation converters might have settling times of 1 10 μs for an 8-bit conversion, increasing to perhaps 10 100 μs for a 12-bit device.