Multiple LEDs on one pin - Best Way?

I want to make a light show with LEDs. I've got a breadboard with one LED (avec resistor) for each of 13 channels, controlled with Vixen using some Arduino code I got from an instructables page. So yeah, I really know what I'm doing. :stuck_out_tongue: That is working great, but I want to make a diorama of Radical Highway, with anywhere between 1 and nearly 50 LEDs on each channel. I'm sure I can't just wire them all up in series or parallel, they'd prolly need their own dedicated power source with the Arduino being a valve control. Relays are exactly what I could use, but they are loud and clicky. That's why I love them, but not so good for a musical light show. There's solid state relays, but... what are those, exactly? Or maybe I could rig something with transistors, but how? And maybe that IS what a solid state relay is. And before all that, how could I calculate what power supply I would need, and how would I divide that power to different levels for each channel? Some, would have 40-50 white ones, while others might have 5-10 purples. Any help at all would be much appreciated.

If you have no more than 64 LEDs you can connect a MAX7219 and control from the Arduino with just 3 wires - clock, data, latch.
Multiple MAX7219s can be daisychained, with each driving 64 LEDs.
Each chip needs 5V, and ~160mA. Only 8 LEDs are on at any one time, but they are switched at 800 Hz, and persistence of vision lets your eye see any that are on as being on at the same time.

Well, unfortunately, I don't have the time or money to order something like that. This is for a school project, and school is done in two weeks. Plus, I wouldn't know the first thing about re-working the Arduino code to have it work with that.

Okay, then make strings of LEDs, 4-5 each with a resistor, and as many strings in parallel as needed.
Power from 12V.
Each string will need 20mA.
Use a basic NPN transistor such as 2N2222 or 2N2222A, can sink current up to 10 strings. Use a 220 or 250 ohm resistor between Arduino pin and NPN base. Emitter to Gnd. Collector to the bottom cathode of the LED string.

Ok, so lemme get this clear:
Each individual line of LEDs would need to be capped at 5, but I can branch out from each transister as many as I want.
My power would need to be 12v and amps would be 20mA * number of 5-LED strings.
Now, when you say Emitter to Gnd... There's the ground of my Arduino (Uno, by the way), and the ground of my 12v power supply. Would it be gnd of the power supply? So there only be one wire from the Arduino to the LED rig, from the output pin, through a resistor and to the transister base, per channel? Just a one way line? No ground for the power outta the output pins... or all that power will be eaten by the LED array. Hm.
And, having to make them into 5 LED strings would lead to quite a mess of wires, but I should be able to make it happen. I got loads of Bell wire.

12V, strings of 3-5 LEDs depending on their Vf and Vce of the NPN transistor.
Voltage across transistor 0.3 to 0.7V.
Low Rds, Logic Level N-channel MOSFET, can be .05 ohm (50 mOhm), voltage loss will be much smaller.
Example:
http://www.digikey.com/product-detail/en/AOI518/785-1569-5-ND/3152481

Ok, well, I'll get back to that in a bit. New thing: purple LEDs. They seem to be nearly impossible to find. I just got some rated for 395-400, and say their UV but also make visible light. Thing is, they look blue. The cast a purpleish-blueish light, but still. I found this website I can quickly order LEDs from, but I don't know what nm to go for. Apparently, if I want to get more purply then blue, I gotta go closer to UV, but this already is UV! Or maybe that's the problem. I mean, I've seen purple LEDs in ready made products, but I'm not going to buy a buncha computer fans just to rip LEDs from 'em. And, surprisingly, there doesn't seem to be any web widget to just type in a wavelength nm and have it show you the colour for it. Note - The purple I'm going for is this arrow sign on the right:

Try some of these
http://www.superbrightleds.com/cat/through-hole/
Or maybe use a blue & red together. Adjust the current flow to the color you want.

Well, here's one from a website that can ship to me quickly and cheaply. The one you sent had a nm rating of 460, which, according to spectrums, would make it more... blue? This one has the highest nm level there and still be called purple, at 407.5.

There's also this other website with 420nm ones... http://www.ledsupply.com/leds/5mm-led-purple-420nm-15nm-degree-viewing-angle The site you gave apparently can't do quick shipping to Canada, but this one can. I e-maild them the same picture, asking if it is around that shade. In the mean time, I gotta start making the street lights with the white LEDs I have, but I can't find my dang bell wire!

You might also consider using an RGB LEDs, mix the Red & Blue via current control to get the shade of purple you want.
As you are in Canada, try these guys:
http://www.dipmicro.com/store/index.php?act=viewCat&catId=511
I am in eastern Massachussetts, shipping to me from Niagara Falls area has been very inexpensive, they cram a box full of stuff and mailing cost is like $3.

Well, if I were to get RGB LEDs I'd just get 'em from a retail store, but would some sort of current regulator be worth making, and would the light from the different diodes in there actually mix together well enough at the small scale I'll be building in? I'm still not even 100% sure on that transistor controller thing you showed me. But I'm still gunna save comprehending that for later because I got purple to worry about, and I can't even build anything yet because I can't find wire. Everything is against me. People are being graciously helpful, but all these things...

Yes, you can get whatever mix you want with correct resistor selection.

BenAgain:
Now, when you say Emitter to Gnd... There's the ground of my Arduino (Uno, by the way), and the ground of my 12v power supply. Would it be gnd of the power supply?

All are the same thing. The ground of the Arduino is (must by definition, be) connected to the ground of your 12V power supply which is where the transistor emitter connects. Should be no confusion there.

Now as to the LEDs. Ultraviolet LEDs have the highest voltage drop, at least 3V, so allowing for a few volts for the current limiting resistor (which will have to be determined by "trial and error" anyway, starting with a value about 1k and measuring the current with a meter set on the 10A range), you can only use three in a chain from 12V. You could use five per chain if you power it with a 19V laptop surplus power supply.

Ultraviolet LEDs have the same drop as white LEDs, because they are the same, except for the phosphors in the white ones.

Now, as to "purple", two things are being confused here. Genuine deep purple at the low nm values you quote, cannot be represented on a computer screen because it is not the same as a mix of red and blue, so is not the same as what a RGB LED produces. OTOH it is not as visible either because the human eye sees colour in much the same way as a computer screen (or RGB LED) displays it.

So there you go!

So I’d get a power supply to plug into the Arduino’s power supply socket that’s 12v and a good amount of amps (correct me if I’m wrong, but for amps it just needs to be >= the amount needed, just not ridiculously more), but I’d also be tapping straight into it for the LED array? And included is a still-rough-but-slightly-more-in—depth picture of what I think I gots to do with them transistors.

Paul__B:
All are the same thing. The ground of the Arduino is (must by definition, be) connected to the ground of your 12V power supply which is where the transistor emitter connects. Should be no confusion there.

Well, I was thinking of two things. I guess I’m meant to do the top one (of the second picture)?

Arduino Powers.PNG

Schematic looks ok, if "R/W" is the barrel jack and 0D is Gnd.
Not sure what the paint drawing is.

You can also use darlington array chips-they may be cheaper and you won't need base resistors.
ULN2003
ULN2004

Their dropout voltage is a bit atrocious though-but for your application, it might not be a problem.
Solid state relay is basically a transistor (a mosfet, usually) or other power device (tyristor, triac), triggered in a way that ensures galvanic isolation. Optical insulation is the most common choice in such applications.

CrossRoads:
Not sure what the paint drawing is.

That's me asking about how to put power all up in there. The top one has the LED bundle and the Arduino being powered by a 12v supply while the USB connection is just for data. The bottom has the LEDs being the sole recipiant of 12v and the Arduino being powered by the USB line, with the only connection being from the I\O pin to the transistor's base. Basically I'm asking whether they must share a power supply and ground.

BenAgain:

CrossRoads:
Not sure what the paint drawing is.

That's me asking about how to put power all up in there. The top one has the LED bundle and the Arduino being powered by a 12v supply while the USB connection is just for data. The bottom has the LEDs being the sole recipiant of 12v and the Arduino being powered by the USB line, with the only connection being from the I\O pin to the transistor's base. Basically I'm asking whether they must share a power supply and ground.

You ALWAYS need to tie all your grounds together when you have other connections in place. DO NOT tie the positive rails together. Other than that, up to you.

thegoodhen:
You ALWAYS need to tie all your grounds together when you have other connections in place. DO NOT tie the positive rails together. Other than that, up to you.

Soo… like this?

Arduino Light Example C.png