Can arduino do this and, if so, what's my study path?

Greetings all! I am completely new to Arduino (just finished my first version of the "Blink" program :slight_smile: ) and I want to know if Arduino can do the following. If it can I'd like to know so that after I finish my first tutorial guidebook I'll know what kind of tutorials or knowledge to seek out!

Okay, so what I'm working on is a coffee table with LEDs in it. Basically it will be a 2'x4' rectangle with about 75 LEDs placed in the table underneath a glass sheet. What I'd like to be able to do though is write some sketches that control what lights are lit at certain times. So I'd like to be able to turn on all 75 lights, or cycle through the lights one at a time, or have the lights "chase", or light half of them, or blink a just the ones on the outer perimeter of the table, etc...

I think I'm asking if the Arduino can control many more lights than it has outputs? I think pinball machines do this my using what's called a "light matrix" where they have up to 64 lights controlled by only 16 wires in an 8x8 setup. Does the Arduino allow for anything like this?

If so, what is this called so I know what to start studying!

Yes, you can do that.
Here is one example.
http://arduino.cc/forum/index.php/topic,8664.0.html
Also look up Charlieplexing.

Its called multiplexing ...
the lights are not actually all on at once, it just looks like that because the flash so fast

You could do 75 in 3 blocks of 25 in 5X5 configuration, obviously that is just one option.

it go's like this ...
Enable block 1, scan through the columns 1 at a time and control LED's with the rows.
Then disable block 1
Thats 5 scans,
Now do the same for blocks 2 and then 3.

Other options
There are display chips specifically designed to do this for huge displays, many are addressed, controlled over a network.
I am no expert but if you start looking at these concepts you will find the info you need.
keywords, multyplex, matrix controller.

If you want specifics look for lighting display controllers they use a protocol called DMX

Its called multiplexing ...
the lights are not actually all on at once, it just looks like that because the flash so fast

It doesn't have to be. If you add enough shift registers you can have them on all the time or even dim then.

http://www.elcojacobs.com/shiftpwm/

ironspider, I think multiplexing is not ideal if you need to turn on 75 LEDs at the same time. Instead, look for shift registers. The 74HC595 is very popular for Arduino:

http://bildr.org/2011/08/74hc595-breakout-arduino

And you better use an external power supply for powering all your LEDs, the Arduino won't be powerful enough and you may damage it...

Good luck :slight_smile:

For your next step look at "blink with out delay".

Mark

look for shift registers. The 74HC595 is very popular for Arduino:

The '595 is OK on the logic front but it still needs high-current drivers and resistors for every LED.

Have a look at one of the many functionally similar/equivalent shift registers like the TPIC6B595 (high-current but still needs one resistor per LED) or the TLC5916 (only needs a single resistor for each 16 LEDs).

There are also chips that can drive a heap of LEDs, the AS1130 for example can drive 132 of them and there's a thread here where someone has been using it and so presumably has some code.

EDIT: Found the thread

http://arduino.cc/forum/index.php/topic,122138.0.html


Rob

Something like this?
http://macetech.com/blog/node/93

I Absolutely agree that the shift register technique is a valid, possibly good, method of building a flashing table but it is still multiplexing.

Multiplexing is a term that refers to strategies that permit a single output/input to be used for more than one task by varying its functionality over time.
Mux and DeMux, multiplex and demultiplex, are recognised methodologies used for a vast array of tasks.

Think of it like this ...
You have some stuff to manipulate but you have more stuff than you have control lines.
The solution is to reuse your control lines as many times as it takes to manipulate all your stuff.
It is fundamentally impossible to access all the stuff at once because you can only talk to a 'control lines' worth of stuff at any one time.
However if you do this quickly enough it may not matter, it largely depends on the application.

This is true however it is physically achieved and also just as valid for inputs as it is for outputs.

Going a step further ...
If your individual items of stuff are capable of latching in a particular state IE they are bistable like a a switch, not the momentary button type which is astable
then you control can be tristate meaning that on any particular scan you can set, reset or ignore a given chunk of stuff.
You still only get to talk to chunks of stuff every so often but when you aren't talking to them thy say the way you last left them.

Addressable systems are really just complex forms of multiplexing but are distinct in the way they operate requiring some processing capability within a chunk of stuff.
You still send a string of commands which chunks of stuff respond to and still you only get to command one chunk of stuff at a time.
The only exception to this in addressable systems is that you may have the option to issue global command to which all chunks of stuff respond.

OK now I know that doesn't affect the fact that you may want to implement a sketch based on shift registers but it is always good to understand what you are doing in the broadest sense. Any form of multiplexing is a compromise and how it is achieved is likely to affect the results.

Hay even your Arduino IO is multiplexed in the purest sense ...
The processor only handles one register at a time so it is not possible to switch on a bit in port A at exactly the same time as a bit in port B.
The time difference is so small that it usually doesn't matter, but it could if the application was sensitive enough.