RobotForge
The $200 robot arm that actually works
tutorial·14 min read

The $200 robot arm that actually works

A 6-DOF arm built from MG996R servos, a PCA9685, and an ESP32. Pick up a coin. Sort blocks. Under-promise, over-deliver.

Six MG996R servos, a PCA9685 PWM driver, an ESP32, and a 3D-printed frame. Pick up a coin. Sort blocks by color. $210 all-in. No exotic parts, no printed PCB, no surface-mount soldering.

Why this build

Robot arm tutorials online split into two useless piles: "my-first-servo tutorial" (one servo, no structure) and "industrial arm" ($5,000, welding required). Nothing in the middle that gets you to "pick stuff up and move it around, like a real arm, for a reasonable price."

BOM

  • 6× MG996R servos — $6 each = $36
  • 1× PCA9685 16-ch PWM driver — $8
  • 1× ESP32 DevKit v1 — $7
  • 1× 5V 10A power supply — $22
  • ~150g PLA — $4
  • Screws, bearings, ball-joint — $12
  • Jumper wire + DuPont ends — $8
  • Subtotal: $97
  • + camera (ESP32-CAM or USB webcam): $20–60
  • + end-effector (vacuum or parallel gripper): $40–80

The gotcha nobody mentions

MG996R servos can draw 2–3 amps under stall. Don't try to power six of them off your ESP32's VIN pin. You'll brown out, and the ESP32 will reset halfway through your gait. Wire the servo rail to its own 5V 10A supply; share ground with the ESP32, not V+.

Inverse kinematics in 40 lines

For a 2-DOF planar arm (shoulder + elbow) with link lengths L1 and L2, the IK closed-form is:

// JavaScript. theta2 is elbow angle, theta1 is shoulder.
function solveIK(x, y, L1, L2) {
  const r2 = x*x + y*y;
  const cosTheta2 = (r2 - L1*L1 - L2*L2) / (2*L1*L2);
  const theta2 = Math.acos(Math.max(-1, Math.min(1, cosTheta2)));
  const theta1 = Math.atan2(y, x)
               - Math.atan2(L2*Math.sin(theta2), L1 + L2*Math.cos(theta2));
  return { theta1, theta2 };
}

For the full 6-DOF arm, we chain planar IK for the shoulder/elbow and solve wrist orientation separately. Full code in the companion sim lesson (coming with the launch).

What not to attempt first

Don't try dynamic pick-and-place, velocity control, or torque estimation on hobby servos. MG996Rs are position-controlled with no torque feedback. Treat them like that and you'll have a working arm by next weekend.

Liked this?

Get a new one in your inbox. No spam. Unsubscribe in one click.