The Raspberry Pi B+ models have a protection circuit between the USB connector and the 5V net on the board. They recommend putting a similar protection circuity on a Pi HAT before 'backpowering' the pi through its GPIO header along with a polyfuse. I understand why this is the recommendation, but I'd like to understand more about how this circuit works.

I did some searching before posting this question and found information on using a MOSFET as a low voltage drop diode, but they all had the gate wired directly to ground without the pair of PNP's and the resistors. What are they doing for this circuit? Also, is this primarily using the body diode? In which case, what's the relevant info on the datasheet that qualifies DMG2305UX for this application? In the other circuits I found, it appeared low Rdson and Vgsth compatible with the circuit seemed like the relevant characteristics.

'ideal' safety diode

  • \$\begingroup\$ Your circuit is valid .I have used a version of it that has a transistor and a diode which I called the FIODE .Your circuit is good for LV and my circuit is good for HV.There are many reasons why you are better with this than the old gate to ground . \$\endgroup\$ – Autistic Mar 21 '16 at 23:09
  • 2
    \$\begingroup\$ @Autistic kindly be brave and post the reasons why this (and yours) is better. \$\endgroup\$ – skvery Mar 12 '17 at 20:17
  • \$\begingroup\$ This is good .The transistor array that is SMD will be well matched for VBe .My circuit has thru hole parts and is better for High volts .For low volts the SMD array is the most sensible. \$\endgroup\$ – Autistic Mar 13 '17 at 9:04

The idea of the transistors is that:

  • If the Left is low and the right is high R2 (and the left transistor a little) will negative-bias the base of the right transistor's base, allowing it to push the gate to the right voltage; closing the FET's channel and the body diode will block as well.
  • If the right is low and the left is high, the left transistor's b-e junction will work as a diode and pull the base of the right transistor high enough to close off, allowing R3 to pull the gate low, opening the transistor. Initially the right side will start to be powered by the body diode, but quite quickly the channel's low on resistance will take over causing a very low drop.

So the left transistor acts as a matched diode for the right transistor. The exact component values may hinge a bit on the chosen MOSFET and PNP matched pair. Similar tricks are available in other ways, but this is the most well known one.

If you tie the MOSFET's gate directly to ground, like this:


simulate this circuit – Schematic created using CircuitLab

You are effectively creating an always-on-link, with possibly some adjusted start-up behaviour. Usually this start-up behaviour is enhanced using capacitors and/or resistors on the gate-path.

Because if the left is high, and the right isn't, the right will get lifted up by the body diode, then the source becomes higher than the gate, causing the FET to turn on. If the right goes high, the source goes up relative to the gate right away and again the FET turns on. Not much for diode action.

In either case usually you'd seek a FET that has a very low On-Resistance at least 10 to 20 percent below the minimum operating voltage. So if you're using it on 3.3V, you'd want a FET that's fully on at 2.5V or so, which would probably mean 1.2V or less threshold, but that's down to datasheets.

  • \$\begingroup\$ The normal version of the FET-only ideal diode uses an N-ch part with the source to the power input and the drain to the load... \$\endgroup\$ – ThreePhaseEel Mar 21 '16 at 23:18
  • 2
    \$\begingroup\$ @ThreePhaseEel AFAIK For high-side that would require a gate voltage drive above source level (i.e. a driver as in cds.linear.com/docs/en/datasheet/4357fd.pdf with built in charge pump), or some manner of trickery around a very carefully chosen depletion type (challenge right there!), neither of which is a single-FET solution. (and the P-type design in OP will probably beat the depletion tomfoolery on effort vs result scale in all imaginable situations) \$\endgroup\$ – Asmyldof Mar 22 '16 at 0:28
  • \$\begingroup\$ You might be right. Let me dig up the documentation on this... \$\endgroup\$ – ThreePhaseEel Mar 22 '16 at 1:02
  • 1
    \$\begingroup\$ Actually, you are right that a PFET is the normal case for the high-side -- but I am doubting your explanation as the diode action needed is when the left goes below ground (i.e. the gate), not when the left is unpowered and the right is above ground. \$\endgroup\$ – ThreePhaseEel Mar 22 '16 at 1:07
  • 1
    \$\begingroup\$ While I did never say the diode action was needed during normal operation, just explaining that it's there, I did (merely) omit it's only needed in case of reverse-connection-spikes and the like. \$\endgroup\$ – Asmyldof Mar 22 '16 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.