Arduino 8x8 led table

Hi there. I have some questions regarding building a led 8x8 table with an arduino. First of all, can i use shift registers (more specific 74hc595) to control the leds? Or it can't be done, and must use something like TLC5490. What LEDs do you suggest? I can't get diffused ones from my supplier, but i can get them at different angles. Would a 100 degree LED be better than a 30? (I think so, but i haven't seen anyone use them in these sort of projects). At lastly, i understand that in a matrix you only light up only one led at a time, so do I still need to use transistors? (i think so because, on collumn you hook up the cathode which is minus, and u use npn transistors. Correct me if i'm wrong)

Thank you in advance.

Hi, are these leds rgb or single colour? How bright to you need them to be and how big is the table? Do you want fading and colour mixing or simply switch the leds on/off?

Shift registers will only be suitable for on/off switching by themselves, bud could be used in conjunction with 5940 as part of a multiplexing design.

You can work out the led angle from the dementions of the box it will be in. A deeper box will give a more evenly lit appearance. A shallow box with a wide angle led will not look as evenly lit. That's assuming we are both interpreting "led table" as the same thing!

Not sure what you mean by one led lit at a time... that would be a 1:64 multiplex ratio to make all leds "appear" lit, which would be barely visible!

Paul

PaulRB:
Hi, are these leds rgb or single colour?
Single colour
Do you want fading and colour mixing or simply switch the leds on/off?
Swiching them on and off (I want to make patterns like in the video below, a game of pong and a game of tetris. I do have 16 pins on the arduino, including the analog ones which could be used as digital ones, but that leaves me with only 3 more for sensors, buttons, etc.)
Video example :
http://www.youtube.com/watch?v=QSvZ_oKdn5w

You can work out the led angle from the dementions of the box it will be in. A deeper box will give a more evenly lit appearance. A shallow box with a wide angle led will not look as evenly lit. That’s assuming we are both interpreting “led table” as the same thing!
I don’t know the height yet, but the top view is square with l = 7.5cm (60*60cm table). What do you suggest? 30° LEDs with a drop of hotglue or 100° LEDs with a slight deeper box.

Not sure what you mean by one led lit at a time… that would be a 1:64 multiplex ratio to make all leds “appear” lit, which would be barely visible!
My fault here. The multiplex ratio i think it is 1:8 (because i will be able to lit 8 LEDs at a time). Correct me if I’m wrong.
Thank you!

LE.
I have done some calculations and it seems like I would need a height of only 2.16cm for those 100° LEDs.
Is it correct? NO Apparently the sum of all angles in a triangle is 190 degrees :)) .
The final result is 3.14cm, i hope it’s correct now.

Your trig is slightly off: you need to illuminate your box corner-to-corner, which is 7.5 * sqrt(2) on the diagonal.

The "angle" quoted for leds is usually the "half-brightness" angle, i.e. the intensity is half the maximum at those limits. That still won't make it evenly lit. The deeper the box the better and the wider the angle the better, plus your blob of hot glue, and paint the inside walls of the box white.

As for controlling your leds, there are about a squillion ways to do this.

TLC5940 not needed, as you don't need to fade your leds.

Question 1: to multiplex or not to multiplex?

No multiplexing: you need 8 x 74hc595 shift registers, daisy-chained, 3 Arduino outputs required. Very simple to understand, wire up and code, but alot of chips.

Question 2: DIY multiplexing or "does-it-all-for-you" chip?

"Does-it-all-for-you": max7219. There is an Arduino library for this, although you might not need it for a single chip. This chip does 1:8 multiplexing.

Question 3: for DIY multiplexing, what ratio? 1:8, 1:4 (even 1:2). It all depends how bright your leds are and how bright you want the table lit. The higher the multiplex ratio, the dimmer the output, for a given current. You can boost the current, but there will be limits imposed by whichever chips you choose.

Some combination of one or more 74hc595, possibly with ULN2803 or a bunch of transistors, or perhaps TPIC6B595 (which is like a combination of the two). Arduino pins: anything from 3 to 11 depending on the design.

Once you have chosen the leds, let us know their spec. (forward voltage & max current).

Don't let all these decisions put you off. Even 1:8 multiplex ratio will probably be bright enough. I built an led 4x4x4 cube with max7219 and it was plenty bright enough.

Paul

Yes, i totally forgot about that. I have to redo the calculations. The LEDs i think i will use are these : http://www.tme.eu/ro/Document/0db71466ffafa5186233e25e86795419/WW05G3SGQ4-W%28ver2%29.pdf Foward voltage min 2.8 max 3.4, max current 20mA.

The problem is that its luminosity is 10times less than a normal 30 degree angle, but maybe inside are the same and only the lens differ. I was thinking of multiplexing with 2 74hc595 shift registers, as it's far a cheaper solution. The problem is that I'm not very good at programming so I will have to look through some other examples regarding multiplexing with this chip. I just hope that it isn't very complicated to integrated patterns and games like tetris / pong. Also i was thinking of using BC639/640 for every column/row.

MAX7219 and high brightness LEDs will be a great combo. $1.25 from www.taydaelectronics.com Maybe put a pin pong ball over each LED for some extra diffusing. http://www.dipmicro.com/store/LED5W for example or http://www.dipmicro.com/store/LED5R http://www.dipmicro.com/store/LED5Y http://www.dipmicro.com/store/LED5B http://www.dipmicro.com/store/LED5G

Use 3 MAX7219, one each driving Red, Green, Blue, have 15 levels of color control too.

Those LEDs have very narrow viewing angle (15~25°). I tried the thing with the ping pong ball on a RGB led a while ago, but it is too thick and doesn't let much light out. I'm from Romania and the only place where i can find MAX7219 have a price of 4-5$ per one compared to a few cents for the 74hc-s.

Thank you for your response thought.

Will tayda electronics ship to Romania? Is very inexpensive to the US. Try them.
The LEDs, well, do what gotta do.

It's about the time it takes to ship, otherwise I could just use ebay. The question now is if it's hard to program pong and tetris with the 74h-s, considering that there are already some examples for these. If so, i will have to postpone my project about a month until i can get my hands on some MAXs.

If your programming skills are not great at the moment, the max7219 will be a little bit easier than using shift registers, because the chip does the multiplexing for you. But using either max7219 or shift registers will be far easier than programming a game like pong or tetris! When your programming skills eventually reach that level, using either max7219 or shift registers will both seem very easy.

For animated patterns, once you have the multiplexing working, the difficulty of using max7129 versus shift resisters will be about the same.

The bc639 transistors will be fine. But you will need to solder up 8 of them, plus resistors etc. ULN2803 is like 8 transistors in a chip, so will save some time and wiring, and they are very cheap. TPIC6B595 is like a shift register with the transistors built in, so will save even more time and wiring, and they are cheapter than max7219. But max7219 would be easier still.

CrossRoads, those max7219 from that website are very cheap. I suspect they may be "fake" in that they are not genuine Maxim chips. It may well be that they will work OK. I purchased some fake ones from an eBay supplier and they work great. But I have also heard of people having serious problems with these fakes, so its definitely "caveat emptor" at that price. By the way, I know how to tell a real from a fake from a good picture...

Paul

I found TPIC6B595 on the local supplier and I think I will go with these. Now it's just a matter of waiting for the ordered parts to come and work on the software side. Thank you Paul for all the help you have given me so far.

Icamaster, did you order some 74hc595 also? Did you read the data sheet for tpic6b595? They are only for the anode side, they cannot source current, only sink it. You will still need 74hc595 for the cathode anode side.

Paul

I have used several batches of MAX7219 from tayda with no issues.

TCIP6B595 sinks current, they connect to the cathode side of the LEDs. Something else must source current to the anodes.

Good spot CrossRoads, I said cathode when I meant anode above - thanks!

Those max7219 from tayda - do they have a little dimple next to pin 1? Are the pins at the extreme ends the same width (at the top) as the others?

Yes, i also ordered some simple 74hc595 + pnp transistors for the + of leds (anode). Is it ok?

Yes, simplest option will be to use 74hc595 for anodes and tpic6b595 for cathodes. You can daisy-chain the two chips so only 3 arduino outputs needed. You will need series resistors for the leds in each column.

I have a concern. The 2 driver ics will each drop some of the supply voltage, perhaps a volt per chip. If your leds have a forward voltage of around 3V, they may not light...

“Dimples” - TPIC6B595s have a normal looking recess between pins 1/20, and a small flat circle between pins 10/11.

74HC595 sucks for sourcing current - use a 24mA capable part like cd74ac164.
Turn off cathode sink, send out anode info, turn on cathode sink.
Use SPI, sends it all out nice & fast.

cd74ac164, 20mA high output shift register.pdf (597 KB)

CrossRoads: "Dimples" - TPIC6B595s have a normal looking recess between pins 1/20, and a small flat circle between pins 10/11.

The dimples question was in relation to max7219!

Ah - will have to look.

I can still modify my order as it hasn't been shipped yet (just got confirmation). Given the specs in the previous page, what resistors would you suggest for leds? I want to be on the safe side (i want them to last me ) but in the same time i don't want to compromise brightness. So... should I use 120 or 100 ohm resistors?

FV : min 2.8 max 3.4 FC : 20mA

I think with 100ohm resistors I will be on the safe side (3v per led) but I want to make sure.