Hi Everybody. So here's what we've been working on at Real Art. With an Arduino Mega, 5 refrigerator switches, 4 cameras, 3 motor controllers, 3 wheelchair motors, 2 power supplies, an actuator and an ultrasonic sensor we set out to make the worlds largest claw machine. Not only that... You drive it over the internet! The machine itself is 17' long x 8' wide x 12' high. There's an awesome flash site behind it to handle the long line of people queuing up to play it. If you want to check it out in action go to http://www.thesantaclaw.com
and give it a shot.
This was our first big project with an Arduino, we typically write Flash and .Net sites, so this way pretty far out of our wheel house but having no knowledge or training of any sort wasn't going to stop us! Now on to how this puppy works.
We decided to use wheelchair motors because you can pick up some cheap used ones on E-bay. We used two for forward/backward, left/right and a third one to drop and raise the claw. We put switches on each point of the chassis that the motors should stop. When a switch is hit, the motor is stopped. We drop the claw on a timer and have another switch at the top that stops it from raising too far. After we had this thing moving around it was time to figure out how to pick up stuff. We use a 4” actuator to open the claw arms and springs on the hinges to pull them back together.
Now this thing is moving, dropping, raising, opening and closing the claw arms. Since your game is over after you drop the claw it's time to figure out how to get it back to the chute, open the claw arms, and detect if a prize came out. Easy enough to get it back over the chute, just go left and backwards until both switches are contacted and stop. You're over the chute, open the actuator. To detect if there was actually a winner, we picked up an ultrasonic sensor. So when we start opening the claw arms, we start reading it repeatedly for a few seconds. If it reads anything lower than the distance to the wall you have a winner, if the timer expires with just the base reading you've got a loser.
That's pretty much the extent of the Arduino stuff. All communication comes to the Arduino through a serial connection for an AIR app using a serial proxy. The AIR app manages the queue and handles the commands being sent from flash clients over the web. Depending on your connection there's hardly any latency. But don't take my word for it, check it out. Here are a few pictures of the process.