Around 50 RGB Leds... Possible???

Hello, I began a project here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1207502723/5#5

I'm stduying technics about control around 50 RGB LEDs

Do I need more than one LED Driver like that : http://www.arduino.cc/en/Tutorial/LEDDriver ???

What kind of LED must I buy?? I found a lot but several seem to have a blinking circuit (I don't need that,I'll control it with max/msp probably... via serial or other way)

any ideas?
advices?

I’m a little lost… :-?

Well, im quite the noob myself, but i plan to control 4 TLC5940 LED Drivers thru max/msp, and that way have 64 LED:s under my command. All thru serial programming, i still havent really figure out how to access the different drivers etc. though.. But thats a tip for you anyway, the TLC5940 can have 16 induvidual channels for LED:s.

wow it seems to be a great thing. :D

did you already buy and test it?

The TLC should arrive today or so, but theoreticly it should work. Just have to figure out how to drive it entirely thru max, with serial.

ok steffensen,

and how does it go with Arduino Board (or Wiring board) ??

The 4794 IC can only control 8 LED's and not RGB LED's.

You can connect many 4794 together to control more Led's with 4 Arduino pins.

Try to search the forum for info on controlling many RGB LED's it has been discussed serveral times.

The short version is that you have to consider each RGB LED as 3 individual LED' s and control them that way.

Pretty much like the link u provided above, and here is a little more information about the TLC: http://www.arduino.cc/playground/Learning/TLC5940

ok. but for the newbie, it isn't easy.

I mean: does it exists examples, tutorial?

I have to buy one TLC? or more for my future 50 RGB Leds ?

http://www.arduino.cc/en/Tutorial/ShiftOut

It may be the solution.

are my 50 RGB Led's = 50*3 Leds ?? Any advice to control RGB Leds? I mean, I found a lot of different RGB Leds. Have you pre-requisites in order to make me controlling all R, G & B channel? I only want to have around 4 or 5 colors... no more.

The MAX7219 is a popular choice for driving up to 64 LEDs.

Assuming your RGB LEDs are actually 3-LEDs-in-one, with 4 legs, then 3 x MAX7219 would do the trick (one 7219 for Red, one for Green, one for Blue).

150 LEDs switched on simultaneously is going to use a lot of current though. In the worst case (all directly connected to the supply) 150 of them @20mA is 3 Amps! The 7219 time-multiplexes them very quickly though, so you don't see them flicker, but even then with all 64 LEDs on the datasheet says it draws 330mA. So you should supply at least 1A to your circuit overall.

Code and tutorial here http://www.arduino.cc/playground/LEDMatrix/Max7219 plus plenty of others around the web. You need to make sure you initialise all the registers properly in your code before you do anything else. I also recommend putting a 10k pull-down resistor on each of the 3 inputs to the chip.

Some further reading (based on basic stamp but the principles are transferrable):

http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv70.pdf http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv70.pdf http://www.parallax.com/dl/docs/books/sw/exp/sw29.pdf

Alternatively if you feel like spending US$650 (or can negotiate bulk discount) you could use 50 BlinkM's communicating via two-wire interface. This would be super-easy to wire up: just an arduino, the BlinkMs and some wire. Sparkfun have them http://www.sparkfun.com/commerce/product_info.php?products_id=8579

thanks a lot mungbean ! I begin to understand the tips.. in the http://tomekness.files.wordpress.com/2008/01/max7219_tutorial_pre_c.pdf we can understand that

I need to know if I'm right: with this tip, I can drive 64 monochrome LED with one max7219. For 64 RGB LEDs, I need 3 max7219. Conceptually, if I want to make one led of the matrix : - blinking in red or b or g - change from red to blue etc will it be possible??

I guess I'll have to code a function that "convert" data from max/msp in data understandable by the Arduino (or wiring) board.

As i havent started testing this myself yet, i cant really much advice, but this seems useful regarding max: http://www.milkcrate.com.au/_other/downloads/max_patches/Three_595s/

And of course the playground: http://www.arduino.cc/playground/Interfacing/MaxMSP

The maxduino (a really good patch imo) seems to do most of the basics, but im not sure how i will have to edit it for work with registers, perhaps a combo of the "three_595s patch" and the maxduino would work.

Keep us updated how u get along. :)

I need to know if I'm right: with this tip, I can drive 64 monochrome LED with one max7219.

For 64 RGB LEDs, I need 3 max7219.

yes, and yes.

Conceptually, if I want to make one led of the matrix : - blinking in red or b or g - change from red to blue etc will it be possible??

Yes.

I'm assuming you'll use RGB LEDs like this one: http://www.sparkfun.com/commerce/product_info.php?products_id=105

It has 4 legs, one is common and the other 3 are for red, green and blue. So it's effectively 3 LEDs in one package. If you want red, you turn on the red and turn off green & blue. Same for G or B. Magenta is R+B, Cyan is G+B, white is R+G+B, and so on.

With the MAX7219 you can turn individual LEDs on or off. Or you can vary the brightness of all of them at the same time. You wouldn't be able to vary the brightness of individual LEDs (unless you went for the the expensive BlinkM option).

Changing from red to blue just means turning off the red LED and turning on the blue one - which is controlled by a separate 7219. So you would have to send commands to each chip.

Blinking LEDs would be done by turning them off and on in the arduino's software, using its timing functions.

I guess I'll have to code a function that "convert" data from max/msp in data understandable by the Arduino (or wiring) board.

You haven't said what configuration your LEDs will be in, but since there are 50 I'm assuming it's not a matrix. (the 7219 often drives an 8x8 matrix.)

Nevertheless you might find it helpful to represent the LEDs in each display as binary numbers, where a 0 in the number means off and 1 means on. This is known as a bitmap. You could have 3 x 50-bit binary numbers to represent your whole display. Since 50 bits takes up 4 bytes anyway, in practice you would have 3 x 64-bit numbers, which you can send from Max/MSP to the arduino through Max's serial object. Then read in the numbers on the arduino using Serial.read() and send the relevant commands to the 7219.

Hope this is starting to make sense!

Is it possible to drive the TLC5940 in the same manner?

I'm assuming you'll use RGB LEDs like this one: http://www.sparkfun.com/commerce/product_info.php?products_id=105

It has 4 legs, one is common and the other 3 are for red, green and blue. So it's effectively 3 LEDs in one package. If you want red, you turn on the red and turn off green & blue. Same for G or B. Magenta is R+B, Cyan is G+B, white is R+G+B, and so on.

yes, I understand. additive color building.

With the MAX7219 you can turn individual LEDs on or off. Or you can vary the brightness of all of them at the same time. You wouldn't be able to vary the brightness of individual LEDs (unless you went for the the expensive BlinkM option).

Changing from red to blue just means turning off the red LED and turning on the blue one - which is controlled by a separate 7219. So you would have to send commands to each chip.

Blinking LEDs would be done by turning them off and on in the arduino's software, using its timing functions.

ok If I understand correctly, I have to "build" functions in Wiring AND in Max/MSP in order to make a "protocol" I mean "own protocol"= I send 001000 from max, The board understand led1off..... ledn On etc

You haven't said what configuration your LEDs will be in, but since there are 50 I'm assuming it's not a matrix. (the 7219 often drives an 8x8 matrix.)

Nevertheless you might find it helpful to represent the LEDs in each display as binary numbers, where a 0 in the number means off and 1 means on. This is known as a bitmap. You could have 3 x 50-bit binary numbers to represent your whole display. Since 50 bits takes up 4 bytes anyway, in practice you would have 3 x 64-bit numbers, which you can send from Max/MSP to the arduino through Max's serial object. Then read in the numbers on the arduino using Serial.read() and send the relevant commands to the 7219.

ok. I understand these concepts.

The project can be that:

I could remove the last line. not sure. btw, there is a matrix of 8x6 (or 8x5 as I wrote above)

the other leds should receive other kind of information. But I guess they may be involved in the same matrix for easiest process. the source of led information will be make in Max/MSP. (I guess... ?!)

Hope this is starting to make sense!

it definitively starts to make sense! I have to thank you very much.

But......... as usual in this kind of question, I have other questions ....

How could I chain my 3 (or more) MAX7219 ???

I'll buy very soon all the parts (+ 3 or 4 breadboard to prototype that...)

I'd like to follow that: http://www.arduino.cc/playground/uploads/Main/MAX72XX_Schematic.jpg

BUT I'll use 3 Led drivers one for each color of my RGB led matrix I'll only use 8x5 (or 6) matrix

who could help me with schematics ? I'll have a buttons matrix too... and power supply issues.. I'm too low skilled :-[

julienb,
As we’re on a similar path here (im assuming ure heading for a clip matrix for Live right?)
then you might get inspired and helped by this guy’s amazing work:
http://www.upwardnotnorthward.com/

Im trying to follow his line of work, just waiting for him to reveal the schematics etc.

Live Clip matrix! yes

the hardware part isn't the most difficult.. but Mdk on http://groups.google.fr/group/liveapi?hl=fr published a lot of code and test and it works fine on windows OS

I'll try to design a schematics cause I understood the concept of MAX7129 LED Driver. I hope I'll succeed and it helps you or other person

My Main problem: power supply... :-[

I got my TLC5940's yesterday, and im gonna start experimenting with'em today. Those chips seem to be made for this job, just hope i can figure out how to code them right.