bel_16_adc and dac

26

Upload: bharavi-k-s

Post on 06-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 1/26

Page 2: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 2/26

2

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

     The vast majority of signals in t

h

e 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

Page 3: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 3/26

3

     Any information that has to be inputted to a digital system must

first be put into digital form. Similarly th

e outputs of any digitalsystem are always in digital form. Thus, to process any physicalanalog signal in any digital system, the conversion of signalfrom analog to digital (A/D) is absolutely necessary

     After the digital processing is completed, reconstitution of ananalog 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-to-analog (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 differencebetween the digital nature of the computer and the analog natureof the process variables.

     Thus, knowledge of conversion of analog signal to digital andvice versa is absolutely necessary in modern electronicinstrumentation and data acquisition system

S. Kal, IIT-Kharagpur

Page 4: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 4/26

4

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 digitalequivalent 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 inputS. Kal, IIT-Kharagpur

Page 5: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 5/26

5

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 asubsequent 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

Page 6: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 6/26

6

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

The conversion of analog signal to digital form depends onsampling 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

Page 7: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 7/26

7

The samples are continuously varying analog voltages. Now if we

represent the magnitude of each of the signal samples by anumber having a finite number of digits, then the signal amplitudewill no longer be continuous; rather, it is said to be quantized,discretized, or digitized. The process of digitizing samplesinvolves making an approximation. This process of approximationis known as quantization

Among the number systems in digital electronics, binary number system results in the simplest possible digital signals andcircuits. If we use N binary digits (bits) to represent each sampleof the analog signal, then the digitized sample value can beexpressed 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), thecloser the digital word D approximates the magnitude of theanalog sample

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

S. Kal, IIT-Kharagpur

Page 8: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 8/26

8

Here b0 and bN-1 are represented as least significant bit (LSB) andmost significant bit (MSB) respectively and this binary number is

conventionally written as bN-1bN-2 «. b0. It is to be noted that such arepresentation 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 rangeof 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 sizeS. Kal, IIT-Kharagpur

Page 9: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 9/26

9

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 VS. Kal, IIT-Kharagpur

Page 10: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 10/26

10

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. Followingcommon 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 occupynominally one-third the interval between sampling times. With

parallel processing, the entire interval is available for each bit

An illustration of digitizing an analog waveform

S. Kal, IIT-Kharagpur

Page 11: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 11/26

11

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, w

hich

may be implemented using operational amplifier 

S. Kal, IIT-Kharagpur

Page 12: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 12/26

12

     The control unit contains the logic circuitry for generating theproper sequence of operation in response to start command,which initiates the conversion process. At a rate determinedby the clock, the control unit continually modifies the binarynumber that is stored in the register 

General Block Diagram of ADC

S. Kal, IIT-Kharagpur

Page 13: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 13/26

13

     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 digitaloutput that switches states, depending on which analoginput is greater. The comparator compares VAD with theanalog input VA. As long as VAD< VA, the comparator outputstays high. When V

AD

exceeds VA

by at least an amount = VT

(threshold voltage), the comparator output goes LOW andstops the process of modifying the register number. At thispoint, VAD is a close approximation of VA

     The digital number in the register, which is the digitalequivalent 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

Page 14: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 14/26

14

Specifications of Analog to Digital Converters

Analog to digital resolution: Analog to digital resolution isdefined as the necessary change in input voltage for one bitchange in the output and is expressed in percentage. For example, if a 10 bit analog to digital converter has an inputvoltage 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, deviationsfrom linearity, etc.

Analog to digital speed: Analog to digital speed is defined intwo ways, namely, the time necessary to perform oneconversion, or the time between conversions at the maximumpossible rate. Typical conversion times vary from 50 Qs for moderate speed units to 50 ns for a veryhigh speed device.

S. Kal, IIT-Kharagpur

Page 15: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 15/26

15

Analog input voltage: This is the maximum allowable input-

voltage range. Typical values are 0 to 10 V, s 5V, s 10 V, etc

Input impedance: Typical input impedance of ADC lies in therange of 1k; to 1M;, depending on the type. The inputcapacitance 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 andcheap

Conversion time is fixed and is not dependent on the analog input

Specifications of Analog to Digital Converters

S. Kal, IIT-Kharagpur

Page 16: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 16/26

16

Basic block diagram of successive approximation

converter (SAC)

It uses a DAC in a feedback loop and successive approximationregister 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 thusmodifies 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

Page 17: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 17/26

17

Digital to Analog (D/A) Conversion

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

The digital inputs Q3, Q2, Q1, Q0 are usually derived from theregister of a digital system. For each of 24 = 16 input binarynumbers, the D/A converter output voltage is a unique value.This value could be same as decimal equivalent of binarynumber or there could have been other proportionality factor 

S. Kal, IIT-Kharagpur

Page 18: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 18/26

18

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/Aconverter is related to the digital equation

1)(N to0 j0isinput of bit th jif 0

1isinput of bit th jif 1 jQ

 jQ j

2 K  )0Q021Q

122 N Q2 N 21 N Q1 N  K(2 AV 

!!

!

§!yyy

!

Digital to Analog (D/A) Conversion

S. Kal, IIT-Kharagpur

Page 19: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 19/26

19

The outputs of a DAC takes on only specific values and istechnically not an analog quantity. However, the number of different possible output values can be increased and thedifference between successive values decreased by increasingthe number of input bits. This will allow us to produce anoutput 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 accordingto their position in the binary number. Thus, Q0, which is theLSB, has a weight of 1 V, Q1 has a weight of 2 V, Q2 has aweight of 4 V and Q3, the MSB, has the largest weight of 8 V.The weights are successively doubled for each bit, beginningwith 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

Digital to Analog (D/A) Conversion

S. Kal, IIT-Kharagpur

Page 20: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 20/26

20

Specifications for D/A Converter 

Resolution: The resolution of digital to analog converter is

defined as the smallest observable change in the analog outputthat can be effected by a single step change in the digital inputand is calculated as

Resolution = V / (2N ± 1)

wh

ere V is th

e difference in voltage of two logic levels (0 and 1).Itis 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 adesired accuracy. The operating speed of a DAC is usuallyspecified by its settling time, which is the time required to go

from zero to full scale as the binary input is changed from all 0sto all 1s. Typical values for settling time range from 50 ns to 10 Qs

Linearity, Accuracy

Temperature sensitivity

S. Kal, IIT-Kharagpur

Page 21: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 21/26

21

Binary-Weighted Resistor D/A Converter 

A simple 4-bit DAC circuit uses op amp summing amplifier withbinary-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 (logic1). 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

Page 22: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 22/26

22

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

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;)

In a binary-weighted resistor D/A converter circuit,

S. Kal, IIT-Kharagpur

Page 23: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 23/26

23

For N bit D/A converter, the output of DAC may be generalizedas

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 twofactors: (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 beh

andled differently.It s

hould be clear t

hat t

hedigital inputs cannot be taken directly from the outputs of FFs

or logic gates because the output logic levels of these devicesare not precise values like 0 V and 5 V but vary within givenranges

Binary-Weighted resistor D/A converter 

S. Kal, IIT-Kharagpur

Page 24: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 24/26

24

A modification has beendone in the DAC circuit asshown here. Each digitalinput controls a semi-

conductor switch

. Wh

en th

einput is high, the switch closes and connects aprecision reference supply tothe input resistor; when theinput LOW, the switch isopen. The reference supplyproduces a very stable,precise voltage needed togenerate an accurate analogoutput

Four bit D/A converter Circuit with Precision

Reference Supply

S. Kal, IIT-Kharagpur

Page 25: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 25/26

25

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 a12-bit DAC, the LSB resistor will be over 2 M;

2. 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

Resistor Ladder D/A Converter 

Practical limitations of the DACs with binary-weighted

resistors

S. Kal, IIT-Kharagpur

Page 26: Bel_16_ADC and DAC

8/3/2019 Bel_16_ADC and DAC

http://slidepdf.com/reader/full/bel16adc-and-dac 26/26

26

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 invertingsumming op-amp. This

particular converter is a 4-

bit R-2R resister ladder 

network consisting of two

precision resistancevalues (R and 2R).

VOUT = Q3 VOUT3 + Q2 VOUT2 + Q1 VOUT1 + Q0 VOUT0

Resistor Ladder D/A Converter 

S. Kal, IIT-Kharagpur