A robot arm with four mini servos: how it works
The arm’s four joints (base, shoulder, elbow and gripper), why powering the servos is where most problems come from, the two ways to control it with a joystick and how to record and replay movements.

A workbench robot arm with four mini servos has four degrees of freedom: four independent movements. That is enough to pick up an object at one spot on the table and put it down at another, and it is the same reasoning as an industrial arm with six joints.
The four joints
- Base. Rotates the whole arm around the vertical axis: it chooses which way the arm points.
- Shoulder. Tilts the arm forward and back: it sets the reach and the height.
- Elbow. Bends the forearm: it adjusts the height of the tip.
- Gripper. Opens and closes.
Each joint is a mini servo, which turns from 0 to 180 degrees and holds the angle it was given. But the mechanical part rarely uses the full 180 degrees. The gripper, for example, may hit the end of its travel well before that. That is why the first job with a new arm is to find the limits of each joint: move it slowly and note the angle at which it bottoms out.
Power: where almost every arm fails
A mini servo at rest draws little current. In motion, and especially when it pushes against an obstacle, the current climbs to hundreds of milliamps. Four servos at once easily exceed what the computer’s USB port and the board’s regulator can supply.
The symptoms are well known: the board resets in the middle of a movement, the servo jitters, the program stops responding to the joystick. The fix:
- A separate 5 V supply for the servos, rated for at least 2 A.
- The supply’s GND tied to the board’s GND. Without a common reference, the command signal is not understood.
- An electrolytic capacitor (470 µF to 1,000 µF) across the servos’ power terminals, to absorb the peaks.
- Movements in small steps, instead of jumps from 0 to 180 degrees. Besides easing the load on the supply, it spares the gears.
Two ways to drive it with the joystick
Direct position. The servo angle is the lever position: lever in the middle, servo at 90 degrees; lever at the end, servo at 180. It is the simplest to set up, but the arm goes back to the center when you let go of the lever, and any shake of your hand becomes a shake of the arm.
Speed. The lever says which way the servo moves and how fast. Lever in the middle, the servo stays where it is. Push it, and the angle rises a little on every pass of the program loop. This is how real arms are controlled: you bring the tip to the spot and let go.
In the block coding IDE, both exist as cards: "Servo follows the joystick" does direct position, and "Joystick moves the servo" does speed control, with a minimum and maximum angle limit for each joint.
Record and replay
With two joysticks, you get two spare buttons, one on each lever. A classic use:
- Joystick 1 button: records the current position of all four joints and beeps.
- Joystick 2 button: replays the recorded positions, one after another.
This is the principle behind the "teach by hand" mode of many industrial robots: the operator guides the arm to the points and the robot repeats them.
The eye and the voice
The ultrasonic sensor at the front of the gripper measures the distance to the object. With it, the arm stops being just a remote control and starts to react: close the gripper when something comes within 5 cm, or beep when someone’s hand gets close. The buzzer is the feedback: it confirms a recording, signals the end of the program and warns of a nearby object.
Building it in the IDE
Open the block coding IDE, choose the board and start with a single joint. The articles on the SG90 servo and the analog joystick explain what happens under each card.