Digital Electronics and Computer Interfacing Tim Mewes 5. Computer Interfacing – DAQ cards
Feb 01, 2016
Digital Electronics and Computer Interfacing
Tim Mewes
5. Computer Interfacing – DAQ cards
Digital Electronics and Computer Interfacing 2
5.4 Digital to Analog conversion
5.4.1 Operational Amplifiers• Short: “Op-Amp”
• DC coupled amplifier withtwo inputs and one output
• Feedback network determines gain
Voltage Rule:The output attempts to do whatever is necessary to make the voltage difference between the inputs zero.
Current Rule:The inputs draw no current.
Golden rules (Horowitz & Hill):
VSupl. +
VSupl. -
Invertinginput
Non-invertinginput
Output
Digital Electronics and Computer Interfacing 3
5.4.1 Operational Amplifiers
Summing amplifier
VSupl.+
VSupl. -
VOut
V1
V2
R1
R2 R3A
Current Rule non-inverting input ‘+’ draws no current thus it is at ground potential
Current Rule
032
2
1
1 R
V
R
V
R
V out
32
2
1
1
R
V
R
V
R
V out
)( 211
321 VV
R
RVRR out
)( 21321 VVVRRR out
Voltage Rule inverting input ‘-’ (and thus A) is at virtual ground potential
Digital Electronics and Computer Interfacing 4
5.4.2 DAC using scaled resistors
VSupl.+
VSupl. -
VOut
V
8R
4R R
2R
R
0
1
2
3
LSB
MSB
4-Bit Digital to Analog converter
For n bits the largest resistor needs to be 2n-1 times as large as the smallest one!
Resistors need to be veryprecise!
Impractical for large numberof bits n
Digital Electronics and Computer Interfacing 5
5.4.2 DAC using scaled resistors
VSupl.+
VSupl. -
VOut
V=-8 V
8R
4R R
2R
R
0
1
2
3
LSB
MSBHow does it work?!
1
0
0
1
Voltage rule: Inverting input ‘-’ is at ground
Current rule:
08
R
V
R
V
R
V out
outVV )18
1(
VoltsVout 9)81(
10012=18+04+02+11=910
4-Bit Digital to Analog converter
Digital Electronics and Computer Interfacing 6
5.4.2 DAC using scaled resistors
VSupl.+
VSupl. -
VOut
V=-8 V
8R
4R R
2R
R
0
1
2
3
LSB
MSBHow does it work?!
1
0
1
0
Voltage rule: Inverting input ‘-’ is at ground
Current rule:
048
R
V
R
V
R
V out
outVV )4
1
8
1(
VoltsVout 3)21(
00112=08+04+12+11=310
4-Bit Digital to Analog converter
Digital Electronics and Computer Interfacing 7
5.4.2 R-2R ladder DAC
VSupl.+
VSupl. -
VOut
V
2R
2R R
2R
2R
3
2
1
0
MSB
LSB
4-Bit Digital to Analog converter2R
R
R
R
Only requires resistancevalues R and 2R
Resistors still need to be precise!
Can be used for arbitrarynumber of bits
Digital Electronics and Computer Interfacing 8
1
0
1
0
5.4.2 R-2R ladder DAC
VSupl.+
VSupl. -
VOut
V=-16 Volts
2R
2R R
2R
2R
3
2
1
0
MSB
LSB
4-Bit Digital to Analog converter2R
R
R
R
How does it work?!
Voltage rule: Inverting input ‘-’ is at ground
Current rule:
042
R
V
R
V
R
V out
outVV )4
1
2
1(
VoltsVout 1248)4
1
2
1(16
11002=18+14+02+01=1210
Why?!
Digital Electronics and Computer Interfacing 9
1
0
1
0
5.4.2 R-2R ladder DAC
VSupl.+
VSupl. -
VOut
V=-16 Volts
2R
2R R
2R
3
2
1
0
MSB
LSB
4-Bit Digital to Analog converter2R 2R
R
R
R
How does it work?!
042
R
V
R
V
R
V out
Why?!
R
2R
2R
Digital Electronics and Computer Interfacing 10
1
0
1
0
5.4.2 R-2R ladder DAC
VSupl.+
VSupl. -
VOut
V=-16 Volts
2R
2R R
3
2
1
0
MSB
LSB
4-Bit Digital to Analog converter
R
How does it work?!
042
R
V
R
V
R
V out
Why?!
2R
Digital Electronics and Computer Interfacing 11
5.4.2 R-2R ladder DAC
V=-16 Volts2R
4-Bit Digital to Analog converter
R
How does it work?!
042
R
V
R
V
R
V out
Why?!
2R
I
IGND
IVGND
R
V
RR
V
R
VI
tot 8
3
232
VGNDVGNDVGNDVGNDGND IIIIII2
3
2
1
R
V
R
VIIVGND 48
3
3
2
3
2
Digital Electronics and Computer Interfacing 12
5.4.2 R-2R ladder DAC
VSupl.+
VSupl. -
VOut
V=-16 Volts
2R
2R R
2R
2R
3
2
1
0
MSB
LSB
4-Bit Digital to Analog converter2R
R
R
R
Summary
)16842
( 0123 VVVVVout
ibitondependingVolts
VoltsVi
0
16
VoltsVout 1028)16
0
8
1
4
0
2
1(16
1
1
0
0
10102=18+04+12+01=1010
Digital Electronics and Computer Interfacing 13
5.4.3 Definitions
• Voltage resolution V: smallest voltage difference possible with DACdepends on the number n of bits used:
12minmax
n
VVV t
• Sampling rate fS
tfS
1