Time based LED control from a button press

Thread Starter

LewLex

Joined Jul 15, 2025
11
Screenshot 2025-07-15 095643.png
i'm hoping someone can help me in my quest for a super simple 5 second LED control circuit.
from a 5V rail, i'd like to be able to press and hold a tactile switch, which will keep Q1 On for 5 seconds, even if the button is held on for longer.
I'm thinking theres got to be a capacitor onto the gate of Q1, but I just can't get my head around it.
 
Last edited:

DickCappels

Joined Aug 21, 2008
10,661
I don't think you can get simpler than this:

1752585837880.png

You can change the capacitor value to get a precise pulse width -this depends on the characteristics of the MOSFET. I assumed that the MOSFET does not need more than a few volts of gate drive.
 

Thread Starter

LewLex

Joined Jul 15, 2025
11
Does it matter if the LED dims while turning off?
i'd prefer the timing circuit to control the gate of a mosfet (with ow vgs), so that the LED would just turn off at the end of the time period rather than dim
that being said, i am open to idea's
 

AnalogKid

Joined Aug 1, 2013
12,047
Post #5 is the most simple circuit. Note that the FET and LED will not turn off rapidly. It will snap up to full brightness, hold there for a few seconds, then fade out over a second or two. If you want a crisp and rapid turn-off, that takes a second transistor. Both the FET and the LED have approximately-exponential response curves, so the turn off rate might appear to be quick enough; depends on the actual components.

ak
 

Thread Starter

LewLex

Joined Jul 15, 2025
11
I don't think you can get simpler than this:

View attachment 352687

You can change the capacitor value to get a precise pulse width -this depends on the characteristics of the MOSFET. I assumed that the MOSFET does not need more than a few volts of gate drive.
thanks. Yes, I plan on using a Mosfet with a low vgs thershold.

Am I right in thinking in this circuit, when +5V is supplied (button is pressed) the Gate will see 5V instantly and turn on. Then as the voltage across the capacitor charges up, determined by the 100k/0.022uF RC, the voltage at the Gate starts to reduce, and eventually the Mosfet will turn off. Once the button goes open circuit, the capacitor will discharge through the 10K?
 

dl324

Joined Mar 30, 2015
18,220
ideally turn off, but it is not the end of the world if it was to stay on for the 5 seconds duration
With a 555 timer, you could eliminate the MOSFET. But getting the timer to reset if the button isn't held for the 5 seconds or turn off if held for longer than 5 seconds would be problematic.
 

AnalogKid

Joined Aug 1, 2013
12,047
You can do what you want with a 555 and no MOSFET.
Capacitor couple the trigger and use the button to power the circuit.
So now you have two timing capacitors, one for the input signal differentiator and one for the LED.

OTOH, with a bipolar 555 you probably can eliminate the FET.

ak
 
Last edited:

DickCappels

Joined Aug 21, 2008
10,661
Am I right in thinking in this circuit, when +5V is supplied (button is pressed) the Gate will see 5V instantly and turn on. Then as the voltage across the capacitor charges up, determined by the 100k/0.022uF RC, the voltage at the Gate starts to reduce, and eventually the Mosfet will turn off. Once the button goes open circuit, the capacitor will discharge through the 10K?
It should turn what seems to be instantly. As soon as you release the button the LED will "head toward" being off.

I think this is getting too complicated. Maybe you would like to try an NE555.
1752593778862.png
You can probably leave out the capacitor between pin 5 and ground, it is only there to minimize jitter, which you probably would not even see if it were there.
 

ElectricSpidey

Joined Dec 2, 2017
3,312
The circuit in post 5 seems to be treating the transistor as a bjt not a MOSFET.

I am failing to understand why the MOSFET would turn off after reaching steady state.

Maybe someone can explain.

Nevermind...I figured it out.
 
Last edited:
Top