Upload
ahmed-salad
View
8.961
Download
13
Embed Size (px)
DESCRIPTION
understanding is more easily by:ahmed salad osman
Citation preview
1
UNIVERSITY OF HORMUUD
Analog to digital converter
And
Digital to analog converter
By: Ahmed Salad Osman
1
2
Part one
And
Part two2
3
analog to digital converter
Part one
3
4
Outline
DefinitionWhy we need ADCTypes ADC and each basic operationApplications of analog to digital converter
4
5
Definition
An electronic integrated circuit which transforms a signal from analog(continues) to digital(discrete) form
Analog signals are directly measurable quantities
Digital signals only have two states for digital computer we refer to binary states, 0 and 1
5
6
Continue
The heart of computer-based data acquisition is usually the analog to digital converter
Basically this device is digital volt meterDigital Systems require discrète digital data
Digital System?Analog Digital
6
7
Continue
Digital computers require signals to be in digital form whereas most instrumentation transducers have an output signal in analogue form.
ADC conversion is therefore required at the interface between analogue transducers and the digital computer
7
8
• Voltmeter
Examples of use
• Cell phone (microphone)
ΔV 7.77 V
Wave
Voice
8
9
Why we need ADC
Microprocessors can only perform complex processing on digitized signals
When signals are in digital form they are less susceptible to the deleterious effects of additive noise
ADC Provides a link between the analog world of transducers and the digital world of signal processing and data handling.
9
10
Types of analog to digital converter
There are many different types of analog to digital converters
Each offers something in the way ofSpeedCostPower dissipationcomplexity
10
11
Types of analog to digital converter
Counter typeSuccessive approximationThere are many types such as flash
type and sigma-delta but we will cover these two types
11
12
Counter type
One of the simplest types of analog to digital converter is counter type ADC
The input signal of ADC is connected to the signal input of its internal comparator
The ADC then systematically increases the voltage of the reference input of the comparator until the reference becomes larger than the signal
12
13
Continue
And the comparator output goes to 0Ex: consider an input signal is 4.78 volts. The
initial comparator’s input would be 2.5 voltsThe comparator compares the two value then
the result this is less than 4.78 then the next higher voltage (5.00 volts) is applied
The comparator compares the two value and says this is greater than 4.78 and switches 0
13
14
Continue
The digital output of the ADC is the number of times the ADC increase the voltage after starting at the initial 2.5 volts
This scheme is relatively simple , but as the number of ADC increases the time it takes to scan through all possible values lower than input will grow quickly
14
15
Components of counter type
This type of converter uses some type of counter as part of its operation
Counter type contains the following elements:Digital to analog converterSome type of counting mechanismComparatorclock
15
16
Features of counter type
Use a clock to index the counterUse DAC to generate analog signal to
compare against inputComparator is used to compare VIN and VDAC
where VIN is the signal to be digitizedThe input to the DAC is from the counter
16
17
Operation of counter type
Control Logic
D A C Counter
START
Vin
Comparator
Digital Output
clock
17
18
Operation of counter type
Control Logic
D A C Counter
START
Vin
Comparator
Digital Output
clock
18
19
Successive approximation
A Successive Approximation Register (SAR) is added to the circuit
Instead of counting up in binary sequence, this register counts by trying all values of bits starting with the MSB and finishing at the LSB.
The register monitors the comparators output to see if the binary count is greater or less than the analog signal input and adjusts the bits accordingly
20
Continue
The SAR architecture mainly uses the binary search algorithm
The SAR ADC consists of fewer blocks such as one comparator, one DAC (Digital to Analog Converter) and one control logic.
The algorithm is very similar to like searching a number from telephone book
20
21
How Successive Approximation Works
• Example : analog input = 6.428v, reference = 10.000vMSB5.000V
2SB2.500V
3SB1.250V
LSB0.625V
VIN > 5.000V VIN > 6.875VVIN > 6.250VVIN > 7.500V
YES
1
NO
0
YES
1
NO
0
21
22
Applications
Scanner : when you scan a picture with a scanner , what scanner is doing is an analog to digital conversion : it is taking the analog information provided by the picture(light) and converting into digital
Recording a voice : when u=you record your voice or use a VoIP solution on your computer you r using analog to digital converter to convert you voice , which is analog into digital information
22
23
Part two
Digital to analog converter
23
24
Outline
DefinitionTypes of DAC and each operationDAC performance specificationsApplications of ADC
24
25
Definition
To convert digital values to analog voltagePerforms inverse operation of analog to digital
converter
DAC100101…
26
What is DAC
10111001 10100111 10000110010101000011001000010000
An
alog
ou
tput
sig
nal
Digital input signal
27
Continue
ANALOGOUTPUT
DIGITALINPUT
REFERENCEINPUT
RESOLUTION= N BITS
RESOLUTION= N BITS
Digital Input Analog Output = x Reference Input
(2N - 1)
27
28
continue
ADC is function that converts digital data(usually binary) into analog signal(current , voltage, or electric charge)
digital-to-analog converter, a device (usually a single chip) that converts digital data into analog signals.
Modems require a DAC to convert data to analog signals that can be carried by telephone wires.
Video adapters also require DACs, called RAMDACs, to convert digital data to analog signals that the monitor can process.
28
29
Types of DAC
There are two types of ADCWeighted Resistor or Resistive Divider type
And there is an other type of R -2R ladder
Digital to analog converter
01
2
n-2
N bit digital data
Analog data
29
30
Weighted Resistors
• In this type of DAC components used is– Operational amplifier– Switches– Resistors– Voltage source– Ground
Rf = R
8R4R2RR
-VREF
iI
LSB
MSB
30
31
Definition of weighted resistors
Binary Weighted resistors are used to distinguish each bit from the most significant to the least significant
Binary weighted resistors Reduces current by a factor of 2 for each bit
31
32
Continue
Binary Weighted resistors is reliable, and simple to do
The circuit shown is a digital to analog converter 4-bits weighted binary resistance network circuit types.
Resistor values can be calculated using the weight of the binary number.
32
33
Circuit diagram of weighted resistors
33
34
Weighted Binary Resistance Network
20K
RF
18.7K 150K37.5K 75K
R4 R3 R2R1
3V
ABCD
VVVO
UT
-
+Vout
-
+Vout
Weighted Binary Resistance Network Circuit
34
35
Continue
For exampleReferring to the circuit as shown, the highest
value resistor (150KΩ) is a digital input resistor. The smallest bit (least significant bit), and the values of other resistor is
35
36
Circuit analysis to find Vout
R1 = 150KΩ, RF = 20KΩ, Vref = 3V
Voltage Gain (AV) = RF = 20KΩ = 0.133
R1 150KΩ
Vout = Vref X AV
= 3V X 0.1333
= 0.4V
If binary input is 0001
36
37
Continue If binary input is 0110
R2 = 75KΩ, R3 = 37.5KΩ, RF = 20KΩ, Vref = 3V
RT = R2//R3 = 25KΩ
Voltage Gain (AV) = RF = 20KΩ = 0.8 RT 25KΩ
Vout = Vref X AV
= 3V X 0.8= 2.4V
37
38
Calculate
If binary input is 1100
R3 = 37.5KΩ, R4=18.75 RF = 20KΩ, Vref = 3V
RT = R3//R4 = 12.5KΩ
Voltage Gain (AV) = RF = 20KΩ = 1.6
RT 12.5KΩ
Vout = Vref X AV
= 3V X 1.6= 4.8
38
39
Simply that we can see the resulting output is shown in the table below
Decimal Digital input Vout (V)D C B A0 0 0 0 0 01 0 0 0 1 0.42 0 0 1 0 0.83 0 0 1 1 1.24 0 1 0 0 1.65 0 1 0 1 2.06 0 1 1 0 2.47 0 1 1 1 2.88 1 0 0 0 3.29 1 0 0 1 3.6
10 1 0 1 0 4.011 1 0 1 1 4.412 1 1 0 0 4.813 1 1 0 1 5.214 1 1 1 0 5.615 1 1 1 1 6.0
39
40
Example
Find output voltage and current for a binary weighted resistor DAC of 4 bits where :
R = 10 k Ohms, Rf = 5 k Ohms and VR = 10 Volts. Applied binary word is 1001.
40
41
Solution
Rf = (R/2)
R2R4R8RVo
VR
1-bit
MSB
2-bit3-bit4-bit
iI
41
42
Solution Cont’d
V625.5)A001125.0)(10*5(
IR- V
A 0.001125-
10*2
1
10*2
0
10*2
0
10*2
1V10
30
0f0
0
43424140
V
I
Io
42
43
Solution Cont’d
Binary input = 1001 = 9
From example, V0 = 5.625V
V0/VR = 5.625V/10V = 9/16
43
44
Binary Weighted Resistor
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
Requires low switch resistances in transistors Can be expensive. Therefore, usually limited to
8-bit resolution.
44
45
Limitations of binary weighted
Has problems if bit length is longer than 8 bitsFor example, if R = 10 k Ohms
R8 = 28-1(10 k Ohms) = 1280 k Ohms
If VR = 10 Volts,
I8 = 10V/1280 k Ohms = 7.8 AOp-amps to handle those currents are expensive
because this is usually below the current noise threshold.
45
46
Limitations Cont’d
If R = 10 Ohms and Vref = 10 V
I = VR/R = 10V/10 Ohms = 1 A
This current is more than a typical op-ampcan handle.Large resistors more error
46
47
DAC performance specification
ResolutionReference VoltagesSettling TimeLinearitySpeedErrors
47
48
Resolution
Resolution: is the amount of variance in output voltage for every change of the LSB in the digital input.
How closely can we approximate the desired output signal(Higher Res. = finer detail=smaller Voltage divisions)
A common DAC has a 8 - 12 bit Resolution
NLSB
VV
2Resolution Ref N = Number of bits
48
Resolution continue
49
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
49
50
Reference voltage
Reference Voltage: A specified voltage used to determine how each digital input will be assigned to each voltage division.
Types:Non-multiplier: internal, fixed, and defined by
manufacturerMultiplier: external, variable, user specified
50
51
Reference voltage typesNon-Multiplier: (Vref = C)
Digital Input
4
3C
2
C
4
C
0
Voltage
00
01 01
00
10 10
11
Multiplier: (Vref = Asin(wt))
0
Voltage
Digital Input
4
3A
2
A
4
A
00 00
01 01
10 10
11
51
52
Settle time
Settling Time: The time required for the input signal voltage to settle to the expected output voltage(within +/- VLSB).
Any change in the input state will not be reflected in the output state immediately. There is a time lag, between the two events.
52
53
Settle time continue
• Analog Output Voltage
• Expected Voltage
• +VLSB
• -VLSB
• Settling time• Time
53
54
Linearity
Linearity: is the difference between the desired analog output and the actual output over the full range of expected values.
Ideally, a DAC should produce a linear relationship between a digital input and the analog output, this is not always the case.
54
55
Linearity continue
Linearity(Ideal Case)
Digital Input
Perfect Agreement
Desired/Approximate Output
Ana
log
Out
put V
olta
ge
NON-Linearity(Real World)
Ana
log
Out
put V
olta
ge
Digital Input
Desired Output
Miss-alignment
Approximate output
55
56
Speed
Speed: Rate of conversion of a single digital input to its analog equivalent
Conversion Rate Depends on clock speed of input signalDepends on settling time of converter
56
57
Errors
Non-linearityDifferentialIntegral
GainOffset
57
58
Non linearity: differential
Differential Non-Linearity: Difference in voltage step size from the previous DAC output (Ideally All DLN’s = 1 VLSB)
Digital Input
Ideal Output
Ana
log
Out
put V
olta
ge
VLSB
2VLSB Diff. Non-Linearity = 2VLSB
58
59
Non linearity: integral
Integral Non-Linearity: Deviation of the actual DAC output from the ideal (Ideally all INL’s = 0)
Digital Input
Ideal Output
1VLSB Int. Non-Linearity = 1VLSB
Ana
log
Out
put V
olta
ge
59
60
Gain error
Gain Error: Difference in slope of the ideal curve and the actual DAC output
High Gain Error: Actual slope greater than ideal
Low Gain Error: Actual slope less than ideal
Digital Input
Desired/Ideal OutputA
nalo
g O
utpu
t Vol
tage
Low Gain
High Gain
60
61
Offset
Offset Error: A constant voltage difference between the ideal DAC output and the actual.– The voltage axis intercept of the DAC output curve is different than the
ideal.
Digital Input
Desired/Ideal OutputOutput Voltage
Positive Offset
Negative Offset
61
62
Applications of DAC
Digital Motor ControlComputer PrintersSound Equipment (e.g. CD/MP3 Players, etc.)Function Generators/OscilloscopesDigital Audio
62
63
References
• Callis, J. B. “The Digital to Analog Converter.” 2002. http://courses.washington.edu/jbcallis/lectures/C464_Lec5_Sp-02.pdf. 14 March 2006
• “DAC.” 2006. http://en.wikipedia.org/wiki/Digital-to-analog_converter#DAC_types. 14 March 2006.
• Johns, David and Ken Martin. “Data Converter Fundamentals.” © 1997. http://www.eecg.toronto.edu/~kphang/ece1371/chap11_slides.pdf. 14 March 2006
• Goericke, Fabian, Keunhan Park and Geoffrey Williams. “Digital to Analog Converter.” © 2005. http://www.me.gatech.edu/mechatronics_course/DAC_F05.ppt. 14 March 2006
64
end64
65
Questions