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)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 5440

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.