Single momentary on/off switch question

Thread Starter

Swar

Joined Sep 24, 2019
7
I have 12VDC input voltage to power my load. I would like to use a single momentary switch to close the circuit and keep it closed when pressed and released. I would like to use the same momentary switch to open the circuit and keep it open when pressed and held for >5 seconds.

I can accomplish this using an arduino but I was wondering if there is a simpler solution. Any help would be appreciated.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
I have a relay based one that is a form of flip flop, works on 24vdc, should work on 12vdc, if necessary it could be tweeked for 12v.
What do you want to happen after the 5 secs?
Max.
 

Thread Starter

Swar

Joined Sep 24, 2019
7
With the circuit closed, holding and pressing the momentary switch for 5 seconds would open the circuit and disconnect power from the load.
 

Thread Starter

Swar

Joined Sep 24, 2019
7
I figured the solution was a simple one. Can you explain what you are describing in more detail? I am new to electronics.
 

crutschow

Joined Mar 14, 2008
34,285
I tried to come up with a simple way to do your delay on turn-off only, but the best I could do is the circuit below.
It requires one dual CD4013 D-FF package, and one CD4093 quad Schmitt-trigger NAND-gate package
It has no delay for turn-on and about 6 seconds for turn-off (determined by the R4-C1 time-constant) as shown by the LTspice simulation.

How much current does the load require?

An Arduino may be a simpler choice for this function.

upload_2019-9-24_17-54-37.png
 

Wolframore

Joined Jan 21, 2019
2,609
Yeah I agree with @crutschow. Simple to add an 8 pin ATTINY internal clock to 8k. It would need a regulator to go from 12v to 5... couple bypass caps and switch 12v with a small mosfet. I design modules like this based on the 1k chip that would be more than enough. Put it into sleep mode and wake on interrupt.
 

Thread Starter

Swar

Joined Sep 24, 2019
7
Thank you for the design. The load is 1A. I think you are right about sticking with the arduino. I am using a pro mini board currently.
 

crutschow

Joined Mar 14, 2008
34,285
Here's a simpler circuit using just one CD4017 counter IC chip configured as a toggle FF with a delay upon turn off.
Edit: I used that particular chip since it has a Schmitt-trigger clock input, so can tolerate the slow rise of the clock signal from the RC delay without glitching.

It does trigger on the opening of the switch, so you would need a normally-closed PB switch.

Edit 2: Modified schematic to correct power-on reset error.
upload_2019-9-26_8-44-11.png
 
Last edited:

Canobi

Joined Mar 4, 2015
29
I needed something very similar but a three second press before circuit activation. After doing a bit of research, I came across a site called mosaic industries which have various types of soft latch circuits, including the one I chose to use below:



Changing the value of the 1uf cap to 10uf and the 100k resistor to 500k will give a 5 sec delay before the circuit activates.
 

crutschow

Joined Mar 14, 2008
34,285
Changing the value of the 1uf cap to 10uf and the 100k resistor to 500k will give a 5 sec delay before the circuit activates.
He wanted a delay only upon turn-off, not turn-on.

And all that circuit does is delay the time until you can press the button again, not delay the time it takes to switch.
After the delay, it switches immediately when the button is pressed.
 

Canobi

Joined Mar 4, 2015
29
Ahh, thank you for explaining it so succinctly. I'm still learning and I'd obviously misunderstood the circuit (my bad folks).
 

crutschow

Joined Mar 14, 2008
34,285
Do a search on 555 timer circuits..There are lots of Application notes and articles with unique functionality.
[/QUOTE]Yes, the 555 is a very versatile timer but it will take that and at least one other IC to perform the desired function the TS wants.
 
Last edited:
Top