Introduction: The Claw: a 3D Printed Robotic Claw

Why? Because everyone needs a robot Claw! This instructable will show you how to 3D print and build a simple robot claw that you can then attach to any of your Arduino projects. You could put it on a RC car, make a full robot arm or put it on a stick and use it to grab things.

Now before we begin, this claw is not going to be particularly powerful, don't imagine you're going to be picking up small children or large mugs of coffee with it. The Servo I'm using cost about $2 so you really do get what you pay for, but besides all that it does look pretty cool and I managed to get mine to pick up lego's, pens and batteries.

Step 1: Parts List

You will need:

  • Access to a 3D printer
  • A soldering iron

Items

  • Arduino UNO (or similar)
  • Breadboard or protoshield
  • Potentiometer (POT)
  • Jump wires
  • Servo
  • Some 3mm filament (or 3mm nut and bolts)

Step 2: Print Your Claw

Use the attached .STL file and print it out. I printed mine with a raft, no scaffolding or support is needed. You can print raft-less if you can manage it, on my Up! Mini the raft just peels away nicely so its no hassle apart from the extra time it takes.

The second .stl file is for a knob to go on the POT, its optional.

  • Once printed pull the pieces apart, if you printed with a raft, we're ready to make THE CLAW...

Step 3:

Check out the pictures, as these speak 1000 words, although I've also described the steps below.

  • Place the cap onto the Servo as shown
  • Using one of the provided screws, screw your servo into the cap. If you have spare screws feel free to put in 2.
  • Take the claw arm that has the servo arm indent in it. Put it over the servo cog and place your Servo's single arm into place in the indent. It should fit nice and snug.
  • Push the arm into the Cog so that it grips move the Servo back and forth and make sure it grips well. Look at the 4th picture your servo should be fully extended by about this point. If it wants to keep going then pull off the arm and adjust it so this is the end point.
  • Now wind the arm back a bit (as shown) and screw in the small screw that came with your servo pack to secure the arm.
  • Hold the 2nd arm in place as shown in the 5th image, it should be in the same relative spot as the first arm.
  • Take the top plate and push it into place, notice there is a hole in the cap under the 2nd arm. The rod from the top plate goes through here and should click into place.
  • Use your remaining screws, to screw the two sides together. There are 3 matching screw holes, but you may only have one screw left from your kit, it will hold together with one screw, put it in the front hole.

Step 4: Putting It Together

  • Cut 6 short pieces of your filament they should be about 8mm long.
  • Push the filament into all of the holes. If you are struggling to get these through you may need to find a 3mm drill bit and gentle drill out the holes. You can actually do this better by hand rather than using a drill.
  • Attach the 2 supports as shown
  • Attach the claws as shown.
  • Using a soldering iron (on low temperature) gently melt and squash the ends of the filament on both sides so that they won't fall out. (or attach nuts if you're using them). If you don't' have a soldering iron you can melt these with a hot knife or similar.

You should now have a working claw. Move the claw back and forward and make sure it moves smoothly and you can hear the gears in the Servo working.

If the servo is not spinning you may not have attached the arm to the servo cog well enough. As long as your claw has full range open and close it should work.

Step 5: Wiring It Up

  • Take you pot and solder 3 wires to it as shown. I find the male leads that come out do not fit well with Dupont wire. But whatever works for you...
  • Leave your batteries out for now
  • In the breadboard connect the battery red and black wires to the power rails +ve and -ve rows respectively
  • IMPORTANT: Connect the GND on the Arduino to the -ve on the breadboard with another wire
  • Connect the red and brown wires on the Servo to the +ve and -ve rails respectively.
  • Connect the yellow wire on the Servo to pin 12 on the Arduino
  • Connect the pot's red and black wires (the outside wires) to the Arduino 5V and GND respectively.
  • Connect the middle wire to pin A0 on the Arduino.

That's it we're ready for the code. See the fritzing diagram above.

Attachments

Step 6: Coding It

The code is pretty simple.

#include <Servo.h>

const int potPin = A0;
const int clawPin = 12;

Servo claw;

void setup() {
  Serial.begin(9600);
  claw.attach(clawPin);
  pinMode(potPin, INPUT);    

  testClaw(2);
}

void testClaw(int loops)
{
  for (int i=0;i<loops;i++)
  {
    claw.write(10);
    delay(1000);
    claw.write(170);
    delay(1000);
  }
}


void loop() {

  int potVal = analogRead(potPin);  
  int angleVal = map(potVal, 0, 1024, 0, 180);
 
  claw.write(angleVal);
   
  Serial.print("Pot: ");
  Serial.print(potVal);
  Serial.print(" Claw: ");
  Serial.println(angleVal);

  delay(50);
}

Plug your Arduino into a PC and upload the code. If you do not know how to do this there is plenty of info on the Arduino.cc website.

Once uploaded, open the serial monitor and set the baud rate to 9600.

Your claw should open and close a couple of times and then you can control it with the POT.

If you wish to disconnect it from the PC and still use it, then you can take a wire from the power rail on the breadboard and plug it into the VIN on the Arduino this should supply sufficient power to also run the Arduino for this demo, however if you are doing much else with the battery pack you may need to come up with a better power supply to prevent it dropping below 5 volts.

Enjoy!

Step 7: Other Ideas...

  • Put your claw on a robot car and use the ultrasonic sensor to trigger it to open/close
  • put your claw on a stick, add a push button to open / close
  • Get a few more Servos and make a robotic arm.