Sparkfun Robot Claw

I recently purchased an inexpensive robot "claw" from Sparkfun.  I was a little hesitant to purchase it at first because of the  mixed reviews in the comments on the Sparkfun product page.  Some people seemed really happy with the claw, but a few were reporting difficulties, primarily difficulties mounting the servo to the claw. 

But I decided, what the heck.  The claw’s only about $10, let’s try it and see what happens.   And I’m glad I did.  The claw has been pretty fun to play with so far.  It definitely makes for a more interesting Arduino/servo project than just watching the little round end of the servo rotate back and forth! :-) 

However, it *is* a little tough to get put together and working.  Like many of the comments over at Sparkfun point out, the Claw doesn’t *quite* fit the medium servo that Sparkfun sells.  It fits well enough to work, but not well enough to assemble easily. 

So to help out other people who are trying to use the Sparkfun claw, I disassembled my claw and put together the following little photo tour as a put it back together.  Enjoy!

Introducing – the Claw!


Shown here with a penny for size comparison is the claw as it looks right out of the box with no servo attached. 

The medium servo:


Also shown next to a penny is the medium servo from Sparkfun and all the hardware that comes with it.

Mounting the servo to the claw body:

The first step to assembling the claw is to mount the servo body to the main body of the claw.  The front face of the servo is going to mount to the back side of the claw, so that the servo drive shaft will poke out through the big oblong hole in the front of the claw.  There are two screw holes on either side of the big oblong hole.  Use the 2 long screws and a couple of the nuts  that came with the servo to secure the servo to the claw.  Leave the nuts very, very loose!  The serve should be loose enough that it can wiggle in and out about 1/4 inch or so.

This is what it should look like once you get the servo body attached to the claw body:


And here’s what it looks like from the back:


You’ll notice in this picture that the screw on the right is really loose, but the screw on the left is fairly tight.  After I took this picture, I actually had to loosen the screw on the left considerably before I was able get the rest of the claw put together.  You might also notice that the screws look like they’re wedged outward in a bit of a "V" shape.  That’s not an illusion.  The screw holes in the claw are a *little* too close together and don’t quite match width of the servo.  You *can* get the two to work together, but do expect a little bit of squeezing and cramming.

Attaching the control horn to the claw:

I’ve noticed in the comments on Sparkfun  that a lot of people are trying to attach the loose "finger" of the claw to the little round plastic disk that comes with the servo.   The size and shape of the disk certainly make it *look* like it should hook up to the claw, but none of the mounting holes in the disk will line up with the screw holes in the claw.  One option would be to poke or drill new holes in the disk, but I found that the long flat servo control horn actually fits quite well on the claw with two of the little pointy screws included with the servo. 

Here’s a picture of the control horn mounted on the claw:


Putting it all together:

Now comes the hard part.  Putting the control horn (with attached claw "finger”) onto the servo drive shaft.  You’ll need to make sure the screws holding the servo are plenty loose at this point, and even so you’ll need to use plenty of hard squeezing and pushing to make it work.  But rest assured, it *will* go on if you keep trying.    Just make sure you have the gear teeth lined up correctly! 🙂

This is what it should look like once it’s all put together:


Attaching the servo to a breadboard:

What!? You mean we’re not done with obstacles?!  Well, actually… no.  There’s still a few more things we need to do to use the claw.  If you’re anything like me, the first thing you want to do now is hook the claw up to a breadboard.  The bad news is that the connector on the servo is just a *little* too deep for the standard break-away male headers that Sparkfun sells.  The short end of the headers just won’t go deep enough into the servo connector.  But, Sparkfun also sells some extra long breakaway male headers that will work just fine.  After you break away a three pin set of headers, the little plastic separator on the headers should push down, giving you plenty of room on both the breadboard side and servo side of the header.



Setting up a simple test circuit:

The logical next step is to setup a simple circuit to test our newly assembled claw.  Below is the breadboard and schematic views of a simple circuit I put together to test the claw:





This is a basic circuit that hooks the claw servo and two push buttons up to the Arduino.  Once built, copy the following code into a new Arduino Sketch:

// Controlling a servo position using two push buttons

#include <Servo.h> 
Servo myservo;  // create servo object to control a servo 

// constants 
int openButtonPin = 10;  
int closeButtonPin = 11; 
int servoPin = 9;
int openLimit = 0;  // can be set to limit the claw to its "safe" opening limit
int closeLimit = 170; // can be set to limit the claw to its "safe" closing limit
int stepInterval = 1;

int servoPos = 90;    // the current server position.  Change it to whatever position you want your claw to start out at.
int openButtonState = 0;   
int closeButtonState = 0;
void setup() 
  // open the serial console
  Serial.println("Begin Claw testing"); 
  // setup the input pins on the Arduino
  pinMode(openButtonPin, INPUT);
  pinMode(closeButtonPin, INPUT);
  // create the servo object
  myservo.attach(servoPin);  // attaches the servo to the servo object 
void loop() 
  // read the state of the buttons
  openButtonState = digitalRead(openButtonPin);
  closeButtonState = digitalRead(closeButtonPin);
  // if neither button is pushed or both buttons are pushed, do nothing
  if ( openButtonState == closeButtonState ) {
  // if the open button is pushed, open the claw by stepInterval
  if (openButtonState == HIGH) {
      servoPos = servoPos - stepInterval;
  // if the close button is pushed, close the claw by stepInterval
  if (closeButtonState == HIGH) {
    servoPos = servoPos + stepInterval;
  // make sure we don't try to open the claw further than it can go
  if (servoPos > openLimit) {
    servoPos = openLimit;
  // make sure we don't try to close the claw tighter than it can go
  if (servoPos < closeLimit) {
    servoPos = closeLimit;
  // sets the servo position according to the new value 
  // waits for the servo to get there
  // print the servo position to the serial console  

What this sketch will do is let you open the claw (by pushing one button), and close the claw (by pushing the other button).  While doing so, it’ll print the current claw position out to the Arduino serial monitor.  This is important, because the servo *isn’t* going to be able to move through it’s normal full range of motion while attached to the claw.  If you move the servo too far, it makes a continuous “humming” noise.  It’s quite annoying, and I do wonder if it’s bad for the servo to be constantly straining to open or close beyond what it’s really able to do.  That’s why the “Serial.println” statements are in there.  Use the position output in the serial monitor to figure out what’s the usable maximum open and close position are for your claw.  Then you can modify the “openLimit” and “closeLimit” variables at the top of the script to automatically stop the claw from trying to move to far.   Happy clawing!  Smile

3 thoughts on “Sparkfun Robot Claw

  1. I appreciate the the blog post. It really helped. It appears that I’m going to have to trim off a part of the control arm. Otherwise, the arm will run into the screws holding the mounting bracket on the end of the claw. Did you run into the same issue?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s