Lab #7: Transient Response of a 1 st Order RC Circuit Theory & Introduction Goals for Lab #7 The goal of this lab is to explore the transient response of a 1 st Order circuit. In order to explore the 1 st order response, you will first analyze a voltage dividing circuit like the ones shown in Figure 7.1 and Figure 7.2. Then, using your understanding of the voltage divider principle, you will build a circuit that will have LEDs that will flash according to the frequency you determine. Theory In the RC circuit shown in Figure 7.1, a resistor and a capacitor form a voltage divider circuit. Figure 7.1 Under ideal condition, the current flowing through R also flows through C; the relationship between the voltages can be expressed as Vin Vout dvout C =0 R dt As explored in your textbook and in the previous lab, for zero initial conditions, when a step voltage is applied to the RC circuit the voltage across the capacitor grows from zero, in an exponential manner, until it reaches the pulsed value of the voltage source. The solution of the previous equation for a unity step input signal is given as: V out t RC = V ( 1 e ) Eq. 1 in The time the voltage is applied across the circuit is given as t, the resistance in the circuit is R (in ohms) and the capacitance in the circuit is C (in farads). The term RC, which is also measured in seconds, is called the time constant of the circuit. The derivation of the transient response of the RC circuit in Figure 7.2 is left to the reader. Hint: you still have a voltage divider hence equate the current flowing through the capacitor and the resistor and solve the resulting differential equation. In Figure 7.2, the output voltage is taken from the R. (If you need extra help, consult your textbook.) Lab #8 Page 1
Figure 7.2 In order to use the transient response properties described above, we are going to build a circuit like the one shown in Figure 7.3 below. Figure 7.3 The circuit above will make a light strobe using an op-amp with an RC timing circuit. We will use it to drive two light emitting diodes (LED) to blink with variable frequencies. The op-amp is connected with a positive feedback via R 1 and R 2, so it works as a comparator. Recall that an op-amp was used as a comparator in Lab #5. The positive input to the comparator comes from a voltage divider, so the positive input voltage is simply +/- * V dd, where 0<<1 is the ratio of the voltage comparison ratio of the voltage divider by R 1 and R 2, defined in fig. 7.3. The op-amp negative input is connected to a RC circuit which charges or discharges toward its Lab #8 Page 2
target value. The result is the V out that equals either +V dd or V dd ; shown below are some of the typical waveforms. Figure 7.4 For example, after the circuit approaches its steady state, assuming at some time t 1 the output voltage is at +V dd, then proportionally V 1 = +V dd. The voltage across the capacitor, V 2, will then follow the V out, trying to approach +V dd as the dashed lined indicates. However, since the opamp works as a comparator, at moment t 2 when the V 2 reaches V 1, the output of the opamp flips over. All the voltages become up-side-down until a new period starts at t 3. The charging-anddischarging curve is shown in Figure 7.4. It can be demonstrated that the overall oscillation frequency can be expressed as 1 1 f = = T 1+ γ 2ln RC 1 γ Eq. 2 Lab #8 Page 3
Prelab A. Simulate the circuit of Figure 7.1 in PSPICE. Use R = 10kΩ and C = 0.1µF. First, use transient analysis; for the V in, set as VPULSE with the settings shown in Figure 7.5. The TD, TR and TF values should be small, actually you can use anything less than 1e-6, too small settings (as shown) may slow down the simulation. Put voltage probes at both V in and V out. Run the simulation and plot the V in and V out together for 10ms. Manually read the two voltages at every milisecond from 0 to 4ms time marks. Verify Equation 1 in Table 1. Print out the graph to turn in with your prelab. Figure 7.5 Table 1 Time Vin Vout Vin-Vout (Simulation) 0ms 1ms 2ms 3ms 4ms Vin-Vout (Theory.) %Difference B. Simulate Figure 7.2 in PSPICE and print the output waveform for the circuit. Use the same R and C from above. Derive an analytical expression for the first 5ms, in a similar form as Table 1. Compare the result from your formula with the simulation in a table, similar to Table 2, to verify your own theory. Table 2 Time Vin Vout Vin-Vout (Simulation) 0ms 1ms 2ms Vin-Vout (Theory.) %Difference Lab #8 Page 4
3ms 4ms C. Design a strobe light circuit to generate the frequency of your heart rate. Take the =0.5, an R of less than 100 kω, take the f as your heart rate you got from lab#6, (f~1.0hz), Calculate the R and C values for use in Figure 7.8. Use the equation 2: 1 1 f = = T 1+ γ 2ln RC 1 γ D. Simulate your strobe light circuit (Fig 7.3, replace the OPAMP by ua741) in PSPICE, obtain the transient waveforms at V 1, V 2 and V out. Obtain the transient current flowing through the capacitor C as well. Lab #8 Page 5
Procedure Equipments and parts needed resistors capacitors 22 A.W.G. wire Task #1 Verify the voltage divider response from Figure 7.1 A. Connect the circuit in Figure 7.1, take R=10 kω and C=0.1µF, connect the V in to the function generator on the NI ELVIS board and to the CHB input of the onboard oscilloscope, connect V out to the CHA input of the onboard oscilloscope. B. Generate a 1V pp (peak-to-peak), 100Hz square wave signal from the NI ELVIS function generator. You may choose either manual or auto mode. Figure 7.6 below is a screen shot showing an auto mode setting. You may want to calibrate it with ELVIS oscilloscope for better results. Figure 7.6 C. Open the ELVIS oscilloscope. Use cursors to obtain the output voltage at specific time marks same as calculated in the prelab and compare to results in your prelab Table 1. You may need to fine-tune the input voltage to exactly have 1.00V pp. The screen shot shown is with CHB off. You need to take both V and V out and calculate the differences to compare. Comment your results in the lab report. Lab #8 Page 6
Figure 7.7 Task #2 Strobe light Circuit Figure 7.8 In Figure 7.8, a potentiometer (pot) replaced R 1 and R 2 in the conceptual Figure 7.3. A potentiometer is equivalent to a voltage divider with a variable division ratio. The symbol for this element is shown below: Lab #8 Page 7
The total resistance between terminals 1 and 3 is constant. The resistance between 1 and 2 is R 1, and that between 2 and 3 is R 2. The arrow represents a slider, which can slide left and right the length of the potentiometer. Many potentiometers have the resistance materials laid out over part of a circle, and the slider must be rotated rather than moved left and right. The values R 1 and R 2 can be varied while their total resistance, R 1 +R 2, stays fixed. In this way, a variable voltage divider can be implemented. Some typical potentiometers used in the lab are pictured below. The total resistance R 1 +R 2 is usually marked on its side. For the following steps, record the information requested in Table 3. Save waveforms from the Textronix Oscilloscope to a floppy disk to be included in your lab report. Be prepared to comment on all of your results. Be sure to make ground connection of the HP power supply. A. Build the circuit shown in Figure 7.8 with the component values R and C chosen in the design section (D) of the pre-lab. Notice that the electrolytic capacitors and LEDs have polarity. Longer legs are the positive ones. We have used components like these in Labs 3 and 5. B. Adjust the potentiometer to synchronize the blinking LED to your heartbeats. Ask your TA for help if they do not blink. C. Disconnect the potentiometer from the circuit and use an ohmmeter to determine its voltage division ratio =R 2 /(R 1 +R 2 ). Compare this to the value you chose in the prelab and comment your findings in the lab report. Remember that a potentiometer can be modeled as two resistors in series, where R 1 +R 2 is the total value. D. Put the potentiometer back; connect the Textronix oscilloscope CH1 to V 1, CH2 to V 2 and CH3 to V out. Manually adjust the oscilloscope to display the signals correctly. Keep in mind that the period of your heartbeat is in the order of 1 second. Save your waveforms for the lab report. E. Connect another resistor with the same value in parallel with R, what is the new RC constant now? What is the new oscillating frequency? How does the R affect it? Lab #8 Page 8
F. Remove the new resistor; now connect another capacitor with the same value in parallel with C, what is the new RC constant? What is the new oscillating frequency? Comment your observations. G. Remove the added capacitor. Turn the potentiometer for a lower frequency. Manually adjust the oscilloscope to correctly view the signals. Slowly increase the oscillation frequency by adjusting the potentiometer, observe the V 2 waveform, notice how its amplitude and period changes. Referring to Figure 7.3 and 7.4, comment on how the change in the potentiometer affects the oscillating frequency. Lab Report Requirements Reproduce your table from the prelab and your table of results from Task #1. Comment on errors you encounter. Identify any sources of error. For Task #2, include all 4 waveforms you saved and comment on how the frequency of the blinking lights change as you change the input impedance. Relate the oscillating frequency to γ. Be sure to comment on the aspects of the waveforms requested in the procedure. Lab #8 Page 9
Tables and Results Table 1: Task 1 T Vin Vout Vin-Vout (Simulation) Vin-Vout (Theory.) Vin-Vout (Lab) 0ms 1ms 2ms 3ms 4ms 4ms Table 2: Task #2,Part C: R 1 R 2 R 1 +R 2 =R 2 /(R 1 +R 2 ) Table 3: Part D: Measurements V pp out V pp 1 V pp 2 Value Comments on Task #2, Part E Comments on Task #2, Part F Comments on Task #2, Part G Lab #8 Page 10