Servo gripper with a potentiometer and Arduino: design worksheet and code

A ₹1,485 design worksheet for a claw gripper driven by one servo and a knob, with a separate servo supply, a method to find safe jaw limits and a smoothing sketch.

About the author · Sources, testing and AI policy

  • Parts₹1,485
  • Bench time2–3 h
  • LevelBeginner
  • ReviewedNov 2026

A ₹1,485 servo gripper you open and close with a knob. A hobby claw kit is driven by one SG90-class servo, and a potentiometer sets how far it closes. The Arduino reads the knob, limits the angle to a safe range, smooths the motion and writes it to the servo. The page includes the wiring, a separate servo supply, a complete sketch, a method to find the safe jaw limits, and a test plan for stalls and jitter.

Scope: beginner. This is a design worksheet with illustrative costs. It has not been bench-tested by this site, and the angle limits in the sketch are placeholders that you must find on your own claw. A servo that is told to close further than the jaws can go will stall against them, draw high current and can strip its gears, so the limits matter more than the code.

How it behaves

The potentiometer wiper gives a voltage between 0 and 5 V, which the Uno reads as 0 to 1023. The sketch maps that range onto a closed-to-open angle that you have measured, then moves the servo toward the target in small steps rather than jumping. The result is a gripper that follows the knob smoothly and never asks the jaws to go past their ends.

Bill of materials

PartQtyUnitTotal
Arduino Uno R31₹520₹520
Gripper claw kit1₹250₹250
SG90-class servo1₹130₹130
10 kΩ potentiometer1₹25₹25
Small breadboard1₹60₹60
Jumper wire set1₹50₹50
5 V 2 A buck converter1₹220₹220
2×18650 holder with cells1₹200₹200
Switch1₹30₹30
Parts total₹1,485

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 buck converter is part of the build, not an extra: it gives the servo its own 5 V rail, as the next section explains.

Power and wiring

PartArduino UnoNote
Potentiometer ends5V and GNDOuter pins
Potentiometer wiperA0Middle pin
Servo signalD9Orange or yellow wire
Servo VCCBuck converter 5 V outputNot the Uno 5V pin
Servo GNDCommon GNDJoin to the buck converter and Uno grounds
BatteryBuck converter input and Uno Vin2S pack through the switch; the Uno can also run from USB while testing
Set the buck converter to 5.0 V with a multimeter before connecting the servo.

A small servo can pull far more current when it starts or stalls than the Uno’s regulator should supply. Powering it from the Uno’s 5 V pin is the usual cause of resets and jitter; see servo jitter and twitching. Give the servo its own rail, and join all the grounds.

Find the safe limits first

  1. Before fitting the horn, power the servo and send it to 90 degrees with a tiny test sketch. Fit the horn so the claw is about half open.
  2. With the servo powered, send small angle steps one at a time, for example 10 degrees apart, and watch the jaws. Stop as soon as the jaws touch or the servo starts to strain or hum.
  3. Write down the angle for fully open and the angle for just closed on nothing. Back each off by a few degrees. Those are OPEN_ANGLE and CLOSED_ANGLE.
  4. Only then run the full sketch.

The sketch

// Potentiometer-controlled servo gripper: Uno + SG90-class servo + 10k pot
// Design worksheet: measure OPEN_ANGLE and CLOSED_ANGLE on your own claw first.

#include <Servo.h>

const int POT_PIN = A0;
const int SERVO_PIN = 9;

const int OPEN_ANGLE = 120;     // placeholder: fully open, backed off from the stop
const int CLOSED_ANGLE = 60;    // placeholder: closed on nothing, backed off from the stop
const int STEP = 2;             // degrees per update
const int UPDATE_MS = 15;

Servo gripper;
int current = (OPEN_ANGLE + CLOSED_ANGLE) / 2;

void setup() {
  Serial.begin(9600);
  gripper.attach(SERVO_PIN);
  gripper.write(current);
  delay(500);
}

void loop() {
  int raw = analogRead(POT_PIN);
  int target = map(raw, 0, 1023, CLOSED_ANGLE, OPEN_ANGLE);
  target = constrain(target, min(CLOSED_ANGLE, OPEN_ANGLE), max(CLOSED_ANGLE, OPEN_ANGLE));

  if (abs(target - current) > 1) {
    if (target > current) {
      current = min(current + STEP, target);
    } else {
      current = max(current - STEP, target);
    }
    gripper.write(current);
  }

  Serial.print(raw);
  Serial.print(" ");
  Serial.println(current);
  delay(UPDATE_MS);
}

The step limit makes the jaws move at a steady pace even if you flick the knob. The one-degree dead zone stops the servo twitching when the knob reading flickers by a count or two. If the jaws move the wrong way for your knob, swap the two end angles in the map() call, not the wiring.

Test plan

  1. Knob range: turn the knob from end to end and confirm the printed raw value spans nearly 0 to 1023 and rises smoothly. A noisy or jumping value points to a loose wiper wire or a worn pot.
  2. Limits: move the knob to each end slowly. The jaws should stop short of their mechanical ends with no humming.
  3. Speed: flick the knob. The jaws should follow at a steady rate, not snap.
  4. Supply: watch the Uno during fast moves. A reset means the servo is on the wrong supply or the grounds are not joined.
  5. Gripping an object: close the claw on a soft object such as a foam block. The servo will push against it, so note the heat and noise, and do not hold it closed for long.
  6. Repeatability: open and close ten times and check the jaws return to the same points.

What usually goes wrong

SymptomLikely causeFix
Servo hums at the end of travelAngle limit past the mechanical stopBack the limits off
Servo twitches at restNoisy supply or knob reading flickerSeparate servo rail, common ground, keep the dead zone
Uno resets when the claw movesServo drawing from the Uno 5 V pinUse the buck converter rail
Claw moves the wrong wayPot or horn orientationSwap the angles in map()
Jaws do not reach full rangeHorn fitted off-centreRefit the horn at the half-open point
Servo gets hot while holdingPushing against an object or stopDo not hold closed for long; add a force limit

Upgrades

  • Current limit: measure the servo current as in the battery and current monitor and open the jaws if the current stays high.
  • Mount it on a robot: fit the claw on the front of a car and drive it with the IR remote car, using spare buttons for open and close.
  • Arm: add the claw to the 3-DOF arm.
  • Preset positions: add a button that jumps to open and a closed-on-object position.

Cost and parts notes

The ₹1,485 total is an illustration for the parts above and does not include shipping. Gripper kits vary a lot in quality, and cheap plastic claws can flex or bind, so look at the design of the gear train before you buy. Use the cost calculator to compare sellers.

Common questions

Why not power the servo from the Uno?

The servo's start and stall current can exceed what the board's regulator should supply. That causes resets and jitter. A separate 5 V rail with a common ground avoids it.

Can I control two servos with one knob?

Yes, with one more servo on another pin written from the same target. Give each its own limits and watch the total current on the supply.

Why does the servo buzz when I hold an object?

It is pushing against the object to reach the commanded angle. Command a slightly more open angle when holding, or add a current check.

Can I use a larger servo?

Yes, but check its voltage and current needs first. A larger servo needs a bigger supply than the converter in this build.

Last reviewed: November 2026. This is a design worksheet with illustrative costs. It has not been bench-tested by this site; angle limits and speeds are placeholders to find on your own claw, 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.