Download docx - Instructure

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

CMOS wikipedia , lookup

Power MOSFET wikipedia , lookup

Ohm's law wikipedia , lookup

Integrated circuit wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Multimeter wikipedia , lookup

Transistor–transistor logic wikipedia , lookup

Index of electronics articles wikipedia , lookup

Surge protector wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Regenerative circuit wikipedia , lookup

Integrating ADC wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Current mirror wikipedia , lookup

Power electronics wikipedia , lookup

Two-port network wikipedia , lookup

Operational amplifier wikipedia , lookup

RLC circuit wikipedia , lookup

Schmitt trigger wikipedia , lookup

Network analysis (electrical circuits) wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Opto-isolator wikipedia , lookup

Rectiverter wikipedia , lookup

Transcript
ECE 3300 Lab 2
ECE 1250 Lab 3
Name ________________________ Lab Section ___ Student Folder # ____
R2R Digital-to-Analog Converter
Overview: In this lab you will:
 Build an R-2R ladder Digital-to-Analog converter for converting binary numbers to
analog voltages
The Digital-to-Analog (D/A) circuit you build in this lab is like the one in your MP3
player that turns a series of stored binary numbers (patterns of 1's and 0's) into voltages
that represent a music waveform. The 1's and 0's are just voltages that are high (+5 V in
our case) and low (0 V). In this lab, you will use dip switches to connect inputs of a
circuit to a 1 (+5 V) or to a 0 (0 V = reference).
Our D/A circuit will have three binary inputs, which allows us to have eight binary
patterns of input: 000, 001, 010, 011, 100, 101, 110, 111. For each binary input, our
circuit will output a different voltage that is proportional to the binary input. Thus, we
are building a digital power supply. This circuit will output a voltage equal to the binary
number input times 5V/8.
Equipment List:
 MyDAQ board with cables. (You can hook them to the lab computers if you don’t
want to bring your laptop.)
 Print out the lab handout and bring it with you.
 Multisim software.
 From previous labs:
o Breadboard & wire kit
 Additional parts:
o 7 Resistors: values to be determined in lab
o Dip switch module (optional but convenient)
Instructions & Reference Material:
 MyDAQ as voltmeter
https://utah.instructure.com/courses/266578/assignments/1347122
 Multisim demos : See DVD in back of your book.
Prelab: Analyze D/A and Solve Using MATLAB (35 points)
1. Binary numbers: The Digital-to-Analog (D/A) converter circuit that constitutes our
digital power supply is shown below in Fig. 1. Each of the voltage sources, v0, v1,
and v2, will be set to either 0 V or 5 V to represent a 0 or a 1 in binary. The three
binary digits create a binary number where v0 is the 4's digit, v1 is the 2's digit, v2 is
the 1's digit. For example, (v0, v1, v2) = (1, 1, 0) = 1*4 + 1*2 + 0*1 = 6, and
(v0, v1, v2) = (0, 1, 0) = 0*4 + 1*2 + 0*1 = 2.
1
UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu
ECE 1250 LAB 3
Fig. 1 R-2R ladder D/A circuit with 3 inputs.
Complete the second column of Table I, below. That is, write the binary
representation for the decimal numbers 0 through 7. In the remainder of this lab, you
will fill in the last three columns of Table I.
TABLE I
DIGITAL TO ANALOG CONVERTER VALUES
Number
0
1
2
3
4
5
6
7
Binary (v0, v1, v2)
vD/A (Matlab)
vD/A (multisim)
vD/A (measured)
010
110
WRITEUP: Show Table I with Binary numbers in 2nd column.
2. Node-Voltage equations for the D/A circuit: Write one equation for each of node
voltages vA, vB, and vD/A. Use symbolic names for the resistances and voltage
sources v0, v1, and v2. Note that we add a node for vD/A as though it were an
essential node. This is convenient because it is the circuit output. We can, of course,
add nodes wherever we like.
You should find that you can multiply both sides of your equations to cancel out R.
In other words, the output voltage does not depend on R. This means that, so long as
the ratios of the resistor values is precise, the particular value of R does not matter. It
is possible to control the ratios of resistances precisely on integrated circuits, but not
the value of R. Thus, we can make very accurate D/A converters even though we
cannot make accurate resistors!
WRITEUP: Show your derivation of node-voltage equations (with R eliminated).
2
UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu
ECE 1250 LAB 3
3. Now rearrange your equations to put them in matrix form, and verify that you get the
following matrix equation:
é 2 -1
0
ê
ê -1 5 / 2 -1
êë 0 -1 3 / 2
ùé
úê
úê
úû ê
ë
ù é
ú ê
vB ú = ê
vD/A ú ê
û ë
vA
v2 / 2 ù
ú
v1 / 2 ú
v0 / 2 ú
û
(1)
Use MATLAB to solve (1) and determine the expected output voltage, vD/A, from the
D/A circuit for each of the possible binary inputs in Table I. For example, when the
binary input is 101, the input voltages are the following:
v0 = 5 V (binary 1 in 4's digit)
v1 = 0 V (binary 0 in 2's digit)
v2 = 5 V (binary 1 in 1's digit)
WRITEUP: Attach a copy of your MATLAB code and results. Also, show Table I
with 3rd column completed.
4. Use Multisim, as described in the next section, to simulate the D/A circuit. If you do
not have Multisim running on your PC yet, then do the Multisim simulation on the lab
computers.
Experiment 1: Simulate D/A Circuit Using Multisim (15 points)
Multisim: Use the Multisim circuit file for this lab provided on the class Canvas site to
simulate the R-2R ladder circuit and compare the output voltage with the results from
Prelab part 3: Lab3_DAconvertr.ms12. (You should find that vD/A is proportional to the
input number in binary.)
WRITEUP: Fill out the 4th column of Table I with Multisim results.
Experiment 2: Design, Build, and Measure D/A Circuit (50 points)
1. Design: The R-2R ladder D/A circuit is shown above in Fig. 1. The value of R
cancels out in this circuit. That is, vD/A does not depend on the value of R. In
practice, however, we want a value of R that will result in currents around 100 mA.
Much smaller currents than 100 mA result in circuit noise that is undesirably large.
Much larger currents than 100 mA result in wasted power and excessive current drain
from the power supply.
The R-2R ladder, has an interesting property that it may be extended to the left with
more voltage inputs as far as desired and its input resistance, as seen from vD/A, will
be R. Verify that the resistance seen looking into the vD/A terminal when the inputs,
v0, v1, and v2, are at reference, (i.e., the inputs are all 0 V) is R. Hint: start at the left,
combining series and parallel resistances and work your way to the right. The ladder
will collapse in an elegant way.
3
UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu
ECE 1250 LAB 3
The highest voltage drop that can occur across any resistor in the entire vD/A circuit is
5V, since the voltage sources are 0V or 5 V. Choose a value for R such that all of the
following requirements are met:
1) The current flow through R with a 5 V drop is less than 1 mA (to ensure the
myDAQ is not overloaded).
2) The power dissipated by R with a 5 V drop is less than 1/8 W.
3) The value of R is a standard 5% tolerance value:
http://www.daycounter.com/Calculators/Standard-Resistor-Value-Calculator2.phtml
WRITEUP: List the standard 5% tolerance value of R that you will use in your
circuit.
R choice:
2. Build: Construct the R-2R ladder circuit as shown in Fig. 2. For a 1, connect to the 5
V power supply. For a 0, connect to reference. If you wish, you may use dip
switches as shown in Fig. 3 to select whether inputs are 0 or 1. (If you use the dip
switches, close only the 0 switch or the 1 switch but not both for a given input at a
given time. If you close both switches at once, no harm is done, but you get strange
results.)
Fig. 2 R-2R ladder D/A circuit with 3 inputs
Fig. 3 R-2R ladder D/A with dip switches.
WRITEUP: Describe your work and show your schematic. Label resistor values
in the schematic of the circuit.
3. Measure: Use each of the binary input patterns from Table I and find the output
voltage, vD/A. Use the voltmeter on the myDAQ to measure the value of vD/A.
Compare it with the value you calculated in the Pre-lab. Comment on whether your
result is an output voltage proportional to the binary input number.
4
UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu
ECE 1250 LAB 3
WRITEUP: Complete the 6th column of Table I.
WRITEUP: Conclusion. Include a picture of your circuit (tape the picture in your
lab notebook). Comment on how well your circuit met expectations. Describe
any points that caused you difficulty. That is, what would you tell another student
to pay attention to when doing this lab?
5
UNIVERSITY OF UTAH DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
50 S. Central Campus Dr | Salt Lake City, UT 84112-9206 | Phone: (801) 581-6941 | Fax: (801) 581-5281 | www.ece.utah.edu