I am not using an Arduino for this project, but I think it is irrelevant anyway.
I want to have 40-50 LEDs in a circuit, hopefully, all able to be turned off and on individually... I have 8 pins I can work with...
I was hoping, that if 8 pins were enough I could use a 3 color LED which would move me to 120-150 LEDs, all individually controlled.
Is this even possible? Does anyone have any examples I can see, or know what I would need to create this circuit?
Thanks so much!
if you just want binary on off controlls, id reccomend shift registers. http://www.arduino.cc/en/Tutorial/ShiftOut just wire the led like you would three seperate led's and with as little as three wires you can keep daisy chaining them for as many as you need.
I was just looking into using a shift register, however, I would be giving it power at 12 volts... Do you know where I can get a shift register powerful enough for that?
Thanks so much for your reply.
This one will sink 150 mA. http://www.sparkfun.com/commerce/product_info.php?products_id=734 You can source 12V and tie the grounds together. It's based on the 595 so the tutorial applies.
8 Pins give 256 combinations therefore it is possible using multiplexers to control up to 256 LEDs.
With a shift register you get to go to an unlimited number simply by cascading them. You can always increase the current capability of the shift register outputs by using transistors or Darlington arrays.
I read up on multiplxers, because the 8 pins only output 5v I would only be able to light about 8 LEDs at a time this way, correct?
Do you know where i can find a multiplexer?
Would I be able to daisy chain these?
because the 8 pins only output 5v I would only be able to light about 8 LEDs at a time this way, correct?
No with 8 pins you could light 128 LEDs. 7 pins to define what LED and 1 pin to say if it is on or off. See addressable latches, these can control 8 LEDs but you can cascade 16 of them using two multiplexers to give you 128 addressable latches.
Use two 74LS153s to give you one of 16 data select lines to enable the 16 74LS259s.
But as I said before :- With a shift register you get to go to an unlimited number simply by cascading them. Use 74LS595, one for every 8 outputs you need.
What about LED Drivers? With Shift registers hes going to need 18 according to Grumpy's example. One Max 7221 LED Driver can control 64 LEDs and there is an extensive library for them as well. If you can live with the cycling (which you should be able to if the LEDs are just indicators), LED drivers are the way to go.
Where can i buy an LED driver?