Lab 1 RC Circuits
Lab 1 RC Circuits
Lab 1 RC Circuits
Lab 1: RC Circuits
Table of Contents
1 Introduction ........................................................................................................................................... 1
2 Precautions ............................................................................................................................................ 1
3 Prelab Exercises .................................................................................................................................... 2
3.1 The RC Response to a DC Input ................................................................................................... 2
3.1.1 Charging RC Circuit ............................................................................................................. 2
3.1.2 Discharging RC Circuit ......................................................................................................... 3
3.1.3 Square Wave Input ................................................................................................................ 3
3.1.4 Multiple-stage RC Circuits ................................................................................................... 3
3.2 The RC Response to a Sinusoidal Input........................................................................................ 4
3.2.1 Time-domain RC Response .................................................................................................. 4
3.2.2 Frequency-domain RC Response .......................................................................................... 5
4 Experimental Procedure and Data Analysis.......................................................................................... 6
4.1 The RC Response to a DC Input ................................................................................................... 6
4.1.1 Square Wave Input Analysis ................................................................................................. 6
4.1.2 Time Constant Measurement ................................................................................................ 7
4.2 The RC Response to a Sinusoidal Input........................................................................................ 7
5 Reference Material ................................................................................................................................ 9
5.1 RC Step Response and Timing Parameters ................................................................................... 9
5.2 Elmore Delay Estimation ............................................................................................................ 10
5.3 Frequency Response of a Circuit System.................................................................................... 10
5.4 Parameter Extraction via Linear Least-Squares-Fit Technique .................................................. 11
Table of Figures
Figure 3.1.1: Single-stage RC circuit. ........................................................................................................... 2
Figure 3.1.2: Two-stage RC circuit............................................................................................................... 4
Figure 3.1.3: Three-stage RC circuit............................................................................................................. 4
Figure 3.2.1: An RC circuit with the output over the resistor. ...................................................................... 5
Figure 4.1.1: RC circuit for lab experiment. ................................................................................................. 6
Figure 5.1.1: Timing parameters of signal waveforms. ................................................................................ 9
Figure 5.2.1: N-stage RC circuit delay estimation. ..................................................................................... 10
1 Introduction
This lab is designed to teach students methods for characterizing circuit systems, and more specifically, an
RC circuit system. This lab will also familiarize students with the test bench instruments used in this class
by having them use the equipment to analyze some fundamental response trends of step and sinusoidal
input functions for an RC circuit.
A circuit system can be pictured as a box with inputs and outputs, and the characteristics of this system can
be represented by its input and output signals, e.g. voltage and current. A signal contains three parameters:
magnitude, frequency, and phase. Any change of these parameters in the input signal will affect the output
signal.
The RC circuit has many interesting characteristics while staying one of the most basic circuit systems.
This lab is going to allow students to observe these characteristics and teach them how to analyze the output
signals with changes in input magnitude or frequency.
This lab is split into a prelab exercise and hardware implementation. Submit one prelab report and one lab
report per group, with the members’ names are clearly written on the front page. There is no template for
the prelab report, and the lab report template is available on Canvas. These reports must be in pdf format.
There are multiple apps, including CamScanner, for Apple and Android phones that turn photos into pdf’s.
2 Precautions
None of the devices used in this set of experiments are particularly static sensitive; nevertheless, you should
pay close attention to the circuit connections and the polarity of the power supplies, function generator, and
oscilloscope inputs.
Prelab #1:
Derive the differential equation for 𝑣out (𝑡) in Figure 3.1.1, in terms of 𝑣in (𝑡), 𝑅, and 𝐶.
Now suppose the input signal 𝑣in (𝑡) has been zero for a long time, and then is changed to 𝑉𝑜 , a positive
constant, at time 𝑡 = 0. The input signal is then a step function, which means:
0, 𝑡 < 0
𝑣in (𝑡) = 𝑉𝑜 𝑢(𝑡) = {
𝑉𝑜 , 𝑡 ≥ 0
The initial condition for 𝑣out (𝑡) is needed to solve the differential equation. The output voltage should be
zero when 𝑡 < 0, since there is no input until 𝑡 = 0. Thus, the initial condition for 𝑣out (𝑡) is 𝑣out (0) = 0.
Prelab #2:
Derive 𝑣out (𝑡) for 𝑡 ≥ 0 in terms of 𝑉𝑜 , 𝑅, and 𝐶.
Download Lab1_Prelab.m and lab1plot.m from the Canvas webpage, making sure they are in the same
folder on your computer. Suppose 𝑉o = 5V, 𝑅 = 10kΩ, and 𝐶 = 0.01µF.
Prelab #3:
Using the given Matlab scripts, plot 𝑣in (𝑡) and 𝑣out (𝑡) on the same set of axes.
To do this, open Lab1_Prelab.m using Matlab (there is no need to open the other file) and read the
developer comments about how to use the lab1plot function. Run the script, select “Change Folder” if the
warning appears, and the plot for Prelab #3 should appear. You are not expected to know how to use Matlab
in this course, so feel free to ask the TA for assistance if you have difficulty using the script.
𝑉𝑜 , 𝑡 < 0
𝑣in (𝑡) = 𝑉𝑜 𝑢(−𝑡) = {
0, 𝑡 ≥ 0
Prelab #4:
Find the initial condition for 𝑣𝑜𝑢𝑡 (𝑡), then find 𝑣𝑜𝑢𝑡 (𝑡) for 𝑡 ≥ 0 in terms of 𝑉𝑜 , 𝑅, and 𝐶.
Prelab #5:
Using the given Matlab scripts, plot 𝑣in (𝑡) and 𝑣out (𝑡) on the same set of axes.
Prelab #6:
Find the time constant, rise time, fall time, and both delay times for the RC circuit in terms of 𝑅 and
𝐶. Then replace 𝑅 and 𝐶 with their numeric values from Section 3.1.1. How long does the period 𝑇
need to be for the output to be within 1% of its final value?
When deriving the expressions, notice that these timing parameters are independent of the input voltage.
Prelab #7:
Suppose the period of the turning switch is 𝑇 = 4ms. Using the given Matlab scripts, plot the input
and output voltages 𝑣in (𝑡) and 𝑣out (𝑡) over two periods.
Prelab #8:
Calculate the delay time for the circuit in Figure 3.1.1, Figure 3.1.2, and Figure 3.1.3 (located on the
next page), in terms of 𝑅 and 𝐶. Assume 𝑅 = 𝑅1 = 𝑅2 = 𝑅3 and 𝐶 = 𝐶1 = 𝐶2 = 𝐶3 .
Prelab #9:
Derive the new differential equation for 𝑣out (𝑡) in Figure 3.1.1, in terms of 𝑉𝑜 , 𝜔, 𝑅, and 𝐶.
This differential equation is the fundamental equation describing the RC circuit system. The solution for
the steady-state output voltage is
𝑉𝑜
𝑣out (𝑡) = [cos(𝜔𝑡) + 𝑅𝐶𝜔sin(𝜔𝑡)]
1 + 𝑅2 𝐶 2𝜔 2
This solution shows that 𝑣out (𝑡) is a function of the signal’s frequency 𝑓 and time 𝑡. The relationship
between angular frequency 𝜔 and signal frequency 𝑓 is 𝜔 = 2𝜋𝑓.
Prelab #10:
Using the given Matlab scripts, plot 𝑣out (𝑡) from 0 to 5ms. Is the output signal a sinusoidal function?
If so, what is the period 𝑇 and the magnitude |𝑣out (𝑡)|?
Prelab #11:
Using the given Matlab scripts, plot the magnitude of the output voltage, |𝑉out (𝑓)|, versus frequency.
Comment on the output signal’s characteristics at very low frequencies, e.g. 10Hz, and at very high
frequencies, e.g. 1MHz. Read Reference 5.3 for more information.
Notice that the frequency-domain plot’s x-axis is logarithmic, that is, each division is 10 times greater than
the previous. This frequency-domain plot will become very important in subsequent labs, where you will
use it to design filters for your audio mixer.
Now consider another RC system in Figure 3.2.1,
in which the output voltage is over the resistor,
rather than the capacitor.
The output voltage is now the input signal minus
the voltage over the capacitor, and its magnitude is
given by
2𝜋𝑉o 𝑅𝐶𝑓
|𝑉out (𝑓)| =
√1 + 4𝜋 2 𝑅2 𝐶 2 𝑓 2
Figure 3.2.1: An RC circuit with the output over the resistor.
Suppose 𝑉𝑜 = 1V, 𝑅 = 10kΩ, and 𝐶 = 0.01µF.
Prelab #12:
Using the given Matlab scripts, plot the magnitude of the output voltage, |𝑉out (𝑓)|, versus frequency.
Comment on the output signal’s characteristics at very low frequencies, e.g. 1Hz, and at very high
frequencies, e.g. 1MHz. In what way(s) does this output behave differently than the one over the
capacitor? Explain.
Analysis #1:
Does the oscilloscope display the same waveform that you plotted in Prelab #7? Explain any
similarities or differences.
Using the oscilloscope’s Cursor menu, record the period T of the input signal, as well as the maximum and
minimum values of the output signal. Then measure the time value of the 10% point of 𝑉out, the time value
of the 90% point of 𝑉out , and the time value of the 50% point of 𝑉out.
Note: Instructions for using the lab equipment are found in Lab Equipment.pdf, on the Canvas webpage.
Analysis #2:
Calculate the rise time, fall time, and delay time of the RC circuit using the values from the
oscilloscope, then compare them with the theoretical values from your Prelab using percent
error. Explain the likely sources of errors leading to any differences.
Analysis #4:
Plot the 10 measurements in Excel, then make the x-axis (time) logarithmic. The experimental time
constant 𝜏 is the inverse of the slope of this now-linear graph. Compare this 𝜏 with theoretical value
𝜏 = 𝑅𝐶 using percent error. Explain the likely sources of errors leading to any differences.
Analysis #5:
Compare the measured values of the time constant with the theoretical values using percent error.
Are they the same values? Explain the likely sources of errors leading to any differences.
b) A frequency of 1kHz.
Connect Channel 1 to the input voltage and Channel 2 to the voltage over the capacitor as the output.
Display the input and output voltages simultaneously on the oscilloscope in 3 complete cycles. Capture the
output from the scope display with both the waveforms and the measured values. Turn this oscilloscope
waveform in as part of your lab report.
Now measure the RC response to sinusoidal signals with various frequencies. Keep the input amplitude at
1V, but sweep the frequency from the starting input frequency of 10Hz, varying it using a 1-2-5 sequence
Analysis #6:
Using Microsoft Excel, plot the amplitude of the output voltage in terms of frequency. Make sure the
frequency is plotted on a log scale. Compare it to what was plotted in Prelab #11. Explain the likely
sources of errors leading to any differences.
Once done, switch the locations of the resistor and capacitor and change the output to be the voltage over
the resistor. Set the function generator to provide a sinusoidal wave input with 1V amplitude. As before,
sweep the frequency starting from 10Hz using the 1-2-5 sequence up to 1MHz. Record the amplitudes of
the output signals.
Analysis #7:
Using Microsoft Excel, plot the amplitude of the output voltage in terms of frequency. Make sure the
frequency is plotted on a log scale. Compare it to what was plotted in Prelab #12. Explain the likely
sources of errors leading to any differences.
c) Delay time (or propagation delay time): the time interval between the 50%-point of the input signal and
the 50%-point of the output signal when both signals make a transition. There are two delay times depending
on whether the output signal is going from L to H (delay notation 𝑡𝑃𝐿𝐻 ) or from H to L (delay notation
𝑡𝑃𝐻𝐿 ). The subscript P stands for “propagation.”
𝜏1 = 𝑅1 ∑ 𝐶𝑚
𝑚=1
Resistor 𝑅2 charges only capacitors numbered 2 through 𝑁, so the estimated delay from point 𝑥1 to 𝑥2 is
𝑁
𝜏2 = 𝑅2 ∑ 𝐶𝑚
𝑚=2
Working down the row, the total delay for the whole circuit is then estimated as:
𝑁 𝑁
𝜏 = ∑ 𝑅𝑛 ∑ 𝐶𝑚
𝑛=1 𝑚=𝑛