Problem
Build a robotic system that can perceive a chessboard, decide on a move with a chess engine, and execute it as a smooth, collision-free dual-arm motion. Constraints: hobby-grade actuators with non-zero backlash, a single overhead camera, a budget that ruled out industrial-grade encoders, and a deadline driven by a class demo.
Approach
Three layers. A vision layer (OpenCV) rectifies the board from the overhead camera, segments occupied squares, and emits a (from, to) move. A planning layer (Python + MATLAB Robotics System Toolbox) solves inverse kinematics for both arms and produces a time-parameterised joint trajectory with parabolic blends to soften acceleration discontinuities. A control layer (Arduino Mega) consumes joint angles over serial at 100 Hz and dispatches them to a NEMA 17 stepper for J1 and MG996R servos for J2–J6.
| Qty | Part |
|---|---|
| 3 | maxon ECX FLAT 32 brushless motor |
| 3 | Harmonic Drive CSF-11 gearbox |
| 1 | Link one |
| 1 | Link two + spherical end effector |
| 1 | Conical base + shoulder bracket |
| 1 | Raspberry Pi 4 (4GB) |
| 1 | Overhead webcam |
Implementation
The arm is a yaw base plus two pitch joints, designed in SolidWorks — 470 mm to the elbow, another 381 mm to the tip, so about 850 mm of reach fully extended. Each joint pairs a flat brushless motor with a zero-backlash harmonic gearbox, because backlash at the shoulder becomes centimetres of error at the piece. I tuned the trajectory generator in MATLAB against a soft virtual fence around the board, rejecting any plan that violated the 5 mm clearance margin.
Results
The system completed a full self-played match without collisions over a 40-move game, with the vision layer re-anchoring board pose often enough to absorb small bumps between captures.
Lessons
The single biggest win was treating the camera as a state estimator, not just a sensor — recalibrating board pose every 10 moves let me dead-reckon between captures and stay robust to small bumps. Hobby servos are limiting; the next iteration would replace J2/J3 with closed-loop steppers.
Appendix — Figures & Plots
2 figures · click to enlargeSupporting imagery for this project — boards, plots, screenshots and build shots that did not make the narrative above. Click any figure to open it full-screen.