Digital to Analog Conversion

Post on 13-Jan-2016

38 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Digital to Analog Conversion. Heather Humphreys Cheng Shu Ngoo Woongsik Ham Ken Marek. Woongsik Ham. Topics Discussed. What is a DAC? Applications Types of DAC circuit Binary weighted DAC R-2R Ladder DAC Specifications of DAC Resolution Reference Voltage Speed Settling Time - PowerPoint PPT Presentation

Transcript

Heather HumphreysCheng Shu NgooWoongsik Ham

Ken Marek

Digital to Analog Conversion

Topics Discussed What is a DAC?

Applications

Types of DAC circuitBinary weighted DACR-2R Ladder DAC

Specifications of DACResolutionReference VoltageSpeedSettling TimeLinearity

DAC associated errors

Woongsik Ham

What is a DAC?A digital to analog converter (DAC) is a

device that converts digital numbers (binary) into an analog voltage or current output.

Woongsik Ham

Principal components of DAC

Woongsik Ham

What is a DAC?Digital AnalogEach binary number sampled by the DAC

corresponds to a different output level.

10111001 10100111 10000110010101000011001000010000Digital Input Signal

Ana

log

Out

put

Sig

nal

Woongsik Ham

Ideally Sampled Signal Output typical of a real, practical DAC due to sample & hold

Typical OutputDACs capture and hold a number, convert it to a physical signal, and hold that value for a given sample interval. This is known as a zero-order hold and results in a piecewise constant output.

DAC

Woongsik Ham

Types of DACMultiplying DAC*

Reference source external to DAC package

Nonmultiplying DACReference source inside DAC package

*Multiplying DAC is advantageous considering the external reference.

Woongsik Ham

Common Applications

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

Woongsik Ham

Common Applications:Function GeneratorsFunction Generators

Digital OscilloscopesDigital InputAnalog Ouput

Signal GeneratorsSine wave generationSquare wave generationTriangle wave generationRandom noise generation

1 2

Woongsik Ham

Applications – Video

Video signals from digital sources, such as a computer or DVD must be converted to analog signals before being displayed on an analog monitor. Beginning on February 18th, 2009 all television broadcasts in the United States will be in a digital format, requiring ATSC tuners (either internal or set-top box) to convert the signal to analog.

Woongsik Ham

Common ApplicationsMotor ControllersMotor Controllers

Cruise ControlValve Control Motor Control

1 2 3

Woongsik Ham

Types of DACMultiplying DAC*

Reference source external to DAC package

Nonmultiplying DACReference source inside DAC package

*Multiplying DAC is advantageous considering the external reference.

Woongsik Ham

Types of DAC implementationsBinary Weighted ResistorR-2R LadderPulse Width Modulator (not covered)Oversampling DAC (used internally in

HCS12)

Ken Marek

Binary Weighted Resistor

•Start with summing op-amp circuit

•Input voltage either high or ground

•Adjust resistor weighting to achieve desired Vout

Ken Marek

Binary Weighted Resistor• Details

– Use transistors to switch between high and ground

– Use resistors scaled by two to divide voltage on each branch by a power of two

– V1 is MSB, V4 LSB in this circuit

• Assumptions:– Ideal Op-Amp– No Current into Op-Amp– Virtual Ground at Inverting

Input– Vout = -IRf

Ken Marek

Binary Weighted ResistorAssume

binary inputs B0 (LSB) to Bn-1 (MSB)

Each Bi = 1 or 0 and is multiplied by Vref to get input voltage1 2 01

out f f 2 n-1...

2 2 2n n

ref n

B B BBV IR R V

R R R R

B0

B5

B4

B3

B2

B1

Ken Marek

Example: take a 4-bit converter, Rf = aR

Input parameters:Input voltage Vref = -2VBinary input = 1011Coefficient a = ½

Binary Weighted Resistor

3 02 1out 1 2 4 8ref

B BB BV aV

out

1 1 0 1 1 112 1.375

2 1 2 4 8 8V V

Ken Marek

Binary Weighted ResistorResolution: find minimum nonzero output

If Rf = R/2 then resolution is

and max Vout is

f

min n-12refR V

VR

n2refV

max

11

2ref nV V

Ken Marek

Binary Weighted ResistorAdvantages

SimpleFast

DisadvantagesNeed large range of resistor values (2048:1

for 12-bit) with high precision in low resistor values

Need very small switch resistancesOp-amp may have trouble producing low

currents at the low range of a high precision DAC

Ken Marek

R-2R LadderEach bit

corresponds to a switch:If the bit is high, the

corresponding switch is connected to the inverting input of the op-amp.

If the bit is low, the corresponding switch is connected to ground.

Ken Marek

R-2R Ladder

B2

B1

B0

Ken Marek

R-2R LadderCircuit may be

analyzed using Thevenin’s theorem (replace network with equivalent voltage source and resistance)

Final result is:

1

out ref0 2

nf i

n ii

R BV V

R

Ken Marek

B2

B1

B0

Rf

Compare to binary weighted circuit:1

out ref ( 1)0 2

nf i

n ii

R BV V

R

R-2R LadderResolution

If Rf = R then resolution is

and max Vout is

Ken Marek

f

min n2refR V

VR

n2refV

max

11

2ref nV V

R-2R LadderAdvantages:

Only 2 resistor valuesLower precision resistors acceptable

DisadvantagesSlower conversion rate

Ken Marek

General commentsCircuits as shown produce only unipolar

outputReplacing ground with –Vref will allow Vout to

be positive or negative

Ken Marek

DAC Specifications: Reference Voltages Resolution Speed Settling Time Linearity

Cheng Shu Ngoo

Reference VoltageDetermines Characteristic of DACs

Set externally or Generated inside DACVref sets maximum DAC output voltage (if not amplified)Full scale output voltage:

Vref determines analog output voltage changes to steps taken by 1 LSB of digital input signal (resolution)

Cheng Shu Ngoo

BAkX X = analog outputk = ConstantA = Vref analogB = Binary (digital) input

n

nref

fso

VE

2

)12()(

Reference Voltage

Internal vs. External Vref?

Internal External

•Non-Multiplier DAC

•Vref fixed by manufacturer

•Qualified for specified temperature range

•Multiplying DAC

•Vary Vref

•Consider current required•Consider Voltage range•Consider dynamic effects of inner structure

Cheng Shu Ngoo

*Multiplying DAC is advantageous considering the external reference.

Resolution

1 LSB (digital)=1 step size for DAC output (analog)

Increasing the number of bits results in a finer resolution Most DAC - 8 to 16-bits (256 to 65,536 steps)

e.g. 5Vref DAC

1LSB=5/28 =0.0195V resolution (8-bit)

1LSB=5/23 =0.625V resolution (3-bit)

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

58-bit Resolution

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

53-bit Resolution

1 LSB

nrefV

2Resolution

Cheng Shu Ngoo

Speed (Max. Sampling Frequency)

The maximum rate at which DAC is reproducing usable analog output from digital input register

Digital input signal that fluctuates at/ has high frequency require high conversion speed

Speed is limited by the clock speed of the microcontroller (input clock speed) and the settling time of the DAC

Shannon-Nyquist sampling theorem fsampling ≥ 2fmax

Eg. To reproduce audio signal up to 20kHz, standard CD samples audio at 44.1kHz with DAC ≥40kHz

Typical computer sound cards 48kHz sampling freq>1MHz for High Speed DACs

Cheng Shu Ngoo

Settling Time

The interval between a command to update (change) its output value and the instant it reaches its final value, within a specified percentage (± ½ LSB)

Ideal DAC output would be sequence of impulses Instantaneous update

Causes: Slew rate of output amplifierAmount of amplifier ringing and signal overshoot

Faster DACs have shorter settling timeElectronic switching fastAmplifier settling time dominant effect

Cheng Shu Ngoo

Settling TimeCheng Shu Ngoo

tsettle

DAC Linearity

The difference between the desired analog output and the actual output over the full range of expected values

Does the DAC analog output vary linearly with digital input signal? Can the DAC behavior follow a constant Transfer Function

relationship? Ideally, proportionality constant – linear slope Increase in input increase in output monotonic Integral non-linearity (INL) & Differential non-linearity (DNL)

010101000011001000010000Digital Input Signal

Ana

log

Out

put

Sig

nal

010101000011001000010000 010101000011001000010000Digital Input Signal

Ana

log

Out

put

Sig

nal

010101000011001000010000Digital Input Signal

Ana

log

Out

put S

igna

l

010101000011001000010000 010101000011001000010000Digital Input Signal

Ana

log

Out

put S

igna

l

Cheng Shu Ngoo

Linear Non-Linear

Types of DAC ErrorsGain ErrorOffset ErrorFull Scale ErrorNon-Monotonic Output ErrorDifferential Nonlinearity ErrorIntegral Nonlinearity ErrorSettling Time and Overshoot ErrorResolution ErrorSources of Errors

Heather Humphreys

Gain ErrorSlope deviation

from ideal gainLow Gain: Step

Amplitude Less than Ideal

High Gain: Step Amplitude Higher than Ideal

Heather Humphreys

Offset ErrorThe voltage offset

from zero when all input bits are low

*This error may be detected when all input bits are low (i.e. 0).

Heather Humphreys

Full-Scale ErrorIncludes gain error

and offset errorOccurs when there

is an offset in voltage form the ideal output and a deviation in slope from the ideal gain.

Error at full scale – contrast with offset error at zero

Heather Humphreys

Non-Monotonic Output ErrorA form of non-linearity, due to errors in

individual bits of the inputRefers to output that is not monotonic

Heather Humphreys

Differential Nonlinearity ErrorThe largest difference between

the actual and theoretical output as a percentage of full-scale output voltage.

Voltage step size differences vary as digital input increases. Ideally each step should be equivalent.

In other words, DNL error is the difference between the ideal and the measured output responses for successive steps.

An ideal DAC response would have analog output values exactly one code (LSB) apart (DNL = 0).

Heather Humphreys

Integral Nonlinearity ErrorOccurs when the output voltage is non linear;

an inability to adhere to the ideal slope.INL is the deviation of an actual transfer

function from a straight line. After nullifying offset and gain errors, the straight line is either a best-fit straight line or a line drawn between the end points of the transfer function.

INL is often called 'relative accuracy.'

Heather Humphreys

Settling Time and Overshoot Error

• Settling Time: The time required for the voltage to settle within +/- the voltage associated with the VLSB. Any change in the input time will not be reflected immediately due to the lag time.

• Settling time generally determines maximum operating frequency of the DAC

• One of the principal limiting factors of any commercial DAC is the settling time of the op-amp

• Overshoot: occurs when the output voltage overshoots the desired analog output voltage.

Heather Humphreys

Resolution Errors• Inherent errors associated with resolution

– More Bits => Less Error & Greater Resolution– Less Bits => More Error & Less Resolution– Q: How does very high resolution affect measurements?

A: LSB may be in noise range and not produce an output; it may be difficult to find an op-amp to amplify such small current

bitsof#2

Voltage RefResolution

Poor Resolution (1 Bit)

Better Resolution (3 Bit)

Heather Humphreys

Sources of ErrorsDeviation of voltage sources from nominal

values

Variations and tolerances on resistance values

Non-ideal operational amplifiers

Other non-ideal circuit components, temperature dependence, etc.

Heather Humphreys

Project ApplicationsMotor speed controllerSolenoid valves (pneumatics) Digital Motor ControlComputer PrintersSound Equipment (e.g. CD/MP3 Players,

etc.)Electronic Cruise ControlDigital Thermostat

Woongsik Ham

References Previous student presentations and… http://en.wikipedia.org/wiki/Digital_to_analog http://www.allaboutcircuits.com/vol_4/chpt_13/index.html Alicatore, David G. and Michael B Histand. Introduction to

Mechatronics and Measurement Systems, 2nd ed. McGraw-Hill, 2003.

http://www.emersonprocess.com/fisher/products/fieldvue/dvc/ http://auto.howstuffworks.com/cruise-control.htm http://www.thermionics.com/smc.htm Maxim AN641 Glossary http://www.electrorent.com/products/search/

General_Purpose_Oscilloscopes.html http://www.bkprecision.com/

power_supplies_supply_generators.htmhttp://hyperphysics.phy-astr.gsu.edu/hbase/electronic/

dac.html#c4

top related