You are hereHome / Arduino Projects / Project Page: Lotto Shuffle

Project Page: Lotto Shuffle


What It Is

VideoLotto Shuffle is a music selection system that consists of desktop software and an Arduino controlled air mix lotto machine. Each ping pong ball inside the lotto machine has a RFID tag inside it. When a ball is drawn its tag partially determines the music that is played.

I had the idea for Lotto Shuffle while thinking about the way that we choose the music we listen to or, more accurately, how it is chosen for us. Services like Pandora or Last.fm let us input artists or songs we like and then feed us tracks they select. I see this game-of-chance scenario as lacking a physical element. It's more like playing video poker than playing poker.

BaseThe Lotto Shuffle system ultimately relies on Jango.com to choose individual tracks, but artists are selected by the draw of a ping pong ball. A file on the connected computer relates each RFID tag to an artist. This file can be edited at any time with an Adobe Air application, allowing a dynamic flow of artists to choose from.

Hardware

The greatest challenge in creating Lotto Shuffle was building the lotto machine.Base I built the first prototype with cardboard sides and a paper towel tube at the top. I purchased a Bucket Head vacuum at Home Depot to use as the blower. Satisfied that it would work, I began looking for material to use for the build.

BaseAfter considering several options using either Plexiglas or Lexan to build a box I settled on using two Dollar Store punch bowls, one inverted connected to the other with Velcro. Beside the obvious cost advantage, I like the shape the the bowls make better than a box. Using Velcro to attach them allows easy access to the inside of the lotto machine and provides an air gap that is necessary for the correct mixing action of the balls.

The bottom bowl sits on top of what was once a peanut container with a hole cut for the blower hose. A PVC fitting glued to the bottom of the bowl keeps the hose positioned under the hole in the bottom of the bowl.

A plastic tube sits in a hole cut in the top bowl. If the top of the tube is covered then the blown balls bounce around the chamber. Uncovering the tube creates air flow and eventually a ball is shot into the tube. To play on the idea of Lotto Shuffle being like a jukebox I choose to use a CD drive mechanism to open and close the tube.

BaseIn place of a CD is a clear plastic insert, as found in a spindle of discs. When the drive door is closed the CD blank covers the tube. The RFID reader is mounted on top of the drive door so that when it is opened the tube is uncovered and the reader is in place to read the drawn tag. The reader that I used will only read a tag that is within a few inches of it, so there are never any false reads of balls bouncing around the chamber.

While building Lotto Shuffle I learned a bit about ping pong balls. For the original prototype I used a nine pack of balls from the Dollar Store and they worked fine. When I was ready for the final build they were no longer in stock. I looked around eBay and purchased some ballsBase that are of beer pong quality. They were supposed to be good for "carnival games", and I figured that Lotto Shuffle was like a carnival game. It's so violent in the Lotto Shuffle chamber, though, that these balls broke to pieces. Some research showed that there are three levels of ping pong balls, rated one, two or three stars. Two star balls are good for the family game room while three star balls are for tournament play. I replaced the beer pong balls with Gambler brand tournament grade balls and they have been working fine.

Software

As soon as a ball is read the Arduino code kills the blower, Basecloses the drive door and sends the tag ID to the server. The server then reads the XML file that relates tags to artists and sends the name of the drawn artist to the client. When the client receives the new artist name it closes the current Jango window, formats the URL for the new artist and opens another window. JavaScript is used to open and close the browser windows.

Get the Party Started

BaseI could imagine Lotto Shuffle being used at a party. As guests come in, their favorite artists could be entered for the next draw. Draws might happen at 20 minute intervals and everyone would know that the sound of the blower means a chance of their music being played next. The host wouldn't have to worry about pleasing everyone with their music choices because, after all, the selections would follow the luck of the draw.

Parts Bin

Parts Bin

Proto Sheild for Arduino

from Adafruit Industries

H-Bridge motor driver

from Sparkfun

RFID card reader

from Parallax

Bucket Head Vacuum

from Home Depot