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

 by lincomatic
FeaturedContest Winner
dpsqr.jpg
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

daftpunkparts.jpg
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 139Next »
inna25543 says: Jan 31, 2013. 9:02 AM
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) in reply to inna25543Jan 31, 2013. 10:20 AM
have you heard of google?
http://en.wikipedia.org/wiki/Phone_connector_(audio)
dtaylorl says: Nov 21, 2012. 10:25 PM
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) in reply to dtaylorlNov 25, 2012. 7:21 AM
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.
dtaylorl in reply to lincomaticNov 25, 2012. 8:43 PM
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.
dtaylorl in reply to dtaylorlNov 26, 2012. 8:56 PM
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_gs says: Nov 17, 2012. 6:45 PM
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) in reply to leandro_gsNov 18, 2012. 9:20 PM
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
skeplin says: Nov 9, 2012. 5:01 PM
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) in reply to skeplinNov 9, 2012. 5:50 PM
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.
skeplin in reply to lincomaticNov 10, 2012. 6:37 AM
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.
TylerLjungberg says: Oct 15, 2012. 12:15 PM
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) in reply to TylerLjungbergOct 16, 2012. 9:07 AM
it goes into sketchbook\libraries\TimerOne, not sketchbook\TimerOne
TylerLjungberg in reply to lincomaticOct 17, 2012. 4:22 PM
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) in reply to TylerLjungbergOct 18, 2012. 1:25 PM
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.
DrHossa says: Jul 15, 2012. 12:00 PM
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) in reply to DrHossaJul 15, 2012. 2:50 PM
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
DrHossa in reply to lincomaticJul 16, 2012. 1:51 AM
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) in reply to DrHossaJul 16, 2012. 7:43 AM
Cool, looking forward to seeing your build when it's done.
caitlinsdad says: Jul 4, 2012. 3:06 PM
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) in reply to caitlinsdadJul 15, 2012. 2:50 PM
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
caitlinsdad in reply to lincomaticJul 15, 2012. 3:43 PM
That works. Thank you so much!
typomaniac says: Jun 28, 2012. 3:16 AM
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) in reply to typomaniacJun 28, 2012. 8:57 AM
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
typomaniac in reply to lincomaticJun 28, 2012. 9:08 AM
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
typomaniac says: Jun 28, 2012. 3:19 AM
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.v says: Jun 25, 2012. 2:08 PM
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
lincomatic (author) in reply to ron.vJun 26, 2012. 10:18 AM
Sorry, I don't understand your question. You need an Arduino. If you don't want to use music sync, just skip step 7. If you're an uber noob, I suggest that you get an Arduino and play around a bit before you attempt this. It is not for beginners.
holmez says: May 15, 2011. 9:44 AM
hello there,

ive added two buttons to the program which are ment to display two different patterns depending on which button is pushed. currently i have it so when a button is pushed it displays the first frame and when it is pushed again it shows next frame, though i want it to display the full sequence. Any help would be greatly appreciated!

Many Thanks,
holmez

p.s. great post!
lincomatic (author) in reply to holmezMay 17, 2011. 11:39 AM
the Frames[] variable in Frames.h is what contains the frames. You could make two separate variables, one for each sequence, say Frames1[] and Frames2[] and then change the code to switch between them. depending on the button press
holmez in reply to lincomaticMay 17, 2011. 12:39 PM
Thank you brother, worked it out in the end just had to concentrate a bit more. Got that working and a tempo gauge cause couldnt get my hand on a jack plug!

Brilliant project!
typomaniac in reply to holmezJun 17, 2012. 10:44 AM
hey : ) could you please show me your code and how you made this : )? thank you so much,

tm
lincomatic (author) in reply to typomaniacJun 17, 2012. 12:42 PM
It's all in the instructable
typomaniac in reply to lincomaticJun 18, 2012. 12:13 AM
thank you very much for the answer! I was talking about how to make a switch between to animations. I did not see this in the code? I was not able to find this in the instructable. Did i miss something?

lincomatic (author) in reply to typomaniacJun 18, 2012. 8:50 AM
it automatically plays the animations. sorry, i don't understand your question. anyway, the code is all there for you to change as you please.
lincomatic (author) in reply to holmezMay 17, 2011. 1:14 PM
Glad you go it working. Sorry it took me so long to reply.. the message was in my spam folder
holmez in reply to lincomaticMay 17, 2011. 2:06 PM
No Bother!

thanks again!
newdos says: Jan 24, 2012. 10:16 AM
Hey Sam - its me again!!! my daftpunk table is working great but I have just one query to ask you on this. I have added to your code, my AGC code, to deal with using different volume levels, and to refine it I need to print out various variables using serial.print() but as sonn as I add this line anywhere in the code the whole thing seems to crash or not run. Any ideas ?

Cheers Kev
lincomatic (author) in reply to newdosJan 24, 2012. 6:01 PM
Hmm. Sorry, I have no idea what's going on. I don't do anything with the serial pins. Maybe you could debug your AGC code separately.. perhaps just blink an LED until you get it right, and then put it back into my sketch.
newdos in reply to lincomaticJan 25, 2012. 1:27 AM
I have debuugged the code and it runs fine on a separate mood lamp that morphs when noa audio input but sync when a signal is there I just want to be able to refine the variables a bit for the daftpunk table but just by puttin in the serial print anywhere in your sjetch it then doesnt run - try it and you will see!! I'm guessing it something to do with the timerone.h lib but I am too new to this to know what yet. Any help would begreatly appreciated.

Cheers Kev
1-40 of 139Next »
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!