Inspiration
It is seen that even during high-stakes chess matches, the players have to stop and write down their moves as well as remember to press the chess clocks in order to register their moves. We want to eliminate this distraction so that the players can only focus on making the best moves. This project can be extended as a training kit for young chess players.
What it does
Chess Log and Clock is a project that combines the two things that a chess player has to do other than actually playing the game. It is a chessboard that is capable of keeping a log of the player moves as well as keeping track of their time automatically. It is our attempt at making chess more seamless so that players can play with lesser distractions and can focus more on making the best moves. The main problems to this project were as follows: Identifying the squares on the chessboard that had pieces on them Solution: Used 64 hall effect sensors to check whether each square is occupied Recognizing which pieces are placed where Solution: Keep a track of where each piece has moved using an 8x8 array. Distinguishing between a normal move and capture Solution: It is implemented in the code. If the new square was already occupied in the previous state of the board, a capture is recorded, else a normal move is logged Printing the moves correctly Solution: Switch case is used to take values from the chessboard array and print moves accordingly.
The functionality of the aforementioned operation was achieved completely. However, due to lack of time, we were only able to solder and make connections for half of the chessboard. Soldering all of the 64 sensors with PISO shift registers and attaching them to the chessboard was really challenging.
How we built it
Detecting the Chess Pieces: For this project, we will be using magnetic chess pieces. In order to detect the presence of a chess piece on a particular square, we will be using hall effect sensors. These sensors are generally used to detect the presence of magnetic fields. 64 hall effect sensors will be placed underneath all the 64 squares of the chessboard. All of these sensors will be distributed in groups of 8 that will occupy a rank/file (row) of the chessboard. A group of 8 hall effect sensors will be connected to a Parallel-in-Serial-out (PISO) shift register so that we receive the data from these sensors on a single pin. There will be a common clock and latch signal given to all PISO registers through an Arduino pin.
Recognizing Pieces and Remembering Positions: We maintain an array of 8x8 elements that correlate to the actual board positions. The initial positions of all the pieces are stored in the array and all the other elements are kept as zero. As soon as a piece is picked from the board, the corresponding value of the piece from the array is stored in a temporary variable and the element in the array is substituted by a zero. When the piece is placed on a new square, the value corresponding to the piece is recovered from the temp variable and stored to the corresponding location in the array. We use 4 arrays to track the location of every piece on the board in real-time. 2 Arrays to collect the data from the hall effect sensors and to record their current and previous state. Similarly, 2 other arrays are used to maintain the current and previous positions of the pieces on the board.
Detecting Captures: This is implemented in the code. If a piece is placed on a square that already has a piece on it according to the previous state of the board state array, a capture event is triggered. When this event is triggered, an ‘x’ sign is added between the name of the piece and the square where it has been moved.
Challenges we ran into
The functionality of the aforementioned operation was achieved completely. However, due to lack of time, we were only able to solder and make connections for half of the chessboard. Soldering all of the 64 sensors with PISO shift registers and attaching them to the chessboard was really challenging.
Accomplishments that we're proud of
We are proud of designing a 4x8 chess piece recognition system. Interfacing hall effect sensors with PISO shift registers 8 hall effect sensors and using a single clock to connect all the PISO shift registers is something that we are proud of doing.
What we learned
Achieved functionality: The objective of this project is to make chess an even more seamless sport and to be more accessible and appealing to the youth by adding cool features. We were able to successfully implement the functionality of the chessboard which includes recognizing the occupied squares, recognizing which chess pieces are occupying which squares in real-time, distinguishing between a normal move and a capture, and proper chess clock operation. Change in approach: However, we underestimated the hardware challenges in the project. Soldering all 64 sensors to 8 PISO registers along with their current limiting resistors and making sure that all performed the desired functionality proved to be a little challenging given the time constraints. Hence we made the hardware for only half of the chessboard (32 squares). The code can be extended to all the 64 squares(full board). The functionality can be extended easily to 64 squares without changing the code. Challenges faced: The sensors that were initially ordered turned out to be a mixed bag of latching and switching sensors. Therefore, other available sensors had to be used which had significantly less range as compared to the sensors that were initially ordered. Hence we could not use the acrylic board that we initially planned on using and instead had to use a leather board and make slits on it to insert out hall effect sensors.
What's next for Chess Log and Clock System
8x8 LED matrix to indicate the occupied squares Programing the possible moves of each move Adding engine support to suggest lines which will improve the understanding of chess while learning to play
Log in or sign up for Devpost to join the conversation.