» Introduction

  » Project details

  » Play the game

  » Thanks and credits

Technical details

The technical guts and glory

(From Ethan): I got the idea for the project some years ago, and only haven gotten around to taking it on recently. The crane machine came from Outer Banks Amusements, and is a two bay "Clean Sweep" brand machine. Originaly I had intended to build a custom circuit board to replace the original one, but time was limited. So I reused the original controller board, cutting some of the circuit out so it no longer functioned as a normal game (it can easily be restored, however).

The first part of the hardware modification involved wiring to specific points on the original controller board, and bringing those out to a connector that will mate with a PC computer's printer port. The printer port is easy to re-use for other task in software. The cost of this modification was basically zero, reusing a single part from a computer that was trash.

The second half of the hardware modification involved adding two switches to the actual claw trolley that moves around in the top of the machine. When the unit is sitting in the supermarket, there is no need for the controller to detect if the trolly goes too far to the right, or too far back. The player is given 20 or 30 seconds to put the claw where they want, then it is dropped. There are switches to detect the left most postition and forward most position, as this is where the claw goes to drop the prize. This is also used by the board to check the system. I added two pushbuttons to detect rightwards end of travel, and backwards end of travel. This is used by the software when the crane is initialized to figure out how long it takes for the trolley to move left to right, and front to back. This timing value is used when players enter the percentage on the web page. There are higher precision methods of tracking the position such as optical encoders, but this isn't really needed. The cost of the switches was under $6, and some scrap metal and wire was used to cable them. So the modification for the skill crane machine for the project was basically $6.

My goal was always to build the crane for the internet, but the Shmoocon event was in January, and it seemed like good motiviation to get it done. Bruce from the Shmoo group welcomed the idea of the crane machine, so it was to happen. The 2nd bay was modified with a 2nd PC, and contained an attempt to detect the toy being dropped. It also contained a USB port on the front of the machine to accommodate a USB memory stick. This was to particiapte in the Hacker Arcade portion of Shmoocon where digitally signed certificates were used to grant secure "tickets" on the player's USB memory stick. Unfortunately our contribution wasn't completed in time, and the 2nd bay functioned thru the event as a normal skillcrane, accepting money for charity. The USB token system was close to working, but there was a cable issue with the port on the front of the machine. The Shmoo Group and other vendors supplied lots of goodies, as did Tim Kramer. It was very popular. One worry was the worn out lock for the glass door on the front. I didn't have a key, and forgot to get a replacement. People at shmoocon picked the lock (under staff supervision I'm told), and added more prizes to the machine! What a group of people!

Matt wrote the software that runs the Crane, and I will let him describe that himself. I would like to say that I am a slow programmer, as I don't do it often. Without Matt's help it would have been much more difficult, and he did a much better job on the software than I could have done. He also hung around several nights for late night test sessions, beating the machine up and trying to fix a few bugs that cropped up. With his help the machine was ready for Shmoo, where I would say it was a success. After shmoo, he helped refine bits and pieces, and prepare the system for opening the doors to the public at large. The whole project is much better with his contributions.

(From Matt):

Ok ok ok.... well first of all Ethan deserves more credit than he attributes to himself. He understands the inner workings of the crane, assisted in coding, and is the mastermind behind this project.

One aspect of interest is that through the use of this project we can map social networks. Ideally we (Ethan and myself) are to give out our individual password/codes to some friends. As our friends log on they get a password/code that they can pass on to their friends/enemies as well.

What I find really interesting about the crane is how we define the grid. Since the motors controlling the crane's motions are not stepper motors (they're linear motors), defining the grid of 100x100 to use for crane positioning is quite an interesting hack. The positioning is actually based on CPU cycles it takes the crane to hit the left sensor and the right. Same goes for the front and back sensors. The values are then distributed on a 0 to 100 scale for each axis. Ok ok smarty pants so we are not using a real time OS (RTOS) so how can we assure the timings never get off, such as page faults and the like? We can nice the processes and such.

Now for the other bit of interest, how does this whole thing mingle together? Well the crane controller is nothing more than a C program, that communicates on the parallel port to the hacked up crane, that Ethan melted... er re-soldered. The web site generates calls to a file that the crane daemon process listens for. When the daemon receives an incoming process, or works on the next one in its list, it simply calls the crane controller program with the information that has been provided. Having a daemon call the controller allows for us to pool calls, so that a multitude of calls can be kept and logged in a fifo order. Any questions please forge together an email and pass it my way. Thats it. Oh yeah if your judging this description for gramatical happiness forgive me, I do realize that my tenses are not consistent, were not consistent.

















This site is © Copyright Ethan O'Toole / Matt Davis 2006, All Rights Reserved
Steve's free web templates