Servo gripper that stops on a force-sensing resistor: design worksheet and code

A ₹1,192 design worksheet for a servo gripper that closes until a force-sensing resistor says it is holding something, then stops squeezing, with the divider readings worked out and a safe calibration method.

About the author · Sources, testing and AI policy

  • Parts₹1,192
  • Bench time4–6 h
  • LevelIntermediate
  • ReviewedNov 2026

A ₹1,192 gripper that knows when it has hold of something. A force-sensing resistor (FSR) on one finger changes resistance when pressed. The servo closes a degree at a time and stops as soon as the reading passes a threshold, so a paper cup is held rather than crushed. A button opens it again.

Scope: intermediate. This is a design worksheet with illustrative costs. It has not been bench-tested by this site. The divider table was computed by script. FSR resistance falls with force in a curved, part-to-part way, and datasheets describe it only roughly, so the force in grams for a given reading must be found by calibrating your own sensor with known weights. Keep fingers clear of the claw, since a servo can pinch.

How it works

The FSR is wired in a divider with a 10 kilohm resistor to ground, with the FSR on the 5 V side, like a light sensor. With no pressure the FSR is very high resistance and the pin reads close to zero. Pressing lowers its resistance and the reading rises. For example 100 kΩ reads about 93, 30 kΩ about 256, 10 kΩ about 512, 3 kΩ about 787 and 1 kΩ about 930.

The sketch closes the claw one degree every 20 ms. Each step it reads the FSR; when the reading reaches a grip threshold it stops closing and holds. If the reading later falls below a lower release threshold, for instance because the object slips, it closes a little more. If the claw reaches its limit and the reading never passed the threshold, nothing was gripped and the sketch reports it. Using two thresholds avoids hunting around one value.

Bill of materials

PartQtyUnitTotal
Arduino Uno R3 (or compatible)1₹550₹550
Force-sensing resistor, 0.5 inch round type1₹250₹250
10 kilohm resistor1₹2₹2
Micro servo (SG90 or MG90S)1₹120₹120
Servo gripper or claw kit1₹150₹150
Push button1₹10₹10
Breadboard1₹60₹60
Jumper wires1₹50₹50
Parts total₹1,192

Scroll the table sideways to see every column.

Prices checked Nov 2026. Shipping and tools are not included.

Prices are illustrative figures for Indian sellers in November 2026, before shipping, and have not been checked against current listings.

The numbers

FSR resistancePin voltageReading (0 to 1023)
100 kΩ0.45 V93
30 kΩ1.25 V256
10 kΩ2.50 V512
3 kΩ3.85 V787
1 kΩ4.55 V930
Reading = 1023 × 10k / (10k + FSR). The FSR values are examples; real sensors vary and respond nonlinearly to force.

A grip threshold near 300 and a release threshold near 200 are only starting points. Calibrate by hanging known weights, or pressing the claw on a kitchen scale, and writing down the reading against grams for your own sensor.

Power and wiring

PartConnects toNote
FSR5V to one leg; other leg to A010 kΩ from A0 to GND
Servo signalD9
Servo powerSeparate 5 V supply if it resets the UnoCommon GND
ButtonD2 to GNDInternal pull-up
Fix the FSR flat on one finger with a thin layer of soft rubber over it so the force spreads and the sensor’s edges are protected.

The sketch

// Servo gripper with FSR force stop: Uno + servo + FSR + button
// Design worksheet: thresholds depend on your sensor; calibrate them.

#include <Servo.h>

const int FSR_PIN = A0, SERVO_PIN = 9, BTN = 2;
const int OPEN_ANGLE = 30, CLOSED_LIMIT = 120;
const int GRIP_AT = 300;          // stop closing at or above this reading
const int RELEASE_AT = 200;       // tighten again below this reading

Servo claw;
int angle = OPEN_ANGLE;
bool closing = false;
bool holding = false;

void setup() {
  pinMode(BTN, INPUT_PULLUP);
  claw.write(angle);
  claw.attach(SERVO_PIN);
  Serial.begin(9600);
}

void loop() {
  if (digitalRead(BTN) == LOW) {            // button toggles open and close
    delay(30);
    if (digitalRead(BTN) == LOW) {
      closing = !closing;
      holding = false;
      while (digitalRead(BTN) == LOW) {}
    }
  }

  int f = analogRead(FSR_PIN);
  if (closing) {
    if (f >= GRIP_AT) holding = true;
    if (holding && f < RELEASE_AT) holding = false;     // slipping: close more
    if (!holding && angle < CLOSED_LIMIT) angle++;
    if (!holding && angle >= CLOSED_LIMIT) Serial.println("nothing gripped");
  } else {
    if (angle > OPEN_ANGLE) angle--;
  }
  claw.write(angle);
  Serial.println(f);
  delay(20);
}

The servo is only told a new angle, so it is not reading its own position; if the object is stiff, the servo may push harder than the angle suggests. A soft pad, small steps and a conservative threshold keep the force sensible. Print the readings while testing to see the noise on your sensor. The sketch has been proofread but not compiled on this site.

Test plan

  1. Sensor check: press the FSR with a finger and watch the reading rise; it should return to near zero when released.
  2. Calibrate: press the claw onto a kitchen scale and note the reading at 100, 200 and 300 grams of force.
  3. Soft object: grip a paper cup and a foam ball and check neither is crushed.
  4. Hard object: grip a pen and a small box and check the threshold is reached.
  5. Slip test: tug the object gently and see the claw tighten.
  6. Miss test: close on nothing and see the message and that the servo does not strain at its limit.

What usually goes wrong

SymptomLikely causeFix
Never stops closingFSR wired wrongly or too little pressure on itPrint the reading and check the divider
Crushes the objectThreshold too high or pad too stiffLower GRIP_AT and add a soft pad
Releases suddenlyRelease threshold too close to gripWiden the gap between the thresholds
Reading noisyLoose FSR contactSolder the leads or use a proper connector
Servo buzzes at the limitPushing on a stopLower CLOSED_LIMIT

Upgrades

  • Weight estimate: use the calibration table to show the grip force on a screen.
  • Two sensors: add an FSR on the other finger to check the grip is centred.
  • Arm integration: mount it on the record-and-playback arm.
  • Slip detection: watch for a quick drop in the reading.

Cost and parts notes

The ₹1,192 total is an illustration and does not include shipping. Use the cost calculator to compare sellers.

Common questions

What is an FSR?

A force-sensing resistor, a thin sensor whose resistance falls as it is pressed.

Can it measure grams exactly?

Not out of the box. FSRs are good for detecting more or less force, not for precise weighing.

Why two thresholds?

So the claw does not flutter in and out of holding around one reading.

Will a servo crush a soft object?

It can, which is why this design stops at a threshold rather than a fixed angle.

Last reviewed: November 2026. This is a design worksheet with illustrative costs. It has not been bench-tested by this site; library names, pins and limits must be checked against your board and the current library versions, and measurements from your build are welcome.

More builds

Next builds to try

Free: the final-year project pack

A shortlist with BOMs, a report outline that matches the usual chapter scheme, a costing sheet and 40 viva questions. Built for the February–April submission season.

The Build Note

One short email when something is worth your bench time.

A new build sheet, a part price that moved, or a mistake worth avoiding. No daily drip, no recycled news.

One short email when a build or a price is worth your time. Unsubscribe in one click.