Sounds like a job for TLC5940. 16 LEDs per device, PWM control on each one. 3 would drive 48 LEDs.
Check the playground for a library to use them.
Datasheet at ti.com
The PCA9685 also controls 16 LEDs this one has the advantage of being I2C controllable so it is easier to locate them further away from the arduino. Its disadvantage is that it is a surface mount device.
I started building a prototype with a multiplexer, but I could start see some visible flickering on 20 Leds - probably my poor code than anything else.
No issue having the chips close to the arduino, since it is planned that after the prototype each led will be fed into an amp to power a load of them.
So I have a related Project, I join the thread…
We rebuild the rooms of our kids and par of that is to have -at least- one room, which should be illuminated mainly from indirect lights in the corners. To have an idea, something like this: http://www.wanderleben.de/wandgestaltungen/
I think we end up in about 10 “lamps”. Each of it should have the possibility to fade from 0 to 100% brightness and fade to all the colors. So I will have to control RGB in each.
Most likely I will have different number of LEDs in each lamp (think of lamps for light and lamps for ambient light e.g.)
Something like this:
-one controll for the lamps: ALL, Lamp1, Lamp2,…
-1 controll for each color brightness (moving all controls simultaneous should than be the brightness of white light, I think)
-nice to have: brightness separately
First I thought of doing this by controlling all LEDs (40, at least) directly from a arduino, but I think there are better ways
As long, as the lamp control isn’t switched to “ALL”, each lamp should stay in the last status chosen before.
Example:
control is switched to lamp1, I choose 50% blue for that. Than I switch over for Lamp2, an choose a 70% yellow for that, while Lamp1 stays in 50% blue.
Until I switch to “ALL” and illuminate the room with e.g. 100% white by raising all color controls to 100%
maybe.
Some questions, reulting from my beginners state and non-native english (I'm german).
The sample code is just for one Shiftbride.
Does the "SB_CommandMode" address the divice and register of it? (is there a sample code for at least 2 devices)
So I would need a "data" bus of 4 lines as signal and a 2-wire "powerline" to run an "unlimmeted" number of ShiftBrites, right?
And I'd like to find a distributor for them in germany (to avoid "tax-office terror")