Every single project that we build needs an On/Off switch. Hardware switches are big and clumsy and can be quite expensive. Most of them also don’t look very good.
This post will be about an experiment that I recently performed, building a reliable soft start circuit, or latching circuit.
Full disclosure: I did not design this circuit. Full credit to the designer, who shall be mentioned later.
As such, This shall be about my experiences with this great little circuit, and also to show off the neat little prototype PCB that I designed and had manufactured for this experiment. It only took a few minutes to design, and even less to assemble.
The Schematic
How does it work?
To answer this, let us look at what components are in the circuit first.
Q1 is a P-Channel Mosfet. I chose the SI2301, because that is what I had lying around.
T1 and T2 are NPN BJT transistors, I chose S8050’s here, and also tested 2n2222a’s with great success.
Other components are 3 100k pullup resistors, 1 1M pullup and an 1k dropper resistor for the indicator LED.
In the off state, R1 (100k) keeps the gate of Q1 tied to the supply voltage, thus keeping the MOSFET switched off.
T1’s collector, also connected to the MOSFET Gate, are thus pulled High, with the Base of T1, although pulled High, connected to the Drain of Q1.
Q1 is still off, so that base will be low, for now at least.
The collector of T2, is pulled up to the supply voltage via R4, and also, through the push button, to the base of T1.
The base of T2, is pulled up via a 1M resistor to the drain of Q1, and a 22uf to 47uf electrolytic capacitor to ground.
The emitters of both T1 and T2 are grounded.
When you press the switch, the base of T1 goes high, and this switches T1 on, pulling the gate of Q1 to ground, switching it on. This now pulls the base of T1 high through R2, latching it on, and keeping Q1 switched on. This also pulls the base of T2 high through R3. As T2 is now also switched on, the junction between the collector of T2 and the switch is now for all purposes a ground.
Now, when you push the switch again, the base of T1 is pulled down to ground via T2. This switched off Q1. As the capacitor on the base of T2 can now discharge, the circuit is reset, and the next press of the switch will turn it on again.
How big a load can be switched?
Obviously this depends on the rating of the MOSFET at Q1. In my experiments, a load of about 150mA was easily controlled, but more than that, started to somehow drain the cap at C1 too fast, and the circuit would reset.
This is not a problem to me, as the circuit is ideal to switch a relay, which in return can switch the main load.
What other issues did I encounter?
The SI2301 seems to have a small amount of leakage, which allowed a few millivolts to activate T1 or T2. I solved that with the addition of a 10k pulldown to ground, on the base of T1.
This does not seem to be the case with other MOSFETS, and I believe changing the value of R1 to provide a stronger pullup, might solve this issue.
Where does the circuit come from?
I found the circuit, and explanation on the excellent Youtube channel EEVBlog.
The owner, Dave, does an excellent job of explaining how this works. All credit to Dave for this excellent circuit!
It has zero current consumption in the off-state, and very little when on.
Manufacturing
The PCB for this project has been manufactured at PCBWay.
Please consider supporting them if you would like your own copy of this PCB, or if you have any PCB of your own that you need to have manufactured.
Conclusion
I believe this is a great little circuit to keep around, with many excellent use scenarios. It does need a bit of fiddling to get to work perfectly every time ( as you can use many different P Channel Mosfets and NPN BJT transistors)
It provides an excellent alternative to a mechanical switch, and for my own use, the PCB Module is small enough to be mounted into an enclosure with another project with ease.