# LED with a transistor on each side

I'm trying to make a circuit with a transistor on each side of an LED so it only lights up when both transistors are activated.

The transistors need to be on either side of the LED because the LED is part of a small LED grid display and one transistor controls the vertical line (which the anode is connected to) and the other transistor controls the horizontal line (which the cathode is connected to)

Here is the simple circuit I came up with:

Seems to me like it should work, but it doesn't. Applying a voltage to Va and Vb doesn't light up the LED. I'm pretty new to electronics, so I'm sure I'm missing something simple. Is there something obiously wrong with this circuit? (adding a resistor in series with the LED doesn't help)

• What's the voltage of Vcc and whats the voltage of Va and Vb ? Mar 15, 2015 at 0:14
• It would be better to use a PNP for the upper transistor. Mar 15, 2015 at 0:15
• Might be able to get away with the led being put on the highside (next to vcc) with a series resistor rather than in between two transistors Mar 15, 2015 at 0:18

Something like this may work for you (2 x 2 matrix shown). Part numbers and values are placeholders, but you'd normally want the drivers without series resistors to have lower base resistors because they're going to be handling much more current than the other transistors (but for much less time). The drive voltage for the high side drivers (PNP transistors) has to swing up to the +5V supply in this case to turn them off.

simulate this circuit – Schematic created using CircuitLab

• This is exactly the circuit I had in mind, I was just testing it out with only one LED. The only difference between this and mine is that I used NPN transistors on each side of the LED and you have a PNP on one side and an NPN on the other. Can you explain why this works but mine doesn't? Mar 15, 2015 at 7:01
• Also, what do you mean by "the drivers"? Q1 and Q2? And "without series resistors" refers to the fact that there's no resistor between the transistor and the LED like there is for Q3 and Q4 (R5 and R6)? Why are Q1 and Q2 handling current for much less time? Thanks for the answer! I'll try out this circuit in the morning and report back. Mar 15, 2015 at 7:45
• Yours could work with more drive voltage but that's probably less convenient to provide than just using complementary transitors as above. Mar 15, 2015 at 12:58
• Okay, in use you'd start with all the column drive PNP transistors off (the port pins are high). You drive all the NPN transistors on (port pins high) for the next column, then drive the port pin for that column driver PNP low. A brief delay (microseconds) with all column drivers off prevents ghosting. Mar 15, 2015 at 12:59
• Works perfectly! Thanks for the thorough answer. I'm used to stack overflow where software folks happily help each other out. Glad to know there are people in the electronics world who are just as helpful :) Mar 16, 2015 at 1:10

Your Va is too low. It should be at least a volt higher than Vcc, and maybe 2 or 3, depending on your base resistor and LED current.

This is the classical problem with making a high side driver.

A simple transistor and gate. Both must be driven high to conduct, turning on the led.

simulate this circuit – Schematic created using CircuitLab

The transistors need to be on either side of the LED because the LED is part of a small LED grid display and one transistor controls the vertical line (which the anode is connected to) and the other transistor controls the horizontal line (which the cathode is connected to)

I don't get why you think this.

• Thanks for the answer. I'll answer your question with a question. With a circuit like this, how would I add 99 LEDs to create a 10x10 array hooked up to 20 i/o pins of a microcontroller? Mar 15, 2015 at 2:06
• The same way you would normally do it, with one pin to each row, and one to each column. But if you have a 10x10 array, you probably want to go with a led array driver, instead of having 200 transistors + resistors. Mar 15, 2015 at 2:42
• @Passerby - What he's trying to do is multiplex a 10 x 10 array. 10 horizontal control lines and 10 verticals. Mar 15, 2015 at 3:00