Issue with driving multiple LEDs via transistors

arduinolednpntransistors

I am attempting to individual control multiple LED-based light sources via PWM. Now I am somewhat familiar with transistors and their usage, and had no issue setting up one instance of this control scheme. However when I added more transistors to the circuit, I ran into a problem. It seemed that only one PWM signal, would control all of the lights. I am new to schematics and schematic design so I could use some help figuring this out. The schematic, as I think I built it, is below.

schematic

simulate this circuit – Schematic created using CircuitLab

The wiring was done with this article as reference, specifically the "light" example.

The power source is 12V 6A, which is more than enough to drive the lights I am using, which are 12V LED boards. I won't be using an Arduino in the final implementation, but I am using it currently for testing, so assume that is where the PWM is coming from. Oh, and the transistors are TIP31 NPN units.

As I said previously, the issue is that when using the circuit, the lights will only respond to one PWM signal and they will both use that value seemingly. Otherwise it works just fine. My only thought is that it could be an issue with them sharing a common ground? But if so, what is the best way to isolate them?

Best Answer

The article you referenced uses MOSFET transistors, not a BJT like the TIP31. The big difference is that a MOSFET is a voltage-triggered (high impedance) device while a BJT is current-triggered (low-impedance) device. The result of this is that with an NPN transistor, you need a series resistor to limit the current flowing from the arduino IO pin through the transistor base. Without this, you are likely to damage the Auduino and/or the transistor. Try putting a 510 ohm resistor between each source and base and remove the pulldown resistors.