# Is it possible to make a high-side PNP switch circuit active-low with less than 3 BJTs?

I would like to create a high-side PNP switch. The usual example of the circuit design is active high (on the IO node in my schematic). I figured to invert this, I'd simply use the NPN inverter/not gate to drive the PNP (bottom right quadrant of my schematic below).

But, I wondered, is it possible to achieve this with less than 3 transistors, or have I done it the correct way? If the answer is yes (you normally use 3 transistors), then is there a way to reduce the part count or simplify the design?

I'm aware that an alternative approach is to use FETs. My question is specific to BJTs.

simulate this circuit – Schematic created using CircuitLab

Edit: IO voltage is $$\3.3\:\text{V}\$$, and the IO IC can source $$\170\:\mu\text{A}\$$ (but can sink $$\25\:\text{mA}\$$). Part is PCF8574.

• What is your I/O voltage? I can't tell from what I see. I do gather that your high side to the load is 5 V, though.
– jonk
Commented Nov 7, 2022 at 18:53
• You can do it with one PNP if your I/O voltage is the same as the load source voltage.
– vir
Commented Nov 7, 2022 at 18:53
• @jonk 3.3 V, updated question. Commented Nov 7, 2022 at 18:55
• @NickBolton So you can sink a lot of current but cannot source much?
– jonk
Commented Nov 7, 2022 at 18:57
• @NickBolton That's fine. Just wanted to be sure. Then it's pretty easy to do.
– jonk
Commented Nov 7, 2022 at 18:58

Okay. I gather you can sink a lot of current with your I/O pin: about $$\25\:\text{mA}\$$. But you can source only: about $$\170\:\mu\text{A}\$$. I don't really care that much about sourcing. But your indication about sinking tells me that it can easily be done.

(Note: I received an important comment to this answer. I'd been focused on the $$\25\:\text{mA}\$$ figure when I should have been focused on an output current that was an order of magnitude higher. Thanks jp314 for the added comment!)

simulate this circuit – Schematic created using CircuitLab

The idea here is to just nail the base of $$\Q_2\$$ to your lower rail. When your I/O pin pulls down on its emitter through $$\R_1\$$, it generates an emitter current that must be passed along to its collector, which then supplies the base current to $$\Q_1\$$.

Here, your I/O pin will only be asked to sink about $$\10\:\text{mA}\$$, which should be fine.

I think you can easily also see that when the I/O pin is high then $$\Q_2\$$ is off and your weak sourcing capability also isn't an issue since the $$\Q_2\$$ emitter can only source current, not sink it.

You can make $$\R_1\$$ a little higher or a little lower in value. But I suspect you'll be fine with the indicated value, too.

Hmm. Now that I look at it, all of your examples used more parts. This is actually the absolute lowest-part-count example as well as using only 2 BJTs.

In the circuit above, it may be helpful to add a resistor to pull off stored charge in the PNP when it is turning off:

simulate this circuit

You could also consider bypassing $$\R_1\$$ with a speed-up capacitor ($$\2.2\:\text{nF}\$$ as an example.)

You didn't ask for this, but suppose you needed a two-quadrant output drive, instead. For example, driving a speaker with PWM? You can extend this idea and add another BJT so that the output can both sink and source.

simulate this circuit

Again, that's the bare minimum. There's nothing to limit the output current other than the load itself. You may want to consider adding emitter resistors in the two output BJTs as a simple way of helping handle direct shorts at the output. (Better still would be to add two more BJTs along with those emitter resistors.) And once you get going on improvements, the circuit does start getting a little more complex-looking, admitted.

Unfortunately $$\R_3\$$ doesn't meet your I/O's sourcing compliance.

Just offering this, mostly, to illustrate how the earlier idea shown before can be expanded with just the addition of a resistor and a BJT.

• Oh, it's beautiful! So, like common gate on FETs... Didn't know you could do that with NPNs but it makes sense now, thanks! Commented Nov 7, 2022 at 19:16
• @NickBolton It is pretty! Agreed. Since you were asking for BJT-only, I think this is perhaps the best way. Other techniques exist, of course, when using other types of transistors.
– jonk
Commented Nov 7, 2022 at 19:20
• @NickBolton Perhaps so. It's a technique that I learned a very long time ago and it's always in mind when the circumstances warrant it. I will add an example of a 2-quadrant driver you can apply to your circumstance, should you need one.
– jonk
Commented Nov 7, 2022 at 19:24
• add ~ 100k between base and emitter of the upper PNP. That helps it turn off faster and also means that leakage on the NPN won't cause it to leak. You can also ground the 1.5k and drive the base of the NPN directly with the IO (no need for a resistor. Commented Nov 7, 2022 at 19:44
• Beta for that PNP at high currents is 60 or lower. To ensure saturation you should probably have a forced beta of 30 or lower. Therefore the 1base current should be (5V/20ohm/30_beta) = 8 mA ==> the 1.5k should be (3.3-0.7)/8m= 270 ohm for margin. The I/O may not be able to drive 8 mA strongly, so perhaps better to drive the base as in the comment above. Commented Nov 7, 2022 at 19:49

A couple of options.

1. Use 74HCT1G125. 3 state line driver. Works with 3.3V input logic levels, works with 5V supply and drives out 5V logic levels. Just connect a resistor from output to PNP base.

2. Use a dual bias resistor transistor, as an example MUN531. It contains PNP and NPN BJTs with base resistors built in. Sometimes single devices are called digital transistors because they need no external resistors. The MUN531 works up to 100mA so you need to find another component.

• Also known as "pre-biased". Handy when you need more than a few, and wasting all that space on resistors would be ridiculous! Commented Nov 7, 2022 at 22:05

Jonk beat me to the punch, with the circuit I was going to offer. Here is another. This one sinks less than 60 uA into your uC GPIO pin, but requires more components, and is imho somewhat less robust design, making use of the specific voltages involved.

simulate this circuit – Schematic created using CircuitLab