# 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.

Canonical: https://roboticsengineering.in/projects/servo-gripper-force-sensing-resistor-arduino/ | Published: 2026-11-04 | Updated: 2026-11-04

**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

| Part | Qty | Unit | Total |
| --- | --- | --- | --- |
| Arduino Uno R3 (or compatible) | 1 | ₹550 | ₹550 |
| Force-sensing resistor, 0.5 inch round type | 1 | ₹250 | ₹250 |
| 10 kilohm resistor | 1 | ₹2 | ₹2 |
| Micro servo (SG90 or MG90S) | 1 | ₹120 | ₹120 |
| Servo gripper or claw kit | 1 | ₹150 | ₹150 |
| Push button | 1 | ₹10 | ₹10 |
| Breadboard | 1 | ₹60 | ₹60 |
| Jumper wires | 1 | ₹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 resistance | Pin voltage | Reading (0 to 1023) |
| --- | --- | --- |
| 100 kΩ | 0.45 V | 93 |
| 30 kΩ | 1.25 V | 256 |
| 10 kΩ | 2.50 V | 512 |
| 3 kΩ | 3.85 V | 787 |
| 1 kΩ | 4.55 V | 930 |

*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

| Part | Connects to | Note |
| --- | --- | --- |
| FSR | 5V to one leg; other leg to A0 | 10 kΩ from A0 to GND |
| Servo signal | D9 |  |
| Servo power | Separate 5 V supply if it resets the Uno | Common GND |
| Button | D2 to GND | Internal 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

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| Never stops closing | FSR wired wrongly or too little pressure on it | Print the reading and check the divider |
| Crushes the object | Threshold too high or pad too stiff | Lower GRIP_AT and add a soft pad |
| Releases suddenly | Release threshold too close to grip | Widen the gap between the thresholds |
| Reading noisy | Loose FSR contact | Solder the leads or use a proper connector |
| Servo buzzes at the limit | Pushing on a stop | Lower 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](https://roboticsengineering.in/robotics-project-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.
