An R C filter is a simple two-component circuit using a resistor and a capacitor to selectively pass or block specific AC signal frequencies while passing DC. In a real circuit or installation, it changes the frequency response of a signal path—attenuating high-frequency switching noise in a low-pass configuration, or blocking unwanted DC bias voltages while allowing AC audio signals through in a high-pass setup. Think of the resistor as a narrow pipe limiting water flow, and the capacitor as a flexible rubber bladder that absorbs rapid pressure spikes but ignores slow, steady flow. While conceptually basic, getting the component values wrong leads to signal distortion, excessive phase shift, or inadequate noise rejection.
Standard R C Filter Component Values for Common Frequencies
Before grabbing random components from your bin, it helps to look at standardized value pairings. Because capacitors are available in fewer standard values than resistors, the standard engineering practice is to pick a common capacitor value (like 100 nF or 1 µF) and then calculate the required resistor value, rounding to the nearest E12 or E24 standard resistor.
Below is a data-dense reference table for Low-Pass R C filters using a standard 100 nF (0.1 µF) X7R ceramic capacitor. This is the most common configuration for microcontroller PWM smoothing and general-purpose noise filtering.
| Target Cutoff ($f_c$) | Common Application | Calculated R | Standard E12/E24 R Used | Actual $f_c$ Achieved | Output Impedance |
|---|---|---|---|---|---|
| 20 Hz | Audio Subsonic High-Pass (if configured as HPF) | 79.5 kΩ | 82 kΩ | 19.4 Hz | 82 kΩ |
| 300 Hz | Subwoofer Crossover / Tone Control | 5.3 kΩ | 5.1 kΩ | 312 Hz | 5.1 kΩ |
| 1 kHz | DAC Output Smoothing / Audio LPF | 1.59 kΩ | 1.5 kΩ | 1.06 kHz | 1.5 kΩ |
| 5 kHz | Microcontroller PWM Smoothing (Low Freq) | 318 Ω | 330 Ω | 4.82 kHz | 330 Ω |
| 20 kHz | Ultrasonic Sensor Anti-Aliasing | 79.5 Ω | 82 Ω | 19.4 kHz | 82 Ω |
The Math: Worked Numeric Example for ESP32 PWM Smoothing
Let’s walk through a real-world bench scenario. You are using an ESP32 to generate a pseudo-analog voltage using Pulse Width Modulation (PWM) to drive a 0-10V industrial controller (via an op-amp buffer). The default PWM frequency on many ESP32 pins is 5 kHz. You need to smooth this 5 kHz square wave into a clean DC voltage.
The formula for the -3dB cutoff frequency ($f_c$) of a first-order R C filter is:
$f_c = \frac{1}{2 \pi R C}$
Step 1: Choose the target cutoff frequency.
A good rule of thumb for PWM smoothing is to set the cutoff frequency at least one decade (10x) below the PWM frequency to adequately kill the ripple. Therefore, our target $f_c$ is 500 Hz.
Step 2: Pick a standard capacitor value.
We want a capacitor large enough to smooth the ripple, but small enough to avoid slow voltage slew rates (which makes the analog output sluggish when the PWM duty cycle changes). Let’s choose 1 µF (1 × 10⁻⁶ F).
Step 3: Calculate the resistor.
Rearranging the formula to solve for R:
$R = \frac{1}{2 \pi \times f_c \times C}$
$R = \frac{1}{2 \pi \times 500 \times (1 \times 10^{-6})}$
$R = \frac{1}{0.00314159} \approx 318.3 \, \Omega$
Step 4: Select the nearest standard component and verify.
The nearest E12 standard resistor is 330 Ω. Let’s recalculate the actual cutoff frequency with this real-world part:
$f_c = \frac{1}{2 \pi \times 330 \times (1 \times 10^{-6})} = \mathbf{482.2 \, Hz}$
This is perfectly acceptable. The 5 kHz PWM ripple will be attenuated by roughly -20dB (a factor of 10) per decade past 482 Hz, leaving you with a very clean DC baseline.
Where You Meet This in Practice (And What It Replaces)
You will encounter the R C filter in almost every mixed-signal and audio circuit. Here is where it earns its keep on the bench:
- Audio AC Coupling (High-Pass): Placing a capacitor in series with an audio signal and a resistor to ground blocks the DC offset from a microcontroller's DAC while letting the AC audio waveform pass to an amplifier.
- Sensor Anti-Aliasing (Low-Pass): Placed right before an ADC input to strip out high-frequency RF interference picked up by long sensor wires, preventing it from folding back into your digital readings.
- Snubber Networks: Placed across relay contacts or switching transistors to dampen high-frequency inductive voltage spikes (ringing) that cause EMI or false triggering.
Common Confusions: What an R C Filter is NOT
Beginners frequently confuse a deliberate R C filter with other common capacitor placements on a schematic:
- Decoupling / Bypass Capacitors: A 100 nF capacitor placed directly from a microcontroller's VCC pin to GND is technically a low-pass filter, but the "R" is just the parasitic resistance and inductance of the PCB trace. We do not refer to this as an "R C filter" in design parlance; it is a decoupling network.
- LC Filters: Inductor-Capacitor filters use a coil instead of a resistor. LC filters are 2nd-order (steeper -40dB/decade roll-off) and can handle high power without heat dissipation. However, they suffer from resonance ringing and are physically larger. An R C filter is 1st-order (-20dB/decade), inherently stable, and will never ring.
- Active Filters: Active filters use op-amps to provide gain and sharper roll-offs without signal attenuation. An R C filter is strictly passive; it always introduces some level of signal loss (insertion loss) and cannot drive low-impedance loads without a buffer.
For a deeper dive into the differences between passive and active topologies, the Analog Devices Rarely Asked Questions archive provides excellent comparisons on when to abandon passive components for active silicon.
Practical Build Notes: Dielectrics, Tolerances, and Loading
If you are building an R C filter for a precision application (like a medical sensor frontend or high-fidelity audio), the math is only half the battle. The physical characteristics of the components dictate real-world performance.
The Capacitor Dielectric Trap
Most hobbyists grab whatever ceramic capacitor is in their bin, usually an X7R or Y5V dielectric. These are fine for power supply decoupling, but they are terrible for precision signal filtering. X7R capacitors exhibit a severe voltage coefficient—a 10 µF X7R capacitor might actually measure as 2 µF when 10V DC is applied across it. Furthermore, they exhibit microphonics (generating voltage when vibrated) and piezoelectric effects.
Resistor Thermal Noise
Resistors generate their own noise (Johnson-Nyquist noise). The larger the resistance value, the higher the thermal noise voltage. If you design an R C filter with a 1 MΩ resistor and a 10 pF capacitor to achieve a specific high-frequency cutoff, that 1 MΩ resistor will inject a noticeable noise floor into your signal chain. Whenever possible, keep R values below 10 kΩ in sensitive analog paths, scaling the capacitor up to compensate.
The Loading Effect (The #1 Bench Mistake)
As mentioned in the table, a passive low-pass R C filter has an output impedance equal to R. If you calculate a filter using a 10 kΩ resistor, and then connect the output to a multimeter (typically 10 MΩ input impedance), it works perfectly. But if you connect that same output to a 50 Ω coaxial cable or a low-impedance headphone driver, the 50 Ω load effectively parallels with your capacitor, completely destroying the filter's cutoff frequency and attenuating the signal to near zero. Always follow a passive R C filter with a unity-gain op-amp buffer (like an OPA2134 or LM358) if the downstream load impedance is less than 10x the value of R.
Frequently Asked Questions
Can I put two R C filters in series to get a steeper roll-off?
Yes, but you cannot simply cascade two identical passive R C stages and expect a perfect 2nd-order (-40dB/decade) Butterworth response. The second stage will load the first stage, shifting the cutoff frequency and creating a drooping, poorly damped response. To cascade passive stages effectively, the second stage's resistor must be at least 10x larger than the first stage's resistor, or you must place an op-amp buffer between them.
Why does my R C filter output look like a triangle wave instead of smooth DC?
This happens when the cutoff frequency is too close to the PWM frequency, or when the capacitor value is too small to hold the charge between PWM pulses. Increase the capacitor value (e.g., move from 100 nF to 10 µF) and recalculate the resistor to lower the cutoff frequency further below your PWM switching rate.
Does the physical orientation of the capacitor matter?
For ceramic and film capacitors, no—they are non-polarized and can be installed in either direction. However, if your calculated capacitance value is large enough (e.g., >1 µF) that you are forced to use an electrolytic or tantalum capacitor, you must observe polarity. The positive leg must face the higher DC voltage potential, otherwise the capacitor will fail catastrophically.
Mastering the R C filter is a rite of passage for any hardware designer. By respecting component tolerances, understanding dielectric behaviors, and accounting for downstream loading, you can reliably condition signals without resorting to expensive active silicon. For further reading on microcontroller PWM characteristics and default frequencies, consult the Espressif ESP32 Technical Reference Manual, and for foundational passive network theory, review the passive filter tutorials on Electronics Tutorials.






