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: Gregorio Kreiger

Last Updated:

Views: 6269

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.