Beer Pong Table
Beer Pong Table
I'm working on an initial prototype of a Beer Pong Table. I started the initial development on October 5, and plan to have the table finished by the 30th, at which point it will be tested at an awesome Halloween party at my coworkers' house.
Updates will be made as I progress, and pictures will soon be included. At the completion of this project, all schematics, code, materials, and useful information will be presented to allow others to make their own tables.
LATEST UPDATE: Oct 15, 2009
(Note to self: Driving chips at 10VDC when they're only rated for 5VDC doesn't work so well)
I now have 15 days to complete the table.
Planned Features:
- Folds in half for more convenient transportation
- Table size 3' x 8' *1
- Adjustable-speed sequenced LEDs around enge of table
- Adjustable Speed animated light effects down middle of table
- RBG Lights underneath each cup, which go out when cup is removed
- Scoreboard showing current number of cups on each side of the table
- Small audio system built into table to facilitate iPods and iPhones
- Runs from standard AC wall socket
- Quality, water-proof, beer-proof exterior
*1: This isn't regulation size, but it's my first prototype, and under the condition of short time limit to completion, I could only obtain folding legs about 28" in width. Therefore, the table needed to be a bit wider. Future iterations will be 2' x 8'.
BOM for Table:
- MDF, cut into two 3' x 4' sections
- Piano hinge, 3' in length
- 2x4 sections: Four 4' in length, Four 2'10" in length
- Primer
- Paint in colors for final design
- Waterproof clear coat
- 2 Sash Locks
- 4 Corner Braces
- Carrying Handle(s)
- Clear acrylic disks (I chose 3" D x 1/8" T)
BOM for Electronics (for my initial design):
- Stripboard
- 60 - RGB LEDs (20 cups total x 3 RGB LEDs per cup)
- 136 - standard LEDs (in whatever colors you prefer)
- 20 - Infrared (IR) LEDs
- 20 - IR Phototransistors or Photodiodes
- Current limiting resistors
- 12 - 4017 type Decade Counters
- 2 - 7404 type Hex Inverters
- 16 - 74HC595 Serial In, Serial/Parallel Out Shift Registers
- 3 - AVR ATTiny2313 Microcontrollers
- 4 - 4051 type 8:1 Analog Multiplexer/Demultiplexer
- 1 - 7805 type 5VDC regulator
- 1 - Potentiomenter (For speed adjustment of lights)
- 3- Momentary Pushbuttons
- 3 - Switches (Turning on/off main circuit, and sequencing circuits)
- Wire, lots of it
Tools Required:
- Drill with regular bits and step bits
- Saw
- Measuring Tape
- Hole Saw
- Screwdrivers
- Wire Cutters
- Wire Strippers
- Soldering Iron
- Solder
Keep in mind that this is an initial, quickly-built prototype. Cheaper/more efficient components and parts could have been chosen, but I've based my design decisions very much on what I've got on hand. Future iterations will be spec'd better with more time to consider what works best.
The electronics for this project consist of five major circuit blocks.
1. Power Block: Power is supplied via standard 120VAC. A long power cable is integrated into the table. Obviously, this presents some danger in the presence of inebriated players, but the risk can be mitigated by taping the cord down, or placing barriers to prevent people from tripping on the cord. The power block consists of a small transformer with 12-24VAC output on the secondary. A full bridge rectifier outputs unregulated DC, which is then passed through capacitors and the 5V 7805 regulator. This regulator can supply up to 1.5A. This block is placed near the center of the table.
2. Sequenced lighting around table edges: The 100 LEDs around the table edge are sequenced by a 555 timer and twelve 4107 decade counters. The 555 timer runs in astable mode, acting as the clock for the decade counters Counter(0) through Counter(12), except for Counter(1). One pin from Counter(0) supplies the clock for Counter(1), which in turn runs through a not gate in 74LS04, and sets the enable for each subsequent counter in order, allowing it to run through it's count, turning on and off the attached LEDs. The frequency of the 555 timer output is adjusted very simply by a potentiometer underneath the table. A switch is also provided to turn off this circuit block if it becomes too distracting. Rather than use 7404 logic (which is limited to running at 5V) to set the enables, I'll try driving the Vcc of Counter(2)-(12) from Counter(1), through transistors. I saw suggestions of driving the Vcc of one 4017 directly from the output of another 4017, but then I have to worry about the current capabilities of the driving chip.
3. Light effects down center of table: Light effects down the center of the table will be controlled by an AVR ATTiny2313 microcontroller, with Shift registers driving the LEDs. Several animation patterns can be programmed into the microcontroller, and each can be selected simply by pressing a button on the underside of the table, which advances to the next pattern. The patterns can be updated at a future time by using the ISP function of the ATTiny2313. A switch is provided to turn off this circuit block if it becomes too distracting. Because I'll be using the 595 family (74HC595, TPIC6595, TPIC6C595, etc) of shift register which can daisychained, I may be able to get away with using just an ATTiny45 for this block.
4. Lights under each cup & scoreboard: This block actually consists of two identical blocks. Each one controls the lights under the cups and the scoreboard for one side of the table. Because these blocks are at the extreme ends of the table, decoupling capacitors at the power rails are very important. These blocks are each controlled by an AVR ATTiny2313 microcontroller. Under each cup, an infrared LED and infrared photodiode are oriented upward. A constant 5V input is felt at the anodes of each pair. Each of the LED cathodes are tied to ground, leaving them constantly on. The cathode of each photodiode is tied to a pin of a 4051 analog multiplexer/demultiplexer (mux/demux), which also has a pull-down resistor. During initialization, with all the cups removed, the microcontroller uses it's Analog-to-Digital-Converter (ADC) function to sample the voltage at the voltage divider on each pin of each mux/demux, and stores this information in memory. It then samples the voltage levels again on a regular basis (about once every 1/2 second, to determine whether the value has increased drastically (a cup has been placed on top of the sensor), or whether it has decreased drastically (a cup has been removed). If the microcontroller determines that a cup has been placed, it turns on the three RGB LEDs underneath that cup. The color of each team's cup lights can be changed by pressing the momentary button underneath the table at their end. The microcontroller keeps track of the current number of cups on the table, and updates the scoreboard to reflect this value. Because this block uses relative values to determine if a cup is present or not, it should have few errors, and any errors experienced should be easy to rectify by simply placing and removing a cup. (I've decided that the current iteration of the table will not include a scoreboard. It's just that much more work to implement this in the short time I have, and it doesn't seem like it would fit with the overall design anyway. A future table might include this. Not too hard to do if I have more time)
5. Audio System: The audio system is simply a 1/8" stereo jack, amplifiers, and small speakers. The goal is simply to provide a bit of music if someone has an iPod or iPhone, but no other speakers are present.
Difficulties with this table
- Because the table is so large, and various components are placed all over it, a LOT of wire is needed. This presents a problem with noise, expense, and possible damage if wires are exposed.
- Because the table is designed to fold in half for easier transportation and storage, wires can be crushed or stretched.
- Wiring this whole thing by hand it turning into an exercise in insanity. In the future, when I've got more time to work on a new iteration, I'll design actual PCBs. There are so many wires running here and there, not even considering the wires on the boards themselves, that the final product is going to look crazy! Well, the insides at least.
PROGRESS:
- All components are now either on hand, or on their way. Just received the piano hinge this afternoon. Still waiting on new Infrared LEDs/sensors. I don't have many matching pairs, so it seemed to make sense to simply order a bunch of new pairs. Also, waiting on some more TPIC6C595 chips.
- Began wiring up the light sequencer this evening. I got about half way done with the board itself (of course, wiring the LEDs will take much longer). I've run tests on what's completed thus far, and the 555 timer portion and first two timing stages are completed and work as expected.The timing is adjustable from about 30Hz up to about 1.5kHz. With the potentiometer I'm currently using (100k, about 1.5 turns) the slightest change can hugely affect timing. Wish I had a 10-turn 100k pot on hand. Oh well. While this circuit block is technically the simplest being simply a timer and a bunch of counters, the complexity of the wiring makes it probably the most difficult part of the design to implement.
- Ran calculations on the wires I'll be running various places. With 28AWG wire, and a max length of about 5 ft, there's only a couple millivolt drop at most, so that's good news.
- Ran initial tests on my sensor design, and it works better that expected. There was a huge swing in values from object-not-present to object-present. Now that I've got the acrylic disks that will be under the cups, I need to test the real deal. I'll share my numbers and results once I can run the test. My plan is to use approximate values to determine if a cup is placed or removed. If the sensor value changes by more than about 20%, then we'll change the cup value.
- I'm trying to work out how to route small circles. If my CNC router was assembled at the moment, this would be a cinch, but since I'm moving soon, it's not. Sadly, I don't know anyone with one nearby. I may cheat by using a hole saw to cut 1/8 inch down, and then use a wood chisel to manually route the circles out. A lot of work for 20 separate circles!
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 4984 feedbacks awaiting moderation...