analog to digital converter

53
Chapter 6: AD/DA CONVERTERS EE301 : Electronic Circuits 1

Upload: arryshah-dahmia

Post on 30-Oct-2014

211 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Analog to Digital Converter

Chapter 6: AD/DA CONVERTERS

EE301 : Electronic Circuits 1

Page 2: Analog to Digital Converter

Learning Outcomes

Upon completing this chapter, students should be able to:

• Understand the methods of converting digital signals to analogue signals (DAC).

• Understand the methods of converting analog signals to digital signals (ADC).

EE301 : Electronic Circuits 2

Page 3: Analog to Digital Converter

GO/SO1. Understand the methods of converting digital

signals to analogue signals (DAC). • Describe the methods of converting digital

signals to analogue signals • Explain the applications of D/A converter. • Construct the circuits to convert digital signals

to analogue signals– Resistive divider circuit. – R-2R ladder circuit.

3

Page 4: Analog to Digital Converter

Introduction-Data acquisition

EE301 : Electronic Circuits 4

Data converters : the devices that perform the interfacing

function between analog and digital worlds are analog-to-

digital (A/D) and digital-to-analog (D/A) converters

interface between the real world of physical

parameters, which are analog, and the artificial world

of digital computation and control.

Page 5: Analog to Digital Converter

Data acquisition

EE301 : Electronic Circuits

Page 6: Analog to Digital Converter

Data distribution

EE301 : Electronic Circuits6

Page 7: Analog to Digital Converter

Introduction –CONVERTERS

EE301 : Electronic Circuits 7

1. Digital-to Analog Converters (DACs)2. Analog-to-Digital Converters (ADCs)

OverviewDefinitions:Analog voltages – Voltage that may vary continuously

throughout some range.Digital Voltages – Has only 2 useful values; that is “high” and “low”.An analog-to-digital converter (ADC or A/D converter) converts an analog

value to digital equivalent in a process called digitizing.

An Digital-to-Analog converter (DAC or D/A converter) function is to convert this digital values (in binary) back to analog values.

Page 8: Analog to Digital Converter

Digital to Analog Converters (DAC)

EE301 : Electronic Circuits 8

What is a digital to analog converter (DAC)? Converts digital input signal to an analog

output signal

1001

0101

0011

0111

1001

1010

1011

DACDAC

Page 9: Analog to Digital Converter

10111001 10100111 10000110010101000011001000010000

Digital to Analog Converters (DAC)

EE301 : Electronic Circuits 9

Ana

log

Out

put

Sig

nal

Digital Input Signal

Page 10: Analog to Digital Converter

What a DAC Looks Like:

EE301 : Electronic Circuits 10

Page 11: Analog to Digital Converter

Digital to Analog Converters - Common Common ApplicationsApplications

EE301 : Electronic Circuits 11

Generic useCircuit ComponentsDigital Audio Function Generators/OscilloscopesMotor Controllers

Page 12: Analog to Digital Converter

DACs Common Applications -Generic-Generic

EE301 : Electronic Circuits 12

Used when a continuous analog signal is required. Signal from DAC can be smoothed by a Low pass

filter

0 bit

nth bit

n bit DAC011010010101010100101101010101011111100101000010101010111110011010101010101010101010111010101011110011000100101010101010001111

Digital Input

Filter

Piece-wise Continuous Output

Analog Continuous Output

Page 13: Analog to Digital Converter

DACs Common Applications -Circuit Components-Circuit Components

EE301 : Electronic Circuits 13

Voltage controlled Amplifier digital input, External Reference Voltage as control

Digitally operated attenuator External Reference Voltage as input, digital control

Programmable Filters Digitally controlled cutoff frequencies

Page 14: Analog to Digital Converter

DACs Common Applications -Digital Audio-Digital Audio

EE301 : Electronic Circuits 14

CD Players MP3 Players Digital Telephone/Answering Machines

1 2

3

1. http://www.electrorent.com/products/search/General_Purpose_Oscilloscopes.html

2. http://www.bkprecision.com/power_supplies_supply_generators.htm

3. http://www.toshiba.com/taistsd/pages/prd_dtc_digphones.html

Page 15: Analog to Digital Converter

DACs Common Applications- Function GeneratorsFunction Generators

EE301 : Electronic Circuits 15

Digital Oscilloscopes Digital Input Analog Ouput

Signal Generators Sine wave generation Square wave generation Triangle wave generation Random noise generation

1

1. http://www.electrorent.com/products/search/General_Purpose_Oscilloscopes.html

2

2. http://www.bkprecision.com/power_supplies_supply_generators.htm

Page 16: Analog to Digital Converter

DACs Common Applications -Motor Controllers-Motor Controllers

EE301 : Electronic Circuits 16

Cruise Control Valve Control Motor Control

1

1. http://auto.howstuffworks.com/cruise-control.htm

2

2. http://www.emersonprocess.com/fisher/products/fieldvue/dvc/

3

3. http://www.thermionics.com/smc.htm

Page 17: Analog to Digital Converter

Types Of DACs

EE301 : Electronic Circuits 17

D/A conversion can be achieved using a number of different methods such as:

The Weighted-Resistor DAC

The Ladder Network (The R-2R Ladder DAC)

Comprised of switches, op-amps, and resistors

Page 18: Analog to Digital Converter

Binary Weighted Resistor DAC

EE301 : Electronic Circuits 18

Advantage:Easy principle (low bit DACs)Disadvantages:Requirement of several

different precise input resistor values: one unique value per binary input bit. (High bit DACs)

Larger resistors ~ more error.Precise large resistors –

expensive.High number of bits lead to

current changes in the magnitude of noise amplitudes.

Page 19: Analog to Digital Converter

Four-Bit Binary Weighted Resistor DAC

EE301 : Electronic Circuits 19

This approach is not satisfactory for a large number of bits because it requires too much precision in the summing resistors. This problem is

overcome in the R-2R network DAC.

Page 20: Analog to Digital Converter

Switches as Binary Representation

EE301 : Electronic Circuits 20

Rf = R

iI

Most Significant Bit, MSB

Least Significant Bit,

LSB

-VREF

Vo

R 2R 4R 8R

Page 21: Analog to Digital Converter

Switches as Binary Representation

EE301 : Electronic Circuits 21

-VREF

Least Significant Bit

Most Significant Bit

CLEAREDSET

( 1 1 1 1 )2 = ( 15 )10

Page 22: Analog to Digital Converter

Binary Weighted Resistor

EE301 : Electronic Circuits 22

Rf = R

8R4R2RR

Vo

-VREF

iI

LSB

MSB

“Weighted Resistors” based on bit

Reduces current by a factor of 2 for each bit

Page 23: Analog to Digital Converter

Binary Representation

• Choose a common ratio R

R1 = 20R = R

R2 = 21R = 2R

R3 = 22R = 4R

R4 = 23R = 8R

• Remember:- MSB line has smallest

resistor = R- LSB line has largest

resistor = 2n-1R

EE301 : Electronic Circuits 23

Page 24: Analog to Digital Converter

Binary Weighted Resistor

R

B

R

B

R

B

R

BVI REF 842

0123

842012

3

BBBBVRIV REFfOUT

EE301 : Electronic Circuits 24

Result:

Bi = Value of Bit i

Page 25: Analog to Digital Converter

Binary Weighted Resistor

Resolution/Value Digital2 1

REF

ini

REFOUT

V

BVV

EE301 : Electronic Circuits 25

More Generally:

Bi = Value of Bit i n = Number of Bits

Page 26: Analog to Digital Converter

Examples /Exercise:

1. Draw the diagram of an 8-bit weighted resistor

DAC. Given: Resistor in 25 bit line = 20kΩ

Reference voltage = -10 volt 8 bit parallel binary input Xp = 10101101Calculate :

1. Common ratio R of the network2. Value of each of the resistors in the network3. Feedback resistor of the OP AMP, Rf

4. Load Current, IL

5. Analog output Voltage, Vo

SOLUTION : DISCUSSION WITH LECTUREREE301 : Electronic Circuits 26

Page 27: Analog to Digital Converter

R-2R Ladder DAC

EE301 : Electronic Circuits 27

Page 28: Analog to Digital Converter

R-2R Ladder DAC

EE301 : Electronic Circuits 28

Only two resistor values- R and 2R Does not need the kind of precision as Binary

weighted DACs Easy to manufacture More popular Less errors

Page 29: Analog to Digital Converter

R-2R Ladder DAC

EE301 : Electronic Circuits 29

Page 30: Analog to Digital Converter

R-2R Ladder DAC

EE301 : Electronic Circuits 30

The most popular method incorporates a ladder network containing series-parallel combination of resistors, in R and 2R values.

Page 31: Analog to Digital Converter

R-2R Ladder DAC

EE301 : Electronic Circuits 31

Example circuit with 0110 input

Vref2

2D2D2D2DVo

4

33

22

11

00

Page 32: Analog to Digital Converter

R-2R Ladder DAC

EE301 : Electronic Circuits 32

VREF

MSB

LSB

Page 33: Analog to Digital Converter

R-2R Ladder DAC

EE301 : Electronic Circuits 33

Same input switch setup as Binary Weighted Resistor DAC

All bits pass through resistance of 2RVREF

MSB

LSB

Page 34: Analog to Digital Converter

R-2R Ladder DAC

EE301 : Electronic Circuits 34

The less significant the bit, the more resistors the signal must pass through before reaching the op-amp

The current is divided by a factor of 2 at each node

LSB MSB

Page 35: Analog to Digital Converter

R-2R Ladder DAC

248163210 DDDD

vR

Rv ref

fout

EE301 : Electronic Circuits 35

The summing amplifier with the R-2R ladder of resistances shown produces the output

where the D's take the value 0 or 1. The digital inputs could be TTL voltages which close

the switches on a logical 1 and leave it grounded for a logical 0.

This is illustrated for 4 bits, but can be extended to any number with just the resistance values R and 2R.

Page 36: Analog to Digital Converter

DAC -Performance Specifications --ResolutionResolution

EE301 : Electronic Circuits 36

Resolution: is the amount of variance in output voltage for every change of the LSB in the digital input.

Accuracy is a comparison of the actual output of a DAC with the expected output. It is expressed as a percentage of a full-scale, or maximum, output voltage. For Example: if a converter has a full scale output of 10V and the accuracy is ±0.1%, than the max error for any output voltage is (10V)(0.001) = 10mV.

NLSB

VV

2Resolution Ref

N = Number of bits

Page 37: Analog to Digital Converter

EE301 : Electronic Circuits 37

Voltage resolution: n2

Vref

Voltage step example : for 10 bit resolution. So n=10

if Vref = 10V

voltage step : 10V/1024 = 10mV

DAC -ResolutionDAC -Resolution

Page 38: Analog to Digital Converter

DACs Performance Specifications - ResolutionResolution

EE301 : Electronic Circuits 38

Better Resolution(3 bit)Poor Resolution(1 bit)

Vout

Desired Analog signal

Approximate output

2 V

olt.

Lev

els

Digital Input0 0

1

Digital Input

Vout

Desired Analog signal

Approximate output

8 V

olt.

Lev

els

000

001

010

011

100

101

110

111

110

101

100

011

010

001

000

Page 39: Analog to Digital Converter

Comparison Between Weighted Resistor and R-2R

Weighted resistor If all bits = 1, branch current

are weighted sum of branch current = IL

It uses n resistor Number of different resistor

values = n from R to 2n-1 R More difficult to match resistor

values Not convinient to make in IC

form Feedback resistor of OpAmp =

0.5R

R-2R

If all bit=1, branch currents are equal. Each contributes different fraction to IL

It uses 2n+1 resistors

No different resistor values = 2, i,e R & 2R

Easier to match Convenient to make in IC

form Feedback resistor of OpAmp

= 3REE301 : Electronic Circuits 39

Page 40: Analog to Digital Converter

Exercise & Example5.2 Given an 8-bit resistor 2-2R

ladder DAC with reference voltage VR = 10V. Shunt Arm Resistor = 10KΩ and Binary input Xp/Bin = 11001010.

Calculate : • a) Load Current, IL b) Analog output voltage, Vo

SOLUTION : DISCUSSION WITH LECTURER

5.3 Draw the circuit of R -2R DAC as mentioned in question 5.2

EE301 : Electronic Circuits 40

Page 41: Analog to Digital Converter

EE301 : Electronic Circuits 41

Analog to Digital ConvertersAnalog to Digital Converters ADC, A/D or A to D : an electronic integrated circuit

(i/c) that converts continuous signals to discrete

digital numbers.

ADC is an electronic device that converts an input

analog voltage ( or current ) to a digital number.

The digital output may be using different coding

schemes, such as binary and two's complement

binary

Page 42: Analog to Digital Converter

OVERVIEW Analog Signals

EE301 : Electronic Circuits 42

Analog signals – directly measurable quantities in terms of some other quantity

Examples: Thermometer – mercury height rises as temperature

rises Car Speedometer – Needle moves farther right as

you accelerate Stereo – Volume increases as you turn the knob.

Page 43: Analog to Digital Converter

OVERVIEW Digital Signals

EE301 : Electronic Circuits 43

Digital Signals – have only two states. For digital computers, we refer to binary states, 0 and 1. “1” can be on, “0” can be off.

Examples: Light switch can be either on or off Door to a room is either open or closed

Page 44: Analog to Digital Converter

Examples of A/D Applications

EE301 : Electronic Circuits 44

Microphones - take your voice varying pressure waves in the air and convert them into varying electrical signals

Strain Gages - determines the amount of strain (change in dimensions) when a stress is applied

Thermocouple – temperature measuring device converts thermal energy to electric energy

Voltmeters Digital Multimeters

Page 45: Analog to Digital Converter

Types of ADC• Digital Ramp ADC• Successive Approximation ADC

E2002 : Electronic System 2 45

Analog to Digital ConvertersAnalog to Digital Converters

Page 46: Analog to Digital Converter

Just what does an A/D converter DO?• Converts analog signals into binary

words

EE301 : Electronic Circuits 46

Analog to Digital ConvertersAnalog to Digital Converters

Page 47: Analog to Digital Converter

1. Digital Ramp ADC

EE301 : Electronic Circuits 47

Page 48: Analog to Digital Converter

Digital ramp ADC

EE301 : Electronic Circuits 48

Output : conversion from analog to digital form inherently involves comparator action where the value of the analog voltage at some point in time is compared with some standard.

Apply the analog voltage to one terminal of a comparator

and trigger a binary counter which drives a DAC. The

output of the DAC is applied to the other terminal of the

comparator. Since the output of the DAC is increasing with the

counter, it will trigger the comparator at some point when

its voltage exceeds the analog input. The transition of the comparator stops the binary counter,

which at that point holds the digital value corresponding

to the analog voltage.

Page 49: Analog to Digital Converter

Operation - Digital ramp ADC• Uses a DAC a binary counter to generate the digital value of an

analog input.• Initially, the counter is set to 0 (RESET). Vsx = 0volt. Since Vs >

Vsx, the comparator output is HIGH. The counter advances and the DAC output, Vsx increases one step at a time.

• This continues until Vs < Vsx. The comparator will go low and the counter stops counting and the contents of the counter are the digital representation of Vs.

• The control logic loads the binary count into the latches and resets the counter, thus beginning another count sequence to sample the input value. For an 8-bit conversion this means a maximum of 256 counter states. Notice that for each sample, the counter must count from zero up to the point at the stair-step reference voltage reaches the analog input voltage.

EE301 : Electronic Circuits 49

Page 50: Analog to Digital Converter

2. Successive Approximation ADC

EE301 : Electronic Circuits 50

Page 51: Analog to Digital Converter

Successive Approximation ADC

EE301 : Electronic Circuits 51

The successive approximation ADC

is much faster than the digital

ramp ADC because it uses digital logic to

converge on the value closest to

the input voltage. A

comparator and a DAC are used in

the process.

Page 52: Analog to Digital Converter

Practical considerations of ADC circuits

E2002 : Electronic System 2 52

Page 53: Analog to Digital Converter

Example /Exercise5.4 An eight-bit ADC has resolution of 20mV.

What will its digital output be for an analog input of 2.17 Volt?

Solution : DISCUSSION WITH LECTURER

END OF THIS TOPIC

EE301 : Electronic Circuits 53