ECE2205: Circuits and Systems I Lab 1–1 Department of Electrical and Computer Engineering University of Colorado at Colorado Springs "Engineering for the Future" Lab 1: The Digital Multimeter 1.1 Objective The objective of this lab is to gain proficiency using a digital multimeter to measure resistance, dc voltage, and dc current. You will also learn how a real multimeter behaves differently from an ideal multimeter. 1.2 Pre-Lab Preparation Read the lab overview in section 1.3 and answer the questions below. The instructor is to review your answers before you begin the lab tasks. 1. What color code designates a 1Ä, 10% resistor? 2. What color code designates a 1kÄ, 5% resistor? 3. What color code designates a 10MÄ, 1% resistor? 4. What is the ideal resistance of a voltmeter? 5. What is the ideal resistance of an ammeter? 6. How do you measure a voltage between two points in a circuit? (draw a diagram) 7. How do you measure a current between two points in a circuit? (draw a diagram) 8. How do you measure the resistance of a circuit element? Be sure to bring a graphite pencil to the lab! 1.3 Background The dc power supply and the multimeter. This laboratory assignment will introduce you to two of the laboratory workhorses: the dc power supply, and the digital multimeter. Each workstation in the electronics lab possesses one Agilent E3630A triple output dc power supply, drawn in Fig. 1.1, and one Agilent 34401A digital multimeter, drawn in Fig. 1.2. The multimeter can be used as a voltmeter, ammeter, or ohmmeter, depending on how it is configured. The workstations have other equipment, which will be investigated in more detail in later labs. Please be careful with these (and all other) laboratory instruments. They cost thousands of dollars to replace. A voltmeter is designed to measure the voltage between any two points in a circuit, when the circuit is energized. If the voltage to be measured is v12 = v1 − v2 , then the black probe is placed on node 2 (corresponding to v2 ) and the red probe is placed on node 1 (corresponding to v1 ). Since the voltmeter is placed in parallel with a part of the circuit it potentially can disrupt circuit operation. Ideally, a voltmeter’s resistance is infinite—in which case there would be no change in circuit operation. An ammeter is designed to measure current at a point in an energized circuit. To take this reading, the circuit must be disconnected at the point of interest and the ammeter inserted in series with the circuit at that point. Again, c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 1–2 ECE2205, Lab 1: The Digital Multimeter Agilent E3630A 0−6V, 2.5A/0−±20V,0.5A Triple Output DC Power Supply Agilent VOLTAGE ADJUST VOLTS AMPS OVERLOAD +6V 34401A Ω 4W Sense/ 4W Sense/ Ratio Ref Ratio Ref 6 1/2 Digit Multimeter Tracking +20V ratio HI +20V 200V Max −20V Fixed +6V +20V FUNCTION OUTPUT −20V +6V COM +20V Power −20V On Ω 4W Period AC V Ω 2W Freq < MENU Recall > 4 CHOICES The Agilent E3630A triple output dc power supply. Figure 1.2 RANGE / DIGITS 5 > Off On ± 240 VDC MAX TO Figure 1.1 AC 1 DC V On/Off Off MATH DC 1 > METER Power Input d VΩ HI +6V LEVEL Cont 6 Auto/ Man 1000V Max LO dB dBm Null Min Max LO Terminals 500Vpk Max 3A RMS I Auto/Hold Single ENTER TRIG Shift LOCAL Front Rear ! Fused on Rear Panel The Agilent 34401A digital multimeter. the ammeter can potentially disrupt circuit operation. Ideally, an ammeter’s resistance is zero—in which case there would be no change in circuit operation. An ohmmeter is designed to measure the resistance of a device. To do so, the device must be disconnected from the circuit (or else the resistance of the device in parallel with the circuit is measured). Two-wire and four-wire resistance measurement techniques are possible, as discovered in the laboratory exercise. Resistors. You will also be working with resistors. These are located in the shelving units in the lab. Resistor values are designated using a color code: see Fig. 1.3. Most resistors have four colored bands. The first three bands indicate the nominal value of the resistor and the fourth band indicates the manufacturing tolerance in value. The first two bands form the mantissa, and the third the exponent of 10. Values corresponding to the colored bands are tabulated in Table 1.1. Many offensive mnemonics exist to help memorize the color bands, but if you want a G-rated version: “Black Beetles Running On Your Garden Bring Very Good Weather”. First band: First digit Second band: Second digit Third band: Multiplier Fourth band: Tolerance Figure 1.3 Table 1.1 Color Black Brown Red Orange Yellow Green Blue Violet Gray White Gold Silver Resistor color code example. TABLE OF RESISTOR COLOR BAND VALUES. First digit 0 1 2 3 4 5 6 7 8 9 NA NA Second digit 0 1 2 3 7 5 6 7 8 9 NA NA Multiplier 1 10 100 1,000 10,000 100,000 1,000,000 10,000,000 100,000,000 1,000,000,000 0.1 0.01 Tolerance ±20% ±1% ±2% ±3% ±4% NA NA NA NA NA ±5% ±10% The tolerance band is typically either gold or silver. A gold tolerance band indicates that the measured value will be within 5% of the nominal value. A silver band indicates 10% tolerance. For example a resistor with color code brown-black-red-silver indicates a nominal value of 1 kÄ. The first two bands (brown-black) produce the mantissa (10) and the third band (red) is the exponent of ten (102 = 100). So the value is 10 × 100 = 1, 000Ä or 1kÄ. Since c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 1–3 ECE2205, Lab 1: The Digital Multimeter the tolerance band is silver, we can expect the measured value of the resistor to be between 900Ä and 1100Ä. As another example, a 47kÄ, 20% resistor has color code: yellow-violet-orange-black. 1.4 Lab Assignment Task 1: Prelab Certification. Have the Lab Assistant/Instructor review your answers to the prelab assignment questions and sign the certifications page. Task 2: Orientation. instruments: Visually examine the set of test instruments at your lab station. You should find the following • Agilent E3630A triple output dc power supply; • Agilent 33120A function generator; • Agilent 34401A digital multimeter; • Agilent 54624A digitizing oscilloscope. In addition, you should also find a PC and a switch-box that connects the PC to the oscilloscope. You will be using all of these instruments this semester. Locate the dc power supply. Examine the controls on its front panel. This is a relatively simple instrument to use. It is used to provide dc (constant) voltages and currents. It is important to prevent the leads of the dc power supply from touching each other. When the power supply leads touch, a short circuit is formed which can cause serious damage to the power supply. Consider what would happen if you shorted the wall socket, or a car battery! Short circuits can be dangerous, and special care should be taken to avoid them. Locate the digital multimeter. Examine the controls on its front panel. This instrument is used to measure voltage, current and resistance. When configured to measure voltage, its function is a voltmeter. Likewise, it may function as an ammeter or as an ohmmeter. It will be extremely important that you become comfortable (and proficient!) with the use of all lab test instruments. Task 3: Measuring Resistance (Two-Wire). The most common way to measure a resistance is to use a two-wire ohmmeter. The meter places a small voltage across the device under test, measures the current that flows, and uses Ohm’s law to calculate the resistance. Agilent 34401A Ω 4W Sense/ 4W Sense/ Ratio Ref Ratio Ref 6 1/2 Digit Multimeter Input d VΩ HI HI 200V Max FUNCTION AC 1 Ω 4W Period DC V AC V Ω 2W Freq On/Off < MENU Recall > CHOICES 4 Cont RANGE / DIGITS 5 > Off On MATH DC 1 > Power LEVEL Figure 1.4 6 Auto/ Man ENTER 1000V Max LO dB dBm Null Min Max LO Terminals 500Vpk Max 3A RMS I Auto/Hold Single TRIG Shift LOCAL Front Rear ! 1k Ω Fused on Rear Panel Two-wire resistance measurement setup. A “minigrabber” probe is shown to the right. 1. Select a (nominal) 1kÄ resistor. Record the complete color-code of the resistor you used (and particularly the tolerance of the resistance). 2. Use minigrabber probes to connect the multimeter to both terminals of the resistor, as shown in Fig. 1.4. 3. Set the multimeter to measure resistance. To do this, press the softkey labeled “Ä2W”. Determine the actual value of the resistor. The words “actual” and “measured” may be used interchangeably. 4. Compute the percent difference between the actual (measured) value of the resistor and the nominal value of 1kÄ as indicated by its color code. Record the actual and percent difference values. Hang on to this particular resistor—you will use it again later. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 1–4 ECE2205, Lab 1: The Digital Multimeter Task 4: Measuring Resistance (Four-Wire). The two-wire resistance-measurement method works well in most situations. However, it introduces errors for measuring small resistances (e.g., values less than about 10Ä). The problem is that you are measuring the resistance of both the device under test and the probe wire leads. The scenario is illustrated in Fig. 1.5. i(t) Test lead 3 R3 i(t) ≈ 0 Test lead 1 i(t) Test lead 1 R1 R1 v(t) Device under test R v(t) Device under test R R2 R2 i(t) ≈ 0 Test lead 2 i(t) Test lead 2 R4 i(t) Test lead 4 Figure 1.5 Two-wire (left) versus four-wire (right) methods for measuring resistance. In the two-wire scheme, a voltage is imposed on the test leads and the device under test by the multimeter. Current flows through the circuit according to the total resistance. The current will be v(t) i(t) = . R1 + R2 + R The current is measured and the resistance is estimated as R̂ ≈ v(t)/i(t) = R1 + R2 + R. If the resistance of the leads is significant compared to the resistance being measured, the two-wire scheme is not adequate. In the four-wire scheme, a voltage is imposed on one pair of the test leads, again causing a current to flow. While this current is measured, it is used differently in the calculation. A second pair of test leads connect to the terminals of the device under test, and the voltage across that pair of test leads is measured. Current flowing through these test leads is approximately zero since the voltmeter has approximately infinite resistance. Therefore, the true resistance of the device under test may be much better approximated as R̂ = v(t)/i(t). Agilent 34401A Ω 4W Sense/ 4W Sense/ Ratio Ref Ratio Ref 6 1/2 Digit Multimeter Input d VΩ HI HI 200V Max FUNCTION AC 1 Ω 4W Period DC V AC V Ω 2W Freq On/Off < MENU Recall > CHOICES 4 RANGE / DIGITS 5 > Off On MATH DC 1 > Power LEVEL Cont 6 Auto/ Man ENTER Figure 1.6 1000V Max LO dB dBm Null Min Max LO Terminals 500Vpk Max 3A RMS I Auto/Hold Single TRIG Shift LOCAL Front Rear ! 1Ω Fused on Rear Panel Four-wire resistance measurement setup. 1. Select a 1Ä resistor. Record all color bands of the resistor. 2. Repeat the steps from task 3 to measure the resistance using the two-wire method. 3. Now, the four-wire method: Use minigrabber probes to connect the multimeter to both terminals of the resistor using two pairs of test leads, as shown in Fig. 1.6. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 1: The Digital Multimeter Lab 1–5 4. Set the multimeter to measure resistance. To do this, press the softkey labeled “shift” and then the softkey labeled “Ä2W”. This selects the “Ä4W” function. Determine the actual value of the resistor. 5. Compute the percent difference between the actual (measured) value of the resistor and the nominal value of 1Ä as indicated by its color code. Record the actual and percent difference values. Compare results measuring the 1Ä resistor using both methods. Task 5: Graphite Resistor. You will now create a sequence of carbon resistors. Based on their measured values, you will draw conclusions about the relationship between their physical dimensions and resistance. 1. Using a pencil, draw a rectangle whose length (approximately 1") is twice its width on a sheet of paper. Fill in the rectangle with pencil mark. Measure and record the resistance over the length and then over the width of the graphite resistor. 2. Using a pencil, draw a square whose side-length is approximately 1". Fill in the square with pencil mark. Measure and record the resistance over the width of the graphite resistor. 3. Based on your measurements, draw conclusions relating the physical dimensions and resistance. Draw resistors with other shapes, if necessary. Record your measurements and conclusions. Task 6: Biologic Resistor. 1. Holding one probe between the thumb and forefinger of each hand, measure the resistance of your body between your hands. Squeeze the probes tightly so that good contact is established. Record the value of your body’s resistance. You should probably use a standard probe tip (cf. Fig. 1.7) to ensure good contact. 2. Considering that a current of 100–200 mA through your heart will almost certainly kill you, how much voltage across your hands would be lethal? Figure 1.7 Standard probe to be used to measure the biologic resistor. Task 7: Measuring Current and Verifying Ohm’s Law. 1. Configure the multimeter to measure voltage by pressing the “DC V” softkey. Configure the meter on the dc power supply to display the voltage on the +6V output by pressing the “+6V” softkey. Adjust the voltage of the power supply using the “+6V” knob until it reads 5V. Measure the exact voltage using the multimeter. 2. Assemble the circuit in Fig. 1.8. The figure shows the physical setup of the experiment, with the schematic of the circuit also shown in the inset. You will use the (nominal) 1kÄ resistor you measured previously. 3. Set the multimeter to measure dc current by pressing the shift softkey followed by the “DC V” softkey (for the “DC I” function). Make sure that the leads are in the correct jacks in the front panel of the multimeter. 4. Measure the current flowing through the resistor. An ammeter measures the current flow from the red probe to the black probe within the meter. Does this value agree with Ohm’s Law? 5. Measure the current flowing through the resistor in the opposite direction. This is done by reversing the leads of the ammeter. Does this value agree with Ohm’s Law? Task 8: Ideal versus Practical Voltmeter An ideal voltmeter has infinite resistance: It is an open circuit. Although it is impossible to make a physical voltmeter with infinite resistance, a well designed voltmeter exhibits a very large internal input resistance. In some experiments, it is important to take into account the finite, non-ideal, internal resistance. To determine the internal resistance of the voltmeter, set up the circuit shown in Fig. 1.9. The voltmeter reads the voltage across itself, which includes its internal resistance. Since the circuit has only a single branch, the current flowing through the resistor also flows through the voltmeter. The current is given by the c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 1–6 ECE2205, Lab 1: The Digital Multimeter Agilent E3630A 0−6V, 2.5A/0−±20V,0.5A Triple Output DC Power Supply AMPS OVERLOAD +6V 34401A Agilent VOLTAGE ADJUST VOLTS Ω 4W Sense/ 4W Sense/ Ratio Ref Ratio Ref 6 1/2 Digit Multimeter Tracking +20V ratio +6V HI +20V 200V Max −20V Fixed +6V +20V OUTPUT −20V +6V COM +20V FUNCTION Power −20V AC 1 Ω 4W Period DC V AC V Ω 2W Freq On On/Off Off MENU Recall < ± 240 VDC MAX TO RANGE / DIGITS 4 > > Off On MATH DC 1 CHOICES Cont 5 6 > METER Power d Input VΩ HI Auto/ Man LEVEL 1000V Max LO dB dBm Null Min Max LO 500Vpk Max Terminals 3A RMS I Auto/Hold Single ENTER Shift TRIG Front Rear ! LOCAL Fused on Rear Panel 1k Ω 5V Ammeter 1k Ω Schematic of circuit Figure 1.8 Setup for verifying Ohm’s law. equation: I = Vs − Vm , R where Vs is the source voltage (nominally 5V in this experiment), Vm is the voltmeter-measured voltage, and R is the value of the (nominal) 10MÄ resistor. From Ohm’s Law, if we know the current and the voltmeter-measured voltage, we can compute the voltmeter resistance Rm . Vm RVm Vm = Vs −Vm = . Rm = I Vs − Vm R Agilent E3630A 0−6V, 2.5A/0−±20V,0.5A Triple Output DC Power Supply Agilent VOLTAGE ADJUST VOLTS AMPS OVERLOAD +6V Tracking +20V 34401A Ω 4W Sense/ 4W Sense/ Ratio Ref Ratio Ref 6 1/2 Digit Multimeter ratio +6V HI +20V 200V Max −20V Fixed +6V +20V OUTPUT −20V +6V COM +20V −20V FUNCTION Power AC 1 Ω 4W Period DC V AC V Ω 2W Freq On On/Off Off ± 240 VDC MAX TO < MENU Recall > CHOICES RANGE / DIGITS 4 > Off On MATH DC 1 Cont 5 6 > METER Power Input d VΩ HI Auto/ Man LEVEL ENTER 1000V Max LO dB dBm Null Min Max LO Terminals 500Vpk Max 3A RMS I Auto/Hold Single TRIG Shift LOCAL Front Rear ! Fused on Rear Panel 10MΩ 5V Voltmeter 10MΩ Schematic of circuit Figure 1.9 Setup for determining the voltmeter’s internal resistance. 1. Select a (nominal) 10MÄ resistor. Record all color bands of the resistor. 2. Measure its value using the multimeter. Record this value. 3. Set the power supply to provide 5V (Remember, always measure the voltage provided by the power supply with the voltmeter. Do not rely on the digital display on the front panel of the power supply.) 4. Assemble the circuit in Fig. 1.9. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 1: The Digital Multimeter Lab 1–7 5. Record the voltage measured by the voltmeter. 6. Compute the internal resistance of the voltmeter. Record all values. Task 9: Ideal versus Practical Ammeter An ideal ammeter has zero resistance so that the the circuit in which it has been placed is not disturbed. An ideal ammeter is a short circuit. However, as with the voltmeter, no ammeter can ever be ideal, and therefore all ammeters have some (hopefully) small internal resistance. To determine the resistance of the ammeter, we will use the circuit in Fig. 1.8, although with a different value of resistance. According to Ohm’s Law, the current in this circuit will be I = Vs /Rtot where Rtot = R + Rm . The discrete resistor R has value (nominally) 100Ä in this experiment. We can re-write this relationship as: I = Vs /(R + Rm ). By using the known quantities I , Vs and R, we can solve for the unknown quantity Rm . In the procedure that follows it is extremely important that you take precise and accurate measurements. Record each measurement as precisely as the instrument will allow. 1. Select a (nominal) 100Ä resistor. Record all color bands. Measure and record its actual value. 2. Measure the voltage across the dc power supply. It should be set to a nominal value of 5V. 3. Assemble the circuit in Fig. 1.8, but substituting the 100Ä resistor for the 1kÄ resistor in the figure. 4. Set the multimeter to the ammeter mode for dc current measurement. Recall this means two things: Place the test leads in the correct banana jacks on the front panel and press the proper sequence of softkeys. 5. Measure the value of the current using the ammeter and determine the value of Rm . Record all values. Task 10: Lab report. Submit your results in the form of a typed report. While content is clearly the primary objective, neatness and organization will be weighted significantly in the grading of your lab reports. Circuit diagrams may be hand-drawn, but wires should be drawn using a straight edge. A good laboratory report is concise while providing enough detail such that another person could reproduce the results. Another person should be able to read your lab reports and know what you did and how you did it. Your lab reports should not contain the degree of detail present in the lab manual. Try to keep your reports as concise as possible without deleting essential information. Provide minimum procedure statements (e.g., “We obtained four 22 nF capacitors.”). You may assume that the reader has knowledge and proficiency in the use of the lab instruments. Writing of lab reports is not intended to be “busy work” in which you simply rephrase what is stated in the lab manual. You should provide data, calculations, as well as comments, observations, and conclusions to indicate your understanding. The Department requires formal lab reports which must satisfy the following format rules: 1. Title page: This must include a title, name, course and section name and date of the lab assignment (not the due date of the lab writeup). 2. Table of Contents (with page numbers). 3. Introduction: Explain the background and objective of the lab indicating requirements and desired results. 4. Discussion: Discuss the underlying applicable theory and concepts that support the measurements and/or simulations. Indicate and discuss the measurement/simulation set-up and equipment used. 5. Measurement/Simulation Data and/or Results: Present measurement results in tabular, graphical or numeric form. Present results from required lab exercises. Organize according to task. 6. Discussion of Measurements: Discuss measured data and results of simulation in context of comparison to expectation, accuracy, difficulties, etc. Organize according to task. 7. Summary and Conclusions: Discuss findings, explain errors and unexpected results; to what extent were the objectives achieved?; summarize and indicate conclusions. Organize according to task. Also answer specific questions (below). Further requirements on the lab report are: c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 1: The Digital Multimeter Lab 1–8 1. Correct spelling, grammar and punctuation is required. 2. Report must be typed; figures, drawings and equations may be handwritten. 3. Format of references (if any) must conform to IEEE (transactions) standards. In this lab report, please also address the following questions: • Suppose you set the voltage of the dc power supply to 5V. You connect it to a circuit and the voltage provided by the power supply drops to 3V. What happened? • What is the “resolution” of a digital display? Compare the resolution of the digital display on the front panel of the dc power supply to the display on the front panel of the multimeter. Why must you use the multimeter if you wish to set the dc supply to 0.755V? • In task 6, you measured the dc resistance between your left and right hands. To make this measurement, the ohmmeter applied a small (known) voltage and measured the resulting current. The ratio of applied voltage to resulting current is the resistance between the ohmmeter probes (in this case, the resistance between your left and right hands). Based on the resistance you measured, you calculated the voltage range that would cause 100–200 mA of electric current to flow through your body and termed this “the lethal voltage.” However, in “real life,” the lethal voltage would be far less than the value you calculated. Voltages above 50V are considered potentially lethal (really clever people have even been able to kill themselves with lower voltages than this). You are to explain in detail why the lethal voltage is in fact much less than the value you calculated. Your explanation should include the change in skin resistance that occurs when an electric shock occurs and other physiologic effects of electric shock that can be lethal (e.g., pulmonary failure). • Comment on how close the digital multimeter is to ideal with respect to measuring voltage and current. When might the meter not be accurate? c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205: Circuits and Systems I Lab 2–1 Department of Electrical and Computer Engineering University of Colorado at Colorado Springs "Engineering for the Future" Lab 2: Kirchoff’s Laws 2.1 Objective The objective of this lab is to continue developing proficiency in the use of the digital multimeter in the context of verifying Kirchhoff’s Voltage and Current Laws (KVL and KCL). In the process you will investigate both the voltage-divider and current-divider circuit, you will become familiar with the use of the breadboard, and you will learn how to build light-sensor circuits. 2.2 Pre-Lab Preparation Read the lab overview in section 2.3 and answer the questions below. The instructor is to review your answers before you begin the lab tasks. 1. Let the voltmeter in Fig. 2.3 be represented by a resistance Rm . Derive Eq. (2.2) for this circuit. 2. Recall that an ideal voltmeter has infinite resistance. Letting the value of Rm in Eq. (2.2) be infinite should result in the familiar voltage-divider equation (2.1). Derive Eq. (2.1) from Eq. (2.2) by taking the limit as Rm → ∞. L’Hôpital’s Rule may be helpful. 3. Suppose that you measure the full-light and full-dark resistances of two CdS cells and find: R1,low = 90Ä, R2,low = 100Ä, R1,high = 32kÄ, and R2,high = 37kÄ. Find resistances R3 and R4 to match the characteristics of these CdS cells. Which scenario is this? 4. Suppose that you measure the full-light and full-dark resistances of two CdS cells and find: R1,low = 90Ä, R2,low = 100Ä, R1,high = 37kÄ, and R2,high = 32kÄ. Find resistances R3 and R4 to match the characteristics of these CdS cells. Which scenario is this? Be sure to bring your Matlab code minfn1.m and minfn2.m to the lab. If you have a bright flashlight, bring that too. 2.3 Background Prototyping a circuit using a breadboard. The solderless breadboard (sometimes called a protoboard) is the most common type of prototyping circuit board. Prototyping a circuit is valuable for complete evaluation of its design and performance. This requires the circuit to be designed, built and tested in the laboratory. Theoretical calculations and computer simulation are generally part of the design process. Once the circuit configuration is determined, the circuit is built on a prototyping board. There are two main types of prototyping circuit boards: 1. Solderless breadboards, 2. Perfboard. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 2–2 ECE2205, Lab 2: Kirchoff’s Laws Perfboard is a thin slab of either epoxy glass or phenolic with small holes punched through it at a 0.1" spacing. A circuit built on perfboard requires either soldering or wire-wrapping the connections. A circuit built on a breadboard requires neither soldering nor wire wrapping the connections. Your laboratory instructor will assign to you a breadboard on which you will build your circuits throughout the semester. This breadboard has a single (two-sided) terminal strip, two bus strips, and three binding posts as shown in Fig. 2.1. The terminal strips and bus strips have many holes (contact receptacles) with a 0.1" spacing where wires or circuit-element terminals may be inserted. The real value of a breadboard is not as a pincushion, however, but as a wiring aid. The secret is in the hidden wiring inside the breadboard that helps you connect components together. Binding posts BREADBOARD MB−102−PLT R.S.R. ELECTRONICS Vb Va Bus strips 1 Terminal strip 5 10 15 20 25 30 35 40 45 50 55 60 A A B B C C D D E E F F G G H H I I J J 1 5 10 15 Figure 2.1 20 25 30 35 40 45 50 55 60 R.S.R. Electronics MB-102-PLT solderless breadboard. Each bus strip has two rows of contacts. Each of the two rows of contacts on the bus strips comprise a single node. That is, every contact along a row on a bus strip is connected together with wiring hidden inside the breadboard. Bus strips are used primarily for power supply connections but are also used for any node requiring a large number of connections. The terminal strip has 5 rows and 63 columns of contacts on each side of the center gap. Each column of 5 contacts is a node. The internal connections of the breadboard are illustrated in the zoomed cutout view in Fig. 2.2 as orange (grey) lines. 50 55 60 A B C D E F G H Figure 2.2 Zoomed cutout view of breadboard, showing internal connections. You will build your circuits on the terminal strips by inserting the leads of circuit components into the contact receptacles and making connections with 22 AWG (American Wire Gauge) wire. There are wire cutter/strippers and spools of wire in the lab. You will be using the red and black binding posts for power supply connections. Hence, it is a good idea to wire them to a bus strip. Using the multimeter as a voltmeter. A voltmeter is a device for measuring voltage. It measures and displays the voltage (potential difference) of the positive (e.g., red) probe with respect to the negative (e.g., black) probes. The c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 2–3 ECE2205, Lab 2: Kirchoff’s Laws voltmeter is placed in parallel with the circuit element whose voltage is to be measured. Recall that two elements are in parallel when they share the same pair of nodes and hence share the same voltage. Consider the voltage divider circuit shown in Fig. 2.3 in which the voltage across R2 is to be measured. If the presence of the voltmeter does not affect the voltage it is intending to measure, the meter must draw no current. That is, it must act as an open circuit. An open circuit may be thought of as an infinite resistance. Hence, an ideal voltmeter has an infinite resistance. You measured the internal resistance of the voltmeter in Lab 1 and found the value to be on the order of 10MÄ, which is large, but certainly not infinite. R1 Red probe vs Voltmeter R2 Black probe Figure 2.3 Voltage divider circuit, with voltage measured by real voltmeter. First consider the circuit with the voltmeter not present. In this case the voltage v2 across the resistor R2 can be expressed in terms of the source voltage vs and the resistors R1 and R2 by R2 v2 = vs . (2.1) R1 + R2 With the voltmeter present, its resistance alters the voltage division equation, which becomes R2 Rm v2 = vs , R2 Rm + R1 (R2 + Rm ) (2.2) where Rm is the resistance of the voltmeter. You will not be able to see how this equation was obtained at first examination. Let the voltmeter in Fig. 2.3 be represented by a resistance Rm . Use resistance reduction and voltage division to obtain an expression for v2 in terms of vs . Then, clear the fractions in the numerator and denominator. Be sure to show your derivation in your lab report. You will now build the voltage divider circuit using the dc power supply as the voltage source vs in Fig. 2.3. Using the Multimeter as an Ammeter An ammeter is a device for measuring current. It measures the current flowing into the positive (e.g., red) probe and out of the negative (e.g., black) probes of the meter. The ammeter is placed in series with the circuit element whose current is to be measured. Recall that two elements are in series when they share in the same branch and hence share the same current. The ideal ammeter will have zero rresistance, thus not alter the resistance or current of the branch whose current is being measured. Consider the current divider circuit shown in Fig. 2.4. The current i 1 through R1 may be expressed as a fraction of the current i s flowing out of the source in terms of R1 and R2 using current division i1 = is 1 R1 1 R1 + = is 1 R2 R2 . R1 + R2 (2.3) In this lab you will build the current divider circuit and make several measurements. Recall that your ammeter is not ideal—in fact you measured its resistance in the first lab. The resistance of the ammeter will be an important consideration when measuring currents in the circuit shown. Record all measured values and present percent error calculations and tables as appropriate. 10kÄ vs Figure 2.4 R1 R2 Current divider circuit. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 2–4 ECE2205, Lab 2: Kirchoff’s Laws Photoresistors (CdS Cells) Photoresistors are a special kind of resistor that change their value when exposed to light. Some types increase resistance while others decrease resistance. One common photoresistive substance is cadmium-sulfide (CdS), out of which “CdS cell” photoresistors are made. Figure 2.5 shows both a picture of a CdS cell and its schematic symbol (sometimes the schematic symbol is drawn with arrows pointing at the cell to indicate impinging light). Figure 2.5 CdS photoresistor pictorial representation (left) and schematic representation (right). Photoresistors may be used in a voltage-divider circuit for the purpose of sensing the intensity of light. Figure 2.6 gives an example of how this sensor circuit may be designed. In the circuit, R1 is a known resistor and vs is a known voltage. By measuring vCdS , we can compute RCdS and from there infer the level of light. Here is how: 1. First, a table of CdS resistance versus light level is created. 2. By re-arranging the voltage-divider equation, we find that vCdS RCdS = R1 . vs − vCdS 3. We measure vCdS , compute RCdS , and use the table to look up the light level. R1 vs vCdS Figure 2.6 CdS-cell light sensor using voltage divider. Balancing Two CdS Cells The above method for constructing a light sensor works well if you have a specially calibrated table of resistance versus light level for the CdS cell that you are using. A practical problem, however, is that all CdS cells require slightly different calibration tables. If your circuit is being used in some embedded system, the software can be written to automatically calibrate the sensors (you have had some experience with this in ECE1001: Introduction to Robotics). If you want to match the performance of two CdS cells electronically, however, you must follow a different approach. In this lab, we will consider some circuit modifications so that the two CdS cells have identical resistances at two different reference light settings. For example, if you were constructing a line-following robot, you might want identical readings over the dark part of the line and over the white part of the background. Here, we will calibrate identical readings in maximum darkness and maximum brightness. First, we measure the minimum resistances of both CdS cells (in maximum brightness). We denote the CdS cell with the lower of these values “CdS cell 1” and the other as “CdS cell 2”. Then, we measure the maximum resistances of both CdS cells (in maximum darkness). There are two possible scenarios: (1) CdS cell 1 has the lower maximum resistance as well; or (2) CdS cell 2 has the lower maximum resistance. In the first scenario, we replace the CdS cells in the voltage-divider circuits with the circuit shown in the left frame of Fig. 2.7. R3 is a resistor in series with CdS cell 1 to increase its lower resistance value (a side effect that we must consider is that its higher resistance value is also increased). R4 is a resistor in parallel with CdS cell 2 to decrease its higher resistance value (a side effect is that its lower resistance value is also decreased). If we match the c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 2–5 ECE2205, Lab 2: Kirchoff’s Laws conductances of these two cells at both low and high ends, we must satisfy the following equations: 1 1 1 = + R1,low + R3 R2,low R4 1 1 1 = + . R1,high + R3 R2,high R4 Notice that these are two simultaneous equations in two unknowns (R3 and R4 ). Further, they are nonlinear! We can do some algebra to solve them, or we can ask Matlab to iteratively solve the equations using an optimization technique. First, re-arrange the equations as 1 1 1 − − e1 = R1,low + R3 R2,low R4 1 1 1 e2 = − − . R1,high + R3 R2,high R4 The new “variables” e1 and e2 are “equation errors”. If these errors are zero, then both equations are unmodified. We will ask Matlab to pick values for R3 and R4 such that J = e12 + e22 is minimized, and if J is “small enough” then we have solved the equations. Before we see how, let’s first consider the second scenario. R4 R3 CdS Cell 1 Cds Cell 2 Figure 2.7 R4 R3 CdS Cell 1 Cds Cell 2 Two scenarios for matching CdS-cell characteristics. “Scenario 1” is on the left; “Scenario 2” is on the right. In the second scenario, we replace the CdS cells in the voltage-divider circuits with the circuit shown in the right frame of Fig. 2.7. R3 is a resistor in series with CdS cell 1 to increase its lower resistance (a side effect that we must consider is that its higher resistance value is also increased). R4 is a resistor in parallel with CdS cell 1 to decrease its higher resistance (a side effect that we must consider is that its lower resistance value is also decreased). If we match the resistances of these two cells at both low and high ends, we must satisfy the following equations: R1,low R4 R2,low = R3 + R1,low + R4 R1,high R4 R2,high = R3 + . R1,high + R4 Again, we re-arrange these equations into an equation-error format: R1,low R4 − R2,low e1 = R3 + R1,low + R4 R1,high R4 e2 = R3 + − R2,high. R1,high + R4 When J = e12 + e22 , minimizing J is the same as solving for R3 and R4 , provided J is “small enough”. The easy way to solve for R3 and R4 uses Matlab’s optimization toolbox (available in the lab, but not included as part of the student version). Specifically, you will invoke a Matlab procedure that will minimize J = e12 + e22 where e1 and e2 are defined for whichever scenario you encounter. A Matlab function for computing the cost J if you encounter the first scenario is: % Minimization function to determine cost for case where % CdS cell 1 has lower minimum resistance and lower maximum c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 2–6 ECE2205, Lab 2: Kirchoff’s Laws % resistance than CdS cell 2. Therefore, CdS cell 1 needs % a resistor R3 in series and CdS cell 2 needs a resistor R4 in % parallel. % The input "theta" comprises [R3, R4]. % matching error-squared (goal = 0). The output is the function cost = minfn1(theta) global R1low R1high R2low R2high lowerror = 1/(R1low + theta(1)) - 1/R2low - 1/theta(2); higherror = 1/(R1high + theta(1)) - 1/R2high - 1/theta(2); cost = lowerror^2 + higherror^2 end Similarly, a Matlab function for computing the cost J if you encounter the second scenario is: % % % % Minimization function to determine cost for case where CdS cell 1 has lower minimum resistance and higher maximum resistance than CdS cell 2. Therefore, CdS cell 1 needs a resistor R3 in series and a resistor R4 in parallel. % The input "theta" comprises [R3, R4]. % matching error-squared (goal = 0). The output is the function cost = minfn2(theta) global R1low R1high R2low R2high lowerror = theta(1) + R1low*theta(2)/(R1low + theta(2)) - R2low; higherror = theta(1) + R1high*theta(2)/(R1high + theta(2)) - R2high; cost = lowerror^2 + higherror^2 end The actual work gets done in Matlab using the following code segment: global R1low R1high R2low R2high R1low = <insert value>; R1high = <insert value>; R2low = <insert value>; R2high = <insert value>; g3 = <insert value>; % initial guess for value of R3 g4 = <insert value>; % initial guess for value of R4 fminsearch(’minfn1’,[g3 g4]) Use minfn2 instead of minfn1 in the last line if you encounter the second scenario. Values of R3 and R4 will be returned from the fminsearch procedure. Variable Resistors In order to match your two CdS cells, you will need to be able to construct the resistance values returned by Matlab’s optimization routine. Since fixed-value resistors are only manufactured with certain nominal values, it is necessary to use a variable resistor (perhaps in combination with a fixed-value resistor) to achieve the desired resistance. A variable resistor is a three-terminal device, depicted schematically in the left frame of Fig. 2.8. Figure 2.8 The variable resistor, or potentiometer (“pot”). c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 2: Kirchoff’s Laws Lab 2–7 Two terminals are connected across the full resistance. The third terminal is connected to a sliding contact that can sweep across the resistive surface to achieve any value between zero resistance and the full resistance of the device. A common configuration for wiring a variable resistor is shown in the right frame of Fig. 2.8. The slider terminal is hard-wired to one of the end terminals. Now, the end-to-end resistance is variable. There are different kinds of mechanisms for adjusting variable resistors. Some have linear sliders; others have rotational sliders. The kind we will use in this lab use a screwdriver to rotate a small rotational slider. If you are careful, you should be able to adjust the resistance in increments of roughly 1% of the full-scale resistance of the device. 2.4 Lab Assignment Task 1: Prelab Certification. Have the Lab Assistant/Instructor review your answers to the prelab assignment questions and sign the certifications page. Task 2: Check out a Breadboard Check out an “R.S.R. Electronics MB-102-PLT” breadboard from your lab instructor. You will be using this board throughout the semester. Obtain a piece of masking tape and affix it to the top of your board. Write your name on the tape. After you have checked out your breadboard, examine it closely and compare with Figs. 2.1 and 2.2. Use the ohmmeter to verify the hidden wiring of Fig. 2.2. Task 3: Voltage Divider with Moderate-Valued Resistors. 1. Obtain two 1kÄ resistors from the parts bin. Designate one of the resistors as R1 and the other as R2 2. Measure and record the resistor values using the multimeter as an ohmmeter. Be sure to keep track of which resistor corresponds to which value measured! 3. Build the circuit in Fig. 2.3 on your breadboard using the 1kÄ resistors for R1 and R2 . 4. Set the power supply to 5V. Use the voltmeter, not the front panel display of the power supply to ensure the proper setting. Important note: You built the circuit before you set the power supply voltage to 5V. If the current limiter is set to a value lower than than the current demanded by the circuit, the constant current (cc) indicator will light up and the voltage control knob will no longer adjust the output voltage. If this happens, simply increase the current limiter until you are able to achieve 5V in the constant voltage (cv) mode. 5. Using the voltmeter, measure the voltage across resistor R1 , and then across resistor R2 . Record these values, as always, and verify Kirchhoff’s Voltage Law (KVL). 6. Comment on the accuracy of measurements made considering the internal resistance of the voltmeter. 7. Create a table presenting theoretical and measured voltages along with percent error. Consider whether your theoretical values for the voltages across R1 and R2 should include the effect of Rm . Important Note: When you are calculating percent error, you should avoid cases in which the theoretical value is zero since the percent error is meaningless. To calculate percent error between theoretical and experimental verification of KVL, use the source voltage as the reference. For example, in the measurements made in this section, the theoretical value (and measured value!) for the voltage across the supply is 5V. The measured value is the same as the theoretical value because you used the voltmeter to set the power supply voltage to 5V. To obtain the KVL measured voltage, add the voltage across R1 to the voltage across R2 . Compare with 5V. Task 4: Voltage Divider with Large-Valued Resistors 1. Obtain two 10MÄ resistors from the parts bin. Designate one of the resistors as R1 and the other as R2 . 2. Measure the resistor values using the multimeter as an ohmmeter. Be sure to keep track of which resistor corresponds to which value measured! 3. Build the circuit in Fig. 2.3 on your breadboard using the 10MÄ resistors for R1 and R2 . c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 2: Kirchoff’s Laws Lab 2–8 4. Set the power supply to 5V. 5. Using the voltmeter, measure the voltage across resistor R1 , and then across resistor R2 . Record these values, and verify Kirchhoff’s Voltage Law (KVL). 6. Comment on the accuracy of the voltage measurements made (consider the internal resistance of the voltmeter). 7. Create a table presenting theoretical and measured voltages along with percent error. Consider whether your theoretical values for the voltages across R1 and R2 should include the effect of Rm . Task 5: Current Divider with Moderate-Valued Resistors 1. Obtain two 1kÄ resistors from the parts bin. Designate one of the resistors as R1 and the other as R2 . (You may use the same resistors that you used in Task 3 if you wish). Also, obtain one 10kÄ resistor. Designate this resistor as R3 . 2. Measure the resistor values using the multimeter as an ohmmeter. Be sure to keep track of which resistor corresponds to which value measured! 3. Build the circuit in Fig. 2.4 on your breadboard using the 1kÄ resistors for R1 and R2 . 4. Set the power supply to 10V. Don’t forget to set the voltage using the voltmeter rather than depending on the front panel display of the power supply. Important Note: You built the circuit before you set the power supply voltage to 10V. If the current limiter is set to a value lower than than the current demanded by the circuit, the constant current (cc) indicator will light up and the voltage control knob will no longer adjust the output voltage. If this happens, simply increase the current limiter until you are able to achieve 10V in the constant voltage (cv) mode. 5. Using the voltmeter, measure the voltage across the 10kÄ resistor followed by the parallel combination of resistors R1 and R2 . Record these values, as always, and verify Kirchhoff’s Voltage Law (KVL). 6. Configure the multimeter to measure current. Remember that this requires two things: Remove the terminal of the red probe from the voltage/resistance measuring receptacle and insert it in the current measuring receptacle on the front panel of the multimeter. Then press the “shift” and “DC I” buttons to select dc current measurement. 7. Measure the current through the 10V source. Remember that you have to break the circuit and insert the ammeter in series with the 10V source to allow the current to flow through the ammeter. 8. Measure the current through R1 and then the current through R2 . 9. Verify Kirchhoff’s Current Law (KCL). Remember that a theoretical value of zero produces a meaningless percent error. 10. Comment on the accuracy of the voltage measurements made (consider the internal resistance of the voltmeter). 11. Comment on the accuracy of the current measurements made (consider the internal resistance of the ammeter). Task 6: Current Divider with Small-Valued Resistors 1. Obtain two 10Ä resistors from the parts bin. Designate one of the resistors as R1 and the other as R2 . 2. Measure the resistor values using the multimeter as an ohmmeter. Be sure to keep track of which resistor corresponds to which value measured! 3. Build the circuit in Fig. 2.4 using the 10Ä resistors for R1 and R2 . 4. Set the power supply to 10V. Don’t forget to set the voltage using the voltmeter rather than depending on the front panel display of the power supply. Important Note: You built the circuit before you set the power supply voltage to 10V. If the current limiter is set to a value lower than than the current demanded by the c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 2: Kirchoff’s Laws Lab 2–9 circuit, the constant current (cc) indicator will light up and the voltage control knob will no longer adjust the output voltage. If this happens, simply increase the current limiter until you are able to achieve 10V in the constant voltage (cv) mode. 5. Using the voltmeter, measure the voltage across the 10kÄ resistor followed by the parallel combination of resistors R1 and R2 . Record these values, as always, and verify Kirchhoff’s Voltage Law (KVL). 6. Configure the multimeter to measure current. Remember that this requires two things: Remove the terminal of the red probe from the voltage/resistance measuring receptacle and insert it in the current measuring receptacle on the front panel of the multimeter. Then press the “shift” and “DC I” buttons to select dc current measurement. 7. Measure the current through the 10V source. Remember that you have to break the circuit and insert the ammeter in series with the 10V source to allow the current to flow through the ammeter. 8. Measure the current through R1 and then the current through R2 . 9. Verify Kirchhoff’s Current Law (KCL). Remember that a theoretical value of zero produces a meaningless percent error. 10. Comment on the accuracy of the voltage measurements made (consider the internal resistance of the voltmeter). 11. Comment on the accuracy of the current measurements made (consider the internal resistance of the ammeter). Task 7: Check out a parts box Check out a “parts box”. Initially, this will only contain the two CdS cells required for this lab exercise, and two variable resistors. However, you will collect other parts over the duration of the semester that you will keep in this box. At the end of the semester you will return the box, and all the parts. Affix a piece of masking tape on the back of the box and write your name on the masking tape. Task 8: Matching CdS cells 1. Determine a way to differentiate between your two CdS cells. Perhaps you could use masking tape on the leads of one, or perhaps you can keep track using a position on the breadboard. 2. Measure the full-dark resistance of both CdS cells. Cover the cell’s surface completely with your finger to make sure that it “sees” no light. Record both values. 3. Measure the full-light resistance of both CdS cells. It helps if you use a bright flashlight shining directly into the cells. Record both values. 4. Determine whether your cells fall within scenario 1 or scenario 2. 5. Compute the resistances R3 and R4 required to match the CdS cells. 6. Using the variable resistors from your parts box and perhaps some fixed resistors from the parts bins in the lab, construct the circuit(s) required to match resistances of the CdS cells. 7. Repeat the full-dark and full-light resistance measurements to verify that your CdS cells are now matched. Record the values. Are the cells matched under ambient light conditions? Task 9: Lab report. Submit your results in the form of a typed report. Refer to Lab 1 for instructions regarding proper format and content of an acceptable lab report. Please also address the following questions: • The current division equation (Eq. (2.3)) does not include the resistance of the ammeter. Let the internal resistance of the ammeter be Rm . Write the expression for the current i 1 through R1 , including the resistance of the meter assuming that the ammeter is being used to measure the current i 1 . Then take the limit of this expression as the ammeter internal resistance goes to zero, showing that the limit is given by Eq. (2.3). c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 2–10 ECE2205, Lab 2: Kirchoff’s Laws • The voltage source and 10kÄ resistor in Fig. 2.4 form an approximate current source for small load resistances. If the voltage source and 10kÄ resistor formed an ideal current source, then the current i s would be constant, independent of the resistances of R1 and R2 , which is certainly not the case. Consider the parallel combination of R1 and R2 as a single resistance R L . If R L is small compared to 10kÄ, then the current is will be very nearly 1mA (Recall that vs = 10V) independent of R L . Calculate the range of values of R L such that the current is will deviate from 1mA by no more than 5%. • Consider the circuit shown in Fig. 2.9. Suppose you want to know the value of all voltages and currents in the circuit. Assume that you know nothing at all about the resistor values. You want the results to be as accurate as possible. You have a multimeter that you may use as either a voltmeter or an ammeter. Explain the sequence of measurements that you make. Comment on your level of confidence that your results are accurate. Don’t forget that you have Ohm’s Law and Kirchhoff’s Laws that may be used. Try to find the minimum set of measurements required to solve for all unknowns. R1 vs Figure 2.9 R2 R3 Resistive network. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205: Circuits and Systems I Lab 3–1 Department of Electrical and Computer Engineering University of Colorado at Colorado Springs "Engineering for the Future" Lab 3: Oscilloscope Crash Course 3.1 Objective The objectives of this lab are twofold. First, you will learn how to use many of the common functions of an oscilloscope and function generator (including some limitations of the latter). Secondly, you will gain hands-on experience with the ubiquitous resistor-capacitor (RC) circuit. 3.2 Pre-Lab Preparation Read the lab overview in section 3.3 and answer the questions below. The instructor is to review your answers before you begin the lab tasks. 1. According to the discussion on Fig. 3.2, a function generator will provide the set output voltage only if the connected circuit (the “load”) has a resistance of 50 Ä. If a peak-to-peak output voltage of 1 V has been requested, what is the actual peak-to-peak voltage of the “source” inside the function generator? 2. Using Matlab, plot the Lissajous figures of two sinusoids having the same frequency, different amplitudes, and phase differences of 0, π/3, π/2, and π radians. Using the plots and the Lissajous method, demonstrate that you can recover the phase from the ellipses. Do the amplitudes of the sinusoids matter? Why? 3. Of the two RC filters shown in Fig. 3.5, one is a low-pass filter (passing low frequencies but attenuating high frequencies) and the other is a high-pass filter (just the opposite). Which is which? (Try putting ω = 0 into the frequency response and finding the magnitude response of both). 4. By hand, find the step responses of the two RC filters via the method of your choice (e.g., convolution). Since a square-pulse waveform may be created as p(t) = u(t) − u(t − τ ), sketch the square-pulse response of the two RC filters (you need to have the right shape, but not perfect detail). 5. A low-pass RC filter has a step response that achieves its steady-state value in about five time constants, where the time constant τ is defined as τ = RC. For R = 390 kÄ and C = 0.01µF, what is τ and how long do you expect the step response of that filter to take to converge to steady-state? If you have one handy, bring a 3.5” floppy disk to the lab to practice saving scope data to disk. This is not a requirement, however. 3.3 Background Function Generator A function generator is used to generate source voltages in a circuit that vary with time. The Agilent function generator available in the electronics lab is depicted in Fig. 3.1. It can produce four primary waveforms: sine, square, triangular and ramp, as well as other kinds of waveforms under computer control. There are three parameters that can be varied for each of the primary waveform types: c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 3–2 ECE2205, Lab 3: Oscilloscope Crash Course 1. Peak-to-peak signal amplitude (0–10V); 2. Frequency (0–15MHz); 3. DC offset. To set any of these features, press the button labeled with the feature you wish to modify (i.e., “Ampl”, “Freq”, or “Offset”). The present setting of this feature will appear. Notice that one of the digits is blinking—turning the dial will affect this digit. You may change which digit is flashing by pressing the left or right arrow keys. It is also possible to enter a number directly by first pressing the button marked “Enter Number” and then typing the value using the keypad. Pressing “Enter” immediately following will alter the setting to the new value. Agilent 33120A 15 MHz Function / Arbitrary Waveform Generator FUNCTION / MODULATION AM Power 1 Freq Off On 6 FM 2 Freq AM/FM 7 FSK 3 Level Ampl Burst 4 % Duty 8 Offset MODIFY Sweep 5 Internal 9 Single TRIG Figure 3.1 Noise Arb List ± Store 0 Recall STATE Arb SYNC MENU MHz m Vpp On / Off Enter kHz m Vrms Cancel . Enter Number Shift Hz dBm LOCAL Back Space Recall Menu OUTPUT 42V Max 50 Ω Function generator. The function generator has an internal resistance of 50 Ä and “expects” to be connected to a 50 Ä load resistance, as shown in Fig. 3.2. When you select a signal amplitude on the front panel, it will configure its internal source to provide that amplitude at the output terminals only if the load is in fact 50 Ä. If the load that you connect has a different resistance, then you will need to measure the function-generator output to ensure that it has the desired amplitude. The voltage-divider equation can also be used to understand how the internal source voltage relates to the voltage at the function generator’s terminals. Internal Resistance Source Figure 3.2 Circuit Load Assumed configuration for function generator. Both the internal resistance and the assumed load resistance are 50 Ä. Oscilloscope An oscilloscope (scope) is used to view one or more voltage waveforms on a built-in display. The scopes in the lab also have the capability of uploading waveform data to a PC for further analysis and for inclusion in reports. Most often, the waveform is displayed as a function of time; however, it is possible to show one waveform as a function of another waveform in a parametric plot. The Agilent oscilloscope available in the electronics lab is depicted in Fig. 3.3. This scope has four channels, each of which may have an input waveform to be displayed. Each channel has a vertical placement knob that moves the waveform for that channel up and down. Each channel also has a knob that selects the vertical scale of the waveform in terms of volts per division. Divisions are the visible grid lines on the oscilloscope screen. The knobs that set horizontal placement and horizontal scale in time per division control all channels simultaneously. The oscilloscope operates by sampling the input waveform(s) very quickly and plotting the sampled data on the screen. Since only a short segment of time can be shown, the scope most naturally works with periodic waveforms— one or more periods are shown, and the rest of the waveform can be inferred. However, it is also possible to cause the scope to sample a single “trace” of data starting with a triggering event and ending when the scope’s data buffer is full. We will explore both of these operating modes in this lab. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 3–3 ECE2205, Lab 3: Oscilloscope Crash Course Agilent 1 500 m v 54624A OSCILLOSCOPE MEGA 0.00s Z oom 1.00 m s/ Horizontal 100 MHz 200MSa/s 1 Run Control Run Main Delayed RUN 50s Single Stop 5ns Waveform Measure Cursors Quick Meas Auto− Scale Save Recall Trigger Aquire Display Edge Mode Coupling Quick Print Utility Pulse Width Pattern File 1 Level More Vertical 5V 1mV 1 5V Math 1mV 5V 1mV 5V 3 2 1mV 4 Probe Comp 1 X 01 INTENSITY POWER Figure 3.3 2 ! 1M Ω ~ 14 pF 300 V Max CAT I 3 Y 4 ! 1M Ω ~ 14 pF 300 V Max CAT I Oscilloscope. The scope face has knobs and buttons to control the more common operations of the device. Directly under the scope display are five other buttons called “softkeys” that change their function according to the present mode of the scope. Labels on the display directly above the softkeys identify the key functions at the present time. Oscilloscopes have a bewildering number of possible settings, so that it is easy to get confused about the present configuration. If you wish to reset the scope to the factory default configuration, simply press the “Save/Recall” button, and then the “Default Setup” softkey. Saving Oscilloscope Data Oscilloscopes are often used to debug and understand circuit operation. They may also be used to help document circuit behavior. This can be done by uploading the measured information to a PC or by saving the data to a floppy disk (remember what that is?). The saved information can then be included in a report. The lab scopes are connected to the PC at their workstation using a serial RS-232 link. You will notice a switch box on this cable that may be set either to “Oscilloscope” or “Open line”. Make sure that the switch is in the “Oscilloscope” position. Then, on the PC, first log in to your UFP account. Run the “Intuilink Data Capture Application”. In the instrument menu select “54620/40 - Series” and click on the “Get Data” Icon. Two windows will open after the upload is complete. One has a bitmap image of the scope’s screen; the other contains a vector drawing of the actual data that the scope is displaying. When the image window is selected, you may save it to a “.bmp” file for inclusion in a report. When the plot window is selected, you may also save its data as a text file. Be sure to select the “x-axis” button so that both time and value information is saved. An example of the text file is: x-axis ch1 -1.00000000E-03 -9.80000000E-04 -9.60000000E-04 -9.40000000E-04 -9.20000000E-04 (etc) -2.500E-04 -2.500E-04 -3.150E-02 -3.005E-02 -2.150E-02 If your text file does not have the “x-axis” column, you forgot to select the “x-axis” button. If you were displaying more than one channel, there will be more than two columns. The information in this file cannot be directly read into Matlab for plotting because of the first line, which contains text instead of data. Roger Perkins has written the following simple Matlab program that will read and plot the data in the file by first opening the file, discarding the first line, and then reading the rest of the data. If you know how to do file input/output in “C”, then the following will make sense. % Template for plotting scope data data saved with x axis clc; clear; fid = fopen(’Waveform_test_all_data.txt’,’r’); c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 3–4 ECE2205, Lab 3: Oscilloscope Crash Course % First, read the line of text data line1 = fscanf(fid,’%s’,2); % change ’2’ if there are more columns data = fscanf(fid,’%e’); time = data(1:2:end); volt = data(2:2:end); fclose(’all’); plot(time,volt); % get data now % extract time column % get voltage data % close data file grid on; title(’Scope Data’); xlabel(’Time (seconds)’); ylabel(’Voltage’); Alternately, you can edit the text file with “Notepad”, delete the first line, and read the data file with the Matlab statement load -ascii Waveform_test_all_data.txt. The scope also has the ability to save data to a file on a floppy disk. To do so, press the “Save/Recall” key, then the “Save” softkey, and the “New File” softkey. The name of the file may be entered one character at time using the knob to the left of the “Cursors” key to select the present character, and then pressing the “Enter” softkey to accept that character. As practice, try saving the scope data to a disk using the filename “ROCK_ON”. Determining Phase Difference—Lissajous Figures As we progress through this course, we will more-and-moreoften be working with circuits containing capacitor and inductors—components that have v-i relationships that are differential equations. We will find that it is easiest to analyze these types of circuits in the frequency domain rather than the time domain. Recall from ECE2610 that the frequency response of a linear-time-invariant (LTI) system predicts how the system’s output compares to its input when the input signal is a sinusoid. The frequency response comprises both a magnitude response and a phase response. The magnitude response predicts how the amplitude of the output sinusoid is scaled from the amplitude of the input sinusoid. This is easy to measure on an oscilloscope: Simply measure how many volts peak-to-peak are displayed for a sinusoid, and divide by two to get its amplitude. The phase difference between the input and output is a little trickier to measure. One method is to display both signals simultaneously on the scope, measure the time difference between the zero crossings (tm ) and compute the phase as φ = −ωo tm = −2π f o tm . Since phase is a signed quantity, it is important to measure tm from the input waveform to the output waveform. A second method is to use “Lissajous (pronounced LEE-suh-zhoo) figures” named after their discoverer Jules Antoine Lissajous. The oscilloscope is configured to display two signals in x-y mode: the input signal is applied to the horizontal axis of an oscilloscope, and the output signal is applied to the vertical axis. The resulting pattern is a function of the ratio of the two frequencies and the phase shift between the signals. Since LTI systems do not change a signal’s frequency, the output pattern may be used to determine phase shift. A sample Lissajous figure is displayed in Fig. 3.4. Two out-of-phase sinusoids displayed on an x-y plot produce an ellipse. The phase difference between the sinusoids may be computed as either sin(φ) = y2 /y1 , or sin(φ) = x2 /x1 . Note that the origin must be at the center of the scope for this method to work. The scope cursors may be used to measure y1 , y2 , x1 , and/or x2 . To gain some experience with Lissajous figures, the following Matlab script will create one for you: % Create two out-of-phase sinusoids and plot the Lissajous % figure for them. amp1 and amp2 are the amplitudes of the two % sinusoids, freq is the frequency of the sinusoids, phase is c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 3–5 ECE2205, Lab 3: Oscilloscope Crash Course y y1 y2 x x1 Figure 3.4 x2 Sample Lissajous figure. % the phase shift between the sinusoids. Experiment to see % that the amplitudes and frequency do not change the basic % Lissajous pattern. function lissajous(amp1, amp2, freq, phase) clf; inc = 1/(freq*200); % plot 200 points in the ellipse t = 0:inc:1/freq; x = amp1*sin(2*pi*freq.*t+phase); y = amp2*sin(2*pi*freq.*t); plot(x, y, ’k-’); end RC Filters The simple combination of a resistor and capacitor can create a circuit with interesting applications. There are two ways this can be done, as shown in Fig. 3.5. Both circuits result in frequency-selective filters. vin vout Scenario 1 Figure 3.5 vin vout Scenario 2 Two kinds of RC filter. If the resistor has value R and the capacitor has value C, then the left circuit has differential equation (assuming negligible load): d RC vout (t) + vout (t) = vin (t). dt By using the differentiation property of the Fourier transform, we can find the Fourier transform of this differential equation term-by-term: RC j ωVout( j ω) + Vout ( j ω) = Vin ( j ω) Vout ( j ω) 1 H ( j ω) = = . Vin ( j ω) 1 + j ω RC The impulse response of this circuit may be found via inverse Fourier transform of the frequency response H ( j ω) and is 1 − t e RC u(t), h(t) = RC where u(t) is the unit-step function. The right circuit has differential equation c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 3–6 ECE2205, Lab 3: Oscilloscope Crash Course RC d d vout (t) + vout (t) = RC vin (t). dt dt We can similarly find its frequency response to be H ( j ω) = j ω RC , 1 + j ω RC and its impulse response to be h(t) = δ(t) − 1 − t e RC u(t). RC 3.4 Lab Assignment Task 1: Prelab certification. Have the Lab Assistant/Instructor review your answers to the prelab assignment questions and sign the certifications page. Task 2: The function generator assumed load impedance. In this section, we will be using the function generator to provide a time-varying voltage which will then be measured using the oscilloscope. Important: DO NOT let the leads from the function generator touch each other! If the function generator leads touch each other, either the internal fuse will blow or serious damage to the instrument can occur. It is very important that you keep this in mind at all times. Important: The function generator has an internal resistance of 50Ä. The voltage displayed on its front panel is the voltage that would appear at its terminals if it were connected to a 50Ä load. Under open circuit conditions, the voltage across the terminals of the function generator is twice as large as the value indicated on its front panel. This is an important concept and often misunderstood. 1. Set the function generator to produce a 10 kHz sine wave with 1V peak-to-peak. 2. Connect the oscilloscope channel directly to the output of the function generator. 3. Locate the “Vertical” section on the front panel of the oscilloscope. It is the section that includes the connections of the scope probes to the scope. 4. Press the key labeled “1”. Adjust the signal’s vertical position to be centered on the screen using the up/down knob; adjust the volts/division so that the signal nearly fills the screen; adjust the time scale using the time/division knob in the “Horizontal” section on the front of the scope. Your lab TA may rap your knuckles with a solid object if you even think about touching the “Auto-Scale” button, so beware! 5. Press the “Cursors” key and adjust the scope’s displayed measurement value to determine manually the peakto-peak voltage of the input signal. Then, press the “Quick Meas” key to double-check your result. In general, the “Quick Meas” is less accurate since it does not average out noise as you can do visually, and hence overpredicts peak-to-peak amplitude. Observe that the measured peak-to-peak voltage is approximately twice the peak-to-peak voltage shown on the front panel of the function generator. 6. Using the automatic measure features (“Quick Meas”) of the oscilloscope, determine the frequency, and the period of the sinusoidal voltage. 7. Measure the peak-to-peak voltage by hand, i.e., count the vertical divisions from the minimum to the maximum and multiply by the number of volts per division. The volts per division setting is shown in the upper left corner of the scope screen. 8. Using the same screen, measure the period of the sine wave, i.e., count the number of horizontal divisions in one period of the sine wave. The time per division setting is shown at the top-right-center of the scope screen. 9. Using the formula, frequency = 1/period, determine the frequency of the sine wave. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 3: Oscilloscope Crash Course Lab 3–7 10. Connect the function generator across a (nominal) 51 Ä resistor. Leave the settings on the function generator unchanged. 11. Connect the oscilloscope channel 1 probe across the resistor (and function generator). 12. Repeat the measurement of peak-to-peak voltage. Observe that the measured peak-to-peak voltage is approximately the same as the peak-to-peak voltage shown on the front panel of the function generator. Hence, the voltage at the terminals of the function generator is load dependent. Whenever you use the function generator to provide a voltage waveform and desire a specific amplitude, you must use either the multimeter or the scope to set the desired voltage because the value shown on the front panel of the function generator is valid only for a 50 Ä load. Task 3: Upload waveforms to a PC. In this section, you will experiment with shifting and scaling waveforms manually on the scope display, and uploading these waveforms to the PC. 1. Set the function generator to produce a 100 Hz square wave. When displayed on the scope screen, the amplitude should be 2 V peak-to-peak. 2. Configure the scope to display as close to exactly one period of this wave as possible (filling the screen). 3. Upload the scope display to the PC; save the display as a “.bmp” file (include in your report); also, save the display data as a “.txt” file to be plotted in Matlab and included in your report. Be sure to select the option to save the x-axis information as well! 4. Repeat steps 2–3 except show two periods of the wave, and have the bottom of the wave align with the middle of the display, and the top of the wave align with the top of the display. 5. Repeat steps 1–3 with a 1 kHz sine-wave source. 6. Repeat steps 1–3 with a 100 kHz triangle-wave source. 7. Optionally, save data to a floppy disk. Task 4: RC low-pass filter, integrator In the prelab exercise you determined which circuit in Fig. 3.5 was the low-pass filter. We will investigate that circuit here (no hints—you figure it out!). 1. Construct the RC low-pass filter using R = 390 kÄ and C = 0.01 µF. Use an square-wave input to this circuit with frequency 100 Hz. 2. Connect channel 1 of the scope to the input and channel 2 to the output (press the “2” button on the scope to display channel 2 as well). 3. Adjust the function generator so that the input waveform is 2 V peak-to-peak. Include this figure in your report. 4. Estimate the time constant of the circuit from the scope waveform. If necessary, adjust the frequency of the square wave to make this possible. The most reliable way of determining the time constant is to measure the time it takes the output signal to climb from 0% to 63% of its final value. Is this the same as the time taken to fall from 100% to 37%? (If not, something is amiss in your way of taking these readings!) 5. Now, drive the circuit using a 1 kHz triangle wave, 10 V peak-to-peak; what is the output waveform called? (Doesn’t this circuit seem clever? An inanimate object performing calculus!). Include this figure in your report. 6. Does the integrator work for all frequency inputs? Can you find frequencies for which it works well, and others for which it does not? 7. Drive the circuit using a 1 kHz, 10 V peak-to-peak sine wave. What should the magnitude response be at this frequency? What should the phase shift be? c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 3: Oscilloscope Crash Course Lab 3–8 8. Measure the magnitude of the signal at the input and the output. What is the ratio of these magnitudes? What should the ratio be? 9. Measure the phase shift between the input and output using three methods: (a) Automatic method 1: Press the “Quick Meas” key, then the “Select” softkey (select “phase”), then the “Measure Phase” softkey. (b) Automatic method 2: In the same menu as above, press the “Select” softkey (select “delay”), then the “Measure Delay” softkey. (c) Lissajous figure: Press the “Main/Delayed” key on the “Horizontal” section of the scope panel. Press the “XY” softkey. Make sure you adjust the “0” position on both axes, then use the Lissajous method to compute phase. Upload the Lissajous figure to the PC for inclusion in your report. Note: Due to the low frequency input, you will need to also press the “Display” key in the waveform menu, then the “∞ persist” softkey. This allows the entire Lissajous figure to be displayed on the scope and uploaded to the PC. Task 5: RC highpass filter, differentiator In the prelab exercise you determined which circuit in Fig. 3.5 was the highpass filter. We will investigate that circuit here (again, no hints—you figure it out!). 1. Construct the RC highpass filter using R = 390 kÄ and C = 0.01 µF. Use an square-wave input to this circuit with frequency 100 Hz. 2. Connect channel 1 of the scope to the input and channel 2 to the output (press the “2” button on the scope to display channel 2 as well). 3. Adjust the function generator so that the input waveform is 2 V peak-to-peak. Include this figure in your report. 4. Now, drive the circuit using a 10 Hz triangle wave, 10 V peak-to-peak; what is the output waveform called? (Doesn’t this circuit seem clever? Pretty speedy doing calculus, huh?). Include this figure in your report. 5. Does the differentiator work for all frequency inputs? Can you find frequencies for which it works well, and others for which it does not? 6. Drive the circuit using a 10 Hz, 10 V peak-to-peak sine wave. What should the magnitude response be at this frequency? What should the phase shift be? 7. Measure the magnitude of the signal at the input and the output. What is the ratio of these magnitudes? What should the ratio be? 8. Measure the phase shift between the input and output using three methods: (a) Automatic method 1: Press the “Quick Meas” key, then the “Select” softkey (select “phase”), then the “Measure Phase” softkey. (b) Automatic method 2: In the same menu as above, press the “Select” softkey (select “delay”), then the “Measure Delay” softkey. (c) Lissajous figure: Press the “Main/Delayed” key on the “Horizontal” section of the scope panel. Press the “XY” softkey. Make sure you adjust the “0” position on both axes, then use the Lissajous method to compute phase. Upload the Lissajous figure to the PC for inclusion in your report. Task 6: Bouncy switch. Sometimes even simple circuits produce mystifying results. One of these is the pushbutton switch circuit shown in Fig. 3.6. This kind of circuit might be connected to a micro-controller chip. The program in the micro-controller would continuously look at the output voltage vout (t). If the switch is not pressed, we expect that the output voltage is zero (connected to ground through the “pull-down” resistor). If the switch is pressed, we expect that the output voltage is near the input voltage (especially if the resistor has a large value). c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 3–9 ECE2205, Lab 3: Oscilloscope Crash Course vin Figure 3.6 vout A circuit with a pushbutton switch. However, strange things can occur. For a single press of the pushbutton, the output can very quickly turn “off” and “on” several times before settling at its final value. This is due to arcing at the switch contacts, mechanical vibration, and other effects. Since the switch output is not a periodic waveform, it is not possible to see this effect using the standard scope techniques. The scope has another mode, where it displays a single sweep or frame of data. The data collection can be started (“triggered”) by some external event. We will explore this method here. 1. Obtain a pushbutton switch from your lab instructor. Note that the switch will most likely have four wires coming out of it. Use your multimeter to determine the internal connections. 2. Construct the circuit in Fig. 3.6. Use R = 1 MÄ. Connect the input vin = 5 V using the dc power supply. Connect the output to channel 1 of the scope. 3. In the “Trigger” section of the front panel, press the “Edge” key and then the “1” softkey. 4. Press the “Mode/Coupling” key. The left softkey will have a “Mode” menu—select “normal”. 5. Use the “Level” knob from the same section of the front panel to adjust the trigger voltage to 2.5 V. 6. Press the “Single” key on the “Run Control” section of the front panel. The display should go blank. 7. Press your pushbutton. This should trigger the scope and display the output voltage. Adjust the time/division knob to be able to see detail in your trace. Be sure to show this waveform in your report. As a comment, the switches you will be using provide a relatively clean signal. Some switches, especially toggle switches, are absolutely terrible. Task 7: De-bouncing the switch with an RC filter, Design an RC-filter circuit to put in series with the pushbutton switch to eliminate the bounce of the switch as much as possible. You will need to select values for R and C (I suggest that you keep the 0.01 µF capacitor since resistors in different values are much more common, and you can use your variable resistors from Lab 2 to tune your design if necessary). Your circuit should turn on quickly when the button is pressed, but should smooth the bounce as much as possible. You might take a time-constant approach to design, or a frequency-response approach by estimating the frequency of bounce ripple and attenuating that frequency. Construct this circuit and measure the voltage at the switch output (using the scope, of course) when the button is pressed. Include this figure in your report, as well as all your calculations and your final circuit design. Task 8: Lab report. Submit your results in the form of a typed report. Refer to Lab 1 for instructions regarding proper format and content of an acceptable lab report. Please also address the following questions: • Suppose you set the function generator such that it produces a 1 kHz sinusoidal voltage with 5V peak-topeak across a 25 Ä load. What will be the peak-to-peak voltage displayed on the front panel of the function generator? • Consider an arbitrary circuit with source voltage provided by a function generator and monitored by an oscilloscope. Compare the values for the peak-to-peak voltage and frequency that would be 1) specified by the function generator, 2) measured by the oscilloscope and 3) determined manually from measurements carefully taken from the scope screen. Assuming no calculation error on your part, do the measurements made manually differ from those made by the oscilloscope? Which of the three methods do you think are more accurate? Justify your answer. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 3: Oscilloscope Crash Course Lab 3–10 • We saw that the high-pass filter was able to differentiate its input signal. Is the ideal differentiator a special case of the high-pass filter, or is the high-pass filter a special case of the differentiator? Why? • We saw that the low-pass filter was able to integrate its input signal. Is the ideal integrator a special case of the low-pass filter, or is the low-pass filter a special case of the integrator? Why? Also be sure to include scope display data wherever required in the Lab Assignment section. Use actual uploaded data (either the bitmap or Matlab output, as requested, or if not specified, as your preference). Do not sketch by hand. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205: Circuits and Systems I Lab 4–1 Department of Electrical and Computer Engineering University of Colorado at Colorado Springs "Engineering for the Future" Lab 4: Basic Op-Amp Circuits 4.1 Objective The objectives of this lab are gain familiarity with operational amplifiers, read and understand terms related to the parameters of operational amplifiers from its data-sheets, and learn to measure and understand limiting factors to op-amp operation. 4.2 Pre-Lab Preparation Read the lab overview in section 4.3 and answer the questions below. The instructor is to review your answers before you begin the lab tasks. 1. Download the LM741 specifications from the course web site. For the LM741C, tabulate the typical and maximum (if given) input offset voltage, input offset current, input bias current, input resistance, and slew rate. Include units in your table! 2. Label all op-amp diagrams in this lab writeup with correct pin numbers on all input/output and power supply signals. Come prepared to work efficiently. There are a lot of circuits to build. Also, if you have one handy, bring a large mongoose. You never know. . . 4.3 Background Operational Amplifiers Operational amplifiers, or op-amps for short, got their name from the modules used in analog computers to perform “operations” such as adding, multiplying and so forth. Now they are integrated circuits for application as general feedback amplifiers. They seem easy to use, but the many types available and the great variety of ratings hint that their use requires considerable knowledge and skill, which is true. In this lab and the next, we will examine a dozen or so circuits that will give a good understanding of how to use op-amps in various applications. The power supply for an op-amp is normally bipolar, with voltages above and below ground, called V+ and V− . Most common op-amps can stand up to 36 V, or ±18 V. It is convenient for our experiments to use ±15 V, but ±12 V and even ±9 V will also work, (the latter are usually available from multi-output power supplies). You can always arrange a bipolar supply from two ordinary supplies. Ground in this case is merely a voltage between the supply “rails”, as they are called, of no special significance. Op-amps have no ground terminal, since this reference is unnecessary. If you have trouble remembering polarity, have lots of op-amps around, since they are instantly destroyed by any mistake. (Just kidding. Sort of. Don’t be burning up my op-amps!) The pinouts of several common op-amps are shown in Fig. 4.1. They are packaged in standard “dual-inlinepackages” (DIP) with 0.1” spacing between pins and 0.4” spacing between one row of pins and the other. You can identify which is pin 1 by the indent on the top of the actual IC, which corresponds to the indent drawn in the c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 4–2 ECE2205, Lab 4: Basic Op-Amp Circuits figure. The figure shows the op-amp from the top, with pins numbered from upper left, down one side and up the other to upper right, according to standard convention. The 411 uses JFET-type transistors in its input stage, and is quite suitable for our purposes. The 741 uses bipolar-type transistors, long a standard. These two op-amps can be used interchangeably in most circuits. The dual 411 is the 412, and the dual 741 is the 1458. The 351 is another popular JFET-input op-amp. The actual part numbers of a 741 op-amp, for example, are often preceded with letters like “LM” and followed by other letters, like “CN”. These distinguish one flavor of the 741 op-amp from another, each having slightly different specifications, but overall the same pinout and design. We will simply refer to the basic type of op-amp by its number. Top View Top View Offset N1 1 8 NC OUT1 1 8 V+ IN− 2 7 V+ IN1− 2 7 OUT2 IN+ 3 6 OUT IN1+ 3 6 IN2− V− 4 5 Offset N2 V− 4 5 IN2+ 411, 741, 351 412, 358, 1458 Figure 4.1 Op-amp pinouts. The connections marked + and − are the inputs to the op-amp, and the connection from the point of the triangle is the output. The output can go from a value near V+ to a value near V− . When the output is near one of these limits and can go no farther, it is said to be saturated. You can short-circuit an output if you want, since it is internally protected against too much current. On the other hand, the output will handle only up to about 20mA at best. Opamps are not for power applications, but can drive a power amplifier (usually transistors) if power is needed. The output is proportional to the difference in voltage v+ − v− between the two inputs, where v+ is the voltage at the + or non-inverting input, and v− the voltage at the − or inverting input. The voltage gain of the amplifier is perhaps 100,000 or 100 dB at low frequencies for open-circuit operation (no feedback). With such a gain, the voltage difference between the inputs must be very small if the output voltage is not to be at saturation. This amounts to a rule: the voltages at the inputs are equal when a circuit is working properly. In order to make the voltages at the inputs equal to each other, it is necessary to arrange this by feedback. (Essentially) all op-amp circuits use feedback, and the properties of the circuit are determined by the feedback, not by the properties of the op-amp. The common-mode input signal is the average of the potentials of the two input connections. Since they are usually at the same voltage, this voltage is the common-mode input voltage. The op-amp ignores the common-mode input, and determines its output only by the difference signal. Nevertheless, it is important to look at the common-mode input voltage and see that it does not leave its permissible range. The common-mode range of an op-amp is almost always less than from V+ to V− , and the op-amp usually does something unpleasant when the range is exceeded (the 411, for example, goes from a large negative output suddenly to a large positive output when this happens). That the inputs are usually at the same voltage does not mean that they can be connected to each other. If you do this, the output usually saturates. The voltages must be held equal by the active participation of the output, acting through the feedback network. The inputs also carry a small dc bias or leakage current that must have a route to the power supply. With bipolar op-amps, this current is actually the base bias current for the input transistors, and sometimes has to be considered in the circuit design. JFET’s, on the other hand, have a much smaller input current that is largely leakage, and does not affect the circuit much—except that it has to have a route to ground. In ordinary circuit analysis, the bias currents can be neglected, and it can be assumed that the inputs carry no current. Don’t forget that this is only approximate! The most important factor hidden from the casual user of op-amps is the question of stability. Stability is always important with high-gain amplifiers, and when feedback is applied. The feedback loop can become the route for a signal to be fed back to the input in the proper phase to cause oscillation, called instability. Without some care, c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 4: Basic Op-Amp Circuits Lab 4–3 feedback always results in instability, which is always fatal. The oscillation can occur either at a higher or a lower frequency than that for which the circuit is designed, usually higher (like the feedback with a microphone and speaker). With ordinary op-amps (e.g., 741), stability is guaranteed by making the gain fall off at 20 dB per decade of frequency, beginning at about 10 Hz, so that the gain of the amplifier falls to unity at around 1 MHz. Unless you have capacitors in unfortunate places, this guarantees that the circuits you put together will be stable, no matter what you do. What you pay for this is a severe restriction on the bandwidth of op-amp circuits, and overcoming it is advanced work. Op-Amp Specifications: Reading the data sheet. When you download the “data sheet” for an op-amp (a technical publication describing a device’s function, ratings, and limitations), you will see quite a number of parameters of the device described. You should understand how to read a data sheet and discover the information that you need. Absolute Maximum Ratings tabulate factors that the op-amp can safely tolerate without the possibility (likelihood?) of destroying it. However, it is generally recommended that you operate a device at 75% or less of its maximum ratings. • Supply Voltage (±VS ): The maximum positive and negative voltages that can be used to power the op-amp. • Power Dissipation (Pd ): The maximum power the op-amp is able to dissipate, at ambient temperature. • Differential Input Voltage (Vid ): This is the maximum voltage that can be applied across the + and − inputs. • Input Voltage (Vicm ): The maximum input voltage that can be simultaneously applied between either input and ground (also referred to as the common-mode voltage). • Output Short Circuit Duration: How long a short circuit (output to ground or to either supply voltage) can be sustained without damaging the device. • Operating Temperature Range (Ta ): This is the ambient temperature range for which the op-amp will operate within the manufacturer’s specifications. Note that the military grade versions have a wider temperature range than the commercial, or hobbyist, grade version. Electrical Characteristics tabulate factors that describe how the input and output parameters of the op-amp differ from an ideal op-amp model. • Input Offset Voltage (Voi ): This is the voltage that must be applied to one of the input pins to give a zero output voltage. Remember, for an ideal op-amp, input offset voltage is zero! • Input Bias Current (Ib ): This is the average of the currents flowing into both inputs. Op-amps are designed so that the two input bias currents are nearly equal and nearly zero. • Input Offset Current (Ios ): This is the difference of the two input bias currents when the output voltage is zero. • Input Voltage Range (Vcm ): The range of the common-mode input voltage (i.e., the voltage common to both inputs and ground). • Input Resistance (Z i ): The resistance “looking-in” at either input with the remaining input grounded. • Output Resistance (Z oi ): The resistance seen “looking into” the op-amp’s output. • Output Voltage Swing (Vomax ): Depending on what the load resistance is, this is the maximum “peak” output voltage that the op-amp can supply without saturation or clipping. • Output Short-Circuit Current (Iosc ): This is the maximum output current that the op-amp can deliver to a load. • Slew Rate (SR): The time rate of change of the output voltage with the op-amp circuit having a voltage gain of unity (1.0). c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 4: Basic Op-Amp Circuits Lab 4–4 • Common-Mode Rejection Ratio (CMRR): A measure of the ability of the op-amp to reject signals that are simultaneously present at both inputs. It is the ratio of the common-mode input voltage to the generated output voltage, usually expressed in decibels (dB). Push-Pull Transistor Amplifier. Most op-amps cannot provide very large output currents. This means that they cannot directly drive low-impedance loads, such as speakers for audio application, and motors for robotic application. In these situations, the designer has two options: (1) purchase an expensive op-amp that is designed for high-current output, or (2) build a separate current-amplifier circuit. The second scenario is frequently chosen because it is often less expensive. The current amplifier we will build is a simple “push-pull” circuit. It consists of two power transistors: one to “push” current through the load, and one to “pull” current through the load, allowing us to apply bi-directional voltages across the load. This is important for audio applications, otherwise we would clip half the signal, and for motor applications, otherwise we could only run the motor in one direction. (If we only wished to run the motor in one direction, a single transistor would suffice.) The push-pull amplifier that we will use is incorporated in the circuit drawn in Fig. 4.17. The push-pull section itself is the portion of the circuit to the right of the 390 Ä resistor and to the left of the 1 kÄ resistor (not including the resistors). The three-terminal component on the top (connected to the +15 V supply, the 390 Ä resistor and the output) is called an NPN transistor (you can tell because the arrow is Not Pointing iN). The three terminals are called the base (B), collector (C), and emitter (E). This transistor allows current to flow from its collector to emitter (“turns on”) if the base voltage is (sufficiently—approximately 0.7 V) higher than its emitter voltage. The three-terminal component on the bottom is called a PNP transistor (you can tell because the arrow is Pointing iN Perpetually). This transistor allows current to flow from its emitter to collector (“turns on”) if its base voltage is (sufficiently) lower than its emitter voltage. Thorough discussion of transistor function is beyond the scope of this course. Even so, we can easily understand the macroscopic operation of this circuit. For sufficiently positive values of the input voltage, the NPN transistor will turn on, and the output voltage (at its emitter) will be about 0.7 V lower than the input voltage (at its base). Current flows from the +15 V supply through the load to ground. For sufficiently negative values of the input voltage, the PNP transistor will turn on, and the output voltage will be about 0.7 V higher than the input voltage. Current flows from ground through the load to the −15 V supply. Notice that both transistors will never be simultaneously “on”. This is a very simple amplifier. It has some undesirable properties, such as a deadband when the input voltage is around 0 V (|vin | . 0.7 V). We could do better by incorporating feedback around the push-pull circuit. Also, it may be a good idea to protect the amplifier using additional “flyback” diodes if driving an inductive load such as a motor. The latter will be done in Lab 5. For now, this simple circuit will serve the purpose. As a practical note, the NPN transistor we will be using is a TIP31C, and the PNP transistor we will be using is a TIP32C. Both have an industry-standard package termed a “TO-220” three-terminal case. This is also drawn in Fig. 4.17, with the base, collector, and emitter pins labeled. The three terminals need to be twisted 90◦ using needlenose pliers in order to properly fit in your breadboard. Also, you will need to attach heatsinks to both parts to help dissipate heat. 4.4 Lab Assignment Task 1: Prelab certification. Have the Lab Assistant/Instructor review your answers to the prelab assignment questions and sign the certifications page. Task 2: Open-loop test circuit. Before you to build your first op-amp circuit we make three practical points: 1. First, how the integrated circuit (“IC”) package goes into the breadboard. It straddles the trench, as shown in Fig. 4.2. A white dot sometimes identifies pin 1, and a divot on the top is also generally used to identify the top (and hence pin 1 is to the left of the divot). c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 4–5 ECE2205, Lab 4: Basic Op-Amp Circuits 50 55 60 +15 V A B C D E 411 F G H −15 V Figure 4.2 Op-amp on a breadboard. Figure 4.3 Decoupling the op-amp from the power supply using ceramic capacitors. 2. Second, a point that may seem to go without saying, but sometimes needs a mention: the op-amp always needs power, applied at two pins; nearly always that means ±15V in this course. We remind you of this because circuit diagrams ordinarily omit the power connections. On the other hand, many op-amp circuits make no direct connection between the chip and ground. Don’t let that worry you; the circuit always includes a ground—in the important sense: common reference called zero volts. Whatever color convention you use for your wires, you should use the green binding post of the breadboard for ground, the black for −15 V and the red for +15 V. 3. “Decouple” the power supplies with a small ceramic capacitor (0.01µF to 0.1µF) if you begin to see fuzz on your circuit outputs. Op-amp circuits, using feedback in all cases, are peculiarly vulnerable to “parasitic oscillations.” The decoupling method is shown in Fig. 4.3. Place the capacitors physically as close to the opamp as possible. The capacitors act as high-pass filters that let high frequencies escape to the power supply. 4. Construct the open-loop test circuit in Fig. 4.4 using a 411 op-amp. Pin 8 is not connected. (Honest, it’s only there so that the amplifier can fit in a standard 8-pin package.) Pins 1 and 5 are used to eliminate offset voltage—we won’t be using this feature right away, so don’t connect anything to these pins either. 5. With the power supply not yet connected, set the meter selector on the power supply to the +20 V setting. Adjust the voltage until the meter reads +15 V. Turn off the supply, and connect it to the binding posts, as directed above. 6. Watch the output voltage as you slowly adjust the pot, trying to apply 0 volts to v+ . Is the behavior consistent with the 411 specification that claims “Gain (typical) = 200V/mV”? Don’t spend too long on this step, however; this is a most abnormal way to use an op-amp. Hurry on to the useful circuits! +15 V 10 kÄ +15 V vin 411 411 vout 10 kÄ 1 kÄ −15 V Figure 4.4 −15 V Open-loop op-amp configuration. Figure 4.5 Non-inverting amplifier. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 4–6 ECE2205, Lab 4: Basic Op-Amp Circuits Warning: Do not try to unplug the op-amp with your thumb and forefinger. It’s a good way to end up with the op-amp plugged into your fingertip. Use an IC puller (in your toolboxes), or carefully use a small screwdriver to pry the op-amp off of the breadboard. Caution: The components we’ve used so far have been simple (only two terminals) and fairly rugged (connecting a resistor or most capacitors “backward” won’t harm them). The op-amp has four times as many pins, so it’s easier to make a mistake in wiring it. Unfortunately, it’s also considerably more delicate, so connecting it incorrectly can destroy it (often without so much as a puff of smoke to let you know that it has become an inoperational amplifier). The moral—always wire your circuit with the power turned off and check your wiring carefully before turning the power on. Task 3: Non-inverting amplifier. The first feedback circuit we analyze is a non-inverting amplifier. 1. Wire up the non-inverting amplifier shown in Fig. 4.5. Measure and record the actual resistance values used. What is the theoretical gain of this amplifier? Measure and record the actual gain. 2. What is the maximum output swing? How about linearity (try a triangle wave)? 3. Try sine waves of different frequencies. Note that at some fairly high frequency the amplifier ceases to work well: sinusoidal input does not produce sinusoida output. What is the approximate range of frequencies that produce sinusoidal output? (We will postpone until later measuring the slew rate that imposes this limit; we are still on our honeymoon with the op-amp: it is still ideal.). Task 4: Inverting amplifier. Now, we construct a simple inverting amplifier. 1. Construct the inverting amplifier drawn in Fig. 4.6. If you have been paying attention, you will notice that you don’t need to start fresh: you can use the non-inverting amplifier, simply redefining which terminal is input, which is grounded. 2. Drive the amplifier with a 1 kHz sine wave. What is the theoretical gain? What is the measured gain? Is it the same as for the non-inverting amp you built a few minutes ago? 3. Now drive the circuit with a sine wave at 1 kHz again. Measure the input impedance of this amplifier circuit by adding 1 kÄ in series with the signal source (simulating a signal source with crummy Rout ). If you suppose that the 1 kÄ in series with your signal source represents Rout for your source, then use the voltage-divider equation to find the amplifier’s input resistance. 4. Using a second 411, build a voltage-follower circuit to place between the source with crummy Rout and the input to this inverting amplifier. This should solve the poor Rsource problem we have created for you. With the follower’s help, your circuit’s overall gain should jump back up to its original value. Does it? 10 kÄ 10 kÄ vin vin 1 kÄ 1 kÄ 411 15 kÄ 411 vout vout −15 V +15 V 10 kÄ “Offset” Figure 4.6 Inverting amplifier. Task 5: Summing amplifier. Figure 4.7 Summing amplifier. Modify the inverting amplifier slightly, to form the circuit shown in Fig. 4.7. 1. This circuit sums a dc level with the input signal, letting you add a dc offset to a signal. What is the maximum positive dc level added to the output voltage? What is the maximum negative dc level added to the output voltage? c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 4–7 ECE2205, Lab 4: Basic Op-Amp Circuits Task 6: Integrator. Now, we construct an (approximate) integrating circuit. 1. Build the circuit shown in Fig. 4.8. 2. Try driving your integrator with a 1 kHz square wave. This circuit is sensitive to small dc offsets of the input waveform (its gain at dc is 100); if the output appears to go into saturation near ±15 V, you may have to adjust the function generator’s dc-offset control. 3. From the component values, predict the peak-to-peak triangle wave amplitude at the output that should result from a 2 V peak-to-peak, 500 Hz square wave input. Then try it. 4. This is not an “ideal” integrator circuit, in part due to the addition of the 10 MÄ resistor. What is the function of that resistor? What would happen if you were to remove it? Try it. Now have some fun playing around with the function generator’s dc offset—the circuit will help you gain a real gut feeling for the meaning of an integral! 5. Don’t take this circuit apart. You will need it in the next task. vin 0.01 µF 100 pf 10 MÄ 100 kÄ 1 kÄ 0.01 µF 100 kÄ vin 411 Figure 4.8 Integrator. vout 411 Figure 4.9 vout Differentiator. Task 7: Differentiator. 1. Now, build the differentiator circuit in Fig. 4.9. Leave your integrator circuit intact, and use a second op-amp to build this circuit. Try driving it with a 1 kHz triangle wave. 2. A note on stability: Here we are obliged to mention the difficult topic of stability. A simple differentiator necessarily lives at the edge of instability for reasons beyond the scope of our discussion here. To circumvent this problem, it is traditional to include a series resistor at the input, and a parallel capacitor across the feedback resistor, converting the (low-frequency) differentiator to an integrator above some cutoff frequency. You can determine this crossover frequency by monitoring the input and output of the differentiator when the input is a sinusoid. When there is no phase shift, the circuit is crossing from one type to the other. For this circuit, what is that crossing point? Incidentally, a faster op-amp would perform better: the switch-over to integrator must be made, but the faster op-amp allows one to set that switchover point at a higher frequency. 3. Integrate the Derivative—A more intriguing way to see the imperfection of the differentiator is to feed its output to the integrator you built earlier, then compare original against output waveforms. Ideally, they would be identical—at least in phase (that is, apart from gain artifacts). Are they? Does the answer depend on input frequency? Task 8: Voltage follower—slew rate. We now introduce you to the sordid truth about op-amps: they’re not as good as we’ve been saying! Sorry. We begin by measuring slew rate and its effects, with the voltage-follower circuit in Fig. 4.10. Slew rate is the maximum rate at which the output of an op-amp can change. Ideally, the circuit has an output voltage that tracks the input voltage exactly, but in practice the slew rate will introduce a delay and a ramping shape. Explore slew rate in two phases: c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 4–8 ECE2205, Lab 4: Basic Op-Amp Circuits 1 kÄ vin 10 kÄ 411 Figure 4.10 vout Voltage follower. vin 1 MÄ 411 Figure 4.11 ment. vout vin 10 kÄ 411 1 kÄ Input impedance measureFigure 4.12 Output impedance measurement. 1. Build the voltage follower circuit. (The 10 kÄ resistor prevents damage if the input is driven beyond the supply voltages.) 2. Square wave input: Drive the input with a square wave, in the neighborhood of 1 kHz, amplitude of 1 V, and look at the output with a scope. Measure the slew rate by observing the slope of the transitions. 3. Sine input: Switch to a sine wave, same amplitude, and measure the frequency at which the output waveform begins to distort (this is roughly the frequency at which amplitude begins to drop, as well). That is, slowly increase frequency on the function generator. Adjust the scope to observe the zero-crossing of the output of the amplifier. Is this result consistent with the slew rate that you measured in part 1), just above? 4. Now go back and make the same pair of measurements (slew rate, and sine at which its effect appears) with an older op-amp: a 741. The 741 claims a “typical” slew rate of 0.5V/µs; the 411 claims 15V/µs. How do these values compare with your measurements? Task 9: Voltage follower—input and output impedance. Ideally, an amplifier circuit has infinite input impedance and zero output impedance. Here, we will estimate the impedances of the voltage-follower circuit based on the 411 op-amp. 1. Replace the 741 op-amp with the 411 op-amp in the voltage-follower circuit you already built. Also, replace the input resistor with a 1 MÄ resistor, as shown in Fig. 4.11. As always, measure and record the value of the resistor used. 2. Set the input voltage to 5 V. Carefully measure the output of the voltage source and the input voltage to the op-amp. Using the voltage-divider equation, compute the amplifier’s input impedance. Beware the finding “10 MÄ” (instrument limitation!). Does the resistance of the voltmeter interfere with your estimate? How so? How would you make a more precise measurement? 3. Now, construct the circuit in Fig. 4.12. The feedback path should use the solid line in this step. 4. We measure output impedance via voltage divider again. Measure the voltage at the output of the amplifier, and then between the two 1 kÄ resistors. (Use an input voltage that produces an output voltage in the linear range). Compute the output impedance. It had better be 1 kÄ! Note: This measurement is not the amplifier’s output impedance, but the output impedance plus the impedance of the resistor you added. From this step, what do you conclude the output impedance of the amplifier is? 5. Now, move the feedback path to use the dashed line instead. Insert a third 1 kÄ resistor after the feedback path and before the 1 kÄ resistor to ground. Use these final two resistors as a voltage divider to measure output impedance. What do you find it to be now? Is this a surprising result? Does the actual output impedance of the amplifier matter, with the effect of feedback operating on the circuit? Task 10: Op-amp offset voltage. In this task we will measure the offset voltage of an op-amp. Note: use a 741, not a 411, for tasks 10 and 11. The 411 is too good for this exercise: its bias current is so tiny that you would not see appreciable errors attributable to Ib . (You might reasonably infer that you can forget about Ib , simply by choosing a good op-amp. Often you can. This exercise means to prepare you for the unusual case in which Ib does produce troublesome errors.) c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 4–9 ECE2205, Lab 4: Basic Op-Amp Circuits vin 741 10 kÄ vout 741 10 kÄ 100 kÄ 100 Ä −15 V Figure 4.13 Figure 4.14 Offset-voltage measurement. Offset trimming network. 1. Construct the non-inverting amplifier shown in Fig. 4.13. Measure and record the values of all resistors used. What is the gain of this op-amp circuit? Note: Apply no input signal: we are interested in dc errors of a non-ideal op-amp. In the remainder of this section, you will use the amplifier itself to amplify input errors to measurable levels. Knowing the circuit gain, you will be able to infer the value of Voi and Ib . The only challenge will be to peel these two effects apart, so as to be able to assign a value to each error. 2. Since the input voltage is zero, the output voltage is simply an amplified version of Voi . Measure the output voltage and compute Voi . Compare your measured (or “inferred”) offset voltage against specs: Voi = 2 mV (typical), 6 mV (maximum). Don’t be shocked if your Voi is well under 2 mV. They just don’t make 741’s the way they used to! (But the manufacturer can’t change the data sheet to announce the improvement, because then the part would not be a 741; it would have to be called something like 741a.) 3. Minimize the effects of Voi : Trim the offset voltage to zero, using the recommended network shown in Fig. 4.14. Note, the pot is connected between pins 1 and 5 on the op-amp. Adjust the pot until the output voltage is as close to zero as you can get it. Leave the op-amp in this configuration for the remaining tasks. Task 11: Op-amp bias current/offset current. We now measure the bias current for the 741. 1. Construct the circuit shown in Fig. 4.15. Pick a value of R to produce an output voltage in the linear range (non-saturated output). Make sure that your offset voltage has been zeroed as much as possible in the step above. 2. Compute Ib for the non-inverting input as the op-amp’s output voltage divided by the value of R that you found. The bias current is positive if it is entering the op-amp; it is negative if it is leaving the op-amp. 3. Now, construct the circuit shown in Fig. 4.16. Again, pick a value of R to produce an output voltage in the linear range. 4. Compute Ib for the inverting input as the op-amp’s output voltage divided by the value of R that you found. 5. Compute the input offset current. How do the bias currents and the offset current compare to spec? R Figure 4.15 741 741 vout vout R Measuring Ib for the non-inverting input. Figure 4.16 Measuring Ib for the inverting input. Task 12: Push-pull buffer. Finally, build the push-pull buffer circuit, shown in Fig. 4.17. You should attach heatsinks to the transistors. Be careful not to get heat-sink grease on your clothing—it is impossible to remove. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 4–10 ECE2205, Lab 4: Basic Op-Amp Circuits 1. The transistor on top is NPN (TIP31C) and the transistor on the bottom is PNP (TIP32C). At this point, vout should only be connected to the 1 kÄ resistor. 2. Drive the circuit with a sine wave of 100 Hz–500 Hz. Look at the output of the op-amp, and then at the output of the push-pull stage (make sure you have at least a few volts of output, and that the function generator is set for no dc offset). You should see classic crossover distortion. Describe the distortion you see. 3. Now, attach an “8 Ä” speaker to vout (Note: the speaker is rated by its frequency-dependent impedance to a sine wave at 1 kHz, which is 8 Ä). Listen to this waveform on the speaker. Your ears (and those of people near you) should protect you from overdriving the speaker. But it would be prudent, before driving the speaker, to determine the maximum safe amplitude, given the speaker’s modest power rating. The transistors are tough guys, but you can check whether you need to lower the power-supply levels on your breadboard, to keep the transistors cool, given the following power ratings: • Transistors: 75W if very well heat-sunk, so that case remains at 25 degrees C. Much less if no heat-sink is used, as is likely in your setup. • Speaker: 250 mW rms. 4. Now, disconnect the right side of the 100 kÄ feedback resistor and reconnect it to the right side of the pushpull section (where the transistor emitters join), and once again look at the push-pull output. The crossover distortion should be eliminated now. If that is so, what should the signal at the output of the op-amp look like? Take a look. (Ain’t that op-amp clever!) 5. Listen to this improved waveform: does it sound smoother (more flute-like) than the earlier wave-form? Why did the crossover distortion sound buzzy—like a higher frequency mixed with the sine? If you increase signal frequency, you will discover the limitations of this remedy, as of all op-amp techniques: you will find a glitch beginning to reappear at the circuit output. +15 V 100 kÄ vin B 10 kÄ 390 Ä C TIP31C E vout 411 B E TIP32C TO-220 1 kÄ C −15 V Figure 4.17 B CE Twist each leg 90◦ Push-pull amplifier. The transistors both have a “TO-220” case, with pinout shown to the right. Task 13: Lab report. Submit your results in the form of a typed report. Refer to Lab 1 for instructions regarding proper format and content of an acceptable lab report. Please also address the following question: • Explain how moving the feedback path in the push-pull amplifier improves our previous push-pull amplifier by eliminating the crossover deadband and by increasing the current gain (i.e., increasing the input impedance of the amplifier and load). c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205: Circuits and Systems I Lab 5–1 Department of Electrical and Computer Engineering University of Colorado at Colorado Springs "Engineering for the Future" Lab 5: Advanced Op-Amp Circuits 5.1 Objective The objective of this lab is to explore some more advanced op-amp circuits including comparators, Schmitt triggers, oscillators, power amplifiers, and motor-driver circuits. 5.2 Pre-Lab Preparation Read the lab overview in section 5.3 and answer the questions below. The instructor is to review your answers before you begin the lab tasks. 1. Label all op-amp/comparator diagrams in this lab reader with correct pin numbers on all input/output and power supply signals. 2. Assuming that the pot in Fig. 5.5, is adjusted so that the wiper has resistance 1 kÄ to ground, compute the 0 hysteresis levels v2 and v2 . Note that when you compare this circuit with Fig. 5.1, the effective R2 = ∞ as no vref connection is identified. 3. For the square-wave oscillator circuit in Fig. 5.6, compute the frequency of oscillation. 4. For the variable-duty-cycle oscillator in Fig. 5.7, in which direction must the potentiometer wiper be moved to increase the duty cycle (more time spent with the output saturated at V+ and less time spent saturated at V− )? 5. Consider a 50 Ä “power resistor” constructed by connecting five 10 Ä resistors, each rated at 1/4 W, in series. Show that this composite resistor will dissipate 1.25 W without exceeding the power rating of any of the individual resistances. 5.3 Background Positive feedback. Until now, all of our op-amp circuits have used negative feedback to result in stable circuits. We have treated positive feedback as evil—or as a mistake: it’s what you get when you get confused about which op-amp terminal you’re feeding. In this lab, you will qualify this view: you will find that positive feedback can be useful: it can improve the performance of a comparator; or it can be combined with negative feedback to make an oscillator (“relaxation oscillator”) where positive feedback dominates. However, it is still wise to be wary of positive feedback. It can be a real pain in the neck when it sneaks up on you. Comparators. Comparators are op-amp like circuits that compare their two inputs. They saturate their output voltage at the positive rail if the non-inverting input is greater than the inverting input; they saturate their output voltage at the negative rail if the non-inverting input is less than the inverting input. Special-purpose comparator chips like the 311 have separate power supplies for the op-amp circuit and for its output. This way, the op-amp can use a standard ±15 V supply, but the output can use a 0–5 V supply to be compatible with digital logic chips. When the two inputs are nearly equal, the comparator will often go into oscillations as small noise on the input or power supply can produce a quickly-changing decision. A Schmidt trigger is a comparator circuit with positive feedback to produce hysteresis in the decision-making logic. This positive feedback will eliminate those harmful oscillations. It works in the following way: c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 5–2 ECE2205, Lab 5: Advanced Op-Amp Circuits • Generally, if v+ − v− > 0 then the comparator output will be positive. If v+ − v− < 0 then the comparator output will be negative. • With hysteresis, if the output voltage is presently negative, it will stay negative unless v+ − v− > ε, where ε is some positive value set with external resistors. • Also, if the output voltage is presently positive, it will stay positive unless v+ − v− < −ε. The effect of hysteresis is to produce a deadband around v+ − v− ≈ 0 where no change in decision is made. Therefore, small input noise cannot switch the decision. R vref R2 v1 vin vout v2 R3 vout v2 R2 C A R1 Figure 5.1 Positive feedback provides hysteresis. R1 Figure 5.2 RC relaxation oscillator. Fig. 5.1 shows a comparator wired with positive feedback. The positive input is biased, so that the decision point 0 does not need to be at zero volts. The output switches positive when vin > v2 and switches negative when vin < v2 . The hysteresis voltage levels v2 may be determined by applying KCL to node A: v2 vref − v2 vout − v2 + = R2 R3 R1 R123 R123 v2 = vref + vout , R2 R3 where R123 = R1 k R2 k R3 . This dependence on the output voltage gives the dual threshold, which are: R123 R123 vref + V+ v2 = R2 R3 R123 R123 0 v2 = vref − V+ . R2 R3 Note that if R2 is omitted, the decision points are at ±R13 V+ /R3 . Square-wave oscillator. The Schmidt-trigger circuit can be modified to build a circuit that can generate a squarewave output. In this case, we are using both positive and negative feedback. The positive feedback produces a hysteresis level to stabilize the operation of the oscillator, and the negative feedback is used to alternately charge and discharge a capacitor to produce a moving waveform that causes the switch in output polarity. The square-wave generator circuit is shown in Fig. 5.2. We can analyze its operation as follows. First, consider the positive-feedback path. From analogy to the Schmidt trigger circuit, the input to the non-inverting terminal 1 of the comparator has voltage v+ = R1R+R vout which means that the comparator hysteresis decision points are at 2 R1 ± R1 +R2 V+ . The negative-feedback path is an RC low-pass filter. When vout = V+ , the capacitor will charge up toward this value; when vout = V− , the capacitor will discharge down toward this value. However, we know that the capacitor voltage will never approach ±V+ since the output voltage will switch sense when the capacitor voltage passes a hysteresis decision point. 1 . When v− reaches λV+ then the switch to −V+ at the output occurs. To analyze this more carefully, let λ = R1R+R 2 The capacitor has charged to q = λC V+ and now begins to discharge. The general charging equation for a capacitor c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° ECE2205, Lab 5: Advanced Op-Amp Circuits Lab 5–3 which already has an original charge is ³ ´ t t q = C V 1 − e− RC + qo e− RC . For this case, V = −V+ and qo = λC V+ so the charging equation is ´ ³ t t q = −C V+ 1 − e− RC + λC V+ e− RC . Now when v− gets to −λV+ another switch will occur. This time is half the period of the square wave, so it will be represented by T /2. At this time ´ ³ t t −λC V+ = −C V+ 1 − e− RC + λC V+ e− RC which, when solved for T , gives (and the frequency is, of course, f = 1/T ) ¶ µ ¶ µ R1 1+λ . T = 2RC ln = 2RC ln 1 + 2 1−λ R2 5.4 Lab Assignment Task 1: Prelab certification. Have the Lab Assistant/Instructor review your answers to the prelab assignment questions and sign the certifications page. Task 2: Open-loop comparators. Comparators work best with positive feedback. But before we show you these good circuits, we will look at two poor comparator circuits: one using an op amp, the other using a special-purpose comparator chip. These circuits will perform poorly; they will help you to see what’s good about the improved comparator that does use positive feedback. 1. First, build the op-amp “comparator” circuit in Fig. 5.3. You will recognize this circuit as the very first op amp circuit you wired, where the point was just to show you the “astounding” high gain of the device. In that first glimpse of the op amp, that excessive gain probably looked useless. Here, when we view the circuit as a comparator, the very high gain and the “pinned” output are what we want. 2. Drive the circuit input vin (t) with a sine wave at around 100 KHz, making sure that there is no dc offset in the source waveform. Notice that the output “square wave” is not as square as one would hope. Why not? 3. Secondly, substitute a 311 comparator for the 411, as shown in Fig. 5.4. (The pinouts are not the same—you will need to rewire the circuit.) While the output of the 311 can produce different voltages than the ±15 V supply, in the circuits here, you will keep the ±15 V swing. So arranged, the 311 output will remind you of op-amp behavior. The 311 output stage is not a push-pull stage like the 411 op-amp’s is (recall the discrete push-pull section from Lab 4). Instead, it uses a single NPN transistor whose collector is connected to the output pin 7, whose emitter is connected to output pin 1, and whose base is internally controlled. This is the feature that allows using different voltages at the comparator output than at the input. Note that in all subsequent 311 op-amp experiments in this lab, pin 1 will be connected to −15 V and pin 7 will be connected through a 4.7 kÄ “pull-up” resistor to +15 V to provide the power supply for this output stage to allow a ±15 V swing. The pin connection at pin 1 will not be drawn—you must recognize how it is to be connected. 4. Repeat step 2. Does the 311 perform better than the 411? 5. A side-effect of the 311’s fast response is its readiness to oscillate when given a “close call”—a small voltage difference between its inputs. Try to tease your 311 into oscillating, by feeding a sine wave with a gentle slope. With some tinkering you can evoke strange and lovely waveforms. See if you can capture one of these images on the scope and upload to your PC for your report. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 5–4 ECE2205, Lab 5: Advanced Op-Amp Circuits 6. You can sometimes stabilize a comparator without the remedy of hysteresis, which we are about to promote. Let’s see how far these efforts can carry us. First, to get some insight into why the 311 is confusing itself, keep one scope probe on the oscillating output and put the other on the +15V power supply line, close to the 311. AC-couple this second probe, and see if the junk that’s on the output appears on the supply as well. Chances are, it does. Keep those ugly 311 oscillations on the scope screen, and try the following remedies: (a) Put ceramic decoupling capacitors on positive and negative power supplies. If the oscillations stop, tickle them into action again, by dropping the slope of the input sine. (b) Short pins 5 and 6 together: these adjustment pins often pick up noise, making things worse. Again tease the oscillations back on, if this remedy temporarily stops them. +15 V +15 V +15 V vin (t) 10 kÄ vin (t) 411 vout (t) 10 kÄ 3 2 4.7 kÄ 8 311 7 1 vout (t) 4 −15 V Figure 5.3 411 op-amp as simple comparator. Task 3: Closed-loop comparator—the Schmidt trigger. trigger. −15 V Figure 5.4 311 comparator without feedback. Here, we use positive feedback to create a Schmidt 1. Wire the circuit in Fig. 5.5. Notice that this circuit looks exactly like a positive-gain amplifier circuit, except that the “+” and “−” terminals of the op-amp are interchanged. This particular circuit violates the third rule of simple op-amp analysis: “Assume that the op-amp is configured such that the other two rules apply” (The other two rules being that there is no difference between v+ and v− and that i + = i − = 0. In this case, there will be a difference between v+ and v− ). 2. As input vin (t), use a small sine wave (≈ 200 mV) around 1 kHz, and adjust the pot that sets hysteresis until you find the border between stability and instability of the output signal vout (t). 3. Then watch the waveform at the non-inverting input. Here, you should see a small square wave (probably fuzzy, too, with meaningless very-high frequency fuzz not generated by your circuit; perhaps radio, visible now that you have the gain cranked way up). This small square wave indicates the two thresholds the 311 is using, and thus (by definition) just how much hysteresis you are using. 4. Record the hysteresis thresholds and the values of all resistances used. Compare the measured hysteresis threshold with those computed theoretically. 5. Finally, crank the hysteresis up to about 3× that borderline value (for a safety margin). If your square wave collapses into dc, then increase the input-signal voltage. If you describe your circuit as a “zero-crossing detector,” how late does it detect the crossings? Could you invent a way to diminish that lateness? Leave this circuit set up, for the next experiment. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 5–5 ECE2205, Lab 5: Advanced Op-Amp Circuits +15 V +15 V 100 kÄ vin (t) 10 kÄ 3 8 7 311 2 1 4 −15 V 4.7 kÄ 4.7 kÄ vout (t) 100 kÄ vout (t) 311 0.01 µF 100 kÄ 10 kÄ Figure 5.5 Schmitt trigger—comparator with positive feedback and hysteresis. +15 V 10 kÄ Figure 5.6 RC relaxation oscillator. Task 4: Relaxation oscillator (square-wave generator). 1. Modify your circuit slightly to make an oscillator, as shown in Fig. 5.6. Note that pin connections for power have been omitted from the diagram for clarity—wire these as before. The hysteresis has been increased by replacing the potentiometer of the preceding circuit with a 10 kÄ resistor (which can also be done by adjusting the pot to its maximum value, of course). 2. Then, connect an RC network from the output to the comparator’s inverting input. This feedback signal replaces any external signal source; the circuit has no input. Here, incidentally, you are for the first time providing both negative and positive feedback. 3. Predict the frequency of oscillation, and then compare your prediction with what you observe. Upload an oscilloscope screen shot to a PC for inclusion in your report. Task 5: Variable duty-cycle oscillator. The oscillator built in the previous task has a symmetric 50% duty cycle. Sometimes it is desirable to produce an asymmetric variable-duty-cycle waveform. This can be easily accomplished by using the diode scheme in Fig. 5.7 to effectively produce a different RC time constant for charge and discharge. 1. Modify your circuit to include the variable-duty-cycle capability. Here we use special diodes called “Schottky” diodes that have very low voltage drop and fast turn on-time (instead of a pn-junction, they use a metal-silicon junction, which has different properties). The picture to the top of the Schottky diodes shows how to know “which end is which”. The gray line on the black case denotes the same thing as the “bar” in the schematic diagram. 2. A light-emitting-diode (LED) operates just like a standard diode, but emits light when it is conducting. It is basically an on-off device—you cannot produce significantly different levels of light by using different voltages. When you adjust the duty cycle of your oscillator, you should perceive a change in LED intensity, however. How do you explain this phenomenon? (Note that the resistor is present in the LED portion of the circuit to limit the current through the diode. Otherwise, “poof”). Does the direction in which you insert the LED matter? Why? 3. Record the minimum and maximum frequencies of oscillation for this circuit. Record the minimum and maximum duty cycles for this circuit (duty cycle is measured as the percent of time the signal is at its maximum output). Task 6: Audio amplifier: Speaker-to-speaker. The example below illustrates using an op-amp as an audio amplifier for a simple intercom. A small 8 Ä speaker is used as a microphone which is ac coupled to the op-amp input through a 0.01 µF capacitor. The op-amp voltage gain is determined by the ratio of the feedback resistor to the series input resistor which is around one thousand in this case. The non-inverting input to the op-amp is biased c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 5–6 ECE2205, Lab 5: Advanced Op-Amp Circuits +9 V 100 kÄ 4.7 kÄ +15 V 1 kÄ 4.7 kÄ 1 kÄ 311 0.01 µF 100 kÄ 820 Ä +9 V 0.01 µF 1 kÄ 741 1 MÄ 10 kÄ Figure 5.7 Variable duty cycle oscillator. TIP31C 33 Ä Figure 5.8 Audio intercom design. at 50% of the supply voltage (4.5 volts) by 1 kÄ resistors connected across the supply. Since both inputs will be equal when the op-amp is operating within it’s linear range, the voltage at the non-inverting input and the emitter of the buffer transistor TIP31C will also be 4.5 volts. The voltage change at the emitter of the transistor will be around ±2 V for a 2 mV change at the input (junction of 0.01 µF capacitor and 1 kÄ resistor) which produces a current change of about 2/33 = 60 mA through the 33 Ä emitter resistor and the speaker output. The peak output speaker power is about I 2 R = 0.062 × 8 = 28 mW. 1. Build the circuit in Fig. 5.8. Note that the power supply here is not the ±15 V supply that we have previously used, and that we are now using the 741 op-amp again. 2. Place the “microphone” speaker several feet away from the output speaker. Have someone talk into the microphone and listen to the output. How does it sound? If you have a small radio or equivalent, use that as your sound source. 3. The speaker is sensitive to low frequencies and the small value capacitor serves to attenuate the lower tones and produce a better overall response. Experiment with different value capacitors to improve the response for various speakers. Task 7: DC motor amplifier. Now we’re really getting to some fun stuff! You will build a dc motor driver with push-pull transistors and diode protection. You will also build in dead-zone reduction. 1. Using the multimeter, measure the armature resistance of the dc motor. Because of the commutator, this will vary with the shaft angle, so rotate the shaft and take the average of several consistent readings. Remark: To simplify testing we will use a resistor as the load for our sequence of circuits until the final step. What value of resistor should be used? How might you make this resistance value using standard 1/4 W resistors, but still be able to dissipate more than 1 W? 2. Construct the circuit in Fig. 5.9. The supply voltage is set to ±9 V to avoid damage to the motor. The 1N4148 diodes are identified by (very small) printing on the case. These are not the same as the Schottky or LED diodes you used earlier in the lab. Be sure to get the correct diodes.The diodes are a bit of magic to prevent voltage transients caused by the motor’s inductance from destroying the transistors. Be sure to insert the diodes in the correct way; otherwise, “poof”. 3. Set the function generator output to 3 V peak-to-peak sinusoid. Connect the function generator input to vin and a load resistor capable of more than 1 W and similar resistance to your motor to the output. 4. Sketch the output waveform. Increase the function generator amplitude control to its maximum value. Is there any clipping? c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 5–7 ECE2205, Lab 5: Advanced Op-Amp Circuits 5. Dead Zone Reduction: Move the feedback from around the op-amp to around the combination of the op-amp and the emitter follower buffer, as you did last week (cf. Fig 5.10). Also add the capacitor as shown. This is another bit of magic, this time to try to control oscillations. 6. Connect to the function generator and the load resistor, as in the previous part. With a 3 V peak-to-peak triangle wave, sketch the output. 7. Increase the function generator amplitude control to its maximum value. Is there any observable distortion in the output? 8. Driving the Motor: Now for the moment of truth: Can we use this circuit to drive the motor? Disconnect the load resistor. Wire the motor in its place. Set the input voltage to an adjustable dc level. What happens when the dc level is greater than zero? What happens when the level is less than zero? Do not exceed ±9 V across the motor. +9 V +9 V TIP31C vin 1N4148 1 µF vout 741 TIP32C Load vin Motor driver circuit. vout 741 TIP32C Load −9 V −9 V Figure 5.9 TIP31C Figure 5.10 Improved motor driver circuit. Task 8: Servo-motor control. A servo-motor controller is used to control the angular position of a motor, as opposed to its speed. They are often used in radio-controlled car steering mechanisms, and in robotic applications. We can control angle by measuring the angular position and feeding it back to a control system that drives the motor one way if the position error is positive, and drives it the other way if the position error is negative. In this lab, we use a simple motor-potentiometer pair. The potentiometer is used to measure the shaft angular position. The potentiometer is dual 10 kÄ, so one potentiometer can be used for feedback of the position, while the other might serve as an output. What we are going to do here is to make a remote-controlled potentiometer that repeats the setting of the control potentiometer. This is a typical feedback system, but since it involves a mechanical element, it is called a servomechanism, or servo, for short. The output could be the shaft position, as well as the electrical output of the controlled potentiometer. In fact, the output of most servos is mechanical. The motor pot consists of a small dc motor, gearing that drives the sliders, the support for the potentiometer resistances, and a shaft. The connections are shown in Fig. 5.12. We are looking at the motor end; the shaft is at the other end. A clockwise rotation of the shaft, looking from the shaft end, increases the resistance between the common end and the sliders. A voltage applied to the motor terminals with the marked polarity turns the shaft counterclockwise, bringing the sliders toward the common ends. The motor requires a little more than 2 V to begin turning, so that 5 V is a reasonable maximum. The motor draws about 30 mA or a bit more. There are two connection pins (not shown) on the shaft side of the potentiometer connections that light a red LED that shines through the hole in the shaft. As you face the shaft, the anode is at the right. Pins 1 and 8 appear to be connected to nothing. An elementary servo circuit is shown at the left. The usual op-amp, here an 411, cannot drive the motor by itself, and must be helped by transistors. The complementary TIP31C and TIP32C do the job nicely. The 411 op-amp is used as a comparator here, which is allowed by its common-mode range. The output saturates one direction or the other to drive the motor. With a ±5 V supply, the motor voltage will be between 3.5 and 4 V, so no further arrangements are necessary. In this simple circuit, the motor is driven one way or the other at full voltage. A more complicated circuit could provide more sophisticated control. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Lab 5–8 ECE2205, Lab 5: Advanced Op-Amp Circuits +5 V +5 V TIP31C 10 kÄ 10 kÄ 12345678 1 kÄ 7 10 kÄ 411 CW TIP32C −5 V 5 Servo motor driver circuit. 4 −5 V 3 Figure 5.12 5 10 kÄ 2 +5 V 6 −5 V Figure 5.11 6 4 Connections to servo motor. This circuit finds the proper position rapidly, following the control potentiometer. It then oscillates on either side of the correct position at a frequency of about 5 Hz. 1. Build the servo-motor control circuit in Fig. 5.11. You may carefully bend the two pins in front of the 8-pin connector down flat. We will not need these connections for this lab. 2. Observe the output voltage of the op-amp with the oscilloscope on the slowest speed sweep. If the feedback has the wrong sign when you test the circuit, simply exchange the connections to the op-amp inputs. The elimination of the position oscillation is a more challenging problem than would appear at first sight. If the voltage applied to the motor is decreased as the equilibrium position is approached (proportional control), the motor will stop short at some point. If this is satisfactory, then the problem is solved, but there will be a little annoying hysteresis because of the finite voltage required for movement. If the error signal is integrated (integral control), it will cause the motor to approach a more correct position until the error is zero. These refinements are not (at this time) within the scope of this exercise, which is to illustrate basic servo control, but are discussed at length in any text on control systems. Task 9: Lab report. Submit your results in the form of a typed report. Refer to Lab 1 for instructions regarding proper format and content of an acceptable lab report. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° Inventory–1 ECE2205: Circuits and Systems I Department of Electrical and Computer Engineering University of Colorado at Colorado Springs "Engineering for the Future" Inventory These labs were designed to minimize the number of different parts required. However, there are still quite a few. Here is the list: Lab 1: Resistors: 1 Ä, 1 kÄ, 10 MÄ. Lab 2: Breadboard (and for all subsequent labs as well). At least two CdS cells per person. Resistors: 10 Ä, 1 kÄ, 10 kÄ, 10 MÄ. Pots: 100 Ä and 100 kÄ. Lab 3: Resistors: 51 Ä, 390 kÄ, 1 MÄ. Capacitors: 0.01 µF. Bouncy SPST momentary pushbutton switch. Lab 4: At least two LF411 op-amps per student, at least one LM741 op-amp per student. Pots: 10 kÄ. Resistors: 100 Ä, 390 Ä, 1 kÄ, 10 kÄ, 15 kÄ, 100 kÄ, 1 MÄ, 10 MÄ. Capacitors: 100 pF, 0.01 µF plus ceramic 0.01 µF for op-amp stabilization. Transistors: TIP31C and TIP32C. Speaker: One 8 Ä speaker. Lab 5: At least one LF411 op-amp, one LM311 comparator, and one LM741 per student. Diodes: Two Shottky diodes, one red LED, two signal (e.g., 1N4148). Resistors: 33 Ä, 820 Ä, 1 kÄ, 4.7 kÄ, 10 kÄ, 100 kÄ, 1 MÄ. Pots: 10 kÄ, 100 kÄ. Capacitors: 0.01 µF, 1 µF. Transistors: TIP31C and TIP32C. Motors: One dc motor, and one dc servo motor. Speaker: Two 8 Ä speakers. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° (mostly blank) ECE2205: Circuits and Systems I Lab Reader Credits–1 Department of Electrical and Computer Engineering University of Colorado at Colorado Springs "Engineering for the Future" Lab Reader Credits This lab reader was assembled by scouring the Internet for lab experiments that were proven by time, suited to the educational objectives of this course, and (hopefully) interesting as well. To a greater or lesser extent, all labs in this course have been copied from these sources, with some modifications to suit the lab equipment at UCCS, and to reduce the required inventory of parts. It is highly likely that some of the original sources have been forgotten, but here are the ones that I remember. • The bulk of Lab 1 came from the Duke University “ECE-61L Electronic Circuits Laboratory” lab manual, “Lab 2—Operation of the Digital Instruments and Basic Measurements” from http://www.ee.duke. edu/~gary/HP/ECE61labmanual.pdf. • The bulk of Lab 2 came from the Duke University “ECE-61L Electronic Circuits Laboratory” lab manual, “Lab 3–Kirchoff’s Laws and Basic Instrumentation” from http://www.ee.duke.edu/~gary/HP/ ECE61labmanual.pdf. • The bulk of Lab 3, especially the RC-circuit sections, were from “Lab 2: Capacitors” from http://www. people.fas.harvard.edu/~thayes/phys123/lb2_feb06.pdf. • The bulk of Lab 4 was from “Lab 8: Op Amps I” from http://www.people.fas.harvard.edu/ ~thayes/phys123/lb8_oc05.pdf and from “Lab 9: Op Amps II” from http://www.people. fas.harvard.edu/~thayes/phys123/lb9_oc05.pdf. • The bulk of Lab 5 was from “Op Amps III: Positive Feedback, Part I: Benign (useful oscillators)” from http://www.people.fas.harvard.edu/~thayes/phys123/lb10a_205.pdf. • The intercom circuit from Lab 5 was from “Electronical basic circuits” from http://www.qsl.net/ yo5ofh/hobby%20circuits/electronical_basic_circuits.htm. • The pulse-width-modulator circuit in Lab 5 was from “Opamp oscillator circuits” from http://www. ibiblio.org/obp/books/socratic/output/opamp10.pdf. • The dc-motor control system in Lab 5 was from “Experiment 4.3: Motor Amplifier” from http://www-ece. rice.edu/~jdw/242_lab4/exp4.3.html. • The servo-control system in Lab 5 was from “Servo System” from http://www.du.edu/~etuttle/ electron/elect32.htm. • Additionally, the Internet site http://hyperphysics.phy-astr.gsu.edu provided the theoretical description for the Schmitt trigger and relaxation oscillator in Lab 5. c 2006, Dr. Gregory L. Plett, ECE Dept., CU Colorado Springs Lab reader prepared by & Copyright ° (mostly blank)