Thursday, December 20, 2012

Sometimes you feel like a nut.



This Halloween costume idea wasn't an original creation. The concept came from internet research but I executed the design and construction. The cutting and sewing was pretty straight forward, however I do have a couple tips that seem obvious after the fact. Firstly, where men are usually roundest around the chest and stomach, women are typically laid out in different proportions.  Keep this in mind whilst essentially making a fabric tube.  Secondly, my initial design called out for cutting the small "Peter Paul" lettering out of fabric.  If you want to keep your sanity, do not attempt such a thing.  I made a stencil and used white fabric paint. If not pressed for time, I probably would have laser cut some 1/32" acrylic for the stencil but exacto-ing out some card stock did the trick.  Here is a bonus tip... hot glue! I tried attaching the larger brown letters with spray adhesive but that basically turned into really weak velcro.  Hot glue is your friend. If you don't already have a dispenser, I'd highly recommend picking one up. I personally like the 1/4" sticks the best but I do more fine touch gluing so that makes sense for me.

I get a kick out of putting together coupley type costumes. The trick is finding something that has most of its impact together but still works well on its own. My favorite part of these costumes was the public discourse they inspired. Almost everyone we passed by had a very strong opinion on what candy they liked more. I brought a bag of Almond Joys with me just in case they didn't see things my way ;)

Thursday, September 06, 2012

Electropong is going to change everything


I've been playing beer pong for the better part of 20 years. During that time, the tried and true setup and rules of the game really haven't changed that much. Why mess with a classic. Sure there have been many variations on the table used, certain house rules that one needs to entertain, and everyone has there own style of toss; but the core essence of the game has stood the test of time. I'm looking to shake that up a bit.  Introducing Electropong!

Feel like playing beer pong during the winter months but your brew freezes before you get a chance to throw. Wanna play inside but your significant other will raise hell if you get beer on the new carpet. Tired of wondering what germs you're passing around drinking out of the same cups everyone else is. Electropong may be just the game you're looking for.

Alright, I'm not here to give you the sales pitch, I just thought it would be neat to build an electronic beer pong game. It's very much like the electronic darts game machine you might find at a bar. Two teams play on one unit and hit the "swap team" button to cycle their turn. The color of the cups and the LED display keep track of which team is currently throwing. Each of the six cups has a RGB LED embedded inside and a hole at the bottom so a 40mm ping pong ball can pass through it. Under the cup base, the enclosure houses six IR interrupters, a 9V AC/DC power supply, a custom LED driver board (recycled from an old project) and a custom PCB that controls everything. In addition, there are three arcade style buttons on the front face that also have RGB LED's lighting them up. The display in the back is an off the shelf Betabrite scrolling LED matrix and above that are two mini beacons I got from Woot! The control board has a PIC18F6622 micro-controller that reads in all the IR interrupter inputs, talks to the LED matrix display, does PWM for the LED drivers, toggles the beacons and keeps track of the game play. I think that pretty much sums up the hardware section.

The real magic happens in the software. You can play games on Electropong that wouldn't be possible with the traditional setup. For instance, a popular game with my guests has been "king of the hill" where teams go head to head on the same board and try to be the first to light up three cups of their color. This game tends to go faster than regular pong and is a good fit for people who want to play a quick game and get back to the party. I'd still like to add one or two more games so if anyone has an idea, please leave a comment.

The construction of this game definitely wasn't without it's challenges. An un-tethered Solo Cup with about two ounces of beer in it sitting on a wet surface has some mechanical dampening properties that are difficult to simulate. At first, the cups on Electropong were rigidly fastened to the base with four screws. This caused the ping pong balls thrown at them to ricochet off dramatically. Turns out, the necessary shock absorption system was built right into the cups themselves. About a quarter inch of the outside diameter of the cup base sits squarely on the ground while the rest of the base is raised about an eighth inch. The screws attaching the cups were pressing this raised portion down so backing the screws out a little allowed the cups freedom to pivot a bit. However, in doing so, the imprecise holes I made in the cups allowed too much movement and they ended up not lining up correctly.  I fixed this by laser cutting a donut shaped spacer that fits in between the screw heads and the bottom of the cup. This locked the cup in place and still allowed it to pivot, effectively dampening the force of the ball against the cup.  The second significant challenge was reigning in the size of the unit, especially the height.  If the cups were offset too much from the table top, they would look awkward and the game-play would suffer. However, I still needed to concoct a ball return system. I ended up cutting away some of the base and putting the ball return ramp in its place. Had to go back to my junior high school trig skills to figure out the angles. I was very proud of myself.

Purists will object to certain aspects of the game that have been taken away like the rush of having to drink from a selected cup but I think I have made up for that with the additional games and the spectacle of lights. I don't want to compete with the traditional game, I want to add to it.  But hey, my party guests really seem to like it. I guess that's what matters most.

Oh, one more thing. There is a reason the cups are black. Aside from the obvious styling advantage, I needed to go with black so the light from the LED wouldn't bleed out through the cup. I initially wanted red cups but any hint of red light would make them glow like a lantern. And I think black makes the game look cooler, what do you think?

Monday, June 04, 2012

Networked Betabrite and a better party music solution

Home-brew Ethernet to RS-232 converter

For a recent party, I was looking for a better solution to my current audio setup and happened across a reconditioned Apple Airport Express on the web. While it has many features, I primarily wanted it for streaming music via iTunes on the ol laptop to my stereo receiver over the home network. With WiFi enabled I can locate the computer anywhere in the house I want. And I can control the playlist with the remote app on my iPhone. Got it, hooked it up, and everything worked great... but something was missing.

For the same party, I was planning to set up my Betabrite scrolling LED sign to display a few generic messages such as the contents of the kegerator and a couple birthday wishes.  I quickly realized how boring the repetition would be.  You really must have continual content updates to keep the public's attention. Hmmm, maybe I should heed my own advice with this blog ;) I've seen other people scroll twitter updates and directed text messages to their betabrites but I don't currently have their programming chops so I opted to gobble up some local data.

I thought I would be neat to combo the new sound system with the display and scroll the currently playing song title and artist on the betabrite.  I had two weeks before the party, plenty of time right? There were challenges.

Challenge number one, hardware. In a nutshell, I needed an Ethernet to serial (RS-232) converter so I could connect the Betabrite directly to my router.  You can buy a quality unit for around a hundred dollars but a quick trip to the spare parts bin yielded a bounty that would get me most of the way there. The heavy lifting is done with a Lantronix XPORT Embedded Ethernet Device Server. I'm a big fan of these little guys.  It has many features but for this project I only utilized its UART (serial) output. On the PC side, you can use vendor provided software to create a virtual com port eliminating the need to fool with setting up a socket connection. The XPORT outputs TTL level signals but the betabrite sign requires +/-15V (RS-232) so I needed to gin up a proto board with a level shifter on it. As luck would have it, I made such a board for a previous project.  After tossing in a 3.3V linear regulator to power the XPORT, the hardware was complete.
 
Challenge number two, software. This was by no means trivial, I dabble in the medium at best. From a past project I already had a little C++ code that talks to the serial port so I decided to start there. The next logical steps were to gather up relevant information from iTunes, format said info, and write it out to the Betabrite. On a Mac, interacting with iTunes is native but Windows plays with iTunes a little differently. It uses the COM object interface to handle the data exchange. Thank goodness for Google and online example code.  The only real trick was setting up the Visual C++ dependencies correctly and getting all the various updates and whatnot working.  Looking through forums for semi-useful and somewhat relevant information is tedious. I'll provide the code and environment setup instructions upon request.  Writing to the Betabrite also proved to be a bit tricky. I had the programming guide along with some sample scripts but I still had to snoop the serial data from the vendor software to figure out the ins and outs of the protocol. You can never underestimate the importance of a good technical writer.

Having the Betabrite display update with the currently playing song turned out to be a hit with the party goers.  I'll have to make it permanent fixture for future gatherings. Maybe I can even get some tweets up there next time.


Tuesday, March 06, 2012

You say potato, I say evil



I implored onto my friend, and that day's frymaster, that there was evil in the bag of smiley face potatoes he was preparing to dump into the cauldron of boiling hot peanut oil. "Nonsense" he exhausted as droplets of the oil nipped at his un-gloved hand. He would be sorry...