Instructables

Yet Another Daft Punk Coffee Table (5x5 LED Matrix)

FeaturedContest Winner
Picture of Yet Another Daft Punk Coffee Table (5x5 LED Matrix)
dp4.jpg
dp.jpg
Yes, I know this has been done before, but I wanted to build my own, using as few parts as possible.  I built this as a table top or wall mount model, but it can be scaled up to make a coffee table.  I built it as a study for a more ambitious project, which will be an 8x8 RGB coffee table.  In designing this project, I wanted to keep the part count and cost as low as possible, and also to design the software for speed and minimal memory usage.

The code I used in the Arduino sketch demonstrates direct port manipulation, which is a fast and powerful alternative to digitalWrite().

Update 3/10/2011 : Finished adding the Music Synchronization section of this Instructable.
Update 3/20/2011:  I decided to build Lampduino instead of the coffee table.

Note that the flickering in the video below was caused by my video camera. When viewed with the naked eye, no scanning is perceived, and the lights do not flicker.

Music Sync Mode:
Arvid "Try (fenomenon remix)"


Syncing to Daft Punk's "Around the World:
 

 

Free-running mode (without music synchronization):













 
Remove these adsRemove these ads by Signing Up

Step 1: Acquire the Parts

Picture of Acquire the Parts
Parts List

25 LED's - I used warm white 5mm LED's purchased on eBay
5 resistors - I used 100 ohm, but the exact value will depend on what LED's you use. I will explain how to calculate in the Wiring step. 
NOTE: You may need also need 10 diodes and different resistors, especially if you are using white LED's... please the Troubleshooting section in step 3 for details.
Arduino - I used a Duemilanove clone - in Step 7, I switch to a much cheaper alternative.
wire
white foam board
.005" thick matte drafting film - I bought a sheet from a local artist's supply store.  The smallest sheet they had was way more than I needed - 24x36"

If you want to implement music synchronization capabilities, you will also need some more parts, as discussed in the Music Synchronization step.

Tools Needed

hot glue gun
mat knife
soldering iron
solder
pliers/wire cutters

The LED's I used were point source water clear.  If you don't want to deal with hotspots in your display, diffused would be better.  I had to put blobs of hot glue on mine to diffuse them.  The photo below only shows bits of the foam board, because I forgot to photograph the parts before I started.  The piece I used was about 16x20" to start with.

1-40 of 152Next »
jmaxado10 months ago
Hello
I plan to do this project using 3w leds, so I know I need to place some transistores in the circuit. But using transistores for all pins I need to change the code right.
In you case to turn a certain led on you would put one port high and another low, but using transistors I need to put both ports on.
I am thinking correctly ?
If yes where do I change the code in order to be able to use transistors ?
Thanks

José

http://www.instructables.com/id/Yet-Another-Daft-P...

The daft punk is a great instrucatble. I saw you had the same question as mine. Were you able to solve it. If yes, I am curious to know how you did it.

I have been planning to do the same thing with 3W LED's. How shall I go about it. I do know that I would perhaps need transistors for them.

What I do not know as of now is how would the circuit look like once I have made the required changes. The transistors would only be placed where you have the current limiting resistors placed ?

I am having a feeling I need 5 circuits similar to diagram #5 in http://www.instructables.com/id/Circuits-for-using...

Do you think the same ? I just want to be sure I do not burn my UNO in the process

Thanks in advance

lincomatic (author)  jmaxado10 months ago
It's been a while since I wrote this code, but I think all you have to do is change the line at the top of display() from
digitalWrite(rows[row], HIGH); // Turn whole previous row off
to
digitalWrite(rows[row], LOW); // Turn whole previous row off

and the bottom line from
digitalWrite(rows[row], LOW); // Turn whole row on at once (for equal lighting times)
to
digitalWrite(rows[row], HIGH); // Turn whole row on at once (for equal lighting times)

Also, you don't need to light only 2 LED's at a time like I did, since you'll be able to handle the current of a whole row at a time. So your display() function should look like this:

// Interrupt routine
// each time display() is called, it turns off the previous row
// and turns on the next row
byte bitMask = B00011111;
void display() {
digitalWrite(rows[row], LOW); // Turn whole previous row off

// increment row and wrap if necessary
if (++row == DIM) {
row = 0;
}

// direct port manipulation.
// PORTB is a pseudo variable for digital pins 8 to 13 The two high bits (6 & 7) map to the crystal pins and are not usable
// the bottom 5 bits are our columns. We don't want to change the other bits,
// so we first mask the bits we ignore, and then set the bits we want to light
PORTB &= B11100000;
PORTB |= curFrame[row] & bitMask;

digitalWrite(rows[row], HIGH); // Turn whole row on at once (for equal lighting times)
}

jmaxado lincomatic10 months ago
Thanks for your reply.
regarding the transistor do you have any sugestion ?
Yesterday I got some BUZ12 but I dont think it will do the trick.

José
lincomatic (author)  jmaxado10 months ago
I think it will work OK w/ your BUZ12. It handles 12A and you only need to sink about 5A per row.
jmaxado lincomatic10 months ago
I need the buz12 to control both the cathods and anoths.
I did some testing and it seams to work with only one of them.
Only when I put the negativ trough the buz12 works, if I change it it stays always on.
What the hell am I doing wrong ?

José

This is a great instructable. I am done with the sort of LEDs you have described and looks just awesome.

I have been planning to do the same thing with 3W LED's. How shall I go about it. I do know that I would perhaps need transistors for them.

What I do not know as of now is how would the circuit look like once I have made the required changes. The transistors would only be placed where you have the current limiting resistors placed ?

It would be great if you could give me the right pointers on the same. I could also see that some of the other guys also had the same query as well.

Thanks in advance

ABCreates4 months ago

Hey, I have been following your instructions, i've got the matrix to work, and all the frames play out without music sync. However when I try to use the music sync with adafruits eletrect mic all i get is the LEDs (Col 0, Row 0) and (Col 4, Row 4) constantly on. Any idea why this is happening? *Disclaimer* Newby Alert**

typomaniac2 years ago
Hey : )

i built your table with some large blue leds but they did not make bright enough light so i went for straw hat leds which seemed to be fine. For testing purposes i put one of them on a cr2032 battery with 3 V and it worked fine. I replaced one of the leds in my arduino driven matrix with one of the new red leds and was disappointed: It seems that it does only glow with much less intensity than it did before on the battery. Did i do something wrong or does the matrix work this way and there is not enough power for the maximum brightness of the leds?

thank you so much,
tm
p.S: I currently use a 91 Ohm resistor which should be even lower than the one it would need for the red ones
lincomatic (author)  typomaniac2 years ago
In order to keep the current within the alllowed levels on the Arduino, the current is limited. If you want to drive your LED's with more current, you will have to either use transistors, or add a driver IC
thank you for your answer! Oh thats bad. I have no idea how to do this. Do you know an instructable or other tutorial for a 5x5 arduino matrix like yours withh drivers or transistors? maybe i can upgrade my matrix..

thank you very much
tm
jmaxado typomaniac10 months ago
Did you ever figured out how to do this project with transistors ?
jmaxado10 months ago
Hello
I plan to do this project using 3w leds, so I know I need to place some transistores in the circuit. But using transistores for all pins I need to change the code right.
In you case to turn a certain led on you would put one port high and another low, but using transistors I need to put both ports on.
I am thinking correctly ?
If yes where do I change the code in order to be able to use transistors ?
Thanks

José
evilman21011 months ago
Hey is the TRS jack here male or female? It looks like like a female trs jack in the photo you posted but you linked male phone audio connectors in the comment below this.
lincomatic (author)  evilman21011 months ago
female
mehring1 year ago
Hey There,
I have built a 5x5 matrix and it seems to be working great in test mode. The LEDs are bright and fill the 2" squares they are in. However, when I leave test mode and go into the animation frames the brightness of the LEDs greatly diminishes. Is this due to the current limitation on the Arduino or is there something else going on within the code that does this? Any help or insight anyone could provide would be much appreciated.
Thanks.
inna255431 year ago
is the trs jack an auxillary wire? can you post a picture of it? (i would really appreciate it if you replied to this ASAP because we are doing this for school)
lincomatic (author)  inna255431 year ago
have you heard of google?
http://en.wikipedia.org/wiki/Phone_connector_(audio)
dtaylorl1 year ago
Great Instructable. I've wired it up and it is working great in test mode. As soon as I turn off test mode however, none of my LEDs will light up. I have installed TimerOne in the correct location, and the compiler does not indicate any errors, so I don't think the issue lies there. Any other ideas where I should be looking for the issue?
lincomatic (author)  dtaylorl1 year ago
It sounds like the timer isn't working. Are you using one of the newer Arduinos like the Leonardo? If so, I'm not sure if Timer1 will work.
I'm using an Uno. A problem with Timer1 makes sense since test mode works. I'm not getting any code errors though, which I get if I remove the library. Would the IDE version matter at all? I'm using 1.0.
I did a little more digging and discovered that Timer1 only works with certain pins. I had been using 3-7 for anodes and 8-12 for cathodes. Reversing this fixed the issue. Working great now, thanks again!
leandro_gs1 year ago
I really don't understand what this piece of code does. I'm trying to make a 3x3 matrix but the first column is on all the time.

if (bitMask == B00010000) {
    bitMask = B00000011; // light the right 2 columns (pins 9,8)
    // increment row and wrap if necessary
    if (++row == DIM) {
      row = 0;
    }
  }
  else if (bitMask == B00000011) {
    bitMask = B00001100; // light the middle 2 columns (pins 11,10)
  }
  else { // bitMaskIdx == B00001100
    bitMask = B00010000; // light the leftmost column (pin 12)
  }

what do i have to do to fade the leds instead blink them?
lincomatic (author)  leandro_gs1 year ago
the bits that are set to one are the columns that will light. since this is 5x5 the 5th bit is the leftmost column.
If you need to figure out what's going on w/ a column staying on all the time, try TESTMODE... it will light up the LED's in sequence. You might have a wiring error.

You have to use PWM to fade them. I don't have time to write the code for you
skeplin1 year ago
First off - thanks for the awesome Instructable! I've managed to build the display and get it running.

I'm working on a version that uses random numbers instead of pre-defined values in frames.h. However, I'm running into a snag and perhaps you can help me to figure out why.

Whenever I call random(), the display freaks out and flickers. Everything works find when that statement is REM'd. Is this a problem with the random number generator used in conjunction with the interrupt library?

Thanks!
lincomatic (author)  skeplin1 year ago
I don't know. You shouldn't call random() from withing the ISR. Maybe it's taking too long. Try to find a simple random number generator that doesn't use floats. You don't need anything fancy to just pick random frames.
Thanks for the tip! I've found an example that uses an analogRead on a pin with nothing attached to get a 0 or 1. Seems to work Ok. I've also found that I can call random() from inside the main loop() but when I call it from a function, it's too slow.
I'm building this as a table for an engineering project. I put all three files (frames, daftpunk, and timerone) into my sketchbook but when I try to upload it to my board it says "Timer1 was not declared in this scope." Help?
lincomatic (author)  TylerLjungberg1 year ago
it goes into sketchbook\libraries\TimerOne, not sketchbook\TimerOne
I asked my professor and he said the same, thanks! Also, if I want to make my LEDs brighter, how bad of an idea is it to add another 120ohm resistor to each existing resistor in parallel to only have 60ohms of resistance? How much chance am I taking as far as burning my LEDs out?
lincomatic (author)  TylerLjungberg1 year ago
You really need to figure out how much current your LEDs are rated for, and set the resistance accordingly. The main problem with brightness is the limitation on how much current the Arduino can dissipate without getting burned out, since for simplicity, the LED's are being driven directly by the Arduino. If you change the circuit to use transistors to drive the LED's instead, you can put more current through. And then you can change my sketch to drive a whole row at a time, which will increase the duty cycle so the LED's will be brighter.
DrHossa2 years ago
hi there,
i want to built the 5x5-matrix too, but first i wanted to try the animationbuilder, unfortunately the link doesn't work. can anyone tell me, if i can download it elsewehere. would be really nice to have it. thanks in advance!

and great tutorial!!! after this i'll maybe try the lampduino ;).

lincomatic (author)  DrHossa2 years ago
Sorry, it seems they don't let me upload HTML files anymore. I put it into a zip file. Please download daftpunkanimationbuilder.zip. Unzip it to daftpunkanimationbuilder.html, and load it into your web browser
thank you for the super fast reply and the upload of the zipfile!!! works great.

next step is to sand + paint the table and to find the right leds. the table already has a 5x5 grid built in, but the "pixels" are quite big. i'm going to buy a few leds and try, if i can find one, that has the right angle to light the hole pixel.

i'm going to post some pictures or maybe a video of the final result.

thanks again!!!
lincomatic (author)  DrHossa2 years ago
Cool, looking forward to seeing your build when it's done.
caitlinsdad2 years ago
Hi, I finally got around to building your ible with a mod http://www.instructables.com/id/Daft-Punk-LED-Matrix-Breakout-Board/

Your animation builder html leads to a 403 forbidden error, maybe a bug?
lincomatic (author)  caitlinsdad2 years ago
Sorry, it seems they don't let me upload HTML files anymore. I put it into a zip file. Please download daftpunkanimationbuilder.zip. Unzip it to daftpunkanimationbuilder.html, and load it into your web browser
That works. Thank you so much!
typomaniac2 years ago
Hey lincomatic : )

i built your table with some large blue leds but they did not make bright enough light so i went for straw hat leds which seemed to be fine. For testing purposes i put one of them on a cr2032 battery with 3 V and it worked fine. I replaced one of the leds in my arduino driven matrix with one of the new red leds and was disappointed: It seems that it does only glow with much less intensity than it did before on the battery. Did i do something wrong or does the matrix work this way and there is not enough power for the maximum brightness of the leds?

thank you so much,
tm
p.S: I currently use a 91 Ohm resistor which should be even lower than the one it would need for the red ones
ron.v2 years ago
hello. i'm lost in step 7. if i dont want it to sync to music what do i need? i have no cables for arduino or something like it. so what board do i need and what cables do i need? but i want some animations ofcourse! please help me out. i'm an uber noob when it comes to electronic XD
1-40 of 152Next »