Introduction: Daft Punk Table Replica Graphics Controller

This instructable presents a graphics controller card for something like the Daft Punk Table Replica. This should be used in conjunction with a driver board (output expander) like this one, which will drive the high loads presented by the table. This is a work in progress and collaborations on this instructable are welcome.

*audio used under creative commons license, see youtube for details.

The graphics controller does three things:
1) Accepts display instructions from a USB port (virtual com port compatible with old winamp plugins).
2) Reads display scripts from an SD card. Display scripts are made on a PC using the seq_txt program (and source) attached to this instructable.
3) Decodes display instructions and sends them to the driver board(s).

The board uses a 28 pin PIC with USB hardware. This is super easy to implement using the microchip USB CDC driver. I haven't bothered to implement this yet. I don't plan to use it and a bit of memory trickery is required. The 18fX550 USB PICs only have 2K of ram. The FAT file system (below) uses 2 512K buffers to read the SD card. That is taken from the upper 1k normally reserved for USB by the microchip CDC driver. SO: since USB use will always take priority (ie SD card play will stop and the table waits for instructions after USB is plugged in) we can just reuse the FAT memory buffers for the USB when connected. Also note:the USB Vcc pin is actually connected to a PIC pin. This is so we can detect a usb cable without full enumeration (maybe?).

SD card
Animation files can be made with the seq_txt.exe (windows) program (and source) attached to this instructable. The original files can be found here. I did not write these. I believe they were created by instructables user Mathieu Roncheau. Its a bare EXE file from an unknown source. Use at your own risk (but I've had no problems). Click on the squares in this program to create images that will display on the daft punk table, click '>' to make a new frame. Click the disk to save a plain text representation of the images you drew.

Here is an example of the file that goes with the image shown in the screen shot below:

1 2 4 8 16

This is the ascii representation of the binary equivalent of each column, with the top as 0. The first column is 10000 = 1, the third is 00100=4, and so on. Each line represents a frame, each line is terminated with both \r and \n.

These animation files are copied to an SD card (like your digital camera uses) just like any other disk. The controller accepts SD cards in any of the common formats (FAT12/16/32) thanks to a stripped down version of DOSFS by Lewin Edwards.

The controller reads through all the *.dpt (daft punk table) files in the root directory of the SD card and 'plays' each one. When all files are read it starts over at the beginning.

Display Decoding
No matter how the data gets into the controller, it arrives as ASCII representations of bitmap images. Yuck.

We need to convert the ascii data to a real integer. In the example above the last column (00001 in binary) is represented by 16 in decimal. 16 is actually represented by two bytes on a PC - 1 & 6. Furthermore, these bytes are encoded as ASCII, 1 is actually 0x31 and 6 is actually 0x36.
A) Subtract 0x30 from each digit (|= 0x30...xor?).
B) Add first digit to new variable X
C) Multiply X by 10
D) Add second digit, repeat C & D as needed to process all digits.

Once that is finished its just a matter of banging the bits out a few pins.

Code Status
The code is just barely alpha. I wanted to get the PCB and code posted because a few people have written expressing interest. The USB driver is not yet implemented and requires some attention to memory organization. The FAT & SD libs work great, it reads files in a loop without any problem, but only FAT 16 has been tested. The code has not yet been moved into neat functions, its simply 'as is' from my first working prototype.

Future improvements:
  • USB connectivity through CDC (virtual com/serial port).
  • Built in font for rendering plain text over USB or reading .txt files from the SD card.
  • Use built in font to display NO CARD/BAD CARD messages.
  • Error handling on SD reads and animation parsing.
  • ADC ports were left available for beat detection based speed control.
  • ADC/DIO ports left free for switches or potentiometers.
  • Add loop and speed instructions to the animation script format...since bitmap values are always 0-31, a value of 32 could trigger a loop of N times determined by the next digit. A value of 33 could specify a new update rate (speed).
  • Hardware test/power on self test (POST) - write bytes into the IO expander, and read output from last board in the chain. If bytes out=bytes in then hardware is functioning correctly (requires loop-back connection to last output expander board in the chain).

Hardware Overview

PCB and circuit are in Cadsoft Eagle format.

Firmware written with MPLAB & C18 compiler.

For the geeks: The microcontroller is a 28 pin 8 bit PIC18f2550 with USB hardware and 2K ram. It runs at 5 volts because it needs 48 MHZ to do the USB interface (via a 20Mhz crystal). The SD card is 3.3v only logic. The SD card has its own +3.3 supply from a LM317 feed from the 5.1V shared by the PIC and LEDs. Its not strictly perfect, but it works. The signals into the SD card are divided to around 3V using a 2.2K and 3.3K resistor divider. The data output from the card to the PIC is left bare, the 3.3V high is enough to trigger Vh on the PIC. I picked up the voltage divider design from the MikroeBasic compiler manual. This is not an ideal arrangement, I had to cut the SPI speed down to clock/64 before I could reliably communicate with the SD card. However, this is read only operation where speed doesn't really matter so it worked out perfectly (and cheap!).

Step 1: "Table" Details.

mrgalleta presents a pretty good writeup of his daft punk table construction, with less emphasis on the electronics. If you want to know more about constructing the actual table, please read his instructable, I wont bother to duplicate that work. Below are just a few notes on my daft punk table.

  • I didn't actually build a table, its a hanging wall-piece for my super small studio apartment. The size is 3 feet per side, with each square 17cm wide/tall (5x5 grid, total of 25 squares).
  • I used 2 LEDs per square, high power, 20 degree angle, 14000MCD. The LEDs are wired in series with a single resistor (56ohms) and run at 5 volts. If I wanted 4 LEDs per square I would wire all four in series with a single resistor and run the system at 12 volts. 2 LEDs were plenty.
  • Rather than make 25 PCBs to hold the LEDs, I drilled 10 holes into thick paper board and soldered the LEDs and resistors at the back. This was cheap and easy (see picture below).
  • My 5x5 grid is made of foam core. In the picture below you can see that I recycled my poster from the 06 maker fair into this project.


ron.v made it!(author)2012-06-25

can you please post a part list for the whole table?(only the electrical parts) using 2 leds per square perhaps theese leds. or do u have a kit for sale? :D that would be nice!

xanxor made it!(author)2010-09-03

Make it play pong!

marcoskohler made it!(author)2007-12-03

Where did you purchase your LED's. I finished my table awhile ago, but am using 12000mcd with 8 degree viewing angle. I am thinking of upgrading them to be brighter and have a better viewing angle!

ian made it!(author)2008-01-22

I buy all my high power LEDs (13,000mcd @20 degrees) from - they have a web-store and ebay listings. I always buy from the web-store. In 50+ the price is pretty reasonable. BE CAREFUL!!!!!!!! They most certainly sold my e-mail to many spammers over the years. I always use the website name @my domain for orders, so I know who spams. I still get a huge amount of spam to{mydomain}.com. Be sure to use an e-mail you can later filter.

bFusion made it!(author)2009-11-11

That's a pretty clever way of tracking who spams. I might have to give that one a try :)

magopo made it!(author)2009-09-12

hi, cool project, congrats How can I use it with winamp? is there a plugin for that? thanks

Cyberman+The+Tory made it!(author)2009-08-16

Have you ever seen somebody lick the chutney spoon in an Indian Restaurant and put it back? This would never have happened under the Tories.

falsehero made it!(author)2009-07-14

Buy your lights pre-made here for this project. Read the description! 70000 mcd.

hybrid_snyper made it!(author)2009-01-15

Curious, how do drive the LEDs? I am assuming you have say 12V across each of the 25 sets of LEDs and with each of them sunk on 25 pins of the ULN2803. I built a similar project once using MUXing where I drove 7 lines from the MCU through a driver and using a ULN2003 to sink the current.

the_babou made it!(author)2008-08-09

hi, i would like to make a daft punk table but i don't know anything about electronics and micrcontrollers: how to program them and how to get program on them could someone please tell me how to do with detailed steps? thanks

ian made it!(author)2008-01-25

Here is the code for the PIC pin configuration: #define GFX_DO LATAbits.LATA2 //#define GFX_DI //for eventual POST (self test) by reading bytes in and out of 595s.... #define GFX_CLK LATAbits.LATA1 #define GFX_CS LATAbits.LATA0 PIC DO is PORTA.2 this connects to the driver board DI/SI PIC CLK is PORTA.1 this connects to the driver board clock. PIC CS is PORTA.0 this connects to the driver board latch/chip select/enable. PIC DI is an extra pin that is not yet used. The data you put into the driver board comes back out on the other side, so its possible to read what comes back out to verify that all the electronics are in order (a self test). I never wrote the code, but it could be a cool feature.

Ora made it!(author)2007-11-13

Hurray!!! Something that I might be able to understand eventually! The chances of me being able to make the table have increased!

ian made it!(author)2007-11-13

If anyone makes some animations/sequences with the seq_txt.exe program attach them to a comment here and I will play them in my daft punk table replica (replica). :) If its super cool I'll make a youtube video of it. Instructables changes the file name in my browser, you may have to rename it. Better yet, download the source code in the archive and compile it yourself :)

About This Instructable




More by ian:Thermal Tweeter networked Twitter printer@tweet_tree: Twitter controlled Christmas treeHackable Christmas card & ornament
Add instructable to: