Let's Make Robots!

Free Servo force sensor

Uses the servos potentiometer to detect resitance on a gripper.
Gripper on my robot.2.24 MB
My robot.1.97 MB

I soldered a wire to the middle pin of the potentiometer inside the servo that operates my gripper. Using an analog pin, I can tell when the Servo isn't moving. I use a subroutine to slowly close the gripper and check if the potentiometer value has changed since the last time I incremented the servo value. If the value has changed much over the increment, is detects something is inside the gripper and is tightly gripped. this is the arduino code that I used: 


void Grip() {

  GripperVal = 80;



  do {

    lastPos = currPos;

    GripperVal = GripperVal + 5;



    currPos = analogRead(4);


    if(Serial.read() == 'b') {

      GripperVal = 80;






  while(abs(lastPos - currPos) > 5 && GripperVal < 140);


  GripperVal = GripperVal - 5;



  Serial.print("done - lastPos - ");


  Serial.print(" currPos - ");


  Serial.print(" Gripper Val - ");



My robot!


This eliminates the need of a seperate force sensor to be installed into a robots gripper. Some of the values may need to changed for different servos. I ended up spending an hour and a half tuning it to my gripper.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Cool. Collected.

It would be easy to add it to Grab-E for his gripper. All you need is to solder a wire to the potentiometer and connect it to an analog pin.

You have read my tiny, transparent mind.

Thanks for sharing your method. Another way to determine the force is employing a current sensor, with a series resistor in the ground terminal (0.33ohm for example). With an apropiated low pass filter (to supress noise and some high frequency signals), the voltage in this resistor will be proportional to the force applied. 

Be careful with the current spikes when the servo begins a rapid movment, this can produce a "false force" that must be filtered by software.