Computer Interfacing - Part II

Download Report

Transcript Computer Interfacing - Part II

Digital Electronics and Computer
Interfacing
Tim Mewes
5. Computer Interfacing – DAQ cards
5.4 Digital to Analog conversion
5.4.1 Operational Amplifiers
• Short: “Op-Amp”
• DC coupled amplifier with
two inputs and one output
• Feedback network determines gain
Inverting
input
VSupl. +
Output
Noninverting
input
VSupl. -
Golden rules (Horowitz & Hill):
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.
Digital Electronics and Computer Interfacing
2
5.4.1 Operational Amplifiers
Summing amplifier
R2
V2
Current Rule
 non-inverting input ‘+’ draws no current
thus it is at ground potential
A
R1
VSupl.+
V1
VOut
VSupl. -
Voltage Rule
 inverting input ‘-’ (and thus A) is at
virtual ground potential
Current Rule
V1 V2 Vout



0
R1 R2 R3
V
V1 V2


  out
R1 R2
R3
R3
R1  R2
 Vout  
R1  R2  R3
R3
(V1  V2 )
R1
 Vout  (V1  V2 )
Digital Electronics and Computer Interfacing
3
5.4.2 DAC using scaled resistors
4-Bit Digital to Analog converter
R
MSB 3
For n bits the largest resistor
needs to be 2n-1 times as
large as the smallest one!
2R
2
4R
R
1
8R
LSB
VSupl.+
Resistors need to be very
precise!
0
VOut
V
VSupl. -
Impractical for large number
of bits n
Digital Electronics and Computer Interfacing
4
5.4.2 DAC using scaled resistors
4-Bit Digital to Analog converter
R
MSB 3
1
How does it work?!
2R
2
Voltage rule:
Inverting input ‘-’ is at ground
0
4R
1
0
8R
LSB
0
R
VSupl.+
1
VOut
V=-8 V
VSupl. -
Current rule:
V V Vout

 
0
8R R
R
1
 (  1)V  Vout
8
 Vout  (1  8)  9 Volts
10012=18+04+02+11=910
Digital Electronics and Computer Interfacing
5
5.4.2 DAC using scaled resistors
4-Bit Digital to Analog converter
R
MSB 3
0
How does it work?!
2R
2
Voltage rule:
Inverting input ‘-’ is at ground
0
4R
1
1
8R
LSB
0
R
VSupl.+
1
VOut
V=-8 V
VSupl. -
Current rule:
V
V Vout



0
8R 4R
R
1 1
 (  )V  Vout
8 4
 Vout  (1  2)  3 Volts
00112=08+04+12+11=310
Digital Electronics and Computer Interfacing
6
5.4.2 R-2R ladder DAC
4-Bit Digital to Analog converter
2R
2R
Only requires resistance
values R and 2R
LSB 0
2R
R
1
R
2R
R
2
2R
R
Resistors still need to be
precise!
VSupl.+
MSB 3
VOut
V
VSupl. -
Can be used for arbitrary
number of bits
Digital Electronics and Computer Interfacing
7
5.4.2 R-2R ladder DAC
4-Bit Digital to Analog converter
2R
LSB 0
How does it work?!
0
2R
1
2R
R
Voltage rule:
Inverting input ‘-’ is at ground
0
R
2R
2
1
2R
MSB 3
R
R
VSupl.+
Current rule:
Why?!
V
V Vout



0
2R 4R
R
1
VOut
V=-16 Volts
VSupl. -

1 1
(  )V  Vout
2 4
1 1
 Vout  16  (  )  8  4  12 Volts
2 4
11002=18+14+02+01=1210
Digital Electronics and Computer Interfacing
8
5.4.2 R-2R ladder DAC
4-Bit Digital to Analog converter
2R
LSB 0
How does it work?!
0
2R
1

Why?!
V
V Vout


0
2R 4R
R
R
2R
R
1
2R
MSB 3
R
2R
0
2R
2
2R
R
R
VSupl.+
1
VOut
V=-16 Volts
VSupl. -
Digital Electronics and Computer Interfacing
9
5.4.2 R-2R ladder DAC
4-Bit Digital to Analog converter
LSB 0
1
How does it work?!
0

0
2R
2
V
V Vout


0
2R 4R
R
2R
R
1
2R
MSB 3
Why?!
R
VSupl.+
1
VOut
V=-16 Volts
VSupl. -
Digital Electronics and Computer Interfacing
10
5.4.2 R-2R ladder DAC
4-Bit Digital to Analog converter
How does it work?!

IGND
2R
2R
I
IVGND
R


V
V Vout


0
2R 4R
R
V
V
3V


Rtot 2 R  2R 8 R
3
1
3
I  IGND  IVGND  IVGND  IVGND  IVGND
2
2

V=-16 Volts
Why?!
I
IVGND 
2
23V
V
I

3
3 8 R 4R
Digital Electronics and Computer Interfacing
11
5.4.2 R-2R ladder DAC
4-Bit Digital to Analog converter
2R
LSB 0
Summary
0
2R
1
2R
R
Vout
1
R
2R
2
0
2R
MSB 3
R
R
V3 V2 V1 V0
 ( 
  )
2
4 8 16
 16Volts
Vi  
depending on bit i
 0 Volts
VSupl.+
1
VOut
V=-16 Volts
VSupl. -
1 0 1 0
Vout  16(    )  8  2  10 Volts
2 4 8 16
10102=18+04+12+01=1010
Digital Electronics and Computer Interfacing
12
5.4.3 Definitions
• Voltage resolution V:
smallest voltage difference possible with DAC
depends on the number n of bits used:
V 
Vmax  Vmin
2 1
n
t
• Sampling rate fS
1
fS 
t
Digital Electronics and Computer Interfacing
13