RC circuit to fade in LED

Thread Starter

snolan

Joined Apr 28, 2024
4
Hi everyone,

I want a circuit where I push a button and the LED fades in but goes out instantly when the button is released. Would this be a standard RC circuit with an LED in parallel across the capacitor?
 

crutschow

Joined Mar 14, 2008
38,352
An RC circuit will work for that but it takes more than just one R and one C.
For a smooth rise without a delay and instant off, it could be done with a SPDT PB switch, two capacitors, two resistors, and a diode.

How long do you want the fade to be?
What's the supply voltage and the LED current?
 
Last edited:

crutschow

Joined Mar 14, 2008
38,352
Only for about a second. It will be powered by two coin batteries
Below is the LTspice sim of an example circuit:
The green trace shows the LED current versus time after the PB is pressed.

C2 rapidly charges C1 to the LED's forward drop voltage after the PB is pressed, to avoid the delay that otherwise would occur for the capacitor to charge to that voltage.

The diode rapidly discharges the capacitor to ground when the SPDT PB is released.

1714405897464.png
 
Top