# What do these two PNP transistors do in this power circuit?

I am a beginner in circuit design and I have been trying to understand the purpose of the Q2A and Q2B transistors in the above power circuit.

Here is what I am able to understand so far.

1. There are two power sources, +5V and +5V_USB.
2. When +5V is present, the Q2B turns on which turns of the P-Channel Q1 and vice versa
3. This makes sure that only one source is available at the same time? • The configuration is a current mirror. Thus the need for a matched transistor pair. Basically it is for reverse voltage protection. If the left hand side voltage is less than the right side, the mosfet is turned off. Mar 4, 2021 at 4:48
• Like Dave said... it’s a differential amplifier but with a mirrored collector current referenced by the left side as a diode drop instead of a typical common emitter current bias soil USB 5V is higher on the left the switch turns ON. At 100uA most same transistors have the same Vbe,(536mV) but they must be thermally matched to be within 1mV Mar 4, 2021 at 5:31
• One cannot call this a current mirror. The current mirror requires two emitters together. Mar 4, 2021 at 13:43
• Is this configuration a current mirror? From what I have read in theory, in current mirror circuit configuration, current through both the transistors would be the same. So, in this case, will the current through Q2A and Q2B won't be the same, correct? If so, how can we call this a current mirror configuration? Mar 5, 2021 at 9:48

It's a 1-way low impedance current switch implementation.

The circuit basically behaves like a diode, without the downside of having a voltage drop. (It still has but much lower).

It's to avoid power going back to the USB port when powered from an external source.

When powered from the USB, current flow through Q2A and will block Q2B, the Q1 gate will then be at 0V letting current flow.

When powered from an external 5V source, Q2B will conduct, R34 will bring the gate of Q1 to 5V (more precisely 5V minus the saturation collector-emitter voltage of Q2B) thus blocking Q1.

Overall it's a neat design.

This is an ideal diode circuit. It permits current to flow when the left hand side is at a higher voltage than the right, but blocks current flow otherwise, like a regular diode, but it has minimal forward voltage drop.

The circuit is described in this power electronics tips article

They form a differential amplifier that functions as a comparator to determine which side of Q1 is more positive. When the drain is higher than the source, Q2B is cut off and R34 pulls the gate to ground, turning on Q1.

Otherwise, Q2A is cut off, Q2B is turned on by R33, and the gate is pulled up to the source voltage, cutting off Q1.

• When I read "differential amplifier" here I started looking at the BJTs as a differential pair which confused me. Now I see Q2B is a comparator with its inverting input being the reference consisting of Q2A and R33 and the non-inverting input being the source of Q1. Feb 25 at 20:17