Lab 1: Resistor-Capacitor Circuits

This lab covers the basic characteristics of RC circuits, including both DC and AC analysis, simulation, and experimentation. Students will learn about the equations that govern capacitor charging and discharging, the RC circuit time constant, and be introduced to using RC circuits as low-pass and high-pass filters. Advanced students can build on the lab and challenge themselves to design band-pass and band-stop RC filters.


Introduction

A resistor-capacitor, or RC, circuit is an important circuit in electrical engineering; it is used in a variety of applications such as self-oscillating, timing, and filter circuits, these are just to name a few examples. In this lab, you will investigate how the RC circuit responds when a DC voltage source is applied to it and learn about the charging and discharging properties of the capacitor. You will also investigate the AC response of the RC circuit and learn how to design a low-pass and high-pass filter.

For this lab, you will use Multisim Live to confirm the theory before proceeding to prototype the circuit on the Breadboard Canvas. Multisim Live is a web-based SPICE circuit simulation, schematic capture that works directly from web browsers, no software installation is required. You can use your desktop computer or any mobile device to build and simulate the circuit.

Along with Multisim Live, we will use the Analog Discovery Studio to measure the charging and discharging time of the RC circuit. We will also use it to generate an AC signal and view the AC frequency response. Analog Discovery Studio was designed for students for learning electronics. It is a powerful all-in-one instrument consisting of all the essential instruments found in a lab such as power supply, scope, function generator, and digital logic analyzer.

Learning Objectives

In this section, students will:

  • Simulate an RC circuit with Multisim Live
  • Build an RC circuit on the Breadboard Canvas and explore its DC, AC, and Frequency response with the Scope and Bode Plotter

Part List

The following equipment is required for this experiment:

Hardware


Circuit Theory and Simulation

DC Circuit Analysis

When a DC voltage source is applied to an RC circuit, it causes the capacitor to charge and store energy. When the capacitor is fully charged, the voltage across it is equal to the source voltage. Once the capacitor is charged and then DC source is removed from the circuit, the capacitor begins to discharge and eventually reaches 0V. In this section, you will investigate the charging and discharging properties of a capacitor.


Charging a Capacitor

When the switch is closed, current begins to flow into the capacitor. At any given time, you can calculate the current in the circuit by the given formula:

$I_C=\frac{E}{R}e^{\frac{-t}{RC}} [A]$, where:

  • t - time [s]
  • E - DC voltage source [V]
  • R - resistance [Ω]
  • C - capacitance [F]

The product of R and C is also referred to as the time constant of the circuit and is symbolized by the letter tau with a unit in seconds.

$\tau=RC [s]$

When talking about RC circuits, it can be useful to view the time constant as a measure of time. For example, an experiment might be interested in the current through the circuit when t = 1$\tau$ and when t = 3$\tau$, indicating that they would like to measure the circuit when t = 1(𝑅𝐶) and when t = 3(𝑅𝐶).

Using Ohm’s Law and Kirchhoff’s Current Law (KCL), you can derive the equations to calculate the voltage across the resistor and capacitor from the first equation, these equations are given below:

$V_C=E(1-e^{\frac{-t}{RC}}) [V]$

$V_R=Ee^{\frac{-t}{RC}} [V]$

Questions and Exercises
  • Using the equations provided, calculate the voltage across the resistor when E=5V, R=10kΩ, and C=1μF for t=1, 2, 3, 4, and 5 $\tau$.
  • Calculate the voltage across the capacitor when E=5V, R=10kΩ, and C=1μF for t=1, 2, 3, 4, and 5 $\tau$.
  • Calculate the current through the circuit when E=5V, R=10kΩ, and C=1μF for t=1, 2, 3, 4, and 5 $\tau$.

Simulate the Capacitor Charging with Multisim Live

To build the circuit in Multisim, follow the instructions below:

Visit multisim.com and log in with your account to get started. Locate the Create Circuit button and press it, to create a new workspace. The components toolbar is on the left side of the Multisim screen. Place a ground, resistor, capacitor and a DC voltage source on the workspace.

Click on the individual component to select it, then click the Open Configuration pane icon to access the component properties. From the Item tab, set the component values. For this lab, set the DC Voltage source to 5V, the resistor to 10KΩ and leave capacitor at 1μF. You can also click on the value of the component in the schematic and directly change the component value.

Arrange to components on the workspace, you can rotate a component by selecting the part then click the Rotate button. Connect the components and place a voltage probe between the resistor and the capacitor.

Select the Transient analysis.

In the Configuration Pane select the Document tab and set the End time to 0.1 s and the initial condition to User defined. Setting the End time to 0.1 s allows the full capacitor charge curve to be viewed on the Grapher. If you use the default setting automatically determine initial condition, Multisim will show the steady state response which means the capacitor is fully charged.

Click the Run Simulation button.

Questions and Exercises
  • Compare your calculations with the Grapher response. For each time constant, calculate the ratio of the voltage drop across the capacitor to the source voltage.
  • Replace the Voltage Probe with a Current Probe and run the simulation again. Compare your calculations with the simulated response.

Discharging a Capacitor

Once the capacitor is fully charged, and the switch shown in the first image is toggled, disconnecting the battery from the circuit, the energy stored in the capacitor begins to discharge through the resistor. The equations to calculate capacitor current and voltage are given by:

$V_C=V_0e^{\frac{-t}{RC}} [V]$, where:

  • $V_0$ - is the initial capacitor votlage

$I_C=I_0e^{\frac{-t}{RC}} [A]$, where:

  • $I_0$ - is the initial current through the capacitor
Questions and Exercises
  • Calculate voltage across the capacitor for $\tau$=1, 2, 3, 4 and 5 using the same circuit values as before and $V_O$=5V.
  • Before the switch is toggled to ground, what is the current in the circuit?
  • Calculate the current for $\tau$=1, 2, 3, 4 and 5 using the same circuit values as before and $V_O$=5V.

Simulate the Capacitor Discharging with Multisim Live

If you created a new circuit, ensure the Transient simulation setting setup the same as the charging section.

Remove the battery from the circuit in Multisim Live and connect the resistor to ground. Set the capacitor stored voltage to 5V by checking the IC box in the Configuration Pane and entering 5V.

Ensure the Transient Analysis initial conditions is set to User defined and the End time is 0.1s. The User defined setting allows us to use the custom initial voltage that we set earlier for the capacitor. This lets us measure the discharge curve for the capacitor.

Place a Voltage and Current probe between the resistor and capacitor to plot both current and voltage in the same graph.

Click the Run simulation button. The legend at the top-right corner indicates which curve represents the current and which one the voltage.


AC Circuit Analysis

A filter is a circuit that blocks signals at certain frequencies while allowing other frequencies to pass. There are many complex techniques to design a filter, but in this section, you will learn how to design a high-pass and low-pass filter using an RC circuit.

When AC signal enters a capacitor, the capacitor impedance has a direct relationship with the signal frequency. The capacitor impedance is defined as:

$X_C=\frac{1}{2{\pi}fC} [Ω]$, where:

  • f - frequency [Hz]
  • C - capacitance [F]

Examine the above equation, when the frequency is low the denominator is small, and when you divide by a small number the result is large. As frequency increases, the denominator becomes larger and dividing a number by a large denominator the result becomes smaller. In an RC circuit, you can visualize a large $X_C$ as an open circuit and a small $X_C$ as a short.


Low Pass Filter

A low-pass filter is a circuit that passes low-frequency signals while blocking high-frequency signals. The circuit output is between the resistor and the capacitor. When signal frequency is low, $X_C$ is large and $V_{out}$ is the same as the source. As frequency increases, $X_C$ gets smaller and eventually it can be viewed as a short and $V_{out}$ is then tied to ground.


Simulating the RC circuit frequency response in Multisim Live

If you are reusing the circuit built from the previous exercise, remove the capacitor initial condition.

Set the AC voltage source frequency to 1 MHz. Place a Voltage probe at the output node.

For this exercise, use the Interactive simulation instead of the Transient, this allows you to change the signal frequency as the simulation is running. Run the simulation. Click the Split so that you can view both the circuit and the Grapher at the same time.

Click 1 MHz on the schematic and a slider will appear. The allows you to change the frequency while the simulation is running. You can use the slider or enter the exact value by clicking the current value and type the value you want. For this exercise, start at 1 Hz and as the simulation is running, change the frequency to 10, 100, 1K, 10K, 100K and 1 MHz. Click on the x10 or x0.1 buttons above and below the slider to increase or decrease the current frequency by one order of magnitude.

Each time you change the frequency, the grapher scale may need to be adjusted. Click anywhere in the Grapher and then adjust the Time/Div and click the Auto Fit option. You can also use click on the desktop, highlight your mouse over the horizontal axis and scroll to zoom in or out. If you are using a mobile device, pinch to zoom in or out.

Questions and Exercises
  • How does the amplitude of Vout change as you increase the frequency?

AC Sweep

Analyzing a filter circuit’s effect on frequency can be difficult in the time-domain; a better way is to use the AC sweep. An AC sweep is a test where we sweep through a range of AC input frequencies, and the magnitude of $V_{out}$ is plotted against the input frequency. For this exercise, you can view the y-axis as the output voltage, but this is not entirely accurate. When analyzing filter circuits, you use polar, or complex numbers and the magnitude from the AC sweep represents the magnitude in polar coordinates, but this is beyond the scope of this lab.

Change the simulation from Interactive to AC sweep and run the simulation.

Questions and Exercises
  • Describe the magnitude curve in terms of $V_{out}$.

High Pass Filter

A high-pass filter is a circuit that passes high-frequency signals while blocking low-frequency signals. To obtain this circuit, swap the resistor with the capacitor in the low-pass filter. When signal frequency is low, $X_C$ is large and $V_{out}$ is connected to the ground. As frequency increases, $X_C$ gets smaller and eventually it can be viewed as a short between $V_{out}$ and the voltage source.


Building and Measuring Your Circuit

The next step is to validate what you have done so far with a real-world circuit. In this section, you will connect the RC circuit to the Analog Discovery Studio's DC source and look at the capacitor charging and discharging. You will then use the Wavegen to generate an AC signal and view the RC circuit response with the scope and Bode plotter.

If you are unsure how to connect the Analog Discovery Studio to the circuit or how to use an instrument, check: Analog Discovery Studio.

DC Circuit Analysis

Connect one pin of the resistor to V+, the other to the positive pin of the capacitor. connect the negative pin of the capacitor to GND. Connect the first Scope Channel 1+ (orange wire) to the junction between the resistor and capacitor, then the Scope Channel 1- (orange-white wire) to the ground.

Don't forget to turn the Scope Channel 1 switch towards the MTE header and the V+ switch towards the POWER inscription.

You can download the wiring diagram here: wiring_diagram_dc.zip.

Launch WaveForms. Open and dock the Supplies and Scope instruments.

In the Scope instrument select channel 1, set its range to 2V/div and the time base to 200ms/div. Start the instrument.

In the Supplies instrument, set the positive supply voltage to 5V.

Toggle the positive supply on then off, try to get the capacitor to charge to 5V and discharge on the same screen, click Stop on the scope to stop the data acquisition.

Use the mouse wheel to zoom into the charging section of the curve. Hold the left mouse button down if you want to scroll left or right. You can set the offset and the range of the channel, to make the signal more visible.

Add X cursors to the scope display. Adjust the cursors that they are one time constant apart and measure the voltage at each cursor.

Questions and Exercises
  • How does the voltage measured at each cursor compare to the simulated and calculated voltage in the same time moment? Why would they be different?
  • How long does it take for the capacitor to fully charge?
  • How long does it take for the capacitor to discharge?

AC Circuit Analysis

Connect one pin of the resistor to the W1 pin of the signal generator, the other to the positive pin of the capacitor. Connect the negative pin of the capacitor to the grounded pin of the signal generator. Connect the first Scope Channel 1+ (orange wire) to the junction between the resistor and capacitor, then the Scope Channel 1- (orange-white wire) to the negative pin of the capacitor.

Don't forget to turn the Scope Channel 1 switch towards the MTE header.

You can download the wiring diagram here: wiring_diagram_ac.zip.

Launch WaveForms. Open and dock the Wavegen and Scope instruments.

In the Scope instrument select channel 1, set its range to 1V/div and the time base to 500ms/div.

In the Wavegen instrument, on channel 1, set a sinusoidal signal, with 1V amplitude and a frequency of 1Hz.

Run the Scope and the Wavegen and note your observations about how the input signal compares to the output signal. In the Wavegen, adjust the frequency of the sine wave to 10Hz, 100Hz, 1kHz, and 10kHz. Allow enough time for the scope to acquire the response before changing the frequency.

Questions and Exercises
  • Describe the voltage peak in the scope as you increase the Wavegen frequency.

Frequency Response of the Circuit

The frequency response of a circuit shows how a circuit behaves as the frequency of the input signal changes; it is similar to the AC sweep we did earlier in Multisim. To analyze the RC circuit frequency response, use the network analyzer. Connect the wavegen and the Scope Channel 1 to the circuit input, connect the Scope Channel 2 to the circuit output. Leave the resistor and circuit connections the same and modify the connections to the Analog Discovery Studio using the instructions below.

Connect one pin of the resistor to the W1 pin of the signal generator, the other to the positive pin of the capacitor. Connect the negative pin of the capacitor to the grounded pin of the signal generator. Connect the second Scope Channel 2+ (blue wire) to the junction between the resistor and capacitor, then the Scope Channel 2- (blue-white wire) to the negative pin of the capacitor. Connect the first Scope Channel 1+ (orange wire) to the signal generator's W1 pin (yellow wire) and the Scope Channel 1- (orange-white wire) to the negative pin of the capacitor (this pin is grounded).

Don't forget to turn the Scope Channel 1 and 2 switches towards the MTE headers.

You can download the wiring diagram here: wiring_diagram_fr.zip.

Launch WaveForms and open the Network Analyzer instrument. Set the start frequency to 1Hz, the stop frequency to 100kHz, the sample number to 51 and uncheck channel 1, to display only channel 2. Run the instrument.

You will not see the result right away as it takes some time to generate and acquire data over the set frequency range.

Questions and Exercises
  • Turn on the cursor and measure when the signal begins to roll off. Compare the result with the simulation.

Further Exploration

The RC circuit you just explored is a fundamental circuit used in virtually every electronics product. In this lab, you learned how a capacitor is charged and discharged, and you learned that an RC circuit acts as a filter and can block or pass an AC signal based on the time constant of the RC circuit and the frequency of the AC signal. We also saw how an RC circuit can switch between being a low-pass or high-pass filter simply by switching the placement of the resistor and capacitor.

Band-Pass and Band-Stop Filters

Aside from the low-pass and high-pass filters, there are two other more advanced filters: the band-pass and band-stop filter. A band-pass filter the blocks low and high frequencies while allowing mid-range (or band) frequencies to pass. To build a band-pass filter you can combine a high-pass filter and a low-pass filter in series. The opposite of that is the band-stop filter which blocks mid-range frequencies but allows low or high frequencies to pass. Investigate how you can use only resistors and capacitors to design a band-pass and band-stop filter. Use Multisim Live to build your circuit so you can quickly change and test different component values.


Next Steps

For more complementary laboratories, return to the Complementary Labs for Electrical Engineering page of this wiki.

For technical support, please visit the Test and Measurement section of the Digilent Forums.