Friday, March 2, 2012

The Beer Pong Table




Anybody who knows me or has drank with me has at least heard about "The Table". This was a project I started years ago with a few friends as a way to build a better beer pong table, and has since evolved a fair amount. Though the goal was never to be the best BP table, things have shuffled a bit and now I guess I'm planning (at some point) to make it the best. Or something. Does it even matter?


Anyway, the initial build was from an old extending Ikea table that had taken up use as the resident pong table. We mounted the wood frame around the top of it for the plexiglass and lights, and from there things slowly evolved. The original control mechanism was a (hand soldered) board with 6 relays that I more-or-less just deadbugged together, all controlled by a laptop's LPT port from inside the cabinet we mounted on the bottom. It worked well enough, but the whole system had its quirks and it made annoying clicking sounds when in use. Later on, upon acquiring an old flatscreen monitor from a friend, I promptly disassembled it, cut a hole in the middle of the table, and mounted it in there with wood screws, right to the frame. I imagine some folks are wondering how smart that is; I don't really know, but its survived two moves at this point, so I don't really care.

With the advent of moving into a much larger apartment with my girlfriend (and the first party we were throwing in it a month ago) the table became interesting to me again. It'd been years since I'd improved it, and rather than gluing down a beer-bottle-cap design under the plexiglass and epoxying it down, the thing sat unused for years under a red tablecloth. The high points of its use during this time include when I once spilled some orange juice on it after a particularly late night. In light of this, I found an old laptop with a printer port, and decided to wake the sleeping beast. Only it didn't wake up. After a string of four-letter words, it became apparent to me that the old control board just wasn't gonna be having any of this. So I fucking tore it out.

The play-by-play is boring and generally a kinda hum-ho affair, but suffice to say the table now runs an Arduino Mega with a vastly improved light-control circuit. I used Ladyada's excellent LED strip tutorial as a jumping-off point for the new circuit and tested everything before soldering it all down to a prototyping shield I found at Radioshack (they sell Arduino stuff now? wtf? Thats not a cell phone...). The rebuild ended up running me around $100, but I had to get some extra tools there too, so the components were likely less.

Its worth noting that this also lets me fade the lights rather than just binary on/off. And it doesn't sound like a broken hard drive from all the relays switching states either. The real heavy lifting is done on my laptop, which is running a Processing sketch that analyzes the audio currently playing. I've been working to improve the sketch's code and still have a long ways to go, but currently it lets me control each light channel's attack/decay/release as well as a few triggering options- a specific frequency, the average of a range of frequencies, or beat detection for the snare/hat/kick.

The video is a little out of sync with the music (I dubbed over the audio with the actual song I was playing) but you can get the general idea.



I've already got an LCD (3.2 inch, resistive touch) on the way for the Arduino to play a more active role in the whole setup, along with some EL wire to run along the outside of the frame. Still haven't figured out what I want to do for that bottle-cap design yet though...

No comments: