DIY Self-Playing Chess Robot: Building a Magnetic Chess Board with ESP32 & Stockfish (2026)

Imagine a chess board that plays by itself, a true marvel for chess enthusiasts and robotics fans alike! But creating such a robot comes with unique challenges. The goal is to merge the physical and digital worlds of chess, and here's the catch: you need a mechanism that moves the pieces without human intervention.

Joshua Stanley has taken on this task, as seen in his video demonstration (https://www.youtube.com/watch?v=tLgXvUgsYmw). He employs Hall magnetic sensors to detect 3D-printed chess pieces with embedded magnets. These sensors are cleverly mounted on the underside of a PCB, which doubles as the chessboard, utilizing the silkscreen for the board markings.

The piece movement is facilitated by an electromagnet, guided by core x/y kinematics, which moves beneath the PCB. An ESP32 MCU controls this mechanism, while the chess engine, Stockfish (https://stockfishchess.org/), runs on a computer. As the human player moves a piece, the sensor detects the change in magnetism, feeding this input to Stockfish.

And it works! But there's a twist. The current design has a quirk where larger pieces like the knight can nudge nearby pieces out of place. Plus, the computer can't identify which piece is where, a feature common in commercial self-playing chess boards that aids new players and detects illegal moves.

The standout feature, however, is the use of a PCB as the playing field, opening up endless customization possibilities with multi-color silkscreens and custom graphics.

But here's where it gets controversial: is it truly a self-playing chess board if it requires human intervention to reset displaced pieces? And is the inability to identify pieces a deal-breaker or an opportunity for improvement in version 2.0? The debate is open, and we'd love to hear your thoughts in the comments!

DIY Self-Playing Chess Robot: Building a Magnetic Chess Board with ESP32 & Stockfish (2026)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Van Hayes

Last Updated:

Views: 5956

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Van Hayes

Birthday: 1994-06-07

Address: 2004 Kling Rapid, New Destiny, MT 64658-2367

Phone: +512425013758

Job: National Farming Director

Hobby: Reading, Polo, Genealogy, amateur radio, Scouting, Stand-up comedy, Cryptography

Introduction: My name is Van Hayes, I am a thankful, friendly, smiling, calm, powerful, fine, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.