Is the following circuit electrically sound? My recollection is that the right way to do it is to use a PNP transistor on the high side and an NPN transistor on the low side. Will it work if they are both NPNs? What differences in performance are there?


simulate this circuit – Schematic created using CircuitLab

A, B, C, and D are 0 - 5V logic signals from a microcontroller. Obviously the truth table of the two circuits is a little different:

A B D1      C D D2     
0 0 OFF     0 0 OFF
0 1 ON      0 1 OFF
1 0 OFF     1 0 OFF
1 1 OFF     1 1 ON

Something feels inappropriate to me about Circuit Topology #2 though, do you agree? Can you explain why? or why not? When is it absolutely necessary to use a PNP transistor rather than an NPN transistor?

  • \$\begingroup\$ There's nothing inappropriate about #2 - it does what it does as per Phil Frost's answer. It's worth noting that if the LED and R4 were repositioned in Q5's collector you would get the same truth table for D2 but both Q4 and Q5 would be fully saturating like in the D1 example i.e no (hardly any) loss in current through the LED. \$\endgroup\$
    – Andy aka
    Jun 20, 2013 at 22:31

1 Answer 1


Remove R5 and you will have what you describe. The configuration of Q5 is called common collector or emitter follower. Essentially, the voltage at the emitter is the voltage at the base minus 0.6V, but the emitter current can be much more than the base current, because the gain of the transistor will draw more current from the collector. Thus, it's a current amplifier.

Remember, the base-emitter junction is a diode. So, the emitter will be about 0.6V below the base if you forward bias it. With R5 removed, you can pull the emitter up to \$V_{cc} - 0.6V\$. With R5 present, you won't get it as high, since some voltage will be dropped when current flows in R5.

Since there are things that will limit the current in the emitter leg of Q5, you don't need R5 to limit the base current, which isn't true of Q2 or Q4, which have their emitters shorted to ground, or Q1, with its emitter shorted to \$V_{cc}\$.

See Why would one drive LEDs with a common emitter?

There isn't much difference in performance. In circuit 1, the anode of D1 will be at \$V_{cc} - 0.2V\$, whereas in circuit 2, it will be at \$V_{cc} - 0.6V\$, so the LED current is a bit higher in circuit 1, assuming R1 and R4 are the same value.

Circuit 2 has the advantage that the base current goes towards powering the LED, but since the base current is small, this isn't a big effect.

The last subtle difference is that in circuit 1, Q1 enters saturation, which will charge the base-emitter capacitance. When you then turn it off, this capacitance has to discharge before Q1 really goes off, adding a bit of delay from when your MCU output goes low to when the diode gets switched off by Q1. Q5 never enters saturation, because the emitter voltage is brought up to just the point where the transistor enters saturation, but not more. So, no turn-off delay. The delay is very short, and probably not significant until you are switching at least 50kHz.

  • \$\begingroup\$ What happens if I don't remove R5? \$\endgroup\$
    – vicatcu
    Jun 20, 2013 at 22:34
  • \$\begingroup\$ " With R5 removed, you can pull the emitter up to Vcc−0.6V. With R5 present, you won't get it as high, since some voltage will be dropped when current flows in R5." The base of Q5 will not be pulled as high as it would be without R5, and this will (slightly) lower the emitter current, thus driving less current through the LED. \$\endgroup\$
    – Shamtam
    Jun 20, 2013 at 23:47
  • \$\begingroup\$ @vicatcu remember, R5 will experience a voltage drop of \$I\cdot 3.9k\Omega\$ as current flows through it. If \$R5 = 0\Omega\$, then there is no voltage drop. \$\endgroup\$
    – Phil Frost
    Jun 21, 2013 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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