1
\$\begingroup\$

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:

enter image description here

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)

\$\endgroup\$
  • 1
    \$\begingroup\$ What's the voltage of Vcc and whats the voltage of Va and Vb ? \$\endgroup\$ – efox29 Mar 15 '15 at 0:14
  • 2
    \$\begingroup\$ It would be better to use a PNP for the upper transistor. \$\endgroup\$ – Majenko Mar 15 '15 at 0:15
  • \$\begingroup\$ 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 \$\endgroup\$ – efox29 Mar 15 '15 at 0:18
4
\$\begingroup\$

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.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ 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? \$\endgroup\$ – Mike Miller Mar 15 '15 at 7:01
  • \$\begingroup\$ 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. \$\endgroup\$ – Mike Miller Mar 15 '15 at 7:45
  • \$\begingroup\$ Yours could work with more drive voltage but that's probably less convenient to provide than just using complementary transitors as above. \$\endgroup\$ – Spehro Pefhany Mar 15 '15 at 12:58
  • \$\begingroup\$ 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. \$\endgroup\$ – Spehro Pefhany Mar 15 '15 at 12:59
  • 1
    \$\begingroup\$ 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 :) \$\endgroup\$ – Mike Miller Mar 16 '15 at 1:10
1
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

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

schematic

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.

\$\endgroup\$
  • \$\begingroup\$ 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? \$\endgroup\$ – Mike Miller Mar 15 '15 at 2:06
  • \$\begingroup\$ 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. \$\endgroup\$ – Passerby Mar 15 '15 at 2:42
  • 2
    \$\begingroup\$ @Passerby - What he's trying to do is multiplex a 10 x 10 array. 10 horizontal control lines and 10 verticals. \$\endgroup\$ – WhatRoughBeast Mar 15 '15 at 3:00

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.