8x8 grid comments?

Hi there,

I'm relatively new to this stuff and the physical side is my weak point.

I want to light up an 8x8 grid (spread over a space of a few meters squared rather than a PCB). I've been looking at the SHiftOut tutorial (http://www.arduino.cc/en/Tutorial/ShiftOut) and I assume that I can either extend it as is, or run another pair off other pins to make 64 outputs? In particular I'm wondering about current etc over longer distances.

Assuming that I can, is there anything else that I ought to be aware of before getting started? Ideally I'd like bright LED's, and maybe from there RGB ones. Control over the LED's will initially be via code but the next stage is to mirror inputs from a capacitive sensor or drive them from some other source (noise would do)

THanks folks

Spreading a matrix over such a distance could be a problem. Apart from a small LED being widely space the normal way of driving a matrix is by multiplexing. This is a problem with long leads as the capacitance in the long lines causes a natural speed limit on the multiplexing and so you might end up with flickering because you can't drive it fast enough.

However, if you use a shift register to give you 64 solid outputs that would not be a problem. Keep the shift registers close to the Arduino as well as the current drivers, then use long wires to connect up the LEDs.

That's what I'd planned on doing - if it can be honoured with the title of plan at this early stage.

Is there some kind of magic formula to figure latency (or distance I suppose) out? I haven't got to the touchpad part yet so there might be an issue there, but initially it could be controlled via serial inputs and I guess 56k would be fast enough for keystrokes over a (say) 10m serial cable from the PC to the arduino and it's PSU?

THanks for the quick response

Is there some kind of magic formula to figure latency

No it depends on the speed of your data and the capacitance of the line and what voltages you are using. RS232 uses +/- 12V and should be good over 10 meters. You would struggle to get TTL over that distance as fast as 56K. The slower the better, 56K is quite fast for this sort of thing but should be OK.

Not quite but ALMOST on your scale is the 8x8 LED matrix I made that I use as a coffee table. Overall size is about 1 metre squared. I think you should use the same scheme with small boards with the LED connected in a matrix configuration. This minimises wiring.

I use an arduino to control a MAX7219 driver chip. There is HEAPS of code out there to control this driver. Note that it is single colour only, but you'll probably want to start that way anyway.

The LEDs are spaced approx 100mm apart. I made small boards for each LED to make the wiring neater and re-wiring easier. You could just use little bits of perf board and solder the wiring - I went fancy and used connectors which meant I had to cut, stip, crimp a crapload or wires.

The photos of it working do not do it justice - looks much better in real life.

Flickr set: http://www.flickr.com/photos/92064251@N00/sets/72157606001892106/

Another thing to watch out for if you're multiplexing LEDs (or PWMing them to control brightness) is that the square waves going through those long wires can generate significant RF interference. Remember that you'll be transmitting currents a couple of orders of magnitude greater than what goes through an RS-232 or Ehternet cable.

Ran

Hi Ran,

So is that something that can be dealt with by using shielded cable or some other method?

Thanks

Hey Trialex,

That's pretty cool - and in fact I have a coffe table at home with a glass top that would be perfect for this. My original idea is for the wall outside in the yard (hence the size) but this would be fun too.

The diagram mostly makes sense (or I over-estimate what I know). At 8 quid a go I hope I don't blow too many up :-) I may very well ask more questions on this.

Thanks!

One more question (didn't take long!). The chip specs say

Voltage (with respect to GND) V+ ..................................................................-0.3V to 6V DIN, CLK, LOAD, CS .........................................-0.3V to 6V All Other Pins......................................-0.3V to (V+ + 0.3V) Current DIG0–DIG7 Sink Current...........................................500mA SEGA–G, DP Source Current......................................100mA

so I'm hoping/guessing that a bunch of LED's with Forward V of 3.4-3.8 and Forward Cur of 20mA would be ok? THe docs also imply that a single resistor would be ok? I think something around 85o would be ok for standalone usage would this need to change?

I'm really stumbling along here so thanks again for the help :-)

Yep those LEDs would be no problem at all.

Choosing the Iset resistor seems to be an art rather than a science. Try what you've got, then play around with some nearby values.

Have you thought about which library you are going to use to drive it? I think the LedControl library is the best, and wayoda, the author, visits these forums regularly

http://www.wayoda.org/arduino/ledcontrol/index.html

I hadn't but that looks pretty straightforward - and with scope for expansion when I get delusions of grandure.

Unless you can think of anything else that might trip me up (this is my first project after some simple stuff - single LED interfaced to a heart rate belt so that it beats in time and a couple of tutorials) that should be enough for me to get cracking.

Cheers

Sounds good.

Guaranteed you'll stuff up the wiring the first time, and at least have a row or two out of place.

At least when you make up the matrix yourself using discreet LEDs and wire it's easier to see which row is which. When you use a pre-made LED matrix, they have crazy pin mubring and it's almost impossible to get working first time through.

Well, the M5451 seems a bit less popular than the MAX probably because the MAX drives those strobed 64 LED PCB arrays which are so easy to buy. But they aren't really artistic are they? You really have to pay the piper and run a lot of wires to include lights within a sculpture or table. In this case I think that the M5451 is a good bet.

You get 35 constant current outputs per chip. I managed to cram 2 of them onto a shield board just a bit bigger than a Arduino, giving you 70 LEDs which should fit your application. I have 2 entries in my blog about it. Here's the last one http://effluviaofascatteredmind.blogspot.com/2009/02/my-first-arduino-shield-arrived.html. And go a few days earlier to see the M5451 on a breadboard. Also you can find more info in this forum in my post http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1235795499/11#11 (srch for "70 outputs").

Maybe I out to make a wiki page or tutorial or something for the M5451...hmm, how and where do I do that?

BTW they are also a bit cheaper, at about $3.50 a chip, so its less painful to fry one.

The disadvantage is that you have to run a lot of wires, which is why my shield uses IDE cable headers.

I'm anxiously waiting for an order of high brightness RGB LEDs so I can actually try this on a big display!

True - your shield is nice.

I think though if you are looking to do what the MAX7219 was designed for - i.e. a 8x8 LED signle colour matrix, the MAX chip is the easiest way to go.

As always, there are trade-offs you need to consider for any solution - complexity vs. cost vs. ease of use vs. size vs. powerfulness etc...