T ThinkEdge Learn

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.

robot arm robot arm project how to build a robot arm
Robotics · Four axes, each tested before it carries any load

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

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

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

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

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

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

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

ItemQtyWhy
Arduino Mega 2560154 digital pins and four hardware serial ports, so six servos and a sensor all fit without pin juggling.
Metal gear servo MG996R3Roughly 9 to 11 kg-cm at 6 V, which covers the shoulder and elbow where the load is heaviest.
Micro servo SG903About 1.8 kg-cm, enough for the wrist and gripper where the arm is light.
5 V 3 A bench power supply1Four 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 sensor1Mounted at the gripper to report how far the arm is from a shelf or a wall before the jaws close.
Common ground jumper wire2The 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.

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

Humanoid Robots: Balance First, Walking SecondWhat makes a humanoid robot work: inverted-pendulum balance, joint torque budgets and centre of mass, plus the Arduino projects to get you there. How to Build a RobotHow to build a robot from scratch: one motor and a switch, then sensors, then a line-follower that steers itself. Every stage runs in a browser simulator first. Robotics and Autonomous Systems: The Four Sub-AreasRobotics and autonomous systems split into perception, planning, control and SLAM. Here is what each needs, and which parts an Arduino can reach. How to Learn RoboticsHow to learn robotics without a degree: the order to learn electronics, code and control in, how long each stage takes, and the projects that prove each one landed. Arduino Projects for BeginnersTen Arduino projects for beginners that really work, in the order that makes them easiest, with the parts each one needs and the mistake that catches people out.

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.