Push On/ Push Off for 12v Power Supply

Tonyr1084

Joined Sep 24, 2015
9,744
I like the circuit given by dl324 (post #8). I made my own copy of it. And for the sake of using this to control a fan, I've included the MOSFET dl324 mentioned in post #14. All I've done is take his drawing and put it together. Don't give me credit, I didn't draw this circuit; I just copied it. Because I like how elegant it is and how easily it will work.

Single Button Toggle Fan Cont.jpg
 
Last edited:

crutschow

Joined Mar 14, 2008
38,533
This is another circuit which I made. It uses a D-type Flip-Flop (CMOS IC).

Replace N-Channel MOSFET with N-Channel Logic Gate Power Mosfet.


There's a problem with that circuit
It will tend to trigger on the mechanical switch bounces, causing the FF to change states several times, and possibly ending up in the same state as it started.
It needs a debounce circuit.
This can be done by adding a resistor in series from the /Q output to the D input and connecting a capacitor from the D input to ground.
This allow the FF to change only once, to the opposite state, until after the RC delay.
100ms is probably a good delay time, using a 1 megΩ resistor and a 100nF capacitor.
 

AnalogKid

Joined Aug 1, 2013
12,147
I like the circuit given by dl324 (post #8). I made my own copy of it. And for the sake of using this to control a fan, I've included the MOSFET dl324 mentioned in post #14.
Note that since this is an alternate-action circuit, there is no need for the third inverter. The FET gate can connect to the output of either IC1A or IC1B.

While this circuit does not guarantee a consistent power-on state, C1 tilts the odds in favor of IC1A being low on power up. This is the output to use if you want the FET to power up in the off state.

A 7 ms time constant (using non-Schmitt gates) is a bit short to debounce some switches. Unless you need to capture rapid key strokes, I'd increase C1 to something in the 0.33 uF - 1.0 uF range. Back to a previous post, this is much less of a problem if you use Schmitt trigger gates.

ak
 

Tonyr1084

Joined Sep 24, 2015
9,744
While this circuit does not guarantee a consistent power-on state, C1 tilts the odds in favor of IC1A being low on power up. This is the output to use if you want the FET to power up in the off state.
Yeah, you could. But since there are six inverters on that chip, why not use one that is clean. IC1a, c and e, if all strung together, would have the same logic output.

Like I said before, I did not design this, I just copied it from someone else, who copied it from someone else. Using IC1c output would enable you to use something other than a MOSFET. A Darlington pair for instance, but you have to add a resistor. Perhaps you don't need to control that much current. Or more current. Yeah, you can get by without using inverter C if you wanted to. But it's there. With the other three you could build a second switch assembly. But I'm sure if you used just two inverters you could manufacture a total of three switches. All depends on what one wants to do. It's there, I'd use it. Three extras, I'd consider a second switch as well. All a matter of preference.

My ORIGINAL thought was to use a D Type Flip Flop. I it was jayanthd who drew one. There WAS the issue with switch bounce that came up with that design as well.
 

dl324

Joined Mar 30, 2015
18,344
Note that since this is an alternate-action circuit, there is no need for the third inverter.
I added the third inverter because that example was sinking more than the guaranteed minimum current for CD4069. Sinking a few mA would cause the output voltage to be so high it wouldn't be recognized as a LOW.
upload_2017-9-26_12-8-28.png
 

Thread Starter

TheLostRazgriz

Joined Sep 25, 2017
11
I tried my hardest but all that I could find was a 4011 instead of a 4069. I also couldn't find an IRF 350, all that I found had TO-220 on the box
 

dl324

Joined Mar 30, 2015
18,344
all that I could find was a 4011 instead of a 4069. I also couldn't find an IRF 350, all that I found had TO-220 on the box
Any inverting CD4xxx gate can be used. Any MOSFET with low on resistance at a Vgs of 12V that can handle the required current can be used.

As mentioned earlier, the third inverter can be omitted for low current loads.

C1 will cause the circuit to power up with the output of the second inverter HIGH as long as the power off period was more than a couple tens of milliseconds.
 
Last edited:

Tonyr1084

Joined Sep 24, 2015
9,744
I also couldn't find an IRF 350
Maybe you could try looking for an IRF530 instead of a 350.
all that I could find was a 4011
That would work just fine. Where the 4011 NAND gate has two inputs, just tie them together and use them as a single input. They'll do the same thing as the 4069 Inverter Buffer. I'd still suggest you use three gates. The fourth? Just tie the inputs of that to ground and you should be good to go. Just be sure to leave the output connected to NOTHING!

As for using a MOSFET, just do your research. Find one that can handle the amperage you expect (double that) (in other words, if your device draws 10 amps - find a MOSFET that will handle 20 amps). Follow the diagrams you've been given.

If you WANT to use a D-Type Flip Flop you can go that route too. Just be sure to debounce the switch, otherwise you'll get an output dependent upon how many times the switch happens to bounce THAT time you pushed the button.
 

Tonyr1084

Joined Sep 24, 2015
9,744
strantor said:
I know you guys are having fun here but the switch I linked to in post #19 could be connected to a relay and done deal.

dl324 said:
OP posted his switch requirement in post #3.

No, originally the TS (Thread Starter, same as OP = Original Poster) wanted a pull to turn on and a push to turn off. (or vice versa) Just like the old style head light switch in my father's 1970 Ford Ranchero. True, the switch posted in #19 would definitely fit the bill. The TS could simply connect a relay - OR use a MOSFET, whichever he desired. Apparently I missed the link on post #19 or I would have ran with that.

[edit] NEVERMIND. It was Shortbus who suggested the push pull button. The TS stated he only had access to (in his stock) the momentary push button. He could buy the switch you linked to or if he has these components in his stock he could build without having to spend money - albeit a very small amount of money.

I may just buy some of those latching push buttons just to have one on hand. Of course, I'll put it someplace safe (safe from me) and I'll never see them again.
 
Last edited:

Thread Starter

TheLostRazgriz

Joined Sep 25, 2017
11
Maybe you could try looking for an IRF530 instead of a 350.

That would work just fine. Where the 4011 NAND gate has two inputs, just tie them together and use them as a single input. They'll do the same thing as the 4069 Inverter Buffer. I'd still suggest you use three gates. The fourth? Just tie the inputs of that to ground and you should be good to go. Just be sure to leave the output connected to NOTHING!

As for using a MOSFET, just do your research. Find one that can handle the amperage you expect (double that) (in other words, if your device draws 10 amps - find a MOSFET that will handle 20 amps). Follow the diagrams you've been given.

If you WANT to use a D-Type Flip Flop you can go that route too. Just be sure to debounce the switch, otherwise you'll get an output dependent upon how many times the switch happens to bounce THAT time you pushed the button.
Will it not work if I don't tie the other inputs to ground?
 

AnalogKid

Joined Aug 1, 2013
12,147
TO-220 is the name of a power transistor package type, not a part number.
Will it not work if I don't tie the other inputs to ground?
CMOS logic parts do not like unconnected inputs because they can sens and react to random electrons and ions in moving air. This leads to erratic operation, including overcurrent and component failure.

ak
 

Tonyr1084

Joined Sep 24, 2015
9,744
Will it not work if I don't tie the other inputs to ground?
It will still work. It's just that if you don't tie the inputs either to ground or to the positive rail (source voltage) they can oscillate and can destroy the chip. Mostly they just get noisy and interfere with other things. It's just better to tie them to the source or to ground. I like ground because it doesn't see any fluctuations in the positive rail.

CMOS logic parts do not like unconnected inputs because they can sens and react to random electrons and ions in moving air. This leads to erratic operation, including overcurrent and component failure.
Couldn't agree more. Even just the bare leads can act like an antenna. The longer the lead the lower the frequency. But with too many stray signals in the air - you can't make a tuner out of it. Just refuse for the land fill.
 

PhilTilson

Joined Nov 29, 2009
154
As usual, I feel I am missing something here! We have had lots of interesting suggestions involving tactile switches, CMOS ICs, MOSFETs, micro-controllers etc.

In his original post, the TS indicated that he wanted manual control of some (obviously quite big) fans but that he only had access to momentary push-buttons in his stock box. Well, I suggest he gets off his backside and goes down to the local store and buys a 10A toggle switch for a couple of dollars/pounds which will provide him with exactly what he needs, with minimum effort at minimum cost.

Isn't that what we should be aiming at, despite the attractions of weird and wonderful electronic solutions?

Mind you, he is somewhat ambiguous, saying he wants "a circuit to control cooling fans" but that "I was wanting the button to toggle the power on and off". Now, does he want a CONTROL circuit - ie something that will sense the temperature and automate the switching of the fans, or does he just want a SWITCH to manually operate the fans?

As usual, the more clarity with which a requirement is described, the more likely someone is to get a sensible answer!
 
Top