Back to Projects
AI & Robotics

2024 Mechatronics + CV Lead
MATLABSolidWorksPythonOpenCV
Figure 0 · Exploded view
Loading 3D exploded view…
01 / Problem

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.

Figure 1. Figure 1. Vision → planning → control pipeline. The camera doubles as a state estimator, closing the loop every 10 moves.
02 / Approach

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.

QtyPart
2NEMA 17 stepper
6MG996R servo
1Arduino Mega 2560
1Raspberry Pi 4 (4GB)
1Logitech C920 webcam
1Custom 3D printed arm set
Figure 2. Figure 2. Bill of materials — every part deliberately chosen against a student-budget constraint.
03 / Implementation

Implementation

I designed the structural arm in SolidWorks with a 300 mm reach and 100 g payload. Parts were 3D printed in PETG at 50 % infill and iterated three times to eliminate flex at J3. I tuned the trajectory generator in MATLAB by validating each candidate move against a soft virtual fence around the chessboard, rejecting any plan that violated the 5 mm clearance margin.

End-effector position error vs joint travel

Figure 3. Figure 3. End-effector position error grows linearly with joint travel; under 2.5 mm even at maximum reach.
04 / Results

Results

End-effector positional error stayed under 2.5 mm across the full 300 mm travel envelope. The system completed a full self-played match without collisions over a 40-move game.

05 / Lessons

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.

Gallery

Dual-arm chess robot (CAD render) — two articulated arms over a chessboard.
Robot path (MATLAB) — 3D trajectory plot with via-points (X/Y/Z in mm).