Hi Everybody. In case you haven’t noticed, there’s a massive claw in our cafe. In case any of you ladies or dudes are wondering how the geekier side of this thing works check this out. 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! 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 was pretty far out of our wheel house but having no knowledge or training of any sort wasn’t going to stop us! Now to how this puppy works.
We decided to use wheelchair motors because you can pick up some cheap used ones on E-bay. 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. The game is over after the claw drops. Then 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. It’s easy enough to get it back over the chute – just go left and backwards until both switches are contacted and stop. Now it’s over the chute, open the actuator. To detect when there’s 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.
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’s a few pictures of the process.