You are on page 1of 12

RC Circuits and Applications

Lab Ticket and Write-up Comments

Read this lab write-up and write an outline of the procedure you will follow
during your two-week investigation. Also, derive equation [22].
Your lab write-up should summarize all of the investigations you undertook in the
lab. Include all important plots and findings; motivate your arguments and discuss the
method you used to come to your results. Be sure to discuss possible sources of error.
Feel free to explore questions not specifically asked in the lab.
In the guided section of this lab, you should measure the time constant for an RC
circuit, build high- and low-pass filters and measure their gain curves.

Introduction
RC circuits are among the most useful, simple and robust passive electric circuits,
and play integral roles in everyday equipment such as traffic lights, pacemakers and
audio equipment. While their applications are numerous and varied, they are mostly used
for their signal filtering capabilities and surprisingly precise timing abilities.
In this lab you will explore these fundamental uses of RC circuits, filtering and
timing. You will also interface RC circuits with a simple but powerful IC1 called the 555
timer circuit and control its functioning through the RC circuit. The coupling of the 555
timer to an RC circuit gives the user many interesting applications, some of which you
will be able to explore on an open-ended basis.

Theory and Application


RC Charging, Discharging and Timing

When the switch S is closed in the battery powered circuit of Figure 1a, current
begins to flow. Electrons pile up on the side of the capacitor connected to the negative
side of the battery and are drawn off of the side of the capacitor connected to the positive
side of the battery. The value of the resistor (it can be attached to the negative or positive
side of the battery), as will be shown, regulates the rate at which current flows. As more
charge is effectively taken off one side of the capacitor and placed on the other the
potential difference between the sides of the capacitor grows, hindering the flow of
electrons. This in turn slows down the rate of increasing potential difference between the
sides of the capacitor.

1
“Integrated Circuit”. An IC a set of electronic components and their interconnections that are etched
or imprinted on a semiconductor chip.

1
Figure 1: a) The battery powered RC circuit with switch. b) The capacitor charging curve when the switch
S is closed. c) The capacitor charging curve when the capacitor is fully charged (with the battery taken out
of the circuit) and switch S closed.

Mathematically, using Kirchhoff's loop rule, the circuit is governed by the equation

Q
ε = IR + [1]
C

where ε is the emf of the battery, I is the current, Q is the charge on the capacitor and C
the capacitance of the capacitor. Both Q and I are functions of time and are related by I =
dQ/dt. Knowing this relation between I and Q, we may rewrite equation [1]:

dQ 1
ε=R + Q, [2]
dt C

which has the solution (you should check it)

Q = Cε(1− e−t / RC ) . [3]

Since voltage V is related to charge on a capacitor by the equation V = Q/C, the voltage
across the capacitor is given by

V = ε(1− e−t / RC ) . (charging) [4]

This mode of operation of an RC circuit is called “charging”, simply because the


charge on and potential across the capacitor increases asymptotically from zero to a
maximum value of the € battery's emf, ε (Figure 1b). Another mode of operation, sans
battery power, of an RC circuit is called “discharging,” in which the capacitor with some
initial potential of ε (not necessarily related to a battery emf) asymptotically decreases to
a value of zero (Figure 1c). Mathematically, this is given by

dQ 1
0= R + Q, [5]
dt C

2
which has solution

Q = Cεe−t / RC [6]

implying that the voltage across the capacitor is


€ V = εe−t / RC . (discharging) [7]

The quantity RC, which must have dimensions of time, appears conspicuously in
both the charging and discharging solutions. It is called the “time constant” of the circuit
and is represented by€the symbol τ:

τ ≡ RC . [8]

In a circuit that is charging (equation [4]) the potential across the capacitor at time t = τ,
starting with no charge at time t = 0, is

V[τ ] = ε(1− e−τ / τ ) = ε(1− e−1 ) ≈ .63ε . [9]

In other words, during the first time constant τ the voltage has increased from zero to
approximately 63% of its ultimate value (the value after an infinite amount of time), ε. In
€ will reach a value of
a time of 2τ the voltage

V[2τ ] = ε(1− e−2τ / τ ) = ε(1− e−2 ) ≈ .86ε . [10]

For a discharging circuit initially fully charged, the potential after time t = τ is
€ V = εe−τ / τ = εe−1 ≈ .37ε , [11]

meaning the voltage has dropped to about 1 - .63 = .37 or 37% of its ultimate value. First
we saw that a charging capacitor takes time τ to reach 63% of it’s final value ( ε ). Now

we see that a discharging capacitor also takes time τ to reach 63% of it’s final value
(0V). So a circuit's time constant is a measure of how quickly it charges or discharges.
€ €
RC Low Pass Filter

One common use of RC circuits is for analog AC filtering (Figure 2a). Imagine
that a sinusoidal signal generator instead of a battery is powering the RC circuit. What
would the voltage across the capacitor as a function of time look like? The equation
governing the circuit, derived from Kirchhoff's loop rule, is

Q
V0 sin[2π f t] = IR + , [12]
C


3
Figure 2: a) The RC low-pass circuit. The voltage is measured across the capacitor. b) The gain curve for
the low-pass filter as a function of frequency where ω is angular frequency equal to 2! f.

where V0 sin[2π f t] is the signal from the signal generator with signal amplitude V0 and
frequency f.
If the time derivative is taken and the equation is written in terms of I the equation
becomes

dI I
2π fV0 cos[2π f t] = R+ . [13]
dt C

The solution to this equation is


€ I[t] = Acos[2π f t − α ] , [14]

where A and α are constant with regards to in time. To be exact,


€ 1
A = V0 and tan[α ] = 2πfRC = 2πfτ . [15]
R + 1/(2π f C)2
2

This means that the voltage across the capacitor is


V[t] = Q[t]/C =
∫ I[t]dt = Asin[2π f t − α ] . [16]
C 2π f C

We are interested in the gain of the system, the ratio of the output to the input
voltage (Figure 2b). The gain is a measure of how attenuated or amplified the output
signal is, relative to €
the input signal. Roughly speaking, it is a measure of how much of
the input signal has gotten through the circuit. The gain is computed as the output
amplitude divided by the input amplitude:

A /2πfC 1
g= = . [17]
V0 1+ (RC2πf ) 2

€ 4
Notice that the gain is dependent on the frequency of the input signal; for low frequency
signals (2πf <<RC), the gain is close to 1 and for high frequency signals (2πf >>RC) the
gain is close to zero. This means that low frequency signals are passed with almost no
attenuation, while high frequency signals are almost completely blocked, hence the name
“low-pass filter.” Filters are often characterized by their “-3 dB point,” the frequency at
which the gain of the circuit is 1/ 2 . For an RC circuit (both low- and high-pass) this
frequency happens to be 1 /( 2π RC ) :

1
€ f−3dB = . [18]
2π RC

RC High Pass Filter

If we switch €
the resistor and capacitor in the low-pass circuit (so that we’re now
measuring the voltage across the resistor), what will the output voltage look like (Figure
3a)? Luckily, by finding the current through an RC circuit, given by equation [14], all
that has to be done to find the voltage drop is to use Ohms law and multiply the current
by the value of the resistor:

V[t] = RAcos[2π f t − α ] , [19]

where A is given by equation [15] and α is given by


1 1
€ tan α = = . [20]
2πfRC 2πfτ
This means that the gain of the circuit is

1
€ g= . [21]
1/(RC2π f ) 2 + 1

For low frequency signals ( 2πf << RC ) the quantity 1/(RC2!f) is large, and the gain is
close to zero (Figure 3b) while at high frequencies ( 2πf >> RC ) the quantity 1/(RC2!f) is

small, and the gain is close to one so most of the input signal gets through. This circuit
allows signals with high frequencies to make it through while attenuating low frequency
signals, hence the name “high-pass filter.”

5
Figure 3: a) The RC high-pass circuit. The voltage is measured across the resistor. b) The gain curve for the
high-pass filter as a function of frequency where ω is angular frequency equal to 2! f.

Figure 4: a) The 555 timer chip with pin numbers and names. b) The pin configuration of the 555. Note that
pins 3 and 5 are not connected while pin 1 is connected to ground.

The 555 timer and RC Circuits

The 555 timer is a cheap, important and relatively simple IC that produces very
accurate sequences of digital signals2, called “pulse trains" (for example, a series of
square waves is a periodic pulse train). Among their many uses, 555 timers can be used to
control everything from simple robotic motors called servos to complex electrical
circuits.

2
Digital signals, unlike analog signals, can have only one of two voltage values, in this case zero and five volts. In
general, the lower voltage signal is called “low" or “off” and the high voltage signal is called “high” or “on.” While not
all digital signals operate on the same voltages, they all operate on this same basic principle.

6
Figure 5: The output signal (above) of a 555 timer when the input signal (below) comes from an RC circuit
in which the capacitor continually charges through the resistors and discharges through RB to pin 7,
jumping back and forth from 2/3 Vcc to 1/3 Vcc. When the capacitor is charging, the output of the 555 is a
digital high signal, when it is discharging, the output is a digital low signal.

The 555 is relatively simple... for an IC. To describe why the 555 works the way
it does is beyond the scope of this lab and only how the 555 functions, the basic ideas and
rules behind it, will be explained. As shown in Figure 4a, the 555 has 8 “pins” which link
the internal circuitry to the outside. Figure 4b shows the manner in which the 555 should
be setup. This configuration of the 555 is called the “astable” mode of the 555. In this
mode the chip will generate a periodic pulse train. The 555 is controlled through and
functions in the following manner, depicted in Figure 5.

1. Initially, when the power is first turned on (Vcc is applied to the circuit) the output pin
is low (zero volts).

2. The capacitor charges through the combined resistance of RA and RB (i.e. charges like
an RC circuit with resistance equal to RA + RB).

3. When the capacitor charges to a value of 1/3 Vcc, pin 2 is triggered, causing the output
of the 555 goes high (five volts).

4. The capacitor continues to charge until the voltage across it reaches 2/3 Vcc, at which
point pin 6 will cause the output go low (zero volts) and the discharge pin 7 to open (it
now provides a connection to ground), allowing the capacitor to discharge through RB.

7
Figure 6: This chip contains six NOT gates, shown by triangle/circles symbols. The lead going into the
triangle is the input to the gate and the lead coming from the circle is the output. Vcc for the chip should be
5 volts.

5. The capacitor continues to discharge until the voltage across the capacitor reaches
1/3 Vcc, at which point pin 2 causes the output to go high again the discharge pin 7 to
close. Now the capacitor begins to charge again through the combined resistance of RA
and RB.

6. This charging and discharging continues indefinitely (as long as power is supplied) and
the output continues to flip-op between zero and five volts.

The 555 turns an analog timing signal into a digital, pulsed timing signal. The
time the output is high, TH (also called the “pulse width”), is controlled by the values of
RA, RB and C. The pulse width is given by the time it takes the capacitor to charge from
1/3 to 2/3 Vcc. The time the output is low TL is controlled by the value of RB and C, and is
equivalent to the time it take the capacitor to discharge from 2/3 to 1/3 Vcc through RB. TH
and TL are given by

TH = C ln[2](RA + RB )
[22]
TL = Cln[2]RB ,

which you derived in the lab ticket.


Notice that TH must always be greater than TL, since RB ≠ 0 . In other words the
duty cycle, the percent time the circuit is high, can never be less than 50 percent. This is
unfortunate, there are many times when it is desirable to have short pulse widths and low
duty cycles, such as when controlling a servo! To get around this simply add a basic
digital circuit called a NOT gate (Figure 6) which “inverts” the input; if the input is low,
the output will be high and visa versa.

8
Experiment and Analysis
Measuring the Time Constant

You can easily measure τ of an RC circuit by fitting its charge/discharge curve to


an exponential and literally reading off the value of τ. Set-up the circuit and proceed as
directed below.

• First, pick values for the capacitor and resistor which give a value of τ on the order of
one second with the value of resistor somewhere between 10 kΩ and 100 kΩ. Use the
“Impedance meter” to measure the values for capacitance and resistance. Be sure to
note the uncertainty in these values.
• Connect the resistor and capacitor in series on an op amp board and use pieces of wire
and banana cables to connect either end of the circuit to the PASCO Power Amplifier
and its ground. Change the settings on the Power Amplifier so that it outputs a 5 volt
DC signal. Remember to turn on the Power Amplifier before launching
DataStudio.
• Place the voltage sensor across the capacitor and change the sensor's sampling rate
such that you take 100 samples in each period τ.
• Start collecting data and then start Power Amplifier. To do this, turn “Auto” off on the
Signal Generator control window, start taking data, then press the ON button on the
Signal Generator window. Stop collecting data after a few seconds, but leave the
Signal Generator turned on. This graph should look like a charging curve, as pictured
in Figure 1b.
• After 15-20 seconds (so the capacitor has plenty of time to charge) collect another run
and turn the Signal Generator off. This graph should look like a discharging curve as
pictured in figure 1c.
• Finally, measure τ directly by finding the time it took for the circuit to charge to 63%
of its final voltage.

Low and High Pass Filters

To study the low and high pass filters choose values for R and C which give
values for the -3 dB point between 100 and 500 Hz. Use the signal generator of the
PASCO interface to generate the input sine waves. Measure the gain curves for both the
low and high pass filters using DataStudio’s Scope feature (ask your TA if you are
unfamiliar with this feature). Try to get at least 10 data points around both sides of the -3
dB point. Are the curves as you would expect them to be? If you like you can fit your
data with a “user defined” fit, as mentioned in the previous section. The functional forms
for the gain of the low and high pass filters are given by equations [17] and [21]
respectively. To fit the data in DataStudio, you will have to enter it into a data table by
selecting Experiment>>New Empty Data Table.

The 555 Timer

9
To set-up and study the 555, follow the directions below.

• Hook up the 555 to the op amp board as shown in Figure 4b, with Vcc being the five
volt power supply on the board.

• Use values for the resistors of between 5kΩ and 10kΩ, and for the capacitor a value
between .1 and 1 µF. Use values which give the circuit a duty cycle between 50 and 80
percent.

• Use two voltage sensors: place one across the capacitor and hook the other one up to
the output of the 555 timer, pin 3 (Figure 4a). Change the sampling rate of both sensors to
somewhere between 4000 and 5000 Hz.

• Open the scope and turn on the power supply. If you are interested, hook up a variable
resistor to the circuit and change the width of the pulse train.

How close are TH and TL, for both the RC circuit charging/discharging and the
digital output, to being what equation [22] predicts them to be, and is the duty cycle what
it is expected to be? Are these values within uncertainty? Does the potential on the
capacitor jump from 1/3 Vcc to 2/3 Vcc continually?
Now, choose values for the resistors which make the duty rate around 90 percent.
Set-up and use one of the NOT gates from the 7404 IC chip (the long rectangular chip
has 6 NOT gates as shown in Figure 6, we’ll only use one) on the op amp board and
attach the output of the 555 to the input pin of the NOT gate. Hook the voltage sensor
formerly attached to the output of the 555 to the output of the NOT gate and monitor the
output. Is the NOT gate acting like an inverter, changing the duty rate to around 10
percent?

Some Possible Extensions

The number of uses for the 555 and RC related circuits are wide and varied.
Below are some ideas for an open-ended study of such circuits.

• The input and output of an RC filter have different voltage phases, as given by
equation [20]. Explore this difference.

• If an inductor is included in an RC circuit, making it an RLC circuit, the circuit will


allow only mid-range frequencies to pass. Explore the RLC circuit. See pages 776-779 in
your text to learn about RLC circuits and their filtering properties.

• Explore RC circuits as circuits that integrate/differentiate their input signals. See the
appendix for details.

• Use the 555 in “astable” mode (meaning it generates a periodic pulse train) to control a
motor called a servo. See the appendix for details.

10
• Using an RC circuit and/or a 555 to create a simple function generator which generates
square and sine waves (Hints: Choose circuit elements such that the –3dB point is well
below the fundamental frequency of the square wave, so that any higher frequencies will
be severely attenuated. See pages 401 and 402 in your text to learn about frequency
components. Generating a triangle wave is tricky, do it if you can, using an RC circuit as
an integrator and integrate a square wave).

• A 555 can also be operated in “monostable” mode, meaning the 555 outputs only one
pulse, with the pulse width controlled by an RC circuit. This would be desirable to do if
you wanted to trigger a piece of equipment once (like a camera). See the website

http://www.play-hookey.com/digital/timer_555.html

or the 555 technical sheet on mononstable operation (despite the name, it's not to dense)
called “mononstable.pdf” located on the lab computers hard drive at “Lab
Extras >> RC circuit” or talk to an instructor.

• Using multiple 555s you can generate a pulse train consisting of a number of pulses
having different pulse widths and starting times. Warning: this application of the
555 can be involved, but also quite useful and interesting! See the website

http://www.play-hookey.com/digital/timer_555_sequencer.html
for instructions or an instructor for help.

• Explore the myriad of other projects/applications associated with the 555. The web can
be a good resource for finding this kind of information.

Appendix A
RC Integrator/Differentiator

A high pass filter will function as a differentiator, when operated at a frequency well
below the -3 dB point. In this regime

Vout ≅ (iω RC)Vin [A.1]

and hence, if the input is mostly sinusoidal,

dVin
Vout ≅ (RC) (for ω <<1/RC). [A.2]
dt

Apart from the constant factor RC, the output is the time derivative of the input.

11
A low pass filter at frequencies well above the -3 dB point functions as an integrator, for
in this regime

1
Vout ≅ ( )V . [A.3]
iω RC in

and hence, if the input is mostly sinusoidal,

1
Vout = ( ) V dt (for ω >> 1/RC). [A.4]
RC ∫ in

Apart from the constant factor (1/RC), the output is the integral of the input.

Servo Control

This particular servo, called an HS-303 and used in many robotic applications, is
controlled by a signal of a periodic pulse train with a pulse width from one to two
milliseconds with a time between pulses of 20 to 30 milliseconds. The time between
pulses controls the position (not the angular velocity) of the servo. For example, it might
be the case that with a time between pulses of 20 milliseconds the servo is at an angular
position of zero degrees, while with a time between pulses of 30 milliseconds the servo is
at an angular position of 180 degrees.
Of the three wires coming out of the servo the black wire should be grounded, the
red wire should be hooked up to a voltage source (either the five, 12 or 15 volt supply on
the op amp board should suffice) and the yellow wire is where the controlling signal is
attached. Use a 555 with a NOT gate (to have the signal low most of the time) as the
controlling signal. Let RA = 10 kΩ and have RB be a 10 kΩ variable resistor, which will
allow you to easily control the servo. Use a 1 µF capacitor.

12

You might also like