Lab 4 circuits-20201022

pdf

School

University Of Arizona *

*We aren’t endorsed by this school

Course

220

Subject

Electrical Engineering

Date

Feb 20, 2024

Type

pdf

Pages

11

Uploaded by JusticeGerbilMaster969

Report
ECE 220 Laboratory 4 Volt Meter, Comparators, and Timer Michael W. Marcellin Please follow all rules, procedures and report requirements as described at the beginning of the document entitled ECE 220 Laboratory 1. Always wear your safety glasses when performing your lab experiments. Prelab Part 1 In Lab 2, we built a simple volt meter using a d’Arsonval panel meter. We found that the main problem with this simple meter is that its Thevenin resistance is rather small. Because of this, it tends to load the circuit being measured, changing the value of the voltage to be measured. Here, we consider an improved volt meter that uses a 1 𝑚 A d’Arsonval panel meter and an op amp as shown in Figure 1. In this figure, assume power rails of ൅7 V, and െ2 V. a) Calculate the value of 𝑅 required so that 𝑖 ൌ 1 𝑚 A when 𝑣 ൌ 5 V. b) For the value of 𝑅 calculated above, write an expression for 𝑖 as a function of 𝑣 . Observe that your equation in b) results in a linearly increasing needle deflection as a function of 𝑣 , with full (100%) deflection at 5 V. Specifically, the current through the panel meter is of the form 𝑖 ൌ 𝛽𝑣 . That is, the op amp and resistor form a voltage‐controlled current source with the panel meter as its load. An important feature of this circuit is that neither the value that you calculated for 𝑅 , nor your equation for 𝑖 depend on the internal resistance of the panel meter. Figure 1. Improved volt meter. In Lab 2, we used your simple meter to measure the voltage at terminals 𝑎 and 𝑏 in Figure 2 below. We discovered that your meter performed poorly when 𝑅 ்௛ was not small. Specifically, we saw a large %error for the case of 𝑅 ்௛ ൌ 4.7 𝑘Ω . This is because the input (Thevenin) resistance of your meter was not very large compared to 4.7 𝑘Ω . Recall that an ideal volt meter has infinite input resistance. The input resistance looking into the input of the improved volt meter of Figure 1 is very large. In class, we would model it as infinity. In reality, it is “only” many Meg‐Ohms. This results in the %error of the improved meter being
negligible for values of 𝑅 ்௛ up to at least 1 𝑀Ω . We will now verify this via a PSpice simulation. Figure 2. Thevenin equivalent circuit. Start a new project in PSpice and draw the circuit shown below in Figure 3. This figure represents the use of the improved meter of Figure 1 attempting to measure 𝑣 ௔௕ in Figure 2. The 155 Ω resistor is used to model the panel meter, although this resistance value is unimportant as noted above. As in Prelab 3, use uA741 for the op amp. We have not used the 𝑉 ௖௖ labeling trick this time, and have just allowed wires to cross. Note carefully that PSpice includes a red dot (node) where wires connect. There is no such connection where the negative power supply wire crosses the feedback path. Note also, that this time we have included two parameters (variables). Each of them is created using the new property button in the property editor spreadsheet for the part PARAM, as before. You do not need two copies of PARAM. You will just create two different properties (columns) within the same instance of PARAM. Finally, note that the (default) values of the two parameters should be chosen as 𝑣 ்௛ ൌ 5 V and 𝑅 ்௛ ൌ 1 𝑀Ω . Remember that in PSpice, we use “meg” in place of 𝑀 .” Figure 3. PSpice schematic. Perform a linear sweep of 𝑅 ்௛ from 1 𝑘Ω to 1 𝑀Ω in increments of 1 𝑘Ω . Note that 𝑣 ்௛ will
(automatically) stay at its default value of 5 V throughout this sweep. Use a current marker, as shown in Figure 3, to measure the current through the panel meter. The resulting graph will show this current, 𝑖 , as a function of 𝑅 ்௛ . Ideally, it should be constant at 1 𝑚 A, corresponding to 100% needle deflection, since the voltage that the meter is trying to measure is 5 V. In reality, 𝑖 will decrease very slightly as 𝑅 ்௛ increases due to the loading effect. c) What value of 𝑅 ்௛ (among those tested) yields the maximum error between 𝑖 and its ideal value of 1 𝑚 A? d) For this value of 𝑅 ்௛ , calculate the %error in 𝑖 . e) print your graph. Now edit the simulation profile and redo the sweep. This time we will sweep 𝑣 ்௛ from 0 to 5 V in increments of 0.1 V. The value of 𝑅 ்௛ will (automatically) stay at its default value of 1 𝑀Ω throughout the sweep. You may have to add the current marker again after you edit the simulation profile. Ideally, the graph of the current through the panel meter, 𝑖 , should rise linearly from 0 to 1 𝑚 A, corresponding to a linear needle deflection from 0 to 100%. Your graph should (essentially) show this desired behavior. f) print your graph. Prelab Part 2 In class, we discussed an op amp comparator circuit as shown below in Figure 4. For this circuit, whenever 𝑣 ൐ 𝑣 ௥௘௙ , 𝑣 goes to the positive power rail. Else, 𝑣 goes to the negative power rail. Throughout this part, assume that the power rails are േ5 V. Figure 4. Comparator circuit. Now consider the circuit of Figure 5. a) Which LED will be turned on when 𝑣 ൌ 1 V? Which LED will be turned on when 𝑣 ൌ െ1 V?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Figure 5. Comparator with LEDs. Now consider the circuit of Figure 6. b) Write an equation for 𝑣 as a function of the pot setting 𝐹 . Assume 𝐹 ൌ 0 corresponds to the slider being all the way up. Figure 6. Input signal. To make things more interesting, we add some “noise” to 𝑣 . The resulting “noisy” signal is 𝑣 ሺ𝑡ሻ ൌ 𝑣 ൅ 𝑛ሺ𝑡ሻ . Assume that the noise 𝑛ሺ𝑡ሻ is a square wave of amplitude 𝑣 ൌ 0.1 V ( 𝑣 ௣௣ 0.2 V) and frequency 𝑓 ൌ 2 Hz. Figure 7 shows a graph of 𝑣 ሺ𝑡ሻ for a pot setting 𝐹 ൌ 0.4 . Make sure that you understand this figure. Changing the pot setting 𝐹 will raise or lower the level of the signal in Figure 7. As another example, when 𝐹 ൌ 0.5 , the square wave will be oscillating above and below 0 V, rather than above and below 1 V as shown in Figure 7. Figure 7. “Noisy” signal. Consider now connecting 𝑣 ሺ𝑡ሻ in Figure 6 as the input to the circuit of Figure 5. Like the improved volt meter, the input resistance of the comparator is very high. Thus, we do not need to worry about the loading effect.
c) What do you expect the LEDs to do for a pot setting of 𝐹 ൌ 0.4 ? How about 𝐹 ൌ 0.5 ? How about 𝐹 ൌ 0.6 ? In class, we also talked about the Schmitt trigger (comparator with hysteresis) which reduces “chattering” due to noise. A Schmitt trigger circuit is shown below in Figure 8. Again, assume power rails of േ5 V. d) What is the threshold 𝑇 for the Schmitt trigger as shown? Note that this threshold is larger than 𝑣 ௣௣ of the noise in the example above. Thus, any chattering in the example should be eliminated by replacing the comparator with the Schmitt trigger. We will verify this in the lab. Figure 8. Schmitt trigger. Prelab Part 3 In this part, we use an RC circuit together with a comparator to build a simple timer. Figure 9 below shows an RC circuit with a step input of 3 volts at time 𝑡 ൌ 0 . Assume that the initial capacitor voltage is 0 V. In Chapter 7, we will learn the theory for RC circuits. For now, just use the fact that 𝑣 ሺ𝑡ሻ ൌ 3 െ 3𝑒 ି௧/ோ஼ V. a) Let 𝐶 ൌ 220 µ𝐹 and calculate the value of 𝑅 required so that the capacitor voltage passes through 2.5 V at time 𝑡 ൌ 8 seconds. That is, 𝑣 ሺ8ሻ ൌ 2.5 V. Figure 9. RC step response. The circuit of Figure 10 below shows the RC circuit from Figure 9 connected so that the
capacitor voltage appears as the input to a comparator. Note that the input current 𝑖 to the Op Amp is very small so that the loading effect on the RC circuit will be negligible. Note also that 𝑣 ௥௘௙ ൌ 2.5 V for the comparator. As usual, we use 3 diodes to model an LED in PSpice. It should be clear that prior to time 𝑡 ൌ 8 , the LED will be off. After time 𝑡 ൌ 8 the LED will be on. Thus, this circuit acts as a simple timer. The time at which the LED turns on can be adjusted by choosing different values for the resistor 𝑅 . Figure 10. Timer circuit. We will now do a PSpice simulation of our timer. Start a new project in PSpice and draw the circuit in Figure 10. The part name for a capacitor is C. You will need to set the initial voltage of the capacitor. Double click carefully on the capacitor symbol itself (not the value or the name). The property editor spreadsheet will open. Look for the column labeled IC. This is the initial condition. For a capacitor, this is always voltage. For an inductor, of course, IC would be current. Set the value below IC to 0. Click on the tab labeled Page 1 to return to your schematic. Click PSpice ‐> New Simulation Profile. A new window will open. Enter a name and click create. Another new window will open (check the icons at the bottom of the screen). Set the following parameters: Analysis type: Time Domain (Transient) Run to Time: 30 seconds Start saving data after: 0 seconds Maximum step size: 0.01 seconds Click OK Put a voltage marker at the top of the capacitor, and run the simulation. The resulting graph will be the capacitor voltage as a function of time. Make sure that this behaves as expected. When does it cross through 2.5 V? What is the capacitor voltage when 𝑡 ൌ 5𝑅𝐶 ? b) Print your graph. Delete the voltage marker, and add a current marker to monitor the LED current. Run the
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
simulation again. This time the graph shows the LED current as a function of time, indicating that the LED is off prior to 8 seconds, and on after 8 seconds, as expected. c) Print your graph.
Prelab Grading Part 1 a) 2 pts b) 2 pts c) 1 pt d) 1 pt e) 3 pts f) 1 pt Part 2 a) 1 pt b) 2 pts c) 3 pts d) 1 pt Part 3 a) 2 pts b) 3 pts c) 3 pt _______ 25 total pts
Lab 4 Data Sheet Please follow all rules, procedures and report requirements as described at the beginning of the Lab 1 Data Sheet. Lab Grading: Data Sheet = 15 pts; Explanation = 10 pts. Lab Part 1 No experiment Lab Part 2 Comparator circuit working: Y / N (circle one) 5 pts Schmitt trigger circuit working: Y / N (circle one) 5 pts Lab Part 3 Timer circuit working: Y / N (circle one) 5 pts
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Lab Experiments Lab Part 1 No experiment. Lab Part 2 Build the circuit shown in Figure 11. Use an ADTL082 op amp. Use േ5 V for the power rails of the op amp. In Figure 11, we are using the function generator in place of the circuit from Figure 6 of the pre‐lab to generate the “noisy” signal 𝑣 ሺ𝑡ሻ ൌ 𝑣 ൅ 𝑛ሺ𝑡ሻ . Set the function generator to output a square wave with 𝑣 ൌ 0.1 V ( 𝑣 ௣௣ ൌ 0.2 V) and a frequency of 𝑓 ൌ 2 Hz. This square wave is 𝑛ሺ𝑡ሻ . We will employ a DC offset in the function generator to create the “noiseless” signal 𝑣 . Set the DC offset of the function generator ( 𝑣 to various values, while monitoring the noisy voltage 𝑣 with the scope. Make sure you have the scope coupling in DC mode. Verify that 𝑣 behaves as expected (see Figure 7 and the related discussion in the prelab). Verify that the LEDs behave as you expect for different settings of 𝑣 . Specifically, you should be able to find settings where only LED1 (or LED2) is on. You should also be able to find a setting where the LEDs blink on and off (alternating). This is “chatter.” Have your TA initial that your circuit is working. Online students: make a video to demonstrate that your circuit is working. Figure 11. Comparator with noise. Modify your circuit to that shown below in Figure 12, which uses a Schmitt trigger in place of the comparator. Repeat your inspection of the LEDs for different values of 𝑣 . Raise and lower 𝑣 carefully to ensure that all chatter has been eliminated. Have your TA initial that your circuit is working. Online students: make a video to demonstrate that your circuit is working. 𝑣 ሺ𝑡ሻ 200 Ω 200 Ω LED 2 LED 1 𝑓ሺ𝑡ሻ
Figure 12. Schmitt trigger with noise. Lab Part 3 Build the circuit shown in Figure 13. Set the power rails to േ5 V. Use the value of 𝑅 that you calculated in the prelab (nearest value from Appendix H in the textbook). Note the slightly different symbol shown for the capacitor in this figure. This indicates a “polarized” capacitor that should only be charged in one direction. The straight line indicates the “ ” terminal, while the curved line indicates the “ ” terminal. Charging a polarized capacitor in the wrong direction can destroy it. The capacitor that we will use for this experiment is polarized. The positive terminal (the “top” terminal in Figure 13) is the one with the longer of the two wires. Be very careful when you hook up your circuit, and as always, wear your safety glasses. The source labeled 𝑓ሺ𝑡ሻ is the function generator. Set it initially to a constant value of 0 V. Let it sit for at least 30 s to ensure that the capacitor is discharged. The LED should then be off. At some time of your choosing ( 𝑡 ൌ 0ሻ , set the function generator to a constant value of 3 V. Eight seconds later, the LED should turn on. To repeat, set 𝑓ሺ𝑡ሻ to 0 and wait at least 30 s before setting it back to 3 V. Have your TA initial that your circuit is working. Online students: make a video to demonstrate that your circuit is working. Figure 13. Timer circuit.