Controlling multiple RGB LEDs

Hi all Arduino people,

I want your advices as I’m changing my kid night lamp to use RGB LEDs.

I already have some normal comman cathode RGB led and want to use about 4 of them where I should be able to change the brightness and color of both 4 leds, no issue to have each of leds addressable or not.
Only color and brightness will be great and I don’t know how!
I don’t think my micro could handle this case alone where using transistor as I think will make it like a switch for each color on/off only with no brightness control.

Kindle if you have a solution for such case I’ll appreciate your share.

If it is for a night light, why do you need 4 rgb LEDs? If you use only one rgb led, then the Arduino pins will be able to supply enough current.

If you use two RGB LEDs, you can connect them to pins 3,4,5 and 9,10,11 and control colour and brightness of each led separately.

You could connect 4 rgb LEDs, but you would need to increase the series resistors to reduce the current, and the result would be that the 4 LEDs would be the same brightness as 2 LEDs.

If you need maximum brightness for 4 LEDs, then you would need transistors. You would still be able to control the colour and brightness, using transistors does not prevent that. But I think 4 LEDs at full brightness would be too bright for a night light.

If you must have all 4 LEDs at full brightness, then common cathode is the most difficult type to use. Common anode would be more easy. NeoPixel LEDs would be even more easy.

Hi Paul,
I really appreciate your answer it helps me a lot.
I did the job with transistor as you mentioned and it was great. However I’m now try to understand how to handle the brightness for the RGB led, the Hue issue.
Thanks so much.

Hi. Can you post a schematic showing how you wired everything up? Hand drawn is ok.

Also please post your code so far. Use code tags.