20
ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ OBJECTIVES Learn how to connect I/O signals and components to a myDAQ Learn to read resistor color codes, schematics, and how to wire a protoboard Learn to use the ammeter, ohmmeter, voltmeter, and I/O ports on the myDAQ Verify Ohm’s Law Learn how to connect and measure the characteristics of series and parallel circuits Learn to calculate power loss in resistors 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 5 th floor stock/supply lab. The ratio of the smallest resistor to the largest should be less than 5 is suggested. One lot of small solid wires---- AWG 20 through 24 (insulated solid wire not stranded) for connecting to the myDAQ terminals or a protoboard. PRELAB 1

109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

  • Upload
    buithu

  • View
    220

  • Download
    3

Embed Size (px)

Citation preview

Page 1: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

ECE 109 Laboratory Exercise 1

Introduction to the National Instruments myDAQ

OBJECTIVES

Learn how to connect I/O signals and components to a myDAQ

Learn to read resistor color codes, schematics, and how to wire a protoboard

Learn to use the ammeter, ohmmeter, voltmeter, and I/O ports on the myDAQ

Verify Ohm’s Law

Learn how to connect and measure the characteristics of series and parallel circuits

Learn to calculate power loss in resistors

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. One lot of small solid wires---- AWG 20 through 24 (insulated solid wire not stranded) for

connecting to the myDAQ terminals or a protoboard.

PRELAB

Read the NI myDAQ User Guide and Specifications. See the website below. Also, watch the NI training videos shown below. YouTube has numerous videos on the myDAQ.

National Instruments myDAQ training websites and other training videos

There are numerous training websites on YouTube and the National Instruments website.

myDAQ manual and specifications http://www.ni.com/pdf/manuals/373060e.pdf

Read the manual and familiarize yourself with the capabilities and limitations of the myDAQ

Learning objectives

1

Page 2: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

Know the voltage and current limitations of the various terminal ports. The myDAQ has an internal fuse that will blow if the current exceeds 1 ampere to the ammeter terminals. Make sure the input voltage to the voltmeter does not exceed 60 volts. Review all of the limitations for the 20 I/O terminals. You cannot input current into any of the output terminals of the myDAQ or the benchtop power supplies. The 10 output terminal of the myDAQ cannot output any more than 2 mA.

Learn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments (Vis) in LabVIEW which is available on all of the computers.

Please watch either of the following videos before the laboratory class. They are identical videos.

http://www.bing.com/videos/search?q=myDAQ+tutorial&FORM=VIRE1#view=detail&mid=A7BA0996576D8094D660A7BA0996576D8094D660

https://www.youtube.com/watch?v=RsD2tHbuAF4&list=PL727B195319D722ED&index=1

Understand how to build a circuit on a protoboard.

https://www.youtube.com/watch?v=oiqNaSPTI7w

https://www.youtube.com/watch?v=Mq9XMNsoAd8

https://www.youtube.com/watch?v=q_Q5s9AhCR0

Figure 1-1 is a block diagram of the myDAQ internal circuitry. See the reference manual for the input, output, and power limitations of the myDAQ. Drawing too much current from a voltage output terminal will cause its output voltage to drop in order to limit the output current.

2

Page 3: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

Figure 1-1. Block diagram of the myDAQ internal circuitry.

BACKGROUND

Reference directions for voltage, current, and power are not arbitrary. All meters that measure these parameters are designed to meet international standards. For example, if you are going to attach a set of jumper cables between a car with a charged battery and a car with a dead battery, it is extremely important that the cables be connected in accordance with the established standards. If the batteries are accidentally reversed there could be an explosion of one or both batteries resulting in a fire and serious damage to the cars. The jumper cable that is red is connected to the positive terminal of each battery. The jumper cable that is black is connected to the negative terminal of each battery. This same color code is used on ammeters, multimeters, power meters, and various other instruments used in industry. This is no different than measuring the elevation of points on the ground. It is well understood what is up and what is down. The same principle applies to voltages. It is necessary to understand whether a voltage is above or below a reference voltage. When you see a stream flowing in the mountains you know what is upstream and what is downstream. The same principle applies to currents in a wire. The only difference is that you can't see voltages and you cannot see currents and so you have to rely on your instruments. Make every effort to make your measurements so that voltages and currents are typically positive. For example if you live in Los Angeles and wish to drive to San Bernardino you would not tell a driver to drive minus West to go from Los Angeles to San Bernardino. So why would

3

Page 4: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

an engineer say that he has a battery with a negative voltage or a wire with a negative current. Civil engineers wouldn't tell a hiker to go minus uphill to reach a destination which is downhill from the hiker. The accepted standards for voltage and currents are shown in Figure 1-2. If the product of V and I is positive then the circuit in the box is a LOAD (for example a resistor). If the product is negative then the circuit in the box is a source (for example a battery). Notice in the figure that if a positive current goes into the positive voltage terminal then the circuit is a load otherwise it is a source. If a current is going into the positive terminal of your car battery then the battery is a load and it is being charged by your alternator or a battery charger.

If your measuring instrument reads negative, then reverse the leads so that it reads positive. DO NOT try to work with negative numbers. Do not draw a current arrow in one direction and then say that current is flowing in the negative direction. That is left as a trick question on exams. Don’t be fooled by this technique. The positive lead on a multimeter is RED. The negative lead is black. If the current reads negative then the current is LEAVING the red lead. If the voltmeter reads positive, then the red lead is at a higher potential than the black lead. Short circuits have no voltage, but they can have current. Open circuits can have voltage, but they do not have current. Loads may also be a battery charging. Sources may also be a generator or battery. Electronic circuits may use capacitors and inductors as loads and sources.

Figure 1-2. Reference-Direction Standards for Voltage and Current.

PROCEDUREPart 1. Activate the myDAQ. This procedure may very depending on the version of National Instruments LabVIEW you are using.

1. Turn on the computer and open National Instruments software as shown in Figure 1-3 as follows:

o Open all programs/ National Instruments, Figure 1-3. Then Open NI Elvismx for NI ELVIS & NI myDAQ then open NI ELVISmx Instrument Launcher.

4

Page 5: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

Figure 1-3. Starting the MyDAQ software.

2. Connect the myDAQ to the computer USB port. Some computers may have a USB port cable already connected.

3. You should now see the NI ELVISmx Instrument Launcher on the top of the screen. See Figurer 1-4. The number of instruments shown and activated will vary with the version of LabVIEW and myDAQ you are using.Not all of the Virtual Soft Front Panels (SFP) are accessible directly by the myDAQ. However, they can all be simulated in LabVIEW which is installed on all of the computers.

Figure 1-4. NI ElVISxmx Instrument Launcher

NoteThe NI Elvis (National Instruments Educational Laboratory Virtual Instrument Suit) is a custom designed prototyping board that is available for purchase from NI. They are not available in the Cal Poly Pomona labs, Figure 1-5(a). This is a complex protoboard that has

5

Page 6: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

built-in power supplies, signal generators, and many other features. We will be using the protoboard shown in Figure 1-5 (b)

(a) (b)

Figure 1-5. (a) NI Elvis (National Instruments Educational Laboratory Virtual Instrument Suit) and (b) Protoboard.

In this experiment we will be using the Digital Multimeter (DMM), the left most SFP. We will be using this panel to measure, resistance, voltage, and current.

Part 2. Measure resistance, voltage and current using the DAQ DMM

BACKGROUNDResistance Resistors are used for many purposes such as electric heaters, voltage control, and current control. Resistance values and tolerances vary widely. Resistance tolerances may range from +0.001 to +20%. The most common types of resistors are carbon composition, wire wound, metal film, carbon film, steel, and liquid. Their ratings can range from microwatts to megawatts. Variable resistors are called either potentiometers or rheostats. When used as a potentiometer their output is a variable voltage. When used as a rheostat they are used to control current. A good reference source for resistor color codes and other codes is [http://en.wikipedia.org/wiki/Electronic_color_code]. Review this website or another one before you come to the laboratory. Many types of resistors do not have a color code such as resistors made to military specifications and surface mount resistors [http://en.wikipedia.org/wiki/Surface-mount_technology]. You might remember the following mnemonic to help you remember the color versus number code for through hole resistors but not for surface mount resistors:

Bad (0) Boys (1) Race (2) Our (3) Young (4) Girls (5) But (6) Violet(7) Generally (8) Wins (9). Black Brown Red Orange Yellow Green Blue Violet Grey White

6

Page 7: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

Typical resistors are shown in Figure 1-6.

(a) (b)

(c)

Figure1-6. Typical Resistors. (a) 1/8 w to 2 W, (b) 5 W to 25 W, (c) 1/32 W . Very small surface mounted resistors have no markings and you need a microscope to identify them. The resistors internally in an integrated circuit (IC) are considerably smaller than surface mount resistors.

Colors such as silver, gold and yellow on one end indicate parameters such as tolerance and temperature ratings. Most through-hole resistors Figure 1-6 (a) use either 4 or 5 bands of colors for 5% or 10% resistors.. The 5 band color is usually used for 1% and 0.1 % resistors. Surface mounted resistors (SMD) either have a printed code or no markings Figure 1 (c). Typical wattages and sizes are shown in Table 1-1. Many other resistors use a numerical code and no colors codes.

Table 1-1. Surface mount resistors.Package Style Size(mm) Power Rating

2512 6.30 x 3.10 0.5

2010 5.00 x 2.60 0.25

7

Page 8: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

1210 3.20 x 2.60 0.25

1206 3.00 x 1.50 0.125

0805 2.00 x 1.30 0.10

0603 1.50 x 0.08 0.0625

0402 1.00 x 0.50 0.0625 -0.031

0201 0.60 x 0.30 0.05

Power When you observe a resistor it is not always possible to predict its wattage by just observing its size. There are many variables that affect a resistor’s wattage. Some such parameters are size, mounting, encapsulation, and cooling. There are three ways you can calculate the power being dissipated in a resistor in this laboratory. See Eq. 1-1. In a thermodynamics' laboratory you could measure the rise in temperature of water in a calorimeter to determine the power being dissipated by a resistor. Consider the following design problem. What size (ohms and wattage) resistor would you use for the heating element in a coffee maker or toaster? Assume 120 VAC and 1100 watts. (ans: 18 ohms)

P=V2

R=I 2R=V ∆R IR (1-1)

The resistance of a resistor can be approximated by equation (1-2):

Resistance (R)= ρLA 1-2)

Where ρ=¿resistivity of the material; L = length of material; and A is the area of the material. The material may be solid, liquid, or gaseous. Each of these parameters is often functions of temperature and stress.

Temperature The first order approximation of resistance change with temperature is defined by equation (3).

R=Ro (1+∝∆ t ) (1-3)

Where

8

Page 9: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

Ro is the resistance at 0oC or 25 oC.

= material temperature coefficient, expressed as ohms/oC or ppm/oC ( parts per million).

t is the change in temperature. It is expressed as ohms/oC

It is very common to use this characteristic of resistors in the design of temperature sensors. Knowing the variation of resistance with temperature is extremely important in the analysis and design of electronic circuits.

Liquid is often used for low resistances rated in the megawatts. It quite often consists of two electrodes in a tank filled with CaCO3. They are commonly used for wound rotor motors greater than 5000 Hp. Some typical resistors are shown in Figure 1-6a.

1. Connect a banana plug to the myDAQ ohm terminals. See Figure 1-7. Make sure that the banana plug terminal with the nob on the side is plugged into the black terminal of the myDAQ. See Figures 1-7 and 1-8. This is not important when measuring just resistance; however, it is very important when making all other measurements.

9

Page 10: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

Figure 1-7. MyDAQ connected to computer and resistor.

Figure 1-8. Banana plug without cable2. Select the DMM SFM then select the function. See Figure9. You can select the Mode

and Range to match the resistance being measured or use the AUTO mode.

Figure 1-9. Using the myDAQ to measure resistance.

3. Measure a total of five (5) resistors and enter their values in Table 1-1. Then complete the table. Assume the color code is the accurate value and the measured value is in error.

10

Page 11: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

Note that the measured resistance is usually different from the value predicted by the color code. Resistors typically have a tolerance of 0.1, 1, 5 and 10%

Table 1-1. Resistor color codes and Error Analysis

MeasuredValue ~ Ohms

Color Code TheoreticalValue from color code ~ Ohms

% errorExperimental Discrepancy

4. Install the 5 resistors in series on the protoboard. See Figure 1-10. Do not use any resistor values less than 100 ohms. We do not want to damage the myDAQ in later steps when we measure voltages and currents.

5. What was the total resistance of the 5 resistors? _____________ ohms. Measure the resistance of a couple of the resistors while they are in series using the DMM on the desktop in the ohm mode.

6. Question Should all the resistance values remain the same when connected in series? 7. Explain __________________________________________________________________8. Connect 15 volts to the 5 resistors in series using the myDAQ + 15V output on the side

terminals. See Figure 1-10.

Figure 1-10. Connect voltage to five resistors in series.

11

Page 12: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

9. Measure the voltage across each resistor. See Figure 1-10. If you reverse the red and black leads the voltmeter will read (-) negative.

Figure 1-11. Measure voltage across each resistor in series

10. Question. What is the sum of the voltages across each resistor ________?11. Complete Table 1-2, Series Data for resistors.12. Measure the current through the series resistors using the myDAQ ammeter. See

Figure 11.13. Break the series circuit anywhere and insert the ammeter.

Figure 1-12. Measure current through the series circuit.

12

Page 13: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

14. Question. Does it make any difference where you break the series circuit to measure the series current? _________________________________________________

Table 1-2. Series Data for resistorsResistance~ ohms V Current= V/R Power= V2/R

Parallel Circuits15. Connect 5 resistors in parallel. See Figure 1-13. Then complete data for Table 1-3.16. What is the total power drawn by the parallel circuit. __________________________

Figure 1-13. Measure resistance of 5 resistors in parallel.

17. Connect 15 VDC across the parallel resistors. See Figure 12 and 13.

13

Page 14: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

Figure 1-14. Applying 15 Volts across 5 resistors in parallel.

18. Measure current through each resistor. Use the busses (typically red and blue) when connecting the resistors in parallel. See Figure 1-14. You have to disconnect one end of the resistor when its current is being measured. Current through a 10 K resistor is shown in figure 1-14.

Figure 1-15. Measuring current through each of the 5 resistors in parallel.

Table 1-3. Data for parallel resistors with a 15 VDC power supplyResistance ~ Ohms Current = 15/R Power = V2/R

14

Page 15: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

Equivalent Parallel R= of currents = of powers =

Questions

1. What is the difference between conventional current and electron current?2. For the series circuit of Figure 1-10, show that the sum of the voltages around the loop

is zero no matter where you start.3. For the parallel circuit of Figure 1- 11, show that the sum of the currents at either node

is zero. A node is where two or more components connect. Draw a circle around each node and identify them as Node 1 and Node 2.

CommentsThe total voltage across a series circuit is the sum of the voltages across each resistor and the current is the same in each resistor.The voltage of each resistor in a parallel circuit is the same and the current in each resistor is different. The total current into the circuit is the sum of all the individual currents in the parallel resistors. ConclusionWrite 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 experiment3. Objective of the experiment

15

Page 16: 109L/ECE 109 Laboratory... · Web viewLearn the uses of the 12 instruments on the NI ELVISmx Instrument Launcher. Some of the instruments can only be used by writing virtual Instruments

ECE 109 Laboratory Exercise 1Introduction to the National Instruments myDAQ

4. Procedure 5. Data and error analysis6. Answer to the questions7. Conclusions.

16