Soft latching circuit. Is leakage current an issue through a PMOS?

Hi forum.

I'm interested in learning about latching circuits, using a mosfet, instead of a mechanical switch.

I had a look at GreatScott's recent video. Which shows one of these soft latching circuits, using a P-channel Mosfet ...

One of the Top voted comments has me confused. which reads "For battery operated devices that are used infrequently, I really prefer a mechanical switch where there is ZERO drain (other than the compulsory modelled resistance in the battery). Otherwise when you need said devices, you find dead batteries at best or corroded terminals usually."

It has me confused because I had thought, perhaps wrongly, that the only significant drain you'd get on this soft latch circuit (when mosfet is off) would be the drain-to-source leakage current of the Mosfet (IDSS). That is only 25 micro amps maximum, for the IRF5210 at room temperature, which would take many years to drain a large enough battery. e.g. 4000 mah battery would drain in around 18 years.

It can get up to 250 micro amps max, but that is only at extreme temperatures (125 degrees C). here is datasheet for IRF5210...https://www.infineon.com/dgdl/irf5210pbf.pdf?fileId=5546d462533600a4015355e3576b198b

However, some mosfets even claim to have 1 micro amp max IDSS at room temp, and 10 micro amp for 150 degrees C, like this the FQP27P06. data sheet here...https://www.onsemi.com/pdf/datasheet/fqp27p06-d.pdf. So it would seem that using one of those Mosfets would completely solve this battery drain issue, even for extreme temperatures.

Even logic level mosfets, like the AO3401, have IDSS figures between 1 micro amp (room temperature) and 5 micro amp (50 degrees C).

There are other leakages, like gate-body leakage of the mosfet, but this is in the 100ish nano amp range, which would be even more insignificant.

So it would seem like only extreme circumstances, like leaving a battery device in a hot vehicle for a few years, would cause a battery drain issue, but even this can be reduced with a different mosfet.

Am I missing something here?

I don't understand the comment either. Don't assume that because someone makes a comment that it is correct! The comment might just be a reflection of their prejudices or experience, and not actually about the circuit. They might have a bias against all soft latching circuits.

BTW, in that circuit pressing SW1 dumps C1 into the base of Q2 without any current limit, not good.

1 Like

I agree. there's no shortage of bad advice on YouTube. I just thought that with over 200 upvotes on a very popular electronics YouTube channel, with no rebuttal to the comment, I needed to make sure I wasn't going crazy...

thank you for identifying the issue with the capacitor.

Also, I wanted to ask...

For some P-channel Mosfets, like the second one I linked, the IDSS is called "Zero Gate Voltage Drain Current".

However, the IDSS on the first datasheet I linked is called "Drain-to-Source leakage current".

Do these both mean the same thing?

I don't know, can someone else answer?

For an enhancement mode MOSFET, the Idss is a leakage spec since the gate is at zero bias and should not be conducting.

1 Like

Thank you..so a FQP27P06 mosfet seems more appropriate than IRF5210 if you are subjecting it to extreme conditions when off, as the IDSS is only 10 micro amp max when at 150C, but that just does not seem like a condition you'd subject this soft latching power circuit too.

Well the video is clearly filled with noobs, as I just received a reply from a person stating that his soft latching power circuit ended up draining his battery in a single day, when off. Oh dear, maybe I'll stick to reading this forum instead :wink:

Find a different diagram.
Discharging C1 through the base of Q2 seems unhealthy for Q2.
Leo..

1 Like

I see.

I am liking the look of this one posted to the forum. it's controlled by an arduino.

Push-Button Power Circuit-1
The button is commonly used between gate of the P-channel fet and ground (across the N-channel fet).
Then you don't need the diodes.

The button turns the P-channel fet on,
the Arduino turns the N-channel fet on, and that keeps the P-channel fet on.
The Arduino turns the switch off when done.
A $0.20 FDN340P (ebay) P-channel fet, as used on an Uno, is fine for 500mA.
Leo..

1 Like


I suspect you do not understand the clever intention of that circuit. :thinking:

It allows the Arduino to read the button. The button turns it on, and the Arduino asserting INPUT_PULLUP switches the N-Channel FET on to maintain it. But pressing the button again can be read by the Arduino which then sets the pin to OUTPUT LOW (or possibly, just INPUT) and then as the button is released, the circuit turns off.

The circuit first cited is indeed, bad.

It is intended to perform a toggle similarly (without involving the Arduino) but relies on matching of the two transistors for reliable operation. And you have both ends of the switch connected to essentially high impedance points; I suspect its operation may prove to be quite intermittent. :face_with_raised_eyebrow:

1 Like

True. Did not click that a toggle was needed.
Leo..

"Did not click" :rofl:

In the case of the circuit you cited, it is a "permissive" toggle - it requires the permission of the Arduino to switch off, which is particularly useful.

Once the power is on, the push button can be used for any input purpose, not necessarity related to power. Then perhaps a long press would be interpreted as a shutdown signal.

It seems to me that unless there's a real shortage of I/O pins, processor-controlled shutdown is the way to go. That's as opposed to the parts count of all these elaborate push-on push-off circuits, most of which don't really work well.

1 Like

While there may be many other reasons why the battery was drained this circuit is flawed and I believe it can drain a large battery quickly:

Imagine there is some power source on OUT and the circuit is expected to be OFF and the button is not pressed. This source may be very weak - maybe a LED on sunlight, or some long wire acting as antenna. In that case the OUT voltage will rise until about 0.5 V. There Q2 will start to conduct decreasing Q1 gate voltage. This will cause Q1 to leak, adding more power to OUT, increasing Q2 current. This gives a positive feedback turning the circuit on.
I did a quick test with only R1, Q2, small blue (3 mm) LED connected between Base of Q2 and GND. With 9 V power supply there was 3 V voltage drop over R1 in sunlight!
Also any (decoupling) capacitor at OUT may be this "power source". Depending on the load it is easy to imagine that instead of proper turn off this circuit switches to some zombie state with say 1 V at OUT causing non-negligible leakage via Q1 and Q2 but not high enough to increase the voltage further to cause unintended turn on (= easily noticeable fault).

2 Likes

many thanks for all for the advice.

That makes sense. Even after the switch is off, any uncharged capacitor on the load will flow back into Q2 and turn on the mosfet again. That creates an endless loop and the circuit may never turn off.

Interesting. thank you. clearly a flawed design.

That problem does not appear to occur with this circuit. To switch off the N-channel mosfet, the arduino turns off its internal pullup resistor, and sets the pin to a low output. That then turns off the P-channel mosfet. There doesn't appear to be any way that this circuit could enter a "zombie state", as the N-channel FET is not going to have any unintended positive voltage flowing into it on power down.

Well, that was never in doubt. The answer was always no!

Equally, discussing anything other than the actual circuit in question, is simply nonsense. :roll_eyes:

Dave Jones EEVBLOG #262 circuit explanation.

Understanding values chosen for EEVblog #262 - World's Soft Latching Switch - Page 1

ok fair enough. Your explanation of both circuits in the thread is very good. thank you.