CRANE GAME

CRANE GAME
«
  • DSCF4480.JPG
  • DSCF4480-1.JPG
  • IMG_0189.JPG
  • image135.jpg
  • IMG_0299.JPG
  • IMG_0153.JPG
  • DSCF4552-1.JPG
  • DSCF4499.JPG
  • DSCF4532.JPG
  • DSCF4525.JPG
  • DSCF4536-1.JPG
  • DSCF4549-1.JPG
  • DSCF4552-2.JPG
  • last photo ←
»
This shows you how to build an arcade style crane game out of scrap parts.  The basic parts are: a motorized assembly that raises and lowers a claw,  a track for the assembly to move around on, and a ctontroller with some electronics. 

Here is a video of the machine in action.

Video -

Emma after some practice-


Controls -


Pick up and drop -



Overview -
I like to document my work as I go along, so this instructable contains multiple versions with varying components.   I think that this is useful because it seems unlickkly that you would happen to have all the same scrap peices as I do.  I have also tried to show how to build a moderatly complex system by  bulding one peice at a time and then combining them.  By keeping things modular you are able to swap out large peices without having to rebuild the whole thing. 

Here is a rough outline:
     - Get each motor working by itself,  I used a joystick with potentiameters to control the motors, one POT per motor
     - Get all the motors working at once - by wiring all the motor drivers to the Arduino at once and combing the control codes, we are able to run everything at once.  This same setup will be used l to control the whole machine.
     - Build a small test rig with just one axis - It is easier to work on something that you can put on a bench top then it is to work with something mounted the ceiling.  So I will show you how to cobble together a test set-up that will let us work out some of the details without having to build a large rig.
     - Build a large rig - once everything is working on the test rig, we can go ahead and make it bigger.  This required some different materials, but the wiring, code, and motor setup don't nned to change. 
    - Test and improve  - Once the system is working it is easy to see things that can be improved.  I wound up replacing the original joysticks with a larger controller from a kids game.  The whole thing is pretty flexible so there is alot of room for modification and impruovemnt.


Parts - 
Most of the project is built with salvaged computer parts.   Here is a list of parts that you could salvage or buy. 

Power supply - I used a power supply salvaged from a server.  There are good instructions for hacking one of these here http://reprap.org/bin/view/Main/PCPowerSupply  I also pulled a 12volt power supply out of a printer that would have worked well.

Motors -  At least 3 motors are needed.  I used 2 DC motors and a pretty big stepper.  The DC motors are both pulled from an Epson Printer/Scanner.  The stepper is a NEM23 from Keling Technology.  A smaller one would be fine.   You can get one here http://www.sparkfun.com/commerce/product_info.php?products_id=9238.

Drivers -  You can build, buy, or salvage drivers for the motors.  Buying is the easiest and they are not two expensive. I used a  steppper driver and the DC motor driver from the RepRap Gen2 electornics.  The DC motor driver is here - DC Motor Driver v1.1 Kit  http://store.makerbot.com/electronics/electronics-kits.html.   Sparkfun as a good stepper driver here - http://www.sparkfun.com/commerce/product_info.php?products_id=9402

This motor sheild from Adafruit would work well - http://www.adafruit.com/index.php?main_page=product_info&cPath=34&products_id=81

Microcontroller -   The Arduino platform is fun and easy to use.  http://www.arduino.cc/  I used the
Arduino Duemilonove with a hefty screw sheild  http://store.makerbot.com/electronics/electronics-kits/arduino-breakout-shield-v1-4-kit.html

Controller - I started with thumb joystick controllers like  on a PS2 - but I found that a controller from Leap Frog Baby worked out better. http://www.amazon.com/LeapFrog-10210-LITTLE-LEAPS-PLATFORM/dp/B000EIV1OM

Claw - The claw is made from mouse shells and strips of plastics cut from a printer housing.

Wiring - Most of the wiring is discarded cat-5 network cable

Track  - For the test rig I used wooden tracks, for the larger set up I used metal J-trim 1/2" x 10' - this was in the drywall section of home depot - it is the only thing I bought specifically for this project.

 
Remove these adsRemove these ads by Signing Up
 

Step 1Control a DC motor with variable resistor

Control a DC motor with variable resistor


The first thing we will do is to get each motor working with a controller. 

Use a joystick with potentiameter to controll the speed and direction of a DC motor. 

This will be used to:
                         - raise and lower the claw
                         - open and close the clow

Hardware chain:
Joystick (potentiameter) -> Arduino with code -> DC motor driver V1.1 (make.rrf.org\dcmd-1.1) - > motor

Relies on: http://www.reprap.org/bin/view/Main/DC_Motor_Driver_1_1#Wire_up_test_devices

Here is the arduino code:   
          note: this only runs one DC motor


********************ARDUINO*****************
//******* POT to control a DC motor speed and direction ******//


// define pins and variables
int potPin = 2;    // select the input pin for the potentiometer
int val = 0;       // variable to store the value coming from the sensor
int j = 0;
int Dir_A = 4;
int Speed_A = 5;

void setup() {
  pinMode(Dir_A, OUTPUT);
  pinMode(Speed_A, OUTPUT);

  Serial.begin(9600);
}

void loop() {

// Read location of joystick and calculate the distance and from center
  val = analogRead(potPin);    // read the value from the sensor
  j = val - 517;  // 517 is center positions - how far from center
  j = abs(j);      //absolute value

// put some bounds on j to keep PWM values useful
// below 100 the motor won't move and PWM max is 255
  if (j >= 510){
    j = 510;  //the most the PWM pin can do is 255
  }
  if (j <=200 && j>=10){
    j=200;    //below 100 PWM the motor makes a high pich sound and does not move
  }
  if (j <=10){
    j=0;    // below 10 the joystick is very close to center
  }
 
 
 //Run DC motor A based on analog input from joystick
  if (val >= 520){
    digitalWrite(Dir_A, HIGH);  // other direction
    analogWrite(Speed_A, j/2); // PWM out (divide by 2 because max is 255)
  }
  if (val <= 510){
    digitalWrite(Dir_A, LOW);  //
    analogWrite(Speed_A, j/2); //
  }

  if (val <=520 && val >= 510) { 
    analogWrite(Speed_A, 0);  // turn off if the joystick is in the center
  }

// print values for debugging
  Serial.print(val);        // send numbers to PC so you can see what it going on
  Serial.print(",");
  Serial.println(j);

}

 

« Previous StepDownload PDFView All StepsNext Step »
56 comments
1-40 of 56next »
Nov 27, 2011. 6:25 PMgibby123 says:
I love this! Maybe you could remount the joystick on the ps2 controller?
Jun 25, 2011. 10:32 AMtinker234 says:
wow my family broke my pinball machine hey maybe claw machine next has top be tougher
Mar 30, 2010. 11:02 PMdawsonj says:
 genius!

Nov 11, 2010. 6:41 PMDizzyNYC says:
That would be awesome! I wonder if you could use an existing claw from an arcade as well.
Apr 6, 2010. 12:58 AMdawsonj says:
 yeah! I think it's a great idea. People would definitely like it.
Mar 27, 2011. 8:52 AMWhitestar245 says:
would be a great idea, but I've looked it up, and those claws can run over $100 each.
And I sincerely hope the mouse you used didn't cost that much.
Nov 10, 2010. 1:35 PMSkyriam says:
Incredible! Thanks for sharing, how would you do it to make it "stiffer"? Like the arcade games. Thanks!
Aug 22, 2010. 6:55 PMcdousley says:
you saved my life i was working on my own crane game and realized i had no idea how to make the claw until i saw this
Aug 1, 2010. 6:28 AMSpeedStrikerXLR says:
OMG its funzo from the simpsons
Jun 11, 2010. 11:47 AMrasraster says:
Great Instructable - congratulations! One quick question: would it maybe make more sense to use a machine screw for the center of the claw, rather than a wood screw? For one thing, you don't risk drilling a hole in the object you're picking up. :-) Second, the wood screws have decreasing diameter near the tip, which might make the mechanism slip. Finally, machine screws could give you finer and better control due to the diameter thing and typically more threads per inch. Again - GREAT job!!
May 23, 2010. 11:20 AMJ-Five says:
COOL 

the kids are so adorable!!!
May 10, 2010. 1:14 AMmadmada says:
"writhing funzo's in my sack, makes me happy, makes me hurt my back"
Apr 8, 2010. 5:54 PMhamgravy says:
 i KNEW it was funzo. i was just thinking: that doll looks soooo familiar....
Mar 27, 2010. 1:51 PMdowngrade says:
 We need an instructable on how to make that helmet next!
Mar 27, 2010. 8:18 PMdowngrade says:
 Have her teach you, and make an instructable at the same time. That would be cute.
Mar 1, 2010. 8:33 PMMusicman41 says:
Ive got another idea.  Why dont you set up four motors, one in each of the corners of the room, which act as pullies?  You can control the precise position in all three axies, and have more stability.
Mar 27, 2010. 7:57 AMMusicman41 says:
You can do that, but it is not necessary.  It only takes three strings and a weight at the end of the three connected strings to ensure stability.  One extra motor would make the crane capable of moving all over the room though.
Mar 26, 2010. 12:12 PMDerin says:
.How do you think this would be like in an arcade cabinet?
Mar 26, 2010. 6:13 AMKacheeker says:
Really cool. I like the idea too! Makes me want to take apart my computer now. XD
Mar 8, 2010. 7:20 AMwandererwolf says:
I'm not sure which is better the project or the videos! Cool idea, thoughtfully executed and well documented. When will it be strong enough to pick up something useful like say.. a bottle of beer? ;-)
Mar 22, 2010. 3:56 PMdomestic_engineer says:
Congrats Husband on your big win. I can't wait to use "my" new netbook.
Oh, and you still need to fill in the holes in the doorway.
Feb 28, 2010. 9:40 AMpaulosagatiba says:
 parabéns pelo seu projeto, gostei muito da sua criatividade de usar materiais alternativos para construção.
Feb 28, 2010. 10:42 AMjsgraham says:
The instructables I enjoy most are the ones that are comprehensive, well detailed, and even show the rush of the maker in their notes.  e.g. misspellings, etc.  I'm not complaining.  In fact, I'm extending a kudos.  This was an A++ instructable.  I don't know a lot about microcontrollers.  I guess I'm afraid of jumping in and screwing up whatever I'm trying to do.  But your instructable has inspired me to get an Arduino and start exploring.  Love the work you've done.  You've illustrated that robotics is in all aspects of our lives and we don't even think about it.  On a side note, your "little helpers" are adorable. :-)
Feb 27, 2010. 5:07 PM1up says:
I can't believe your wife let you put this in your doorway! And she even helped you with it. :P

Awesome project, by the way! Looks like fun. :) Now make one with two axes!
Feb 28, 2010. 7:41 AMaskjerry says:
It does have two axis... Y and Z!
( y = left/right  Z = up/down)

But yeah... go for a 3-axis x / y / x !

Build the gantry... one track on the first wall, the second on the other... do the whole room! (Evil grin)
Feb 28, 2010. 9:30 AM1up says:
Y and Z? Two axes? That's ridiculous!

Everybody knows X is left and right and Y is up and down!

Get your facts straight. :P
Only joking, of course. Once again, nice project.
Feb 26, 2010. 8:55 PMmrc4796 says:
funzo?
Feb 27, 2010. 5:41 PMdomestic_engineer says:
Our kids love the Simpsons, and they both wanted Funzos for x-mas. They cried when I told them funzo wasn't real, so I had to make Funzos for them, the same way I made the Moe doll.
www.instructables.com/id/Make_a_Moe_Syzlak_Doll/

I'm glad someone finally noticed it was Funzo.
1-40 of 56next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
27
Followers
13
Author:marc.cryan