# How to restrain this soft latching power switch from eating too much current?

I am designing a two buttons soft latching power switch for a project involving a raspberry pi, li-ion cells I salvaged from the battery of a broken laptop, and a power booster from adafruit.

I wanted the circuit to be controlled by two momentary push buttons : one for ON and another for OFF (so this is NOT a regular one button soft latching switch).

I came up with this design :

P1 is the battery input (5V currently regulated by a 7805, see details at the end) and P2 the output to the raspi (requires 5V).
I am beginning in electronics but this is how I understand it :
When you press SW1, Q1 gets activated, so current can pass through. The base of Q2 gets activated too, so that it is no longer required to hold down SW1. When pressing SW2, the base of Q2 gets pulled to ground, so the base of Q1 is no longer connected to ground, thus cutting off the circuit. Without the capacitor C1, noises can trigger the circuit making it unreliable.

I tested this circuit with a LED first, and everything was ok, but I had some doubts about getting it to work with a bigger load, like the pi.

As I thought, when testing with the pi, there is not enough current to power it fully : its power LED is very dim, and it cannot boot. Also, I have to hold down the OFF button for a few seconds, otherwise the circuit gets ON immediately after.

So I thought well, I don't have enough power coming out of there, but I could use this circuit to drive a single transistor as a switch.

So here is the revised design :

The result is way better now : The pi's power LED is very bright, and it tries to read the SD card and engage the booting process. But it's still not enough. The pi seems to loop into its first booting process, without getting completely ON.

To add more details not showing up on these schematics : As I wait for the power booster to ship (I just ordered it), for a quick and dirty alternative, I am using a 7805 to get the voltage of my 11.1V laptop battery down to 5V.

So my questions are :

Is my design correct considering what I want to achieve ?

I only have those BJT (547 and 557) at hand right now, they are rated 50V 100mA, are they really efficient ?

The resistors' values were chosen quite randomly, inspired from what I saw on some forums (there was one guy who retro-engineered a similar circuit from a chinese product, so I thought well, those values might be ok). Are the values of the resistors really well chosen ? (I still don't understand how to choose them well)

Finally, is it safe to keep that circuit connected to the battery when in OFF position ? Will it still draw current ?

• Measure voltage across P2. I doubt it wont be 5. Measure Vce of Q1 also. 100 mA is maximum saturation current. But with 4k7 base current, it will not be pumping even 100 mA. How much current do pi need? – User323693 Jul 3 '15 at 1:52
• The first circuit should suffice if you changed Q1 for a higher-current device. I'd recommend picking a P-channel MOSFET to do the job, something with at least the current capacity of the voltage regulator. The second circuit is suffering from the same problem, except all the current passing through Q3 is going to the Pi, rather than some going to keep itself on, which is why you get a little further. – CharlieHanson Jul 3 '15 at 1:54
• Why not use simple on off switch? OR do you want to have shutdown feature from pi, turning off Q2 by pi? – User323693 Jul 3 '15 at 1:56
• The pi requires 700mA. Thank you @Umar for pointing out the 4k7 resistor, now I get why only a small amount of current is passing through Q1. If I replace this for a 27 ohm one, it should get to near saturation. Still it won't be enough because the BJT I'm using are not powerful enough, right ? I was afraid I had to get some MOSFET instead. Looks like I'll need to follow the advice of chaaarlie2. To answer the last comment : I can't use a simple switch because I am building this inside a specific case that already has two push buttons. – Zoé Martin Jul 3 '15 at 2:14

The FETs can hog current upto 500 mA. For higher load, it is very easy to find FETs with low Vgs threshold. Before pressing the switch SW1, M1 will be off since Vgs is zero. Once switch is pressed, M3 turns on followed by M1 followed by M2. M2 holds the ground to gate of M1 there onwards. When SW2 is pressed, M2 releases the Gate of M1, making the Vgs of M1 zero again, thereby cutting out 5V_OUT. 7805_5V is regulator output. Needless to say, the switch section will consume significantly less current to be suitable for portable applications. I hope, power dissipation across 7805 is looked upon.
(Vin - 5V)/0.7 Watts

• @Jerome NMOS: link PMOS: link Note that, only PMOS carries huge current. NMOS can be any SOT with low Vgs. Current through NMOS is less than a mA Time consuming but play around here -Digikey: link – User323693 Jul 3 '15 at 4:41