Download ECE 109 Laboratory Exercise 2

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

Josephson voltage standard wikipedia , lookup

Test probe wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Transistor–transistor logic wikipedia , lookup

Integrating ADC wikipedia , lookup

CMOS wikipedia , lookup

TRIAC wikipedia , lookup

Multimeter wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Operational amplifier wikipedia , lookup

Two-port network wikipedia , lookup

Schmitt trigger wikipedia , lookup

Power electronics wikipedia , lookup

Electrical ballast wikipedia , lookup

Voltage regulator wikipedia , lookup

Power MOSFET wikipedia , lookup

Surge protector wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Current source wikipedia , lookup

Opto-isolator wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Rectiverter wikipedia , lookup

Network analysis (electrical circuits) wikipedia , lookup

Current mirror wikipedia , lookup

Ohm's law wikipedia , lookup

Transcript
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
ECE 109 LABORATORY 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
OBJECTIVES

Learn how to build a circuit from a schematic using a protoboard

Learn how to output a variable voltage ±10 VDC from the myDAQ. Caution Rmin ≥ 5 K The
myDAQ output load cannot exceed 2 mA.

Understand various types of resistors and how to read their codes.

Verify Ohm’s Law

Verify Kirchhoff’s Voltage and Current Laws
EQUIPMENT REQUIRED






Protoboard---- students must provide their own. Contact SCETA 9-257 for availability.
Two banana cables---- students must supply their own.
One lot of colored clip leads---- students must supply their own clip leads.
National Instruments myDAQ---- supplied by ECE Department.
One lot of resistors ----available in the 5th floor stock/supply lab. The ratio of the smallest
resistor to the largest should be less than 5 is suggested. You will need about 5 resistors. Keep
them for future labs.
One lot of small solid wires---- AWG 20 through 24 (insulated solid wire not stranded) for
connecting to the myDAQ terminals.
National Instruments myDAQ training websites and other training videos
See experiment No. 1 for suggested web sites.
THEORY
Ohm’s Law defines the linear relationship between voltage, current, and resistance.
I=V/R
Kirchhoff’s Voltage Law, (KVL) says that the sum of the voltage drops around a
closed loop is zero. It should be obvious that if you park your car and go hiking in
the mountains and regardless of where you hiked when you return to your car your
change in altitude will always be zero.
1
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
Kirchhoff’s Current Law (KCL) says that the sum of the current at a node is always
zero. That is, a node cannot source or deliver charge.
PROCEDURE
Part 1.
1. Obtain several resistors from the stock bins on the 5th floor. Make sure nothing is less than
5 K for the equivalent resistance seen by the myDAQ 10V power supply. For example, if
you have two 10 K resistors in parallel the equivalent resistance will be 5 K. Otherwise,
you may damage your analog outputs on the myDAQ ( 2mA max). If your resistors are larger
than 5 K from Experiment 1, you can use them for Experiment 2.
2. Complete Table 2-1. You may use your data from experiment 1 if you are using the same
resistors.
Table 2-1. Resistor color codes and Error Analysis
Measured
Value
Color Code
Theoretical
Value
% error
Experimental
Discrepancy
3. Connect a variable voltage supply to three (3) different resistors and vary the voltage from 0
to 10 volts. See the Addendum at the end of the experiment for the procedure to output a
variable DC from the myDAQ. (Remember draw less than 2 mA to the load.) Refer to the
myDAQ specification sheet for all power limitations.
4. Make sure you do not exceed the wattage rating of the resistors. Plot the current versus the
voltage in Figure 2-1. Label each curve with its resistance value. How does the plot verify
Ohm’s Law? What can you say about the slope of the plots? Calculate the slopes and show
that they are equal to 1/R.
Hint: Alternate Method ---All of the curves go through zero so only one additional point for each
resistor is required to generate the Ohm’s Law curve. Simply set the voltage supply at one voltage
for all the resistors and then measure the current in each resistor. Verify the current using Ohm’s
2
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
Law by measuring the voltage across the resistor and then calculate current rather than measure
it.
a. How do you measure the current through the resistor?
b. How do you calculate the current through surface mount resistor under test without using an
ammeter? See Figure 1-6c for a surface mount resistor.
For a circuit board with surface mounted resistors, you would usually use the calculation method.
Calculation of the measure of uncertainty for each method is different depending on your method of
calculation. With surface mount components, you always have to consider other components that
might be in parallel with the device being tested.
A good reference source for error analysis is [http://www.lhup.edu/~dsimanek/errors.htm]. Currents
can also be measured indirectly by measuring the magnetic field surrounding a resistor using a clampon ammeter (ac current) or a Hall Effect sensor (DC current).
Voltage
3
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
Figure 2-1. Plot of current (mA) versus voltage for verifying Ohm's Law,
𝟏
∆𝒊 = ∆𝒗. Make the
𝒓
scale appropriate for your resistors/current.
Part 2.
Connect a small resistor (less than 100 ohms) to the variable power supply on the bench top. Do not use
the myDAQ for this part of the experiment. Gradually increase the voltage and feel, using your finger,
the increase in the temperature of the resistor. Only increase the voltage so that the wattage lost in the
resistor is less than 1/3 watt. What voltage created a ¼ watt loss? At what wattage does the resistor get
too hot to touch? Comment on how hot the resistor gets when it is dissipating 1/4, 1/3, and 1/2 watt.
Hint: Power = V2/R. Resistors are available on the 5th floor in the student work area and stock room. The
resistance will change with temperature. Record your values in Table 2-2.
CAUTION
Going beyond ¼ watt can cause the resistor to explode or ignite. A 100 ohm resistor will dissipate ¼ watt at 5
volts. You will usually see smoke or fire at ½ watt. Do NOT exceed 8 volts( 0.64 W) for a 100 ohm resistor.
Table 2-2. Wattage versus resistor temperature
Measured
Calculated
Temperature
Resistance
Voltage
Wattage
None
Warm
Comments
Hot
1/4
1/3
1/2
Explain how you would determine the power rating of a custom resistor that you just designed for your
company. Write your resistor specifications and its test method.
Resistance ______ Compound _____________ Wattage _______ W Tolerance ________, etc.
Part 3.
1. Design and then construct a two loop circuit similar to Figure 2-2. Show all of your component
values in your schematic. Use only the 15 VDC and 5 VDC power supplies on the myDAQ. Note
that the total power from the two supplies is only 2.67 milliwatts which is considerably less than
the 500 mW allowed. The currents must be out of the positive terminals of the batteries. These
are electronic power supplies NOT batteries. We are not using any rechargeable batteries in
this experiment.
4
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
Figure 2-2. Demonstration of Kirchhoff’s voltage equations using a two loop circuit.
2. Write the two loop equations for your circuit.
3. Solve the two loop equations for I1calculated = ______ i2 calculated = _____
4. Measure the currents i1 and I2 using the myDAQ.
I1 measured = __________± ______
I2 measured __________± ______
5. Discuss the differences (error analysis) between the calculated and measured currents.
6. Calculate the power delivered by each power supply. P15 = ______ P5= _____
7. Show that P total is < 500 mW. Ptotal = _______ mW
If your power exceeds 500 mW you will damage the myDAQ.
8. Now using the same circuit write and solve the node equations for node V1. See Figure 2-3. You
may use PSpice, mesh equations node equations, or matrix equations to solve the circuits.
Attach any computer printouts. I want you to show me that you know how to solve these
equations so I want to see your methodology and your answers.
9. Using the circuit in Figure 2-3 (the same schematic but you will be solving it using Kirchhoff’s
Current equations) measure the currents i1, i2, and i3 using the myDAQ DMM.
10. Solve for the currents i1, i2, and i3 using the nodal method.
5
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
I1 measured = ______± ____
I3measured ______± ____
I2 measured ______± ____
V1 = ____________ ± ______
Figure 2-3. Demonstration of Kirchhoff’s current equations using the nodal method.
Conclusion
Write a professional comprehensive lab report, using a word processor. Show your results and
include a comprehensive conclusion. There are lots of sample lab reports on the internet. Your
report should be such that I can give it to another engineer and they can duplicate it and verify
your findings and conclusion. You can draw schematic drawings and analyze circuits using PSpice
which is available in any of the ECE computer laboratories.
Components of your Lab Report:
1. Names of students in the group that performed the experiment. This is a group report
not an individual report. Reports are due the following week at the beginning of the lab.
2. Title and date of experiment
6
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
3.
4.
5.
6.
7.
Objective of the experiment
Procedure
Data and error analysis
Answer to the questions
Conclusions.
ADDENDUM
Method of generating a variable DC voltage from the myDAQ Analog output (A0 0 and 1).
a. Open LabVIEW and then open a new VI (virtual instrument) by clicking on File.
b. Two screens will appear. Untitled Front Panel and Untitled Block Diagram.
c. Place the mouse marker, in the center of block diagram and press control. A quick drop diagram
will appear.
d. Type in DAC and press enter. See Figure 2-4
Figure 2-4. Opening the DAQ subroutine in LabVIEW
e. A DAQ requirements box will appear in the block diagram and another window will appear that
may show a waveform. Another window will appear called create new. There are two choices
acquire signals and generate signals. Choose generate signal. Three new choices will appear.
Choose analog output. You now have two more choices voltage or current. Choose voltage. Now
choose analog output channel zero AO0 and then press Finish. See Figure 2-5. Select continuous
and +10 and – 10 V in the configuration panel then press OK to continue.
7
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
Figure 2-5. Configure output voltage and display options. Choose Continuous.
f.
You will now see Figure 2-6. Choose Yes to continue.
8
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
Figure 2-6. An automatic setup screen for the DAQ. Choose Yes
g. Figure 2-7 will now appear. The DAQ Assistant will be placed automatically into a While loop.
With a stop button that is also located on the Front Panel and in your While loop.
Figure 2-7. DAQ Assistant automatically placed in a while loop.
h. Expand the While Loop so we can add more VIs.
i. Press Ctrl and the space bar and type in simulate then enter.” Move the Simulate Signal VI into
the While Loop. Wire the Simulate VI to the data input of the DAQ Assistant. Figure 2-8. Wiring
is done by clicking on a VI’s node. A spool of wire will appear. Drag it using the mouse to another
terminal.
9
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
Figure 2-8. Block Diagram with Simulate Signal VI added.
j.
Now go to the front panel by pressing Ctl E. Then right click anywhere and select Numeric then
select the type of numeric you want. See Figure 2-9.
10
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
Figure 2-9. Using the Front Panel to select a numeric control
k.
Now if you go back to the Block Diagram you will see an Output Voltage VI outside the While
loop. Click on it and drag it into the while loop then wire it into the offset terminal of the Simulate
Signal VI. You can click on the Simulate VI and highlight it. Then click on Help on the menu bar
and select Show Context Help to see details of the Simulate Signal VI terminals as shown in Figure
2-10.
Figure 2-10. Adding the voltage set point controller to the block diagram.
l.
Now let’s add a timer to the Block Diagram While Loop to control how fast the While Loop
iterates. Type ctrl space bar then Wait. The Wait timer (in milliseconds) will appear in the Block
Diagram outside the While Loop. Drag it into the While loop. See Figure 2-11.
11
ECE 109 Laboratory 2
Validation of Ohm’s and Kirchhoff’s Laws Using the myDAQ
Figure 2-11. The completed VI for sourcing a variable (0-10 VDC voltage from the myDAQ.
m. Now add the time to wait to the timer. Press Ctrl and the space bar then type in Numeric. Drag
the numeric into the While Loop next to the timer. Double click on the numeric and enter the
number 20. This will cause the While Loop to wait 20 milliseconds between iterations.
n. Wire the numeric
to the timer.
o. Now go to the front panel and press the left arrow . . Now you can measure the voltage between
AGND and AO0 and your meter should read approximately what you have set on the Numeric
controller on the front panel.
CAUTION
A myDAQ VI (virtual Instrument) written on one computer cannot be copies to a thumb drive and then
copied into another computer. THIS WILL NOT WORK because National Instruments attaches a code to
your Vis that is based on your computer’s ID. Hopefully they will remove this restriction in the future.
12