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:
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:
- Am I trying to use the NPN BJTs completely incorrectly?
- 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?
- How can I adjust this circuit to achieve my goal? Should logic level MOSFETs be used instead?
Reference:
LEDs: https://www.cree.com/led-components/media/documents/C512A-WNS-WNN-942.pdf
BJTs (2N3904): https://www.fairchildsemi.com/datasheets/MM/MMBT3904.pdf
Resistors: https://www.amazon.com/gp/product/B07J48VNR7
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!