ME 224 Lab 1 ME224 Lab1 1. Introduction The purpose of this lab is to introduce you to the lab equipment and common electronic components. In this course you will be building circuits in a cookbook fashion. However, because you are building each circuit from individual components most of your circuits will not work the first time. Because this class is useless unless your circuits work, we have provided you with typical electronics test equipment. In this lab we will go over basic operation of this equipment. You will also review the identification, use and troubleshooting of some of the electrical components. 2. Building Circuits from Schematics Throughout this course you will be building many different circuits to accomplish many different tasks. Just like a complex math equation can be built out of combinations of smaller terms, an electronic circuit can be built out of many pieces called components. Different components do different things. A schematic is a diagram that shows how all the components are connected together to form a circuit. An electronic circuit is a collection of components that electricity is driven through to accomplish a task. One thing that you need to understand when building electronic circuits is that for a practical purposes, wire has no resistance. So if you see two resistors connected end to end in a schematic like the one shown here, you can also place any length of wire between the two resistors and get the same results. So if you are physically unable to place the resistors next to each other on your breadboard, you may connect the leads with a length of wire. Sometime in the distant past, electronic experimenters got tired of taping and twisting wires and components together when building temporary circuits. The breadboard was invented, making life much easier for them and you. A breadboard is a piece of plastic with a matrix of holes that you can insert the leads of components into. This way you can place components into almost any configuration you desire with ease. To make things better, patterns of holes are connected internally to help you connect the leads of components the way you need to. A breadboard contains bus strips and terminal strips. The bus strip has two columns of holes. All the holes in each column are electrically connected in each column. Bus strips are typically used to distribute power and ground so it is available to any components that need it. The terminal strips are a series of rows of holes. Each row has 5 holes connected electrically only to each other, a .3" gap, and another 5 Page 1 ME 224 Lab 1 holes only connected to each other. This is where components are placed to build your circuit. There is also a power supply mounted underneath some breadboards (including the one used in this lab). Turn on the power supply now (using the big red button) 3. Looking inside your circuits At your workbench you have a multimeter, an oscilloscope, and a function generator. You will use all three of these devices to gain information about your circuits and to troubleshoot them if necessary. Each of these instruments is complex enough that it takes time to learn to operate them confidently. By the end of this term you should have that confidence level, but it is common for new users of these devices to adjust the settings incorrectly and get no, or worse, incorrect measurements. To help reduce this, default settings for each instrument are provided in the appendix. When you first start your lab, and if you ever have trouble, verify that the instrument is set to its default settings and then adjust it specifically for the measurement you are making. If you would like detailed information on the operation of each instrument, there is a manual for each at your workbench. The multimeter is used primarily to measure resistance, voltage, and current. Note: Only measure resistance when power to the circuit is OFF. We use some special terminology when talking about electrical measurements. Take a brief look at the following so that you understand exactly what we are talking about later. Ground: The point in the circuit that all other points are compared to by default when making voltage measurements. Node: A point in a circuit, between two components. Voltage Measurements: When you are asked to measure the “voltage at a node”, it means that you make the measurement with the positive multimeter lead touching the node and the negative multimeter lead touching ground. When you are asked to measure the “voltage across component x”, it means that the multimeter probes should be touched to the leads of the component. To make a resistance or voltage measurement the multimeter probes are place in parallel to the circuit. To make a current measurement the probes need to be placed in series with the circuit so you will have to disconnect the component leads at the node you need to make the measurement and connect the probes to the disconnected leads. You will use the multimeter most often so lets do a few activities to familiarize ourselves with it. An answer sheet is located at the back of this handout to help you collect data and answer questions. Activity 1.1 Objective: Gain a basic operational understanding of the multimeter, breadboard, and power supply. Page 2 ME 224 Lab 1 Procedure: Record your measurements on the answer sheet. The answer sheet is locate at the end of this lab as Appendix B. 1. Turn on the power supply to your breadboard (the big red button). Using the multimeter measure the voltage of the three red terminals of the power supply with respect to ground. 2. Turn off the power supply. Build circuit 1.1.a. If this is your first time using a breadboard, a suggested layout is given in the figure below. Measure the resistance of R1. Remember to disconnect R1 from the circuit temporarily to avoid measuring the resistance of the power supply in parallel to the resistor. 3. Turn on the power supply. Measure voltage across R1. The voltage “across” a component is an absolute value and it doesn’t matter which probe of the multimeter is placed where… but it is good practice to know and visualize what is happening in your circuit and you should be able to place the red lead at the more positive voltage potential and get a positive reading on your multimeter. 4. Calculate the current you would expect through R1 given the measured resistance and voltage. Note: It is easy to exceed the allowable current measurable by a multimeter and blow the fuse in the multimeter. Make sure you have a rough idea what the current will be in a circuit and that it is less than the maximum allowed by the multimeter before making the measurement. 5. Measure the current through R1. Remember that currents are measured in series with a circuit unlike the parallel measurements made for voltage. So remove one component lead at the point you want to make the current measurement and use the leads of your multimeter to “complete” the circuit. Also remember to move the probe input position on the multimeter itself. Almost all multimeters have separate probe inputs for voltage/resistance and current. 6. Calculate the power dissipated by R1. Power supply Terminal Gnd to bus strip +5V to bus Page 3 ME 224 Lab 1 Using the bus/distribution strips may seem like unnecessary work right now but it’s well worth the effort. You only have to hook up the bus strips once and for complex circuits it makes construction and troubleshooting much easier. Analysis: Notice that the resistance of the resistor isn’t exactly what it is supposed to be. This is because resistors and other components have allowable error tolerance which we will go over in the next section. 4. Looking at a simple circuit By far the most common component found in circuits is the resistor. This class assumes you have already had instruction in basic electronics, so you understand the theory of simple networks of resistors. Resistors are non-polar, which means you don’t have to worry about putting them into a circuit backwards. The main characteristic of real-world resistors are their resistance value, their tolerance, and their power rating. The resistance value of a resistor is denoted on the component by 3 or 4 bands of color (there is always a 4th or 5th band that specifies the tolerance). It is worth your time to spend 30 min or an hour memorizing the color sequence. It will save you a lot of time later. There are also resistor color charts at each workstation and on the mechatronics web page. Resistors typically come with tolerances of either 1%, 5%, 10%, or 20%. This is because of the inevitable difficulties in manufacturing and large tolerance resistors are much less expensive than close tolerance ones. However, close tolerance resistors are rarely needed. It’s good to note though that the combined error of components in a circuit can add up to several hundred percent in common situations. Something to think about and investigate if your circuit isn’t working and you can’t find anything wrong with it. However, circuits work by differences in orders of magnitude rather than multiples so don’t worry if your measured values are a couple hundred percent different than what you expected. If you need to get your circuit to an exact value, there are several easy techniques to do this and if you don’t then don’t worry about it as your circuit will do what it’s supposed to. The last important characteristic of resistors is their power rating. As resistors impede current they convert it into heat. Too much heat will melt the resistor or change it’s properties. The power rating denotes how much power a resistor can dissipate under normal conditions. Typical power ratings are ¼ and ½ Watt. The higher the power rating, the bigger the resistor and the more expensive it will be. A variation of the resistor that is common is the potentiometer (Commonly abbreviated as pot). A potentiometer has three leads. Two of the leads (usually the outside ones) are exactly the same as an equivalently valued resistor. The third lead (called the wiper or tap) has a resistance that is adjustable between the other two leads. Resistance is usually a function of the resistivity, diameter and length of a material. The wiper moves along the length of the resistor so that you have two adjustable resistors whose sum equals a constant value. Potentiometers are very useful for getting exact resistances, creating voltage dividers, and obtaining user input. They have the same characteristics as resistors. Additionally they Page 4 ME 224 Lab 1 are often defined by the number of turns required to move the wiper from one end to the other. A single turn potentiometer can be fully adjusted in one turn of its knob. A 10 turn potentiometer takes 10 turns of it’s dial to do the same full adjustment. A multi turn potentiometer can be adjusted more accurately (though slower) than a single turn potentiometer. The last basic component we will deal with in this section of the lab is the diode. Diodes are non-linear devices that allow current to flow in one direction and not the other. Forward biasing is the condition where there is a more positive voltage on the positive side of the diode that that there is current flowing through the diode. If the diode is reverse biased (the higher voltage is on the negative side of the diode) then current will not flow. Because of this, diodes are polar devices and it is very important that you place them in your circuit correctly. Put them in the wrong direction and they won’t work and often burn out. Diodes have zero resistance in one direction and infinite resistance in the other. Most multimeters have a special setting for testing diode resistance. When testing a diode to see if it’s working the red (positive) probe goes on the positive side and the negative probe goes on the negative side. A burned-out diode will test open (infinite resistance in both directions). Diodes also have a power rating and almost always have an 0.7 voltage drop. (A voltage drop is the voltage you measure across a component). Using the power rating and the 0.7 volts you can calculate the maximum current allowable for a diode. Then you can limit the current through the diode by placing a correctly sized resistor in series with it. A typical current is 2 mA which calls for a 330 Ohm resistor if you are using a 5 volt power supply. A special type of diode called an Light Emitting Diode (LED) will give off light when it is forward biased. A typical voltage drop on an LED is 1.7 volts. You can find LED’s in many different colors and power ratings. Activity 1.2 Objective: Become familiar with the use of resistors, pots and diodes. Procedure: Record your measurements on the answer sheet. 1. A typical LED has a maximum current of 0.01A and a voltage drop of 1.7V. Calculate the size of resistor you need to use with the +5V supply to supply this to the LED. 2. Build Circuit 1.2.a using the resistance you calculated. Remember the LED is polar. You will quickly see if you have it in correctly when you turn on the power supply; if it doesn’t light, reverse it. 3. Turn on the power supply. Verify the diode lights. 4. Turn off the power supply. Change the position of the resistor as shown in Circuit 1.2.b. Turn on the power supply and verify the diode lights. This is to illustrate that the order of the components does not matter. The resistor serves it’s purpose as a current limiter whether it is before or after the LED. Page 5 ME 224 Lab 1 5. Exchange the resistor for one with a value of 1K Ohm. What happens to the light? 6. What is the voltage drop across the diode? 7. Build Circuit 1.2.c. What happens when you adjust the potentiometer. 8. Calculate the current going through the diode for either extreme adjustment (0 Ohms and 1K Ohms) of the pot. The diode has no resistance. But you know that the current through the resistors has to be the same, so use the voltage across the resistors and their resistance values to calculate the current running through them. 5. Transient Circuits – The function generator and oscilloscope So far we have been dealing with Direct Current (DC) circuits. However, in many circuits the power supply is a sine wave rather than a constant voltage and also many circuits generate and communicate with signals of changing voltage. While we can certainly get a picture of the average voltage of a circuit using a multimeter, it is much more useful to get a visual picture of the waveform. The oscilloscope is the instrument we use to do this. But before we talk about the oscilloscope, we need to be able to generate signals to look at with the oscilloscope. The tool we use to do this is the function generator. A function generator is a power supply that is capable of generating a regular voltage waveform. The shape of the wave can be a sin wave, a square wave, or a triangle wave. There are adjustments so that the amplitude, frequency and offset of the wave can be easily changed. Note: Ground is an important concept in electronic theory and even more important when building and testing electronic circuit. It is very important that all instruments, power supplies, and circuits are attached to a ground point. It is also very important that you attach the oscilloscope ground clip (the alligator clip attached to the probe) to ground and ground only. If you attach the oscilloscope ground to another point you could damage your circuit and oscilloscope. For this reason you will need to use 2 oscilloscope probes anytime you want to measure the voltage drop across a component by subtracting the absolute voltage of one side from the other side. Activity 1.3 Objective: Learn the basic operation of the function generator and oscilloscope. The manual is located next to each scope. Read pages 9-45. Procedure: 1. Attach the oscilloscope across the function generator. Do this by attaching the ground clip (black alligator clip) of oscilloscope probe 1 to the circuit ground (ground lead of the function generator Black, not the ground of the breadboard) and then attaching the probe to the red lead from the function generator. Touch the autoset button. What is the amplitude and frequency of the wave? Adjust the function generator so that it is outputting 5 Vp-p at 2 Hz (Vp-p means volts peak to peak or the full amplitude of the wave form) 2. Build Circuit 1.3.a. The black lead goes to the circuit ground and the red lead is the signal which goes to R1. Page 6 ME 224 Lab 1 3. Describe what the LED’s are doing. Make sure you understand the relationship between the signal from the function generator and the behavior of the diodes. 4. Attach Probe 1 of the oscilloscope across the power supply and probe 2 between the resistor and diodes. 5. Use the math features to display the wave form of the voltage across the resistor (probe 1 – probe 2 or math function ch1-ch2 on the display of the oscilloscope). Make sure that both probes are set to the same volts/div. Flip back and forth between using math and no math until you understand the information provided by this function. Make a drawing of this oscilloscope trace. 6. Transient Circuits – rectifiers Now that we add waveforms to the equation, we can see that diodes might be more useful. Diodes and diode circuits that are used to change an AC signal are called rectifiers. A single diode in series with a resistor will remove half of a sin wave (remember current only flows one direction in a diode). This is called a half wave rectifier. Four diodes in the pattern shown in circuit 1.4.b are called a full wave rectifier. This circuit will output the absolute value of the input circuit. These four diodes are often combined into one package and called a rectifier bridge. Activity 1.4 Objective: Utilize diodes for AC signal rectification.. Procedure: Notice: When you are sketching oscilloscope traces include Volts/DIV, Time/DIV, whether it's AC or DC coupling, and add a dashed line to show the ground line location. 1. Build Circuit 1.4.a. Hook the oscilloscope probe to the node between the diode and resistor (oscilloscope ground to circuit ground – the ground lead of the function generator) so you can get a picture of the voltage across the resistor. Notice that the AC signal is converted to a half-wave. Draw the oscilloscope trace. 2. Build Circuit 1.4.b. Hook two probes to the circuit so you are measuring the voltage dropped across the resistor (one on each side of the resistor). Remember that the ground clip of the oscilloscope must be only attached to the circuit ground! You should now see a full-wave rectification. Study the schematic of the circuit until you can visualize what is happening as the circuit works. Analysis Imagine that you have a device that requires a DC voltage and all you have access to is the AC voltage coming from a wall socket. The steps we went through in this section show how you might convert that AC signal into a DC one. Wrap Up You should now feel comfortable using the oscilloscope, function generator, power supply and multimeter. These are the basic tools of electronic troubleshooting and Page 7 ME 224 Lab 1 knowing how to use them will save you literally hours on your labs. If you would like to know more details on how to use the oscilloscope or multimeter, the documentation for each of these instruments is at each workstation. Also feel free to ask your TA to help with anything you are unclear on. Also you should feel comfortable using the breadboard to make circuits. If you don’t feel like you really know how all the little holes are connected or how to use the bus strips to distribute power, ask your TA for help immediately. Not understanding your breadboard completely can make a lab stretch from 1 hour to 3 hours. You’ve gotten a short introduction into some of the basic components used and you should be able to identify resistors, potentiometers, diodes, LED’s, and capacitors as well as determine their value. Be careful when pulling components from the storage drawers. People get in a hurry and don’t always put the right value in the right slot so always read the value on the component yourself before putting it in your circuit. The next two labs will cover basic programming in LabVIEW, a graphics programming language for instrumentation applications and also introduce you to op amps and circuits commonly used for signal conditioning. You will go through everything pretty fast, and later labs will take a bit of thinking on your feet. The idea is not to give you a complete understanding of electronics or programming, but to give you enough basic practical skills that you can complete the experiments which will be using data acquisition and electronics to explore various theory you have covered in other classes Page 8 ME 224 Lab 1 Appendix A: Circuit Diagrams Circuit Diagram Notes +5V 1.1.a I=V/R R1 330 +5V 1.2.a P=I*V=V2/R D1 R1 330 1.2.b +5V D1 is a Light Emitting Diode or LED. R1 330 D1 +5V 1.2.c D1 R1 330 R2 is a potentiometer. R2 1000 R1 330 LED 5V 1Hz D1 D2 R1 1.3.a Page 9 ME 224 Lab 1 Circuit Diagram Notes D1 1.4.a 5V 60Hz This diode is not an LED (no “light” rays on the schematic). R1 1000 R1 1000 5V 60Hz 1.4.b 1.3a LED. R1 Page 10 ME 224 Lab 1 Appendix B: Answer Sheet Activity 1.1 1. 5V______ +15V_______ -15V_______ 2. RR1______ 3. VR1______ 4. Calculated IR1_______ 5. Measured IR1_______ 6. PR1______ Activity 1.2 1. RR1_______ 2. __________ 3. __________ 4. __________ 5. __________ Activity 1.3 1. Initial amplitude & frequency of the function generator? 2. What are the diodes doing? Why? Activity 1.4 Include your oscilloscope sketches. Page 11 ME 224 Lab 1 Appendix C: Basic troubleshooting guide The following is a checklist of things that commonly go wrong with experimental and bread boarded circuits. a. Check power i. Make sure that your power supply is operating correctly. Verify that it is on and supplying the correct voltage. Check the difference in supply voltage when the circuit it connected and when it is not. If there is a big difference, there may be a problem with the supply. ii. Make sure that each IC in your circuit has a power and ground connection. If no power gets to the chip then it won’t work. iii. Make sure your circuit goes to ground at the proper points. b. Check Connections – (Do these with the power off) i. Correct layout: Make sure that you have completely built the circuit in the diagram. Any component connected by lines needs to be connected with wire on the breadboard. Make your circuits neat... Missing a wire or two is a common problem and it’s hard to see when your breadboard is a tangle of multicolored wires. ii. Good connection. Breadboards can have bad internal connections or make poor contact with wires. After you have verified that all your components are correctly connected, use the continuity tester to verify that each pin that should have an electrical connection to another actually does. c. Check components i. Resistors that are burned out have infinite resistance or at least more than 20% of the specified value. ii. Diodes should have infinite resistance in one direction and a small resistance in the other. If it doesn’t (e.g. Short circuit both ways or open circuit both ways) then replace it. Use the diode setting on the multimeter to test this. Remember that diodes are polar and it’s important which way you insert it into a circuit. Often turning it around (so it’s facing the correct direction) will fix the problem. iii. IC’s can be quickly tested by touching them. If they are too hot to hold your finger on them then they are either incorrectly hooked up and about to burn up or they are defective because someone else burned them up. If it’s not hot and you suspect it’s the problem, build a very simple circuit to test the IC or take one that you know works (from your neighbor’s workbench perhaps) and try it to verify that the rest of your circuit and connections are correct. d. Check values – If you still haven’t found the problem you will have to walk through your circuit systematically, checking each component for all the things above and additionally those below: i. Verify node voltages. Here’s where you get to use your theory. Is the voltage at each node in the circuit what you expect it to be? ii. Verify current levels. Sometimes IC’s will behave bizarrely if the current is smaller or larger that it was designed for. Use a multimeter to check the current levels. Page 12