LED Fade On/Off Circuit

Build a circuit where an LED slowly fades on when powered and fades off when disconnected, demonstrating RC time constants.

Overview

When you flip a light switch, the light turns on instantly. But what if it slowly faded on like a sunrise? This project uses a capacitor's charging behavior to create a smooth fade effect. You'll see the RC time constant in action—the capacitor slowly charges, gradually turning on a transistor that controls the LED brightness.

Components Needed

  • 1x Electrolytic Capacitor (100µF to 1000µF)
  • 1x Resistor (1kΩ)
  • 1x Resistor (10kΩ)
  • 1x LED (any color)
  • 1x NPN Transistor (2N2222 or similar)
  • 1x 9V Battery
  • 1x 9V Battery clip
  • 1x Breadboard
  • 1x Push button (momentary)
  • severalx Jumper wires

Instructions

  1. Understand the Circuit

    The circuit works in two parts: 1) An RC charging network feeds the transistor base. 2) The transistor controls current through the LED. As the capacitor charges, base voltage rises, turning on the transistor gradually.

  2. Build the Power Section

    Connect the 9V battery positive to your breadboard power rail. Connect the negative to ground rail. Add a push button between battery positive and the power rail (this lets you control power easily).

  3. Build the RC Network

    Connect the 10kΩ resistor from power to a new row. Connect the positive leg of the 100µF capacitor from that row to ground. The negative stripe on the capacitor goes to ground! This is your RC charging network.

  4. Add the Transistor

    Place the 2N2222 transistor (flat side facing you: E-B-C left to right). Connect the base (middle pin) to the RC junction through a 1kΩ resistor. Connect emitter (left pin) to ground.

  5. Add the LED

    Connect LED positive (long leg) to power through the 1kΩ current-limiting resistor. Connect LED negative (short leg) to transistor collector (right pin).

  6. Test the Fade

    Press the power button. The LED should slowly fade on over several seconds! Release the button—the LED fades off as the capacitor discharges through the transistor base.

Challenges

  • Calculate the expected fade time using τ = RC and verify with a stopwatch
  • Try different capacitor values (10µF, 100µF, 1000µF) and compare fade times
  • Add a second resistor in parallel with the capacitor to make fade-off faster than fade-on
  • Use a potentiometer instead of fixed resistor to make fade time adjustable
  • Build two circuits and create alternating fade patterns