Grippers and end effectors
What you’ll learn
- What an end effector is
- Common gripper types and what each is good at
- How to build and protect a servo gripper
End effectors
The tool at the end of a robot arm is its end effector: a gripper, a suction cup, a magnet, a pen, a welding torch. Change the end effector and the same arm does a different job.
Gripper types
| Type | How it holds | Good for |
|---|---|---|
| Two-finger (angular) | Jaws pivot closed | Simple, cheap, most hobby grippers |
| Parallel | Jaws slide closed, staying parallel | Boxes and blocks |
| Suction | A vacuum pump or cup pulls a flat surface | Flat, smooth items: phones, glass, card |
| Magnetic | An electromagnet | Steel parts only |
| Soft | Flexible fingers inflate or bend | Fruit, eggs, delicate items |
Building a servo gripper
- A servo drives one jaw, and gears or a linkage close the other at the same time.
- Don’t stall the servo by commanding a “closed” angle tighter than the object allows. It will heat up and draw lots of current. Find the angle that just grips, and use that.
- Add rubber or foam on the jaws for grip.
- A limit switch or pressure sensor in a jaw tells the robot it’s holding something.
Example: tuning the close angle
| Command | Result |
|---|---|
write(140) |
Servo buzzes and gets warm: it’s stalling against the block |
write(110) |
Holds the block firmly, no buzzing |
write(100) |
Block slips |
Use 110°, and maybe a slightly lower angle for small objects.
Example: pick and place sequence
- Open the gripper.
- Lower the arm over the object.
- Close to the tuned angle; wait 300 ms.
- Lift, rotate the base, lower.
- Open, lift, return home.
Try it in the virtual Arduino
Press Start simulator, open the diagram.json tab and replace its contents with the wiring below, then paste the sketch into sketch.ino and press the green ▶. If Wokwi says a library is missing, click its Install button and press ▶ again.
{ "version": 1, "author": "RoboLearn", "editor": "wokwi", "parts": [ { "type": "wokwi-arduino-uno", "id": "uno", "top": 0, "left": 0, "attrs": {} }, { "type": "wokwi-servo", "id": "servo1", "top": -100, "left": 180, "attrs": {} }, { "type": "wokwi-pushbutton", "id": "btn1", "top": -90, "left": 40, "attrs": { "color": "green" } } ], "connections": [ [ "servo1:GND", "uno:GND.1", "black", [] ], [ "servo1:V+", "uno:5V", "red", [] ], [ "servo1:PWM", "uno:9", "orange", [] ], [ "btn1:1.l", "uno:2", "green", [] ], [ "btn1:2.l", "uno:GND.2", "black", [] ] ], "dependencies": {}}#include <Servo.h>
Servo jaw;const int OPEN = 20, CLOSED = 110; // tune these to your gripperbool closed = false, wasPressed = false;
void setup() { pinMode(2, INPUT_PULLUP); jaw.attach(9); jaw.write(OPEN);}
void loop() { bool pressed = digitalRead(2) == LOW; if (pressed && !wasPressed) { closed = !closed; jaw.write(closed ? CLOSED : OPEN); delay(50); } wasPressed = pressed;}Runs on Wokwi, free, no account needed.
Tune itEasy
Change CLOSED to 90 and to 160. Which would be gentler on a real gripper?
The smaller close angle (less squeeze) is gentler; 160 would probably stall a real gripper.
Slow closeMedium
Make the gripper close gradually (1° every 10 ms) instead of snapping shut.
Replace jaw.write(...) with a loop: for (int a = OPEN; a <= CLOSED; a++) { jaw.write(a); delay(10); } when closing (and the reverse loop when opening).
Pick the gripperHard
Choose a gripper type for: a phone on a desk, an egg, steel washers, a cardboard box. Phone: suction. Egg: soft gripper. Washers: magnetic. Box: parallel two-finger gripper.
Quick check
Finished this lesson?