ADC and DAC

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Module 5

ADC and DAC


Data conversion Systems
• Both data about the physical world and control
signals sent to interact with the physical world are
typically "analog" or continuously varying quantities.

• In order to use the power of digital electronics, one


must convert from analog to digital form on the
experimental measurement end and convert from
digital to analog form on the control or output end of
a laboratory system.
Data Collection and Control
Analog to Digital Conversion

2-Step Process
• Quantizing - breaking down analog value is a
set of finite states
• Encoding - assigning a digital word or number
to each state and matching it to the input
signal
Quantizing
The number of possible states that the converter can
output is:
N=2n
where n is the number of bits in the AD converter

Example: For a 3 bit A/D converter, N=23=8.

Analog quantization size:


Q=(Vmax-Vmin)/N = (10V – 0V)/8 = 1.25V
Step 1: Quantizing
Output Discrete Voltage
Example: States Ranges (V)
For an analog signal 0 0.00-1.25
in the range 0-10V, 1 1.25-2.50
obtain the discrete
2 2.50-3.75
states in a 3 bit A/D
converter. 3 3.75-5.00
4 5.00-6.25
5 6.25-7.50
6 7.50-8.75
7 8.75-10.0
Encoding
Output Output Binary Equivalent
• Here we assign the States
digital value (binary 0 000
number) to each state
1 001
for the computer to
read. 2 010
3 011
4 100
5 101
6 110
7 111
What is a DAC?
• A digital to analog converter (DAC) converts a digital
signal to an analog voltage or current output.

100101…
DAC
3 bit DAC output waveform
Digital-to-Analog Conversion

• Data in clean binary digital form can be


converted to an analog form by using a
summing amplifier.
• For example, a simple 4-bit D/A converter can
be made with a four-input summing amplifier.
Summing Amplifier
Inverting summer circuit is an
operational amplifier using
negative feedback for controlled
gain, with several voltage inputs
and one voltage output.
The output voltage is the inverted
(opposite polarity) sum of all input
voltages:
K CL @" A "
i i i
a b c
 i f

v v v v
a
 b
 c
  out

R a
R b
R c
R f

R R R 
v   v  v  f
v  f f

R 
out a b c
R Ra b c
Digital-to-Analog Conversion

• 2 Basic Approaches

– Weighted Summing Amplifier


– R-2R Network Approach
Weighted Resistor DAC
• For a simple inverting summer circuit, all resistors must be
of equal value.
• If any of the input resistors were different, the input
voltages would have different degrees of effect on the
output, and the output voltage would not be a true sum.
• Suppose, input resistor values at multiple powers of two:
R, 2R, and 4R, instead of all the same value R:
Binary Weighted Resistor DAC
Voltages V1 through Vn are
Vref
Vref if corresponding bit is high V1
or R
ground if corresponding bit is low V2 2R I Rf

V1 is most significant bit V3 4R


- Vout
Vn is least significant bit +
Vn 2n-1R

MSB

LSB
 V1 V2 V3 Vn 
Vout   IRf   Rf      n -1 
 R 2R 4R 2 R
3 bit binary-weighted DAC
Binary Weighted Resistor

If Rf=R/2
 V1 V2 V3 Vn 
Vout   IRf       n 
2 4 8 2 
For example, a 3-Bit converter

Vout = - Vref (b3/2+ b2/4+ b1/8)


08 1 1 1 -7VR/8 +7VR/8
3 bit DAC output waveform
With Vref negative (-10V) and Rf= R/2
Input Discrete
States output
Voltage (V)
000 0.0
001 1.25
010 2.50
011 3.75
100 5.00
101 6.25
110 7.50
Vout = - Vref (b3/2+ b2/4+ b1/8) 111 8.75
Weighted Resistor D/A Converter
• Uses a parallel network of binary-weighted
resistors to feed the op-amp.
• Seldom used since a wide range of resistor
values is required for a large number of bits.
• Difficult to achieve accuracy for a high number
of bits.
Weighted Resistor D/A Converter
• Advantages
– Simple Construction/Analysis
– Fast Conversion
• Disadvantages
– Requires large range of resistors (2000:1 for 12-bit DAC)
with necessary high precision for low resistors
– Expensive. Therefore, usually limited to 8-bit resolution.
R-2R Ladder DAC
• Produces an analog current that is the sum of
binary-weighted currents.
• Uses only two values of resistors.
• Easily modified to add additional bits – each
new bit requires 2 resistors, values R and 2R.
R-2R Ladder
• Advantages
– Only two resistor values (R and 2R)
– Does not require high precision resistors
• Disadvantage
– Lower conversion speed than binary weighted
DAC
The R/2R Ladder DAC

23
R-2R Ladder DAC
R-2R Ladder DAC
R-2R Ladder DAC

 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.
R-2R Ladder
For 0001 only D0=Vref, all other inputs are at 0V and can be
treated as ground.
So finally Vref/16 volt is appearing as the input to op amp.
This value gets multiplied by the gain of op amp circuit – (Rf/Ri).
If we proceed in this manner (Thevenin equivalent reduction),
we will get

For a 4-Bit R-2R Ladder


 1 1 1 1
Vout  Vref  b3  b2  b1  b0 
 2 4 8 16 
For general n-Bit R-2R Ladder or Binary Weighted Resister DAC
n
1
Vo u t  Vref b
i 1
n i
2i
Important Specifications of DACs
• Resolution
• Speed
• Linearity
Resolution
• Smallest analog increment corresponding to 1
LSB change
• An N-bit resolution can resolve 2N distinct
analog levels
• Common DAC has a 8-16 bit resolution

Vref
Resolution  VLSB 
2N
where N  number of bits
Speed
• Rate of conversion of a single digital input to
its analog equivalent
• Conversion rate depends on
– clock speed of input signal
– settling time of converter
• When the input changes rapidly, the DAC
conversion speed must be high.
Linearity
• Ideally, a DAC should produce a linear relationship
between the digital input and analog output

Linearity (Ideal) Non-Linearity


Analog Output Signal

Analog Output Signal

0000 0001 0010 0011 0100 0101 0000 0001 0010 0011 0100 0101
Digital Input Signal Digital Input Signal
Analog to Digital Conversion
2-Step Process
• Quantizing - breaking down analog value is a
set of finite states
• Encoding - assigning a digital word or number
to each state and matching it to the input
signal
ADC Basic Principle
• The basic principle of operation is to use the
comparator to determine whether or not to
turn on a particular bit of the binary number
output.
• It is typical for an ADC to use a digital-to-
analog converter (DAC) to determine one of
the inputs to the comparator.
A/D Converter Types

–Flash ADC
–Dual Slope (integrating) ADC
–Successive Approximation ADC
Overall Better Accuracy

• Increasing both the sampling rate and the resolution you


can obtain better accuracy in your AD signals.
Flash ADC
• Consists of a series of comparators, each one
comparing the input signal to a unique reference
voltage.

• The comparator outputs connect to the inputs of


a priority encoder circuit, which produces a
binary output
• Highest speed ADC
• Requires 2N-1 comparators for a N bit converter
The Op-amp comparator compares one
analogue voltage level with another analogue
voltage level, or some preset reference voltage,
VREF and produces an output signal based on this
voltage comparison.
Flash ADC Circuit
3 bit Flash ADC
How Flash Works
• As the analog input voltage exceeds the
reference voltage at each comparator, the
comparator outputs will sequentially saturate
to a high state.
• The priority encoder generates a binary
number based on the highest-order active
input, ignoring all other active inputs.
Truth Table

The priority encoder generates a binary number based on the highest-order


active input, ignoring all other active inputs.
Flash

Advantages Disadvantages
• Simplest in terms of • Lower resolution
operational theory • Expensive
• Fo it ADC it e ui e
• Most efficient in terms of 2n -1 comparators
speed, very fast
Block diagram of a 4 bit Successive - approximation ADC .
It consists of a DAC, Successive-Approximation Register (SAR),
and a comparator

44
Successive approximation ADC

Block diagram
Successive approximation ADC
1. Set the MSB of the digital representation to 1, all
other bits to 0.
2. Compare the analog value produced in the first
step to the voltage being converted.
2A. If the test voltage is higher than the voltage being
converted, reset the MSB and set the second MSB.
2B. If the test voltage is less than the voltage being
converted, leave the MSB set and set the second MSB.
3. Repeat Steps 2, 2A, and 2B until all the bits have
been tested.
Successive Approximation
Advantages Disadvantages

• Capable of high speed and • Higher resolution successive


reliable app oxi atio ADC s will e
• Good tradeoff between slower
speed and cost • Medium accuracy compared
• It uses only one comparator to other ADC types
• Low power consumption
Dual Slope ADC
• Also known as Counter-Ramp or Digital Ramp
ADC
• Slowest converter
• Relatively inexpensive
• Not used in data acquisition applications
• A dual slope ADC is commonly used in
measurement instruments (digital multimeters)
Dual Slope ADC

A dual slope ADC is common in digital voltmeters and other type of measurement
instruments.

49
Dual Slope Converter
Vin
tFIX tmeas
t

• The sampled signal charges a capacitor for a fixed


amount of time
• By integrating over time, noise integrates out of the
conversion
• Then the ADC discharges the capacitor at a fixed rate
with the ou te ou ts the ADC s output its. A lo ge
discharge time results in a higher count
Dual Slope ADC- operation
• Assume that the counter is reset and output of integrator is
zero
• When an analog value is applied the capacitor begins to
charge in a linear manner
• The counter continues to count until it reaches a
predetermined value. Once this value is reached the count
stops and the counter is reset.
• The control logic switches the input to the first comparator
to a reference voltage, providing a discharge path for the
capacitor.
• As the capacitor discharges the counter counts.
• When the capacitor voltage reaches the reference voltage
the count stops and the value is stored in the register.
Dual Slope ADC

52
Dual Slope Converter
Advantages Disadvantages
• Input signal is averaged • Slow
• Greater noise immunity • High precision external
than other ADC types components required to
• High accuracy achieve accuracy
ADC Types Comparison

Type Speed (relative) Cost (relative)

Dual Slope Slow Med

Flash Very Fast High

Successive Appox Medium – Fast Low

Sigma-Delta Slow Low

You might also like