The Mechanical Turk
The Mechanical Turk (project)
Overview
The Mechanical Turk is a technical and artisanal chessboard project developed within the Dutch hackerspace Hackerspace RandomData. It combines woodworking, 3D printing, NFC technology, robotics, and Python development to create a physical chessboard that synchronizes with digital chess games played on platforms like Chess.com.
Moves from an online opponent are physically executed on the board by a hidden robotic arm, while moves made on the physical board are detected and sent back to the online game. The name is a modern reference to the 18th-century chess automaton known as The Mechanical Turk, which falsely appeared to play autonomously. This version is fully transparent and truly functional.
Project Lead
The project is led by 0ffset_0x52, also known as UEV52. Those interested in contributing can contact him via SignalChat or the Mattermost channel of Hackerspace RandomData.
Goals
- Build a working physical chessboard that mirrors and controls online games
- Automate physical piece movement using a robotic magnetic arm
- Enable real-world games against Chess.com opponents and AI bots
- Create a platform that fuses old-world craftsmanship with modern automation
Technical Design
- Each chess piece contains a unique NFC tag
- A magnetic robotic arm moves along X, Y, and Z axes beneath the board
- Pieces are lifted magnetically and placed using scripted coordinates
- The system tracks each piece's position via NFC scans
- All movement and logic are handled via a custom Python script
- Synchronization with Chess.com is achieved using their public API
Required Components
| Component | Specification / Version | Description |
|---|---|---|
| Raspberry Pi | Raspberry Pi 4 Model B (4GB RAM) | Controls motor logic, NFC reading, and API communication |
| Operating System | Raspberry Pi OS 64-bit | Platform for running scripts |
| Programming Language | Python 3.11 | Controls logic and hardware |
| NFC Reader | PN532 (I2C) | Detects pieces based on tag IDs |
| NFC Tags | NTAG213 / NTAG215 | Unique ID per chess piece |
| Stepper Motors | NEMA 17 + A4988 drivers | Moves the magnetic arm along X/Y grid |
| Servo Motor | SG90 or MG995 | Controls vertical lifting (Z-axis) |
| Magnet | Neodymium (6×3 mm) | Picks up pieces magnetically |
| Chess Pieces | 3D printed in PLA+ | Finished by hand: sanded, primed, painted, polished |
| Board Material | Mahogany, walnut, maple | Layered and lacquered for appearance |
| Tools | Circular saw, sander, engraver, clamps | Used in board construction |
| Finishing Materials | Acrylic paint, filler primer, lacquer | For visual quality and durability |
| Connectivity | WiFi or Ethernet | For online integration with Chess.com |
Example Code
Below is a simple Python example that retrieves the last move from a Chess.com game and prints it:
<syntaxhighlight lang=\"python\"> import requests
def get_last_move(game_id):
url = f\"https://api.chess.com/pub/game/{game_id}\" response = requests.get(url) data = response.json() moves = data['moves'].split() return moves[-1] if moves else None
move = get_last_move('example-game-id')
if move == 'a2a4':
print(\"Move pawn from A2 to A4\") # Insert motor control logic here
</syntaxhighlight>
Construction Timeline
Phase 1: Planning and Design (Weeks 1–2)
- Create CAD designs for chess pieces
- Define board layout and grid mechanics
- Choose wood types for contrast and durability
Phase 2: 3D Printing and Finishing (Weeks 3–4)
- Print pieces in PLA+ filament
- Sand, prime, paint, and polish each piece
- Affix NFC tags to the bottom of each piece
Phase 3: Board Construction (Weeks 5–6)
- Cut and shape wood components
- Route out internal space for grid and arm
- Inlay or engrave chess squares
- Assemble and lacquer the board
Phase 4: Mechanical Arm (Weeks 7–8)
- Assemble X/Y movement system using stepper motors
- Integrate vertical servo-lifting mechanism
- Test magnetic pickup and alignment
Phase 5: Software Development (Weeks 9–10)
- Write motor control scripts in Python
- Integrate NFC reader and calibrate tag detection
- Connect to Chess.com API and handle logic
Phase 6: Testing and Integration (Weeks 11–12)
- Full system test with online games
- Refine movements and calibrate grid
- Add logging, error handling, and safety checks
Future Expansions
- Add local AI support via Stockfish (chess engine)
- Use RGB LEDs for visual feedback
- Add sound effects for capture, check, and checkmate
- Integrate OLED display to show current notation
- Enable voice control or multiplayer sync between boards
Historical Context
The original Mechanical Turk was a hoax automaton built by Wolfgang von Kempelen in 1770. Though it appeared to play chess autonomously, it concealed a hidden human operator. This project reimagines the same premise using modern technologies—robotics, NFC, and open-source software—to achieve the illusion in reality, transparently and without deception.