Robot Arm
A robot arm is a chain of rotary joints, and every joint is a servo holding a known angle. Get the power and the angles right and the arm moves like a crane. Get them wrong and it sags, jitters or resets mid-move.
A robot arm is a chain of joints
Open any industrial robot arm and you find the same idea repeated: a shoulder, an elbow and a wrist, each driven by a motor that can hold a position against a load. A classroom arm is the same machine with cheaper motors and fewer degrees of freedom. Six hobby servos give you six rotary axes, enough for a shoulder, an elbow, a wrist pitch, a wrist roll, a gripper and a pan at the base.
The physics that decides the design is torque. Servos are rated in kilogram-centimetres, the weight a servo can hold at one centimetre from its shaft. A 20 g arm at 10 cm needs 2 kg-cm at the shoulder; the same 20 g arm at 25 cm needs 5 kg-cm. Because the moment arm grows with distance, the joint nearest the base carries the largest load, and that is the servo to size first. Doubling the arm length doubles the load on every joint downstream of it.
Why the power supply decides everything
The classic failure in a student robot arm is not a bad sketch. It is the power supply. Four servos stalled draw 4 to 5 A at once, and an Arduino powered from a USB port or from the 5 V pin cannot deliver that. The rail sags, the servos chatter, and the microcontroller resets in the middle of a move.
Two rules fix it. Power the servos from a separate 5 V supply and tie the grounds together, and never power a servo from a GPIO pin, which can source about 20 mA. Remember also that the Servo library takes over Timer1 on the Uno, which quietly stops the hardware PWM on pins 9 and 10. If a sketch that used to work stops working once you add servos, check those pins first.
Step by step
-
Drive one servo with no load
Hook a single servo to its own 5 V supply and sweep it from 0 to 180 degrees. Confirm the angle matches the number you send and listen for the buzzing that means the servo is sitting at its mechanical limit.
-
Measure the real torque need
Hold the arm at full reach and note the load at each joint. Compare it with the servo's kilogram-centimetre rating and upgrade any joint that is close to its limit before you build the rest of the arm.
-
Build the frame from the base out
Assemble one joint at a time, testing each axis as you add it. A shoulder that works and a wrist that will not lift tells you exactly which servo to change.
-
Add the gripper
Mount a servo-driven jaw with a thin rubber pad so it grips without crushing the object. Test the grip on something light before adding the wrist servos.
-
Coordinate the axes
Write a routine that moves several joints to a named pose at once, with a short delay between each. Increase the delay until the move is smooth instead of fighting itself.
-
Add limits and a control input
Map a knob or joystick to joint targets, and clamp every target inside a safe range so the arm cannot be driven into a joint stop, where the servo would stall and overheat.
What you'll need
| Item | Qty | Why |
|---|---|---|
| Arduino Mega 2560 | 1 | 54 digital pins and four hardware serial ports, so six servos and a sensor all fit without pin juggling. |
| Metal gear servo MG996R | 3 | Roughly 9 to 11 kg-cm at 6 V, which covers the shoulder and elbow where the load is heaviest. |
| Micro servo SG90 | 3 | About 1.8 kg-cm, enough for the wrist and gripper where the arm is light. |
| 5 V 3 A bench power supply | 1 | Four servos stalling draw close to 5 A. A USB port or the 5 V pin cannot supply that and the board will reset. |
| HC-SR04 ultrasonic sensor | 1 | Mounted at the gripper to report how far the arm is from a shelf or a wall before the jaws close. |
| Common ground jumper wire | 2 | The signal reference between the servo supply and the board. Without it the servos twitch at random. |
Practise it before you build it
Every step above has a matching circuit in the ThinkEdge Learn simulator. The simulator runs a real
Arduino sketch against a modified-nodal-analysis solver, so digitalWrite actually drives the
LED on screen and the readings change when you change the wiring — no hardware, no burnt components.
A real robot arm has at least 4 servos: base rotation, shoulder, elbow, and gripper. The Mega can drive all 4 from independent PWM pins (D9, D10, D11, D12) using the Servo.h library. Each servo is told an angle (0-180°) and the library generates the right PWM signal automatically. The four potentiometers (A0–A3) act as the RC controller — twist them and each servo follows in real time, just like a real robot arm teaching pendant.
A servo motor holds whatever angle you tell it. Inside the servo is a small DC motor, a gearbox, and a potentiometer that tells the servo's brain where it currently is. The Arduino sends a pulse 50 times per second; the pulse width (1ms to 2ms) tells the servo the target angle (0° to 180°). The Servo.h library handles all of this for you.
This is the classic "knob turns motor" pattern — used in RC controllers, robotic arms, animatronics, and steering systems. Read a potentiometer, map the 0-1023 range to the servo's 0-180° range, and write it. The user moves the knob and the servo follows. This is the simplest "control loop" you can build.
This is the foundation of any "remote control" project: a button (or sensor) decides what position the actuator should be in. Here we use TWO buttons. Press button A and the servo snaps to 0°. Press button B and it snaps to 180°. The servo library handles the smooth motion for you.
Your hand is an engineering marvel: 27 bones, 34 muscles, and tendons that pull on the bones to move your fingers. Engineers have been building "bionic hands" for amputees for decades. The simplest design uses a tendon-and-servo approach: a fishing line acts as the tendon, and a small servo acts as the muscle. When the servo pulls the line, the finger bends. In this project, you'll build a 1-finger prototype from cardboard and string, controlled by a single servo. Then you can extend to 5 fingers for a full hand.
Common questions
How much does a robot arm cost to build?
A four-axis arm with a servo gripper runs $55 to $130 in parts: $12 to $20 for a Mega or clone board, $18 to $30 for three metal gear servos, $6 to $12 for three micro servos, $8 to $15 for a 5 V supply, and $10 to $25 for frame material and fasteners. A five-axis version with heavier servos lands closer to $180.
Which servo should I use for a robot arm?
Match the servo to the moment at that joint, not to how big the arm looks. SG90 micro servos give about 1.8 kg-cm and will sag under any real load. MG996R metal gear servos give 9 to 11 kg-cm at 6 V and are the usual choice for shoulder and elbow. If your calculated torque lands within 20 percent of a servo's rating, step up one size.
Why does my robot arm shake and reset when it moves?
Almost always a power sag. Four servos stalling draw 4 to 5 A, and an Arduino running from USB or the 5 V pin cannot supply that, so the rail browns out and the board resets mid-move. Power the servos from a separate 5 V supply, join the grounds, and if the resets continue put a 470 uF capacitor across the servo supply.
Related guides
Try the full simulator with your class
103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. NCERT Science mapping on 47 projects, with Arabic and English copy in the regional builds.