MagChess
Magnetic chess game detection and PGN export system. Designed to integrate with the Traditional Chess Lego Set.
After realizing that the SS49E hall effect sensor fits perfectly underneath each chessboard square, I knew I had to give it a shot. I designed a PCB that can read 64 sensors via multiplexers. 4 sensors per read, 90 reads a second results in a very disappointing 6 SPS for the entire board, but it turns out it's just enough of a sample rate to play chess with.
Conveniently enough, 5x2mm neodymium magnets also fit the bottom of the pieces. Each color gets a different polarity, and it turns out knowing the color of the pieces is just enough information to extrapolate the entire progression of a chess game from its initial state. The next step was an app to visualize the game state.
The Python app is designed for a small Raspberry Pi display. It shows the game state, warns about unexpected sensor states and has a sensor tab to help resolve which piece might be detected incorrectly.
Games can be uploaded either as highlights or full games, if player names and colors are specified at upload. Data is committed so it can be processed by the last piece of the puzzle, the public scoreboard.
This Astro page shows a leaderboard and an archive of the played games. The PGNs of these games can be put into third-party chess analyzers to figure out who made the first blunder or how many checkmates were missed.
The source files for all components of this project, software and hardware, can be found on its GitHub page!