# Multiple leds

I know you can control leds with a Arduino but question is, is there a way to control a bunch of leds with a Arduino lets say like 500 or so. And if so what hardware do I need to do it? All they need to do is go from off to 50% switch to 100% with no fade and back and a trace (follow) animation. All controlled by separate buttons 1 for off 1 for 50% 1 for 100% and 1 for trace. I am new to the Arduino but love it so far.

This has been asked 100 times. Use the "search" box at the top...

To do a chase sequence you need at least three groups of LEDs. The Arduino can easily control brightness on six groups. Because you want 500 lights you may want to go for 5 groups of 100.

If you put all the LED's in parallel and drive then with 5V you will need a current limiting resistor for EACH LED. You can put LEDs in series and use one current limiting resistor for each string but the necessary voltage gets high. Usually you will want to use a combination of series and parallel to keep both the voltage and number of current limiting resistors to a reasonable level.

This calculator gives you choices for how to wire your array given the LED specifics and the supply voltage available:
http://led.linear1.org/led.wiz

fungus:
This has been asked 100 times. Use the "search" box at the top...

I have been looking and have found nothing on what I am trying to do but thank you.

Here’s a test board I am building up that that has 100 LEDs.
Will have 20 shift registers eventually, 1 per 5 bits arranged in columns.
All individually addressable, shift out 20 bytes every 5mS using

``````digitalWrite(ssPin, LOW);
for (x=0; x<20; x=x+1){
SPI.transfer(displayArray[x]);
}
digitalWrite(ssPin,  HIGH);
``````

Can use PWM on the the shift registers to control brightness of the array.
The LEDs are not on here, the flash made them look like that.

The other way is to multiplex control them from a matrix, 24 x 24.
Write 24 anodes, sink 1 cathode.
Write next anode pattern, sink the next cathode.
Repeat 22 more times.

Advantage: less hardware needed, just 6 8-bit shift registers, part like TPIC6A595 (www.avnet.com) for the cathodes can sink 350mA per output (higher if pulsed for short times, 100uS) so limit the anode current to 350ma/24 = 14mA. 74HC595 for the anodes, can’t do 8x20mA anyway.
Disadvantage - less bright, with each column only on 1/24 of the time. High brightness LEDs are pretty darn bright tho, so that may be okay.
Example:
White ø 5mm Clear LED Extra Bright 20,000mcd - dipmicro electronics

Another option is to get an addressable strip and use 2 wires from the Arduino to control it (plus two for power). Something like these: