Instructables

LED Matrix Coffee Table

Picture of LED Matrix Coffee Table
matrix driver daughter board.jpg
Back of table - wiring.jpg
top view matrix wiring.jpg
Wired LEDs.jpg
cells.jpg
glass placed.jpg
chequerboard pattern.jpg
Some construction shots of my Arduino-controlled 8 x 8 LED matrix LED coffee table.

sam5 years ago
-Great project, I thought about doing this with only 9 segments to save cost and wiring, but your design is much more elegant. Can you make any sort of pattern, or is it limited to a checkered, all on, all off sort of thing? I'm having a hard time understanding how the LED's are being multiplexed- am I right in thinking that it turns them on and off at very high rates to achieve what seems to me like magic? Is it just those 4 wires connected to the LED's or is there a ground or something underneath that I can't see? Sorry for all the questions!
trialex (author)  sam5 years ago
Norry worries - sharing is caring :-)

It can display any pattern you like. At the moment I have it running Conway's game of life. Here's a crappy video of some random patterns


The MAX7219 does all of the multiplexing magic. Yes you are right that they are turned off and on very quickly to make it look like they are all on at the same time. The MAX7219 chip turns on one row at a time, then the next row, then the next row etc.

Each LED only has connections to it's neighbours. This is a classic matrix configuration.
This is a great build. Does your Game Of Life code auto restart when it dies or gets stuck in a pattern? If so can you share that code with me. I can't figure out how to do that.
Thanks,
Matt
penester sam4 years ago
i agree with Turdhurler above, I want to make one.
gaitskell3 years ago
Trialex - This table is really nicely designed/built.

For the multiplex solutions being discussed below - if you are switching the LEDs on and off row by row to get the overall effect - won't that decrease the apparent brightness of the LEDs when ON very significantly? Decrease by a factor = 1/(number of rows)?

Is there an LED solution that works with the Arduino that keeps the ON state of the LEDs even when the other rows are being addressed? I assume this would require every LED to have a separate driver pin?
trialex (author)  gaitskell3 years ago
Yep, you are right in how multiplexing works.

BUT, the driver chip just compensates for this by driving the LEDs a bit more harder than normal. This means they are brighter, and the whole matrix is brighter.

Overdriving them is OK, because as you say, they are only turned on for 1/8 of the time.
Thanks for the reply. After we posted that question, inspired by your table, we built the Peggy 2 (evilmadscientist) - 25x25 LEDs. I understand your point now concerning max transient current, versus continuous current.

For the 10 mm diameter, white LEDs we used in Peggy 2, this is 90 mA transient vs 30 mA continuous. The only downside to setting the current supply >30 mA is if your software crashes (or has a logic error) before the next multiplex step switches off the LEDs - you can blow them. Did you worry about this for your software?

trialex (author)  gaitskell3 years ago
(Sorry my reply was very slow - I was on an extended holiday)

No, I don't have to account for it because I have a driver chip between the micro and the LEDs - a MAX7219. So I send the pattern I want once, and the driver chip displays it (using multiplexing) until I send a new pattern.

The advantage of this is that I don't have to worry about continually updating the matrix in software, and it frees up a lot of pins on the micro. The disadvantage is that it costs more, and can be less flexible - for example the LEDs are on/off, no grayscale control (although of course there are LED driver chips that can do this)

I'd love to get a peggy - the project that uses it as a video display is incredible.
This is an elegant solution. Your guidance is helping me become more familiar with the options.

I looked at the Maxim data sheet. A MAX7219 ~$13 in single quantities - can control 64 LEDs. Am I correct in understanding the following?

(1) It will drive 40 mA max per LED/segment.
(2) With 64 separate LEDs the chip will refresh all their states at about 800 Hz. I am assuming that at max intensity the LEDs are on approx 1/8th of the time - since there are 8 banks of 8 LEDs each? ( For the large/bright LEDs transient currents (10% duty cycle) of ~100-150 mA are permitted - if 40 mA is the max for this driver then one is giving up some brightness there?)
(3) For intensity control it uses further time modulation at 1/32nd resolution. The intensity is set globally for all 64 LEDs. You can't change the relative intensity of the LEDs separately.
(4) You are of course free to determine if each LED is either on or off through serial commands.
(4) The serial interface for sending updated state information for each LED runs at 10 Mbit/sec max, with each command taking 16 bits. So the time to write a command to change the on/off state of an LED is 1.6 us. To send the instructions to change the state of all 64 LEDs (unlikely, but limiting case) say would take approx 100 us. This is fast enough to not be a limitation, even for an LED array with many updates. Or am I missing some aspect of the communications overhead?

For the Peggy2 type display 25x25 one would need 10 of these chips, which is ~$100-$130 so I understand your comment on cost. Dedicating a micro-controller to handling display updates, with some discrete electronics is the more budget option? Although the programing to get the desired visual update behavior is also a challenge...

On the other hand in principle a LED display driver could drive the LEDs much closer to their maximum brightness (if it can supply the rates maximum transient currents) without fear of software crashes causing LED burn out?

Did you ever come across a version of this kind of display driver chip that allows different intensities on the LEDs, and also handles a larger number of individual LEDs (>>64) at a lower cost per LED?

Thanks for the discussion, Rick
It is probably a little late and you've completed your work already, but the chip is less the $2 @
http://www.taydaelectronics.com/servlet/the-788/Display-Drivers-serially-interfaced/Detail
trialex (author)  gaitskell3 years ago
Yep, interesting stuff! Sorry for the slow replies - haven't got great net access at the moment.

You know more about this / have a better understanding than me. I just muck around 'till something works.

So the best I can do to answer your questions...

(1) I think so yes
(2) Sounds good :-) All I know is that the LEDs seem just as bright being driven my the 7219 set to the max current as when I fed them individually with a 30mA source. Of course, the human eye isn't a great judge of light levels.
(3) Correct - you can dim/brighten the whole thing at the same time only.
(4) Yep - The libraries I used made it easy to either update a single LED or the whole thing at once.
(5) You sound a LOT more knowledgeable about this than me! I'll just say that I've never had a problem with update or refresh rates.

The TLC5940 and TLC5916 chips seem to be popular for driving LEDs when dot brightness is required. In fact they are often used for RGB matricies where the brightness of each R/G/B LED is adjusted to mix a colour. Both though are designed to control 64 LEDs, but can be daisy-chained. I think they run about ~$5 in quantity, so still not cheap for a larger matrix.

I doubt you could do something the size of the peggy for any cheaper than what EMSL have done. They have very cleverly pushed the hardware and software limits of the micro.

Thanks for the response. Again, very useful.

Do you feel able to publish the schematic (or just a hand sketch) of how your circuit for the coffee table was put together - doesn't have to perfect, but enough info to highlight any subtleties. I just want to make sure I don't have any misunderstanding of how to work at a practical level with the MAX7219. (I'm also going to look at the data sheets of the TLC5940 and TLC5916.)
vishalapr2 years ago
This is soooooo ultra cool, have a look at mine as well
http://www.instructables.com/id/Star-Wars-X-Wing-2/
bman224 years ago
i just realized. Do you think if i put two of the 5000mcd leds in there it would be enough. i found out that the superflux are between 2800mcd and 25000mcd. do you know which you have? Can you tell me how much you paid for them, cause those range are selling for between about 1-5$ each with a quantity of over 50 at mouser. I cannot afford paying more than about 40 total
tony112 bman224 years ago
hey, I just saw your problem with the pricing of LED's. Check out this seller on E-BAY seller named " jeledhk". I have been dealing with these people for about a year now, buying many many LED's from them. They are AWESOME people to work with, the only problem, is that they take approx 2 to 3 weeks to receive. However, they are brand NEW LED's for a third of the price anywhere else...Take care
bman22 tony1124 years ago
great. i ordered 100 70,000mcd red led's from them. only $30. My next question is where did you get the opaque sheet that covers the top (and what is it? glass?). i would prefer to buy things like that locally, so if you got it from someplace like homedepot, i will be happy.
trialex (author)  bman224 years ago
I got mine locally - I rang up local glass suppliers in the yellow pages. I doubt you will find anything suitable in a shop. It will need to be custom, unless you start designing/building your project around what you can already get. Peices of square, opaque glass are not an in-demand item, therefore will not be easy to find pre-made.

The glazier I talked to was very helpful. He showed me different types of glass and finishes. I ended up going with two sheets of 3mm thick glass with some white plastic sandwiched between.

He also made a template by tracing my frame. This meant it all lined up exactly when the glass was cut, rather than him just cutting a 800mm square which would have probably been more square than my frame.

The edges are also proffesionally bevelled.

All up the glass cost AU$160, which is sounds not cheap, but really it's worthwhile.

Also it's heavy - take precautions.

(Seriously how much is the "reply" button confusing on this site - I see so many examples of people replying to the wrong comment.)
You could have saved a great deal of money just buying .220 plexiglass and sanding the bottom side to create the opaque look, while maintaining a nice, flat, polished surface on top....it would weigh much less as well.  ;)
trialex (author)  solpredator4 years ago
Plexiglass? No way that would look as good. It'd be impossible to hand work the underside to get perfectly uniform finish over that large a surface area.

Also you'd be suprised at the cost - it'd be at least half if not more of the cost of the glass.

There is a place for it, and I have used it for other LED projects, but for a coffee table that is displayed all the time glass is the only way to go.
trialex (author)  bman224 years ago
"Superflux" doesn't really mean anything - it's a generic term that once was a brand name from one manufacturer for their high-brightness 4-lead LED. Since then many knockoffs use that name.

Using two LEDs per cell will increase the brightness, however, this will make the circuit significantly more complex. If you put them in series, you'll need to increase the supply voltage, if you put them in parallel, you will need to double the supply current. If you think you can overcome these design issues, then go for it.

The LEDs I use were "rated" at 20,000mCd, but that was definitely a lie. I bought some 20,000mCd LEDs from a reputable LED shop, and they are significantly brighter than these. As usual it's a trade off - you could buy some off eBay, they will be much cheaper, but probably not as bright. Buying from mouser they will be brighter, but obviously more expensive.

Do not expect any LED to be particularly bright during the day. Also, the diffusing material you use will have an effect on the final result. A more opaque material will more evenly distribute the light, preventing bright spots, while a more translucent material will be brighter.

Good luck, and post your results.
bman224 years ago
You wouldn't happen to know the light output in mcd of these LED's. I can't afford the official superbright's measured in flux, but I found some LED's up into 5000mcd, and I am wondering if I even have to pay $25 to get the LED's. (I'm buying 2x what I need. Its much better value that way, and I could use the extra LED's in case I want to make another), so knowing the mcd value could save me a fair bit of money, and having to be pissed when I find they are not bright enough
wkumtrider4 years ago
Is it possible to get detailed instructions on how to build this and where you got your parts? This thing is sweet!
DirtMcGurt5 years ago
This looks great! I second the request for a full write up and maybe even a video. A few questions as I'm still pretty new at hobby electronics: 1. How are you driving all those leds off an arduino? I recently made a led cube and I had to limit myself to a 3x3x3 because there weren't enough pins to directly control a 4x4x4. How hard would it be for a novice to interface a led driver with an arduino? 2. Are those custom led modules you're using there? They look a little like blinkm's
Check out this instructable: http://www.instructables.com/id/Charlieplexing-LEDs--The-theory/
It's called charlieplexing. Each row of LEDs and each column acts as one output or ground connection. Thus, you can drive many LEDs from several pins.
trialex (author)  DirtMcGurt5 years ago
Definately custom "modules" - but really they are just a single superflux LED. No brains at all - BlinkMs have their own microcontroller under the LED

Check out photo 2 - it's the MAX7219 LED driver. The chip is specifically designed to do all the hardwork of interfacing an LED matrix. It is very easy to use - needs only 1 extra component - a current set resistor. There is a lot of excellent code out there to drive it from an arduino.

P.S. Here's my 3x3x3 LED cube http://www.flickr.com/photos/92064251@N00/3126318178/
crapflinger5 years ago
would be neat to get a full Ible on this one ...looks like a little easier method than the others i've seen....also a parts list and a wiring diagram would be neat
i agree with Turdhurler above, I want to make one.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!