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 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 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 1 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ Learning objectives 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. 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=A7BA099657 6D8094D660A7BA0996576D8094D660 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. 2 ECE 109 Laboratory Exercise 1 Introduction 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 and 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 an engineer say that he has a battery 3 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ 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-1. 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. i i + Load - Load V e.g. resistor or motor V e.g. resistor or motor i + i + Source - Source V e.g. resistor or motor V e.g. resistor or motor - + Figure 1-2. Reference-Direction Standards for Voltage and Current. PROCEDURE Part 1. Activate the myDAQ 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 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ Figure 1-3. Starting the MyDAQ software. 2. Connect the myDAQ to the computer USB port (cable on bench top). 3. You should now see the NI ELVISmx Instrument Launcher on the top of the screen. See Figurer 1-4. 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 Note The NI Elvis (National Instruments Educational Laboratory Virtual Instrument Suit) is a custom designed prototyping board that is available for purchasing from NI. They are not available in the Cal Poly Pomona labs, Figure 1-5(a). This is a complex protoboard that has built-in power supplies, signal generators, and many other features. We will be using the protoboard shown in Figure 1-5 (b) 5 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ (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 BACKGROUND Resistance 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 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/Surfacemount_technology]. You might remember the following mnemonic to help you remember the color versus number code: 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 Typical resistors are shown in Figure 1-6. 6 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ (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. 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. 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 1210 3.20 x 2.60 0.25 7 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ 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 300 watts. 𝑃= 𝑉2 𝑅 = 𝐼 2 𝑅 = 𝑉∆𝑅 𝐼𝑅 (1-1) The resistance of a resistor can be approximated by equation (1-2): Resistance (R)= 𝜌𝐿 𝐴 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). 𝑅 = 𝑅𝑜 (1+∝ ∆𝑡) (1-3) Where Ro is the resistance at 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 8 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ 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. 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. Figure 1-7. MyDAQ connected to computer and resistor. 9 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ Figure 1-8. Banana plug without cable 2. Select the DMM SFM then select the function. See Figure7. You can select the Mode and Range to match the resistance being measured. 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. 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% 10 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ Table 1-1. Resistor color codes and Error Analysis Measured Value ~ Ohms Color Code Theoretical Value from color code ~ Ohms % error Experimental Discrepancy 4. Install the 5 resistors in series on the protoboard. See Figure 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. 6. Question Did the values change. __________________ 7. 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. 8. Measure the total resistance of the 5 resistors in series. Then measure the resistance of each resistance again while they are in the series connection. Total resistance of the series connection ________________ ohms 9. Question Should all the resistance values remain the same when connected in series? 10. Explain ____________________________________________________ 11 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ 11. Measure the voltage across each resistor. See Figure 9. If you reverse the red and black leads the voltmeter will read (-) negative. Figure 1-11. Measure voltage across each resistor in series 12. Question. What is the sum of the voltages across each resistor ________? 13. Complete Table 1-2, Series Data for resistors. 14. Measure the current through the series resistors using the myDAQ ammeter. See Figure 11. Break the series circuit anywhere and insert the ammeter. Figure 1-12. Measure current through the series circuit. 12 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ 15. Question. Does it make any difference where you break the series circuit to measure the series current? _________________________________________________ Table 1-2. Series Data for resistors Resistance~ ohms V Current= V/R Power= V2/R Paralle Circuits 16. Connect 5 resistors in parallel. See Figure 1-13. Then complete data for Table 1-3. 17. What is the total power drawn by the parallel circuit. __________________________ Figure 1-13. Measure resistance of 5 resistors in parallel. 18. Connect 15 VDC across the parallel resistors. See Figure 12 and 13. 13 ECE 109 Laboratory Exercise 1 Introduction to the National Instruments myDAQ Figure 1-14. Applying 15 Volts across 5 resistors in parallel. 19. Measure current through each resistor. 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 supply Resistance ~ Ohms Current = 15/R Power = V2/R 14 ECE 109 Laboratory Exercise 1 Introduction 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 9, show that the sum of the voltages around the loop is zero no matter where you start. 3. For the parallel circuit of Figure 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. 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. 15