# ECE 109 LABORATORY 2 Validation of Ohm's and Kirchhoff's Laws

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 &plusmn;10 VDC from the myDAQ. Caution Rmin ≥ 5 K

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 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 7 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.
PROCEDURE
Part 1.
1. Obtain seven resistors from the stock bins on the 5th floor. Make sure nothing is less than 5
K for the equivalent resistance seen by the power supply. For example, if you have to 10
K 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 1. You may use your data from experiment if you are using the same
resistors.
1
Table 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.
4. Make sure you do not exceed the wattage rating of the resistors. Plot the current versus the
voltage in Figure 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 Law by measuring the voltage across the resistor and then calculate current rather
than measure it.
1. How do you measure the current through the resistor?
2. How do you calculate the current through a resistor under test without using an ammeter?
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 clamp-on ammeter (ac current) or a Hall Effect sensor (DC current).
2
Voltage
Figure 1. Plot of current (mA) versus voltage for verifying Ohm's Law,
𝟏
∆𝒊 = ∆𝒗.
𝒓
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 &frac14; 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.
CAUTION
Going beyond &frac14; watt can cause the resistor to explode or ignite. A 100 ohm resistor will dissipate &frac14; watt at 5
volts. You will usually see smoke or fire at &frac12; watt. Do NOT exceed 8 volts( 0.64 W) for a 100 ohm resistor.
3
Table 2. Wattage versus resistor temperature
Measured
Calculated
Temperature
Resistance
Voltage
Wattage
None
Warm
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. 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 watts which is considerably less than the
500 mW allowed.
Figure 2. Demonstration of Kirchhoff’s voltage equations using a two loop circuit.
2. Write the two loop equations for your circuit.
4
3. Solve the two loop equations for I1calculated = ______ i2 calculated = _____
4. Measure the currents i1 and I2 using the myDAQ.
I1 measured = __________&plusmn; ______
I2 measured __________&plusmn; ______
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 &lt; 500 mW. Ptotal = _______ mW
If your power exceeds 500 mW you will damage the myDAQ.
8. Now using the same circuit write the node equations for node V1. See Figure 3.
9. Using the circuit in Figure 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.
I1 measured = ______&plusmn; ____
I3measured ______&plusmn; ____
I2 measured ______&plusmn; ____
V1 = ____________ &plusmn; ______
Figure 3. Demonstration of Kirchhoff’s current equations using the nodal method.
5
Conclusion
Write a professional comprehensive lab report, using a word processor when possible. 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
3. Objective of the experiment
4. Procedure
5. Data and error analysis
6. Answer to the questions
7. Conclusions.
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 4
Figure 4. Opening the DAQ subroutine in LabVIEW
6
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 5. Select
continuous and +10 and – 10 V in the configuration panel then press OK to continue.
Figure 5. Configure output voltage and display options. Choose Continuous.
f.
You will now see Figure 6. Choose Yes to continue.
7
Figure 6. An automatic setup screen for the DAQ. Choose Yes
g. Figure 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.
Figure 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. Move the Simulate Signal VI into the While
Loop. Wire the Simulate VI to the data input of the DAQ Assistant. Figure 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.
8
Figure 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 thee type of numeric you want. See Figure 9.
Figure 9. Using the Front Panel to select a numeric control
9
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 10.
Figure 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 11.
10
Figure 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.
11