Nativity set light controller - CC RGB leds

Hy guys,

as my first project out of the breadboard I've build a basic shield for drivings with a ULN2003A some Leds within a sequence and with fading effects for 3 independent channels. Until now everything fine.. :)

Here you find details on the "shield" http://www.networksoul.net/2010/11/arduino-nativity-set-led-light-controller-hardware/ and the first sketch: http://www.networksoul.net/2010/11/arduino-nativity-set-led-light-controller-%E2%80%93-led-fading-effects/

Now I want to add sunrise and sunset effects with RGB leds. I purchased some 4 pin common cathode 8000 mcd RGB leds.. by mistake.

I have one 3 PWN pins left and the need to control at least 10 leds.. so i need to amplify the current.

I will need to drive the 3 anods (Positive) of each led, can I add a 3 PNP transistor attached to 3 output of ULN2003A (that in an array of NPN transitor)? PWN Pin -> NPN Transistor -> Resistor -> PNP Transitor -> Led -> GND If yes which kind of transistors would you use?

Thank you!

can I add a 3 PNP transistor attached to 3 output of ULN2003A

You can but there is not much point because you can connect the PNP transistors directly to the arduino output. Base through a 1K resistor, emitter to +5v and collector to the resistor that connects to the anode of your RGB LED.

I purchased some 4 pin common cathode 8000 mcd RGB leds.

What is the current you want to drive them with, this will affect the transistor you need.

Hello Grumpy_Mike,
thank you for your answers.

You can but there is not much point because you can connect the PNP transistors directly to the arduino output. Base through a 1K resistor, emitter to +5v and collector to the resistor that connects to the anode of your RGB LED.

Ok, but can i use analogWrite Function on a PWM pin (draining current)?

What is the current you want to drive them with, this will affect the transistor you need.

I want to drive 10 RGB Leds with 20mA for each colour for a total of 200mA for R,G and B.

Thank you again!

but can i use analogWrite Function on a PWM pin

Yes

You should be able to get away with a 2N2222 for that. Each anode of each colour of each RGB LED needs it's own current limiting resistor.

Thank you Grumpy!

I’ve some 2n2222a … this evening I will try.