2
\$\begingroup\$

I have an LED multiplexer circuit (inspired by https://www.instructables.com/id/Multiplexing-with-Arduino-Transistors-I-made/) in which I have set the resistor values to maximize the current through the LEDs (without exceeding the maximum forward current through the LEDs or the maximum power dissipation in any of the components). It looks like this:

current circuit

current circuit with I labels

The R1, R2, R3, C1, C2, and C3 pins are Arduino digital pins while the 5V pin is the 5V from the Arduino. I have this circuit assembled on my breadboard and it works as expected. (Though please let me know if there is anything atrociously bad about it).

What I want to do is add a potentiometer between the 5V pin and the collectors of the Q-RX NPN BJTs so that I can vary the LED light level from off (or almost off) to "full brightness". It seems to me that this should work in theory. When I replace the 5V pin with GND in my simulation, I get ~0 current through the LEDs, which is what I want:

However, when I test with a single LED enabled and I unplug the 5V pin from the Arduino, the LED dims some but is still fairly bright. I measure ".001 A" with my multimeter (I get 0 with it set it to mA). This must be from current flowing from base to emitter of the Q-RX BJTs. I have been trying to re-familiarize myself with how transistors operate, but I need some help here to understand this. A few questions:

  1. Am I trying to use the NPN BJTs completely incorrectly?
  2. Why does my simulation (I'm using OrCAD Capture Lite) show ~0 current through the LEDs when I can measure it at ~1 mA and there is obviously enough to light the LEDs?
  3. How can I adjust this circuit to achieve my goal? Should logic level MOSFETs be used instead?

Reference:

Side note: I just noticed that my simulation shows ~54 mA at the C1, C2, and C3 pins which exceeds the 40 mA Arduino pin limit, but that is besides the point.

Any help is greatly appreciated! Thanks!

\$\endgroup\$
3
  • \$\begingroup\$ Examine this to start out. Some is covered there. Also, a book by HP called "Optoelectronics:Fiber-Optics Applications Manual", 2nd edition, might include lots of useful information to help with this and into the future of similar projects. \$\endgroup\$
    – jonk
    Commented Dec 9, 2018 at 1:16
  • \$\begingroup\$ This design is hopeless since base current * hFE gain is shared by 1 or more LEDs. The only thing that might work with this Matrix is a regulated at Vf and low RdsOn logic level FETs (<1 ohm) \$\endgroup\$
    – D.A.S.
    Commented Dec 9, 2018 at 3:34
  • \$\begingroup\$ I would go with the Cree C503D-WAN. Better efficiency so you can lower the current or have a greater range of brightness. Use scan frequency and on pulse width to control the brightness. You are not using a constant current so the max pulsed current will be higher than 25 mA (C512A) 20 mA (C503D). Pulsed current can go as high as 100 mA with either of these Cree LEDs. I would go along with @Jasen on using current limiting resistors, whereas some believe it's okay to use the Aurdino pin as the current limiter. And Tony's FET is a good idea as well. \$\endgroup\$ Commented Dec 9, 2018 at 3:59

1 Answer 1

2
\$\begingroup\$

First off your matrix has no current limit on the LEDs you need to add resistors, where you add them depends on how you intend to use the matrix. That instructible has these resistors in the "anode" circuit vetween the collector and the LED anodes. that's suitable for when you turn the rows on one at a time and then light some LEDs on each row.

Am I trying to use the NPN BJTs completely incorrectly?

Not completely incorrectly, but you need to remember that a BJT also looks like a pair of diodes when it's not amplifying signals.

so with "V+" disconnected the BJT will pass the current that arrives through "R-Rx" on to the LED with the BJT grounded via a resistor the B-C diode of the BJT will divert some of the R-Rx curren to ground causing the LED to dim.

Why does my simulation (I'm using OrCAD Capture Lite) show ~0 current through the LEDs when I can measure it at ~1 mA and there is obviously enough to light the LEDs?

Q-Cx can generate negative voltage on the collector due to internally generated photocurrent thus making enough voltage to light the LEDs. I don't think any simulators will simulate this very minor transistor effect.

How can I adjust this circuit to achieve my goal? Should logic level MOSFETs be used instead?

Use PWM to dim the LEDs. I see a matrix:so I'm guessing you've figured out how to scan a matrix. when you want the LEDs dimmer just do each row (or column) faster and then wait for a while before doing the rescan.

you probably don't need trasnsitors on both the rows and columns which ever. is active in parallel doesn't need transistors (but does need resistors), the microcontroller can make enough current to light the LEDs, but where the currents group together you need the transistors.

R-Cx seem to be very low resistance, those resistors would be better used between the collector and the column. put 1K resistor in their place (on the base of the Q-Cx)

\$\endgroup\$

Your Answer

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

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