← all lessons
Components · #5 of 20

Capacitors + RC Time Constant

Charging, Filtering, Timing

Why it matters

Capacitors store energy, filter noise, and create time delays. The RC time constant (τ = R × C) tells you how fast they charge/discharge.

The idea

What Is a Capacitor?

A capacitor stores electrical energy in an electric field. Think of it as a tiny rechargeable battery \ that charges/discharges very quickly.
        <div class=

Demo

Adjust Resistance and Capacitance to see how the charging curve changes.

Watch for:

Key takeaways

Going deeper

Capacitors have ESR (Equivalent Series Resistance) and leakage current. For power supply filtering, use ceramic capacitors (low ESR, good for high frequencies) and electrolytic capacitors (high capacitance, good for low frequencies). For timing, use film or ceramic capacitors (stable, low leakage).

Math details

RC charging equation:
  V(t) = V_final × (1 - e^(-t/τ))

  Where:
  τ = R × C (time constant in seconds)
  t = time
  V_final = final voltage

At t = τ:
  V(τ) = V_final × (1 - e^(-1)) ≈ V_final × 0.632

At t = 5τ:
  V(5τ) = V_final × (1 - e^(-5)) ≈ V_final × 0.993

Example:
  R = 10kΩ = 10,000Ω
  C = 100µF = 0.0001F
  τ = 10,000 × 0.0001 = 1 second

  After 1 second: ~63% charged
  After 5 seconds: ~99% charged

Implementation

LLM Prompt: RC Charging Simulator