# delayed latching push button ON/OFF power switch

#### nickfan

Joined Apr 3, 2017
6
I want to build a latching push button ON/OFF power switch which turns on by holding the switch for 3 seconds and turns off by holding the switch for 3-5 seconds. The following circuit is closest to what I need. How can I modify it to delay the turn on time? What is the function of the 10k resistor next to the switch? It looks like the circuit will also work without it. when the switch is not pressed, the 1uF capacitor is not charged, right?

http://www.mosaic-industries.com/em...er-switch#press-on-hold-off-latching-circuits
Nick

#### crutschow

Joined Mar 14, 2008
29,511
I want to build a latching push button ON/OFF power switch which turns on by holding the switch for 3 seconds and turns off by holding the switch for 3-5 seconds.
Obviously you can't have it turn both on and off for identical 3 second time periods.
How much less than 3 seconds will still turn the switch on?
Or do you mean anything up to 3 seconds will turn it on?

Why do you need different times for the on and off delay?

#### AnalogKid

Joined Aug 1, 2013
9,958
Obviously you can't have it turn both on and off for identical 3 second time periods.
R-C delay > D ff clocked on trailing edge > pass transistor = identical long delays for both on and off.

26 V input power makes things a bit more complex, adding a zener regulator for the logic. The n-channel half of the 7319 is used as the open-drain main driver for the p-channel half instead of as the latching component.

Note - For 26 V operation you should use FETs rated for at least 50 V.

ak

Last edited:

#### crutschow

Joined Mar 14, 2008
29,511
R-C delay > D ff clocked on trailing edge > pass transistor = identical long delays for both on and off.
Of course.
But the TS is implying that he wants to ON delay to be shorter than the OFF delay.

#### AnalogKid

Joined Aug 1, 2013
9,958
Yeah, I saw that. But I take TS questions as more like suggestions than requirements. Sorta like customer specs.

Also, the latch output can add hysteresis to the output pulse widths with just one resistor feeding back to the R-C node; add a diode for independence.

ak

#### nickfan

Joined Apr 3, 2017
6
sorry for the confusion. It is fine if the delayed on/off time is the same.
The circuit is press on without any delays. What is the simplest modification to have delayed on?
Also, what is the function of the 10k resistor next to the switch?

#### nickfan

Joined Apr 3, 2017
6

will this mod work?

#### crutschow

Joined Mar 14, 2008
29,511
If you explain the purpose of these delays it would be easier to help you.

#### AnalogKid

Joined Aug 1, 2013
9,958
Before the button is pressed, the capacitor (need reference designators) has 0 V across it. Immediately after a button press, it still does. This means the p-channel FET's gate voltage still changes immediately, only now it is a 75% smaller change. With a low power voltage input, what is left over might not be enough to turn on the FET.

Nice try, I see your thinking, but it won't work.

Try putting the capacitor across the gate-source. Now at button press it holds Vgs at 0 V, slowly increasing until Vgs is large enough to turn on the FET. This approach has its own issues, such as significant variation in the FET's threshold voltage from part to part, and how that voltage requirement varies with temperature. But it's a place to start.

ak

#### nickfan

Joined Apr 3, 2017
6
If you explain the purpose of these delays it would be easier to help you.
I should say "Hold the Button for 3 Seconds to Turn On/ Off". This is to prevent accidental turning on.

#### nickfan

Joined Apr 3, 2017
6
I am very stupid. The 10k resistor connected to power supply and the switch is obviously there to prevent shorting the power to ground directly. My question should be if it matters this 10k is changed to 100k or higher?

#### nickfan

Joined Apr 3, 2017
6

Does the 10k resistor value play a critical role here?

Will this circuit work?

#### AnalogKid

Joined Aug 1, 2013
9,958
My question should be if it matters this 10k is changed to 100k or higher?
Yes. That resistor is what removes charge from the capacitor when the switch is released, so the capacitor will function correctly with the next button press. The capacitor is charged through the 100K and discharged through the sum of the 100K and the 10K.

If you want the capacitor to reset more quickly, add a diode in parallel with the 100K. This makes the charge and discharge time constants relatively independent.

ak

Last edited:

#### AnalogKid

Joined Aug 1, 2013
9,958
Will this circuit work?
No. Once the circuit is latched by the n-channel FET (reference designators!), there is nothing on the input side that can turn that FET off and release the p-channel FET (reference designators!) gate.

ak