RC Time Constant Calculator
Time constant (ms)
100
How it works
The RC time constant (τ = R × C) defines how quickly a capacitor charges or discharges through a resistor. After one time constant, the capacitor reaches 63.2% of its final voltage when charging, or drops to 36.8% when discharging. After 5τ, the capacitor is considered fully charged/discharged (99.3%).
**Charging and discharging equations** Charging: V(t) = V_supply × (1 - e^(-t/τ)). Discharging: V(t) = V_initial × e^(-t/τ). These exponential relationships are fundamental to RC circuit analysis. At t = τ: V = 0.632 × V_supply (charging). At t = 2τ: V = 0.865 × V_supply. At t = 3τ: V = 0.950 × V_supply.
**Filter applications** An RC circuit is a first-order low-pass filter: signals below the cutoff frequency (f_c = 1/(2πRC)) pass with minimal attenuation; signals above it are attenuated at 20 dB/decade. The -3 dB point equals f_c. A high-pass filter uses the voltage across the resistor instead of the capacitor — the outputs are complementary.
**Timing circuits** RC circuits are used for timing delays: 555 timer circuits use an RC network to set oscillation frequency and pulse width. The charge/discharge time determines the timer period. Simple debounce circuits use RC networks to eliminate contact bounce in switches.
**Real capacitor limitations** Electrolytic capacitors have significant ESR (equivalent series resistance) and tolerances of ±20%. Ceramic capacitors have better tolerance but may be voltage-dependent (X5R, X7R dielectrics lose capacitance under DC bias). For precision timing, use C0G/NP0 ceramic capacitors with tight tolerances and low temperature coefficient.
Frequently Asked Questions
- Mechanical switches bounce — contact opens and closes multiple times within 5–20 ms of pressing. RC debounce: R charges C through the switch contact. After the switch settles, C reaches stable voltage within 5τ. For 20 ms bounce time: τ should be ≥ 5 ms (so 5τ = 25 ms). With R = 10kΩ: C = τ/R = 5×10⁻³ / 10,000 = 0.5 µF. Input to Schmitt trigger inverter (hysteresis prevents re-triggering on noise). Better alternative for most MCUs: software debounce — read button state 5 times at 5 ms intervals, confirm all reads agree. RC debounce is useful in hardware-only circuits without microcontrollers.
- f_c = 1 / (2π × R × C). The -3 dB cutoff frequency. At f_c, the output is 0.707 of input amplitude (-3 dB power). Below f_c: signals pass with little attenuation. Above f_c: attenuation increases at 20 dB/decade (first-order filter). Example: R = 10 kΩ, C = 100 nF: f_c = 1/(2π × 10,000 × 100×10⁻⁹) = 159 Hz. This passes audio DC components and hum (50/60 Hz) but blocks audio frequencies — a simple power supply ripple filter. For audio filtering applications, choose f_c at the desired cutoff. Phase shift at f_c is -45°.
- RC filters are essential in ADC design. Before the ADC (anti-aliasing filter): low-pass RC filter removes frequency components above f_Nyquist = f_sample/2, preventing aliasing. The filter's cutoff must be set below f_Nyquist with enough rolloff to reject the image frequencies adequately. After the DAC (reconstruction filter): removes the stepped staircase waveform, interpolating between samples. The RC constant determines settling time — the ADC input must settle to within half an LSB before sampling. For high-resolution ADCs (16–24 bit), settling time requirements are tight: the RC network must settle to within 0.001% in the sample hold period.
- If the RC time constant τ >> half-period of the square wave: the capacitor barely charges/discharges — output looks like triangular waves (the integral of the square wave). If τ << half-period: capacitor charges/discharges rapidly — output voltage tracks the input with small lag and 'spikes' visible on edges. If τ ≈ half-period: classic exponential charging/discharging waveform, neither fully integrated nor fully tracked. These behaviors are exploited in: sawtooth wave generators (τ >> T), edge detection/differentiation circuits (τ << T), and waveform shaping for timing circuits (τ ≈ T).