Mechanical Switch Debounce RC Low-Pass Filter & Time Constant Calculator

Size an RC hardware debounce filter (10 kΩ + 1 µF, τ = 10 ms) for tactile switches and rotary encoders feeding Schmitt-trigger MCU inputs.

Jump to results

Inputs

Filter topology & components
Frequency evaluation

Results

Estimates
−3 dB Cutoff frequency (fc)15.92 Hz
Time constant (τ)
10 ms
Gain at f_test
-22.01 dB (7.9%)
Phase shift at f_test
-85.5°
Settling time (3τ / 5τ)
30 ms / 50 ms
Reactance at f_test
795.77 Ω
Total impedance |Z|
10.03 kΩ
Bode magnitude plot (0.01·fc to 100·fc)
0 dB -20 dB -40 dB0.01×0.1×fc10×100×fc = 15.92 Hz (−3 dB) · Amber dot: f_test
Frequency response sweep
Frequencyf / fcMagnitude |H|Gain (dB)Phase (°)
159.15 mHz0.01×1-4.34e-4 dB-0.6°
1.59 Hz0.1×0.995-0.04 dB-5.7°
7.96 Hz0.5×0.8944-0.97 dB-26.6°
15.92 Hz1×0.7071-3.01 dB-45°
31.83 Hz2×0.4472-6.99 dB-63.4°
159.15 Hz10×0.0995-20.04 dB-84.3°
1.59 kHz100×0.01-40 dB-89.4°

First-order passive filters roll off at −20 dB/decade (−6 dB/octave). Buffer the output if downstream load impedance is less than 10× R.

Eliminate mechanical contact bounce with deterministic RC time constants

Tactile pushbuttons and limit switches mechanically chatter for 2–10 ms after closure, triggering dozens of false external interrupts on fast microcontrollers. Choosing τ = R × C ≈ 10 ms (such as 10 kΩ + 1 µF) smooths contact chatter into a clean monotonic ramp.

Always feed a slow RC debounce edge into a Schmitt-trigger input (built into most STM32/AVR/RP2040 GPIOs, or an external 74HC14) to prevent multiple logic threshold crossings.

Formulas

  • τ = 10 kΩ × 1 µF = 10.0 ms
  • 1τ reaches 63.2% of V_DD (crosses CMOS V_IH)
  • 3τ = 30 ms (95.0%); 5τ = 50 ms (99.3%)

Worked example

A 10 kΩ + 1 µF debounce network has τ = 10 ms (f_c = 15.92 Hz), attenuating 200 Hz contact bounce pulses by −22.0 dB while still responding cleanly to human presses at up to 10 taps/sec.

Frequently asked questions

Should I add a second resistor between the switch and capacitor?

Yes! Placing a 1 kΩ series discharge resistor prevents the 1 µF capacitor from dead-shorting directly across the switch contacts and welding or pitting them over time.

What time constant is right for a hand-turned rotary encoder?

Keep τ around 0.5–1.5 ms (e.g., 10 kΩ + 100 nF) so rapid spinning does not smear quadrature A/B pulses together.

Can I combine a small hardware RC filter with software debouncing?

Yes—a 1 ms hardware RC filter removes ESD and high-frequency spikes while a 10–20 ms firmware timer handles slow mechanical bounce cleanly.