A low pass filter with cutoff frequency fc is a circuit that allows signals below a specific threshold to pass through while attenuating frequencies above that threshold. In a real circuit or installation, it changes harsh, high-frequency noise or jagged PWM square waves into smooth, clean DC voltages or isolated audio signals, protecting downstream components and improving measurement accuracy.

The Math: Calculating an RC Low Pass Filter with Cutoff Frequency

The most common implementation is the passive RC (resistor-capacitor) filter. The resistor is placed in series with the signal path, and the capacitor is placed in parallel to ground. The formula to find the -3dB cutoff frequency (the point where the signal power drops by half, or voltage drops to 70.7%) is:

Core Formula:
fc = 1 / (2 × π × R × C)
Where fc is in Hertz, R is in Ohms, and C is in Farads.

Worked Numeric Example: Smoothing ESP32 PWM

Suppose you are using an ESP32 to output a 1kHz PWM signal to simulate an analog voltage for a motor controller, but the controller requires a smooth DC voltage, not a square wave. You need to set your fc well below the 1kHz PWM frequency to effectively smooth the ripple. A good rule of thumb is setting fc to at least 1/10th of the PWM frequency, but for ultra-smooth DC, 1/50th is better. Let us target an fc of 15.9 Hz.

  • Step 1: Pick a standard resistor value. To avoid drawing too much current from the ESP32 GPIO pin (max 40mA), we choose R = 10,000 Ω (10kΩ).
  • Step 2: Rearrange the formula to solve for C: C = 1 / (2 × π × R × fc).
  • Step 3: Calculate: C = 1 / (2 × 3.14159 × 10,000 × 15.9) = 0.000001 Farads.
  • Result: You need a 1 μF capacitor. Pairing a 10kΩ resistor with a 1 μF capacitor yields exactly 15.9 Hz, crushing the 1kHz PWM ripple by over 30dB while letting the slow-changing DC average pass through.

Where You Meet This in Practice

You will encounter the need for a low pass filter with cutoff frequency calculations across three primary domains in electronics and electrical work:

  1. PWM to DAC Smoothing: Microcontrollers like the Arduino Uno or ESP32 use Pulse Width Modulation to fake analog outputs. Without an RC filter, an LED will visibly flicker at low frequencies, and a motor will whine. The filter averages the square wave into a true DC level.
  2. ADC Anti-Aliasing: When reading analog sensors, high-frequency RF noise from nearby switching power supplies can fold back into your microcontroller's Analog-to-Digital Converter (ADC) as false low-frequency readings. A low pass filter placed right at the ADC pin blocks this noise.
  3. Audio Crossovers and Subwoofers: In audio installations, a low pass filter routes only the bass frequencies (e.g., below 80Hz) to a subwoofer amplifier, preventing the sub from trying to reproduce vocals or cymbals, which causes distortion.
Pro-Tip for Microcontroller ADCs: The ESP32's internal ADC has a notoriously low and non-linear input impedance. If your filter resistor (R) is higher than 10kΩ, the ADC's internal sampling capacitor won't have time to charge during the read window, resulting in artificially low voltage readings. Keep R ≤ 10kΩ when feeding an ESP32 ADC.

Common Confusions: Passive RC vs. Active and Ferrite Beads

When designing a low pass filter with cutoff frequency targets, builders commonly confuse passive RC networks with two other components:

  • Ferrite Beads: A ferrite bead is not a true low pass filter with a sharp, calculable fc. It is a frequency-dependent resistor that dissipates high-frequency energy as heat. While great for suppressing EMI on power lines, it does not provide the precise signal-shaping roll-off of an RC network.
  • Active Filters (Op-Amps): A passive RC filter suffers from loading effects. If you connect a load (like a speaker or another circuit stage) with an impedance close to your resistor value, the actual cutoff frequency shifts dramatically. Active filters use an operational amplifier (like the NE5532 or LM358) to buffer the output, isolating the filter from the load and allowing for steeper roll-off slopes (like Sallen-Key topologies).

For a deeper dive into the theoretical phase shifts and Bode plots associated with these networks, the All About Circuits textbook chapter on low-pass filters provides excellent foundational math.

Decision Path: Picking Your R and C Values

Because the formula fc = 1 / (2πRC) allows for infinite combinations of R and C to achieve the same frequency, you need a decision framework to pick the right pair. Use this decision-tree-table to terminate your design process:

Application Scenario Load Impedance Recommended R Range Recommended C Range Concrete Default Pick
MCU PWM to DAC (High-Z Load) > 100kΩ (Op-amp/MOSFET gate) 10kΩ - 100kΩ 1nF - 100nF R = 10kΩ, C = 100nF (fc ≈ 160Hz)
MCU ADC Anti-Aliasing 10kΩ - 50kΩ (Internal ADC) 1kΩ - 10kΩ 10nF - 100nF R = 4.7kΩ, C = 100nF (fc ≈ 338Hz)
Audio Line-Level Signal 10kΩ - 47kΩ (Mixer/Amp input) 10kΩ - 50kΩ 1nF - 10nF R = 15kΩ, C = 4.7nF (fc ≈ 2.2kHz)
Power Supply Ripple (High Current) < 10Ω (Motor/LED strip) Do not use RC (I²R heat) Use LC (Inductor) instead L = 10μH, C = 47μF
The 90% Rule: If you are just trying to smooth a standard 1kHz to 5kHz PWM signal from an Arduino or ESP32 to drive a high-impedance analog input, stop calculating and default to R = 10kΩ and C = 100nF (0.1μF). This yields a cutoff of ~160Hz, providing excellent smoothing without drawing excessive current from your GPIO pin.

Real-World Component Picks for 2026 Builds

The physical components you buy matter just as much as the math. Using the wrong capacitor dielectric can ruin an audio filter, and using the wrong resistor tolerance can shift your fc unpredictably.

  • Resistors: Always use 1% tolerance metal film or thick film resistors. For surface mount (0603), the Yageo RC0603FR-0710KL (10kΩ 1%) is an industry standard. For through-hole, the Vishay MRS25 series is virtually indestructible on a breadboard.
  • Capacitors (Audio & Precision): Never use X7R or Y5V ceramic capacitors for audio low pass filters. They exhibit the piezoelectric effect (acting as microphones) and suffer from severe DC bias capacitance drop (a 100nF X7R cap might drop to 20nF at 5V). Use C0G/NP0 dielectrics. The KEMET C0805C104J5GACTU (100nF C0G 0805) is a benchmark part for clean signal filtering.
  • Capacitors (General PWM Smoothing): For non-audio DC smoothing where microphonics don't matter, standard X7R ceramics like the Samsung CL10B104KB8NNNC (100nF 0603) are cheap, abundant, and perfectly adequate.

For complex multi-stage designs, Texas Instruments offers a free web-based Filter Designer Tool that automatically calculates active and passive topologies, complete with Bode plot simulations and part number generation.

Frequently Asked Questions

What happens to the signal exactly at the cutoff frequency?

At the exact fc, the signal is not blocked; it is attenuated by -3dB. In terms of voltage, this means the output amplitude is exactly 70.7% of the input amplitude. It is the designated 'half-power' point, not a hard brick wall.

Can I just use a larger capacitor to get a lower cutoff frequency?

Yes, but physical capacitors have parasitic properties. Electrolytic capacitors (often used for high μF values) have high Equivalent Series Resistance (ESR) and inductance, which makes them perform poorly at high frequencies. If you need a very low fc, it is usually better to increase the resistor value (if load impedance permits) or use an active op-amp filter rather than relying on massive, leaky electrolytic capacitors.

Why is my filtered PWM voltage lower than expected?

If your smoothed DC voltage is sagging below the expected duty-cycle average, your load is drawing too much current through the filter resistor. The load and the capacitor form a voltage divider with the filter resistor. Either lower the resistor value, add an op-amp voltage follower (buffer) after the filter, or increase the PWM frequency so you can use a smaller resistor and capacitor pair.