Webcam-Controlled Robotic Arm (SO-101)
A 6 DoF SO-101 follower arm controlled by a webcam only.
Overview
- Context
- I want to work on humanoid robots one day, at companies like Tesla Optimus, Figure, or 1X, and I wanted an affordable way to learn how a robot arm is designed, built, and controlled. I chose the open-source SO-101 follower arm as my base: six Feetech STS3215 serial bus servos and a set of 3D-printed parts. My first prints did not hold the servos, and a full set took about 45 hours to print on a printer I can only run 10 to 12 hours a day.
- Action
- I redesigned all 11 printed parts to use the least filament while keeping the strength the arm needs, printed them in PETG, and set up the LeRobot stack to drive the servos. Instead of the usual leader arm, I control the robot with a laptop webcam: MediaPipe tracks my arm and hand, a MuJoCo model of the arm turns that into joint targets, and hand gestures switch between modes.
- Result
- Measured in the slicer, the redesigned set uses 35 percent less filament and 36 percent less print time than the stock parts (293 g and 28.8 h versus 454 g and 45 h), and every part keeps a printed safety factor of at least 3.9 at full motor stall. In simulation, the webcam pipeline runs with about 49 ms of processing latency and the arm uses nearly the full range of every joint.
- Learning
- On a 3D-printed part, the slicer profile and a closed shell save more material than cutting holes, and every number should be measured instead of assumed. On the software side, safety limits belong in a control system from the first line of code.
Pictures coming soon
What I did
- Built a 6 DoF SO-101 follower arm on six Feetech STS3215 serial bus servos, controlled by a webcam only
- Redesigned all 11 printed parts, cutting filament by 35 percent and print time by 36 percent (measured in the slicer)
- Chose PETG over PLA for its strength and heat resistance near the servos, allowing lighter, lower infill parts
- Set up the LeRobot stack in Python and assigned unique servo IDs over the serial bus
- Mapped MediaPipe pose angles to MuJoCo joint targets with smoothing, velocity clamping, and joint limits
- Added gesture recognition that triggers recorded preset movements, with a mimic or preset mode switch
Engineering decisions
- Why the SO-101 as a base. Starting from an open-source arm let me make real progress with a student budget. I kept the servo layout and redesigned every printed part myself, so my time went into the parts I wanted to learn: design for printing, simulation, and control.
- Why a webcam instead of a leader arm. The standard way to control an SO-101 is a second, hand-moved leader arm. A leader arm costs more, takes up desk space, and would have taught me less. Turning a camera image into joint angles was the harder problem, and the one I wanted to solve.
- Why PETG. PETG is stronger than PLA and handles more heat, which matters because the servos warm the plastic around them after long use. The extra strength also let me print with less infill: my profile went from 15 percent infill to 10 percent lightning infill, so the parts are lighter while still strong enough for the arm.
- Holes do not always save filament. My first idea was to cut material out of the parts. The slicer data showed this rarely works: removing 24 percent of the solid volume from the upper arm saved no filament, because every new opening adds wall lines. An opening only paid off when it was wider than about 15 mm in a 10 to 12 mm plate. Most of the saving came from a tuned slicer profile instead: 0.28 mm layers, 2 walls, 10 percent lightning infill, and supports only where needed.
- Topology optimization versus a simple box. A topology optimization of the upper arm suggested two rails and an X brace. Once sliced, that shape saved under 2 percent of filament and lost 32 percent of the stiffness. A closed hollow box was 4 times stiffer than a thin plate for only 3 g more, so the final upper arm is a box.
- Print orientation is a strength decision. For the shoulder part, a cheaper print orientation would have saved 8 g but put layer lines across the ears that carry the whole arm. I kept the stronger orientation.
- Checking strength. I checked every part at full motor stall (2 N m plus a 10 N load) with finite element analysis, using two independent methods that agreed within 4 to 35 percent. The lowest printed safety factor is 3.9, on the moving jaw.
From webcam to joints
- Mapping a human arm to a robot arm. A human shoulder has three degrees of freedom and the robot's has two, so many of my poses have no exact match. I project my forearm and hand into the robot's plane of motion and measure each angle with a sign, so a pose the robot cannot reach clamps at the limit instead of folding the wrong way. 19 unit tests cover the mapping.
- Smoothing. MediaPipe landmarks jitter from frame to frame even when my arm is still. Without smoothing, that noise goes straight to the servos and the arm shakes.
- Velocity clamping. When tracking drops for a frame or jumps to a wrong point, the target can move tens of degrees at once. A speed limit makes the arm travel there smoothly instead of snapping: 30 degrees per second for first tests on the real arm, 90 in normal use, and 80 for preset moves.
- Joint limits. Every joint stops 5 degrees short of its mechanical range, so a bad pose clamps safely instead of driving the arm into its own frame. An early test path in simulation dragged the gripper on the floor 41 percent of the time, which would have happened on a real table too. Limits and planned paths fixed it.
- Safety around the real motors. The webcam program and the motor driver are two separate programs, so the part that moves the motors stays small and testable. The driver has a kill switch, a 0.5 second watchdog that holds the arm still if commands stop, and a direction check with torque off before live mode can start.
Gesture modes
Copying my arm shows the tracking, but preset moves show repeatable motion and give me a way to stop or reset the arm without touching the keyboard. A fist freezes the arm, an open palm sends it home, a peace sign plays a wave, and a thumbs up returns to copying my arm. A gesture must be held for 1 second and fires only once until my hand changes, so a passing hand shape cannot trigger it. Preset moves follow smooth minimum-jerk paths that start from wherever the arm is.
Mistakes and fixes
- Servos did not fit. My first servos would not press into their pockets. Calipers showed the printer's scale was right within 0.2 mm. The real cause was walls printing about 0.2 mm thick on each side, so a 24.7 mm motor pocket came out 24.35 mm. Instead of reprinting full parts after every change, I designed a small clearance test print to tune the fit.
- Losing the wrist. At laptop distance, the pose model lost my wrist whenever I reached forward, and the arm froze. When the pose model is unsure, the program now rebuilds the wrist position from the hand model, which still sees the hand. On test data, the rebuilt wrist was within 6 mm (median).
What is not working yet
- The end-to-end latency between my movement and the arm's movement is higher than I want. I am working on it.
- In one live test, the camera tracked my full arm in only 42 percent of frames, mostly when I moved out of a clear view of the camera.
- Wrist roll is the weakest estimate, at about 8 degrees median error on test data.
Next steps
- An automatic tool changer, so the arm can switch from the gripper to other tools on its own
- Measure end-to-end latency and joint tracking error on the real arm
Tools
- Python
- LeRobot
- MediaPipe
- MuJoCo
- OpenCV
- Onshape
- OrcaSlicer
- Finite element analysis
- PETG