Electronic – arduino – Hooking up multiple RGB LEDs while using a minimal number of PWM pins on an Arduino

arduinobreadboardledrgbtransistors

I currently have an anode RGB connected to the 11, 10, & 9 PWM pins on my arduino. However I would like to add 3 more LED's to my project, but I don't want to necessarily take up every single PWM pin (I still want to attach a shield). Is there a way for me to hook up all 4 LED's & still be able to only use a minimum number of pins? Keep in mind that I do want to use all 12 resistors for the 4 LEDS. Oh and all the LEDs will do the exact same thing (They all will be red, and all turn blue, etc) if that helps.

Here's how my board looks right now:

enter image description here

I have three NTE123AP transistors I can use for this project.

P.S. I attached the .fzz file so that if any of you would like to edit the schematic image, it would be super easy. In fact that would be better since I'm new at this, and it would be easier to follow! : )

Best Answer

Fairly simple. Just using npn transistors. Duplicate per color channel.

enter image description here

Your transistor can sink up to 600mA continuously. At 20mA per led, 4 per channel, that's only 80mA. That's more than enough.

But make sure your power supply can support that. 80 * 3, that's 240mA on the leds alone, not including the rest of the arduino, the transistor base, anything else you are using.

OP Provided a Fritzing Diagram of the answer as well: enter image description here