Wiring l.e.ds to "chase"

Alright this is my first post and after a few days of searching and researching I felt I should create an account and open a new topic. To the mods, if this is in the wrong place I apologize.

I'm looking to build a beer pong table and wanting to outline the triangle for the cups in l.e.ds that "chase" one another or "bounce". I am a complete rookie with this the only l.e.d work I've done is replace all interior lights in my car with l.e.ds. I didn't even have to wire them, I bought them prewired with resistors and all. So I know no terminology really so if anyone would have a write up with pictures or anything? I'm wanting to make the lights chase each other around the triangle and/or start at the top point and run down the sides, meet at the middle on the bottom and bounce back to the point and so on and so on.

I simply chose to come here because I saw the arduino name everywhere, just couldn't find anything I could follow. Thank you everyone in advance for any and all help

I believe this is a section where you could learn to make led lights chase etc. The famous Knight Rider effect.


Can I not rep you? I'm thinking that's what I'm looking for I really appreciate it

Although I dont understand "code", basically what I'm reading is wire the l.e.ds in place, wire them to a breadboard and resistor, then wire to the arduino and type in a code? How is this done and does that sound right? Thanks again

That is exactly right. You create a layout with leds. Connect them together, then to the Arduino. On your computer you create a programme in the arduino development interface, called a sketch and when done with the sketch upload it by usb-cable to the Arduino. The Arduino runs then the leds for you. To get an idea you could watch this video: http://www.youtube.com/watch?v=4uFrFR31z8s Lot's of video's to be found, about LED controlled by Arduino. I love the LED Cubes :)


Awesome thanks much! One more question if you don't mind, I'm about to order the lights and arduino. I'm probably going to use 30-40 lights per side. So 70-80 total can the arduino support that many or would I need to use multiple boards?

That depends on if you need to control each of those 80 LEDs individually or as groups. If groups - how many? To control multiple LEDs check out this link


What would you guys recommend? I'd imagine groups? All leds in one triangle as one group and the others in a group?

It depends on how many LEDs you wish to have all on or off at the same time. I have no idea what a 'beer pong table' or it's 'triangle' is so I can't help you. Texy

I would go for 2 groups, assuming you want to control them independant from each other. The ammount of leds you can control with one Arduino are limmeted. At some point you have to multiplex / use a matrix. It depends as Texy wrote how many LEDs you gonna use. Also instead of using single LEDs, you could use a LED-strip. There are even waterproof LED-strips, might come in handy with a beerpong table :) To get an idea about what you want, draw your beerpong layout on a piece of paper, draw in the leds and look around if you can find a matching project. Cause you could make the circles by laying the LEDs out in that way, or you could group a few LED's in a flashlight-reflector and shine from underneath.

So I just ordered 400 l.e.ds and I'm thinking I'll use ~75. 25 for each line of the triangle, I also bought a "solderless breadboard" and some wire. So do you guys think the Arduino could handle 75 l.e.ds? If not any ideas on what could? Also are resistors a must have because I have no clue as to what kind to get, so any help on that would be appreciated.

Thanks again for taking the time to help me out with this I do appreciate it

Did you read the link I pointed to a few posts up?


The Arduino can control the leds but you'll need some extra chips and an external power source enough to power 75 leds.

The extra chips can be as simple as a bunch of serial to parallel shift registers all connected one to the next and power. The Arduino communicates to the first one and feeds it bits that can go from one to the next until they're all filled up, in about no time flat. All the bits fed in and latched make the output pins go either OFF or ON and each one can drive a led, of course needing its own resistor. Allelectronics.com used to sell leds with built-in resistors for 12V operation... they still might. Those average 50 cents each though.

With a circuit like that your code only has to send strings of bytes to the shift registers to make the lights 'go'.

In the meantime, you've set yourself up to do a lot of learning.

Yes, Texy, I did I just can't wrap my brain around it. From what I've read and what GoForSmoke said, I need an outside power Source. Is that what the Texas Instruments product is on the link you shared?

Thanks GoForSmoke I appreciate the help, I don't know how to word this or ask it, but what kind of resistors do I need? I mean do I need a certain one I see these different ohm resistors and I have no idea which ones would be needed?

No, the link shows how to control multiple LEDs from a single chip, or from multiple chips daisy chained to increase the led count. For an idea of how much current you will need in total multiply the number of LEDs by the current each one needs, typically 10-20mA. There is lots of info out there on LEDs and how to calculate current needs and the resistor values needs, just google it. Texy

The resistors are there to keep too much current from going through the leds. For a straight 5V to ground with a standard 5mm red led the normal answer is use 220 ohm but I find that bright and go with 470 ohms.

And there's a bigger reason to use the resistors. For the current to be drawn through a led it comes from a pin. Arduino pins can take having 40 mA drawn through their circuitry but 20 mA as a practical limit is smarter. 5V / 220 Ohms = 22.7 mA. You can take that straight to ground without burning your pin up. More resistance only makes less current draw.

Until you learn Ohm's Law and some corollaries I think you will be between cookbook and experiment. In that case, more resistance makes the light dimmer and much less resistance might make it real bright for a very short time.

Here's a lot of already typed info on using leds: http://www.daycounter.com/Calculators/LED-Tutorial-Calculator.phtml

Not all leds are the same. It's best to check. If you can't and don't have a meter then start out with a high value resistor and go to less resistance until the led is bright enough. If it needs to be massively brighter then look at ultrabright leds and then the big high power leds that need heat sinks.

If the led chase is to be a simple pattern like for every 5 leds in a row, only one is on then you only need 5 pins, 5 transistors with 1 resistor each and a resistor for every led. You'd connect each pin through a resistor to a transistor powered by external power supply with enough Amps to power 1/5th of your leds at once and the output from each transistor go to the 1st, 2nd, etc, led and resistor in every group of 5. Your Arduino would turn 1 pin on at a time in sequence, wait long enough for the light to be seen (1/10th of a second?) and switch to the next, over and over. I chose 5 because your number of leds divides well by 5.