multiple rgb leds with shift registers

any1 done this before? I'm lookin to daisy chain some shift registers to do say 100 rgb leds :wink:

Shiftregister are best for On / off only.

If you need to control the intensity of the individual colors (= colormixing) on the RGB LED's then shiftregisters are not a very good solution because you need to implement the PWM in software.

It is possible, but not easy and it will eat some of the brigthness of the LEDs.

Also implementing PWM in software with 300 LED's is probably going to give you noticable flicker.

A better solution is to use some of the PWM LED driver chips, but they are not exactly cheap.

And finally, to drive 100 RGB LEDs (=300 LEDs) you will need 38 shiftregisters.

ah i c...well it was an idea would be neat to do :wink:

I seen some pages that use shift registers with multiple rgbs.

edit:
im gonna try some TLC5940 chips

Yes, I've made a thing using 96 RGB LEDs with 12 shiftregisters for the LEDs. Actually I'm not finished programming the thing yet (TTT), but the display works :slight_smile:

In my case it's organized as 6 matrices of 4 by 4 LEDs each, hence 2 shiftregisters per matrix. Using 4 bits as row multiplexers, which really is identical in all of them, so I could have saved some shiftregisters (two or three). But I wanted to have them identical. Besides it fitted nicely with 2 bytes. Then the rest is 4 bits of R, G and B.

I haven't really tested the limits yet, but I have tested with 8 PWM levels with no problem (no flicker), probably could up it to 16 at the cost of slowing down processing power for everything else. Using a timer interrupt for the software PWM, and direct port access for speed. However, for my main use I only use about 3 or 4 PWM levels. So I choose to use shiftregisters.

Like MikMo says, there are PWM LED driver chips, but they are not as cheap (don't remember price right now). But, unless you really do daisy chain them, you won't need 38 of them to drive 100 LED's, if you organize them in some sort of a matrix. At the cost of some brightness, and maybe speed (though with 38 daisy chained I don't know about speed).

So yes, it's possible with shiftregisters. But if you are looking for smooth transitions / color levels, probably not, but, as stated, I haven't tested the limits on my thing yet, and its not the only way of doing things of course. You might also want to check out marklar's thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1254488619 (and probably tons of others about the same topic). I have an earlier version posted here, for an 8 by 8 RG display (not perfekted): http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1256090448

Another thing to consider, is the evenness of the LEDs. In particularly some of the blue colors are very different. And you got the experiment to find the best series resistors for each color, that mixes the best (to produce white). In my case, I found 1 k ohm for red and blue, and 390 ohm for green, to work nicely with a 5V supply. Also, use LEDs with a diffuse lens (not clear).

As i said it is possible to do the PWM in software, and people have done it, so you could try it out on a smaller scale with say 20 RGB LEd's first, and see if it is too slow / flickering.

The 5940 IC is $$$$$ (cheapest i have seen is around 8$) and can drive 5 RGB LED's (one pin left over)

Macetech (run by a forum member here) has some TLC5947 IC s for sale for around 5$ a pop. Each TLC5947 can drive 8 RGB LEDs.

Only problem is that the IC is SMD type, but if you can solder SMD then it's a possible solution.

EDIT:

rarons post came in between. He knows better than me about software PWM.

I done some thinking... I dont need alot..
Couldnt I just wire some rgbs in series and have a mosfet or h bridge handle the current and PWM the logic pin 0-255 to vary the voltage level?
Really all it will do is I'll use a button debounce to turn/off/dim the rgbs.

You would still need 3 PWM pins and 3 mosftes if you want to change the color, and then all the LED's would always have the same color.

I did something similar with one of those flexible RGB LED strips, i just used an ULN2003 darlington array instead of the Mosftes, and 3 PMW pins to set the "voltage" (with PMW it isn't really voltage but pulsewidth) to each of the 3 colors.

Don't forget the current limiting resistors !!!

Couldnt I just wire some rgbs in series

No these have a common connection (normally anode), you can't wire common anode RGB LEDs in series, think about it.

I'm fixing order some off eBay why not use clear lense? The supplier I got from before I had gotten 200 uv LEDs and they included resistors.
The brighter the better.

I'm fixing order some off eBay why not use clear lense? The supplier I got from before I had gotten 200 uv LEDs and they included resistors.
The brighter the better.

Perhaps, if brightness is what you want. It depends on a lot of things (efficiency, viewing angle, etc), for one-colored LEDs it might be brighter with a clear lens? At least it doesn't matter as much. For RGB LEDs, its usually not the best. The colors mix better in a diffuse lens. In a clear lens, you can see the separation (individual colors) inside the LED better when mixing them, especially if you are close enough (even with a diffuse lens you can do this, but at least it's better).

But it depends on the application. For those bright high-power LEDs for illumiantion, it probably isn't as important (as you won't be looking straigth at them, or at least shouldn't. I've never used those though, nor clear lens types for RGB).

Also, I forgot to mention, as to my particular resistor values, they are ment to be very current limiting and thus the colors are not so bright as they could have been. Your use might vary.

Went with difused LEDs. Seeedstudio has the ti led pwm chip. I'll order one for now