0% found this document useful (0 votes)
25 views7 pages

Muji 2016

The document describes the design and implementation of an electronic chess set for educational purposes. Infrared light sensors are used to detect the position of chess pieces on the board, and an Arduino microcontroller controls the system. A graphical user interface on a computer screen displays the state of the chess game.

Uploaded by

RDM IssI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views7 pages

Muji 2016

The document describes the design and implementation of an electronic chess set for educational purposes. Infrared light sensors are used to detect the position of chess pieces on the board, and an Arduino microcontroller controls the system. A graphical user interface on a computer screen displays the state of the chess game.

Uploaded by

RDM IssI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/315916100

Design and implementation of electronic chess set

Conference Paper · November 2016


DOI: 10.1109/ICAEES.2016.7888087

CITATIONS READS

5 7,322

4 authors, including:

Siti Zarina Mohd.Muji Mohd Helmy Abd Wahab


Universiti Tun Hussein Onn Malaysia Universiti Tun Hussein Onn Malaysia
104 PUBLICATIONS 435 CITATIONS 298 PUBLICATIONS 1,233 CITATIONS

SEE PROFILE SEE PROFILE

Radzi Ambar
Universiti Tun Hussein Onn Malaysia
103 PUBLICATIONS 368 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Development of the Photovoltaic (PV) Module Using Artificial Neural Network (ANN) View project

Autonomous Underwater Vehicle for Target Acquisition View project

All content following this page was uploaded by Mohd Helmy Abd Wahab on 12 January 2019.

The user has requested enhancement of the downloaded file.


2016 International Conference on Advances in Electrical, Electronic and System Engineering, 14-16 Nov 2016, Putrajaya,
Malaysia

Design and Implementation of Electronic Chess Set

Siti Zarina Mohd Muji, Mohd Helmy Abdul Wahab, Wong Kian Loo
Radzi Ambar USAINS Infotech Sdn Bhd, Level 1, Block C, Sains@USM
Embedded Computing System (EmbCoS) Research Focus 10, Pesiaran Bukit Jambul, 11900
Group, Department of Computer Engineering, Bayan Lepas, Penang
Faculty of Electrical and Electronic Engineering [email protected]
86400, Parit Raja, Batu Pahat, Johor, Malaysia
[email protected], [email protected], [email protected]

Abstract— This paper describes the design and implementation Furthermore, the output device is light emitting diodes
of chess set using electronic circuits and MATLAB software for (LEDs), a liquid crystal display (LCD) and computer display.
educational purpose. Nowadays, many children are addicted on the
computer games, and tend to neglect the traditional games like chess
game. The electronic chess set is designed in order to attract the
interest of the children on the chess game. Besides that, the game II. RELATED WORKS
provides some basic rules for beginner. These rules are the
placement of the chess pieces for the opening of the chess game and
A smart electronic chess set using reed switches is
the rule of chess pieces’ movement during the chess game. In order to designed and implemented by Mahmood N.H et al. [2]. The
increase the number of input or output pins of the Arduino purpose for the chess set is to project the process of the chess
microcontroller, the cascade encoder, multiplexer and shift register game on the computer screen during chess tournament. The
are designed. The placement and the type of the chess piece is main control unit for the electronic chess set is PIC18F452
detected using infrared light- emitting diode and photodiode with the
which received the data from the reed switch to obtain the
aid of cascade encoder and multiplexer, whereas the valid
destinations of the current chess piece are displayed using light- information about the position of the chess piece. The data
emitting diode with the aid of cascade shift register. The real from the control unit is converted to the suitable data format
situation of the chess game is also displayed on the computer screen according to RS-232 standard. The data is sent through serial
using graphical user interface (GUI). The project achieved its cable (DB9) to the computer and to display the presentation of
objectives by demonstrating the capability to detect the position and the chess game on the computer screen. The cost of the
type of chess piece, and displaying the real situation of the chess
game on the computer screen via GUI.
materials and electronic components that used in the electronic
chess set is low, which is suitable for chess tournament. The
Keywords— Electronic chess set; shift register; multiplexer; developed chess board is able to recognize the presence of the
encoder chess pieces and to display the chess game on the computer
screen but it cannot identify the role of the chess pieces.
I. INTRODUCTION Matuszek et al. developed an autonomous chess playing
robotic system known as Gambit [3]. It is designed to play the
Nowadays, many children and early adolescents are more chess automatically against human opponent. It consists of
addicted to electronic media and computer games compared to PrimeSense depth camera mounted on the robot’s arm and a
traditional games [1]. For instance, children are losing interest palm camera built on the gripper to provide depth and RGB
in playing traditional board game such as chess game, and colour informations. The depth and RGB colour informations
then tend to neglect it. This is because there are very few are used to detect and recognize the chess piece.
activities or lessons related to chess in society, and the number In [4], an implementation of autonomous chess playing
of trainers that specialized in chess game during co-curricular robot using electromagnet is presented. This robot is capable
program in primary and secondary school are very few. to move chess pieces automatically, and it is designed to
Besides that, most of the parents are busy at work, and have increase the chess playing skill of the player. The design
less time to teach the kids the art of playing chess. detects the location of the chess piece using the camera and
This project describes the design and implementation of an image processing techniques. The image is captured by the
electronic chess set which is developed for the educational camera and then MATLAB executes the image processing
purpose. To build an electronic chess set, this project requires algorithm to identify the placement of the chess piece. The
thirty-two transmitters for the chess pieces and sixty-four controller controls the chess engine via XY positioner based
receivers for all squares on the chess board. The reason to on the output from the image processing software.
choose the infrared light emitting diode (IR LED) as Furthermore, the bottom of each chess piece is made of metal.
transmitter and photodiode as receiver is to reduce the cost for Thus, XY positioner is capable to utilize the electromagnetism
these sensors compared to other type of sensors. The principle and motors to move the chess piece to the desired
controller unit for this project is Arduino Mega 2560. destination.

978-1-5090-2889-4/16/$31.00 ©2016 IEEE 451


Fig. 2. Real and virtual board representation

Fig. 1. Block diagram for the hardware design

An artificial intelligence chess robot using electromagnet


is presented by Gurjit Kaur et al. [5]. The aim for the project is
for chess lovers’ entertainment purpose, especially for those
who play the chess alone. AT89C51 microcontroller was used Fig. 3. Virtual and numerical chess piece
in the project to receive the input from parallel port and
controls the motors to move the chess piece. The algorithm
TABLE I. ROLE REPRESENTATION FOR CHESS PIECES
was written using MATLAB codes and C programming.
MATLAB codes are used to process the RGB image captured
from the camera in order to detect user’s move and to obtain
the position of the chess piece. On the other hand, C
programming is used as Artificial Intelligence (AI) agent code
to generate the counter steps against the human opponent. The
strength of the project are the AI algorithm is used to decide
the computer’s chess movement easily and it is capable to
move the chess piece automatically. A disadvantage of the
project is the role of the chess pieces cannot be recognized,
because only the top view of the chess piece is captured and
processed.
In [6], a chess vision system is presented by Piskorec et al.
to detect and recognize the actual chess game. This system is
programmed using C++ with Open Source Computer Vision
(OpenCV) libraries and it is synchronized with two cameras: B. Software Design
top-view and side-view cameras. The purpose of the top-view
camera is to detect the chess pieces’ coordinate while the side- The real chess board representation is converted to 8x8
view camera is used to recognize the type of chess pieces. matrix form for the chess vision system as shown in Fig. 2.
The numbers on the chess board and the matrix form are
represented by the decimal position code for each square of
III. METHODOLOGY the chess board. The 8x8 matrix is used in MATLAB
programming to analyze the valid destinations of the current
A. Hardware Design chess piece.
Fig. 1 shows the setting of the sensor unit for the electronic Table 1 and Fig. 3 show the virtual and numerical
chess set. The photodiode under the chess board receives the representation for chess pieces’ role in the MATLAB
signal from the IR LED inside the chess piece in order to software. The negative sign represents black chess piece,
detect its position and role. while the positive sign represents white chess piece. The
empty square of the chess board is represented by zero in the
software. The virtual chess piece representation is displayed
on computer display, while numerical representation is used in

452
Fig. 4. Flow chart for the system before the beginning of chess game

MATLAB programming. The IR code for the chess piece is


sign and magnitude representation which is used as chess
piece identification code in the program.

Fig. 5. Flow chart for the system during the chess game
C. System Flow
Prior the players start the chess game, a chess piece is
placed on the chess board. The programmed PIC12F508 inside
the chess piece controls the IR LED to send the IR code to
activate the photodiode inside the chess board. The 64-to-6
line cascade encoder detects which position is placed by the
chess piece and it produces a binary code as position
identification code. The Arduino Mega 2560 controls the 64-
to-1 line cascade multiplexer to receive the IR code from the
photodiode based on the certain position identification code.
The process will be repeated until all the chess pieces are
placed on the chess board. This process is shown in Fig. 4.
When a chess piece is lifted by the player from the chess
board, the 64-to-1 line multiplexer detects which chess piece
is being lifted. Then, the valid destinations for the current
chess piece will be analyzed by Arduino program and sends
the data to the 64-bit serial-in, parallel-out shift register in
order to switch ON the LEDs on the possible positions for the Fig. 6. System flow of electronic chess set
current chess piece. When the chess piece is placed on the
chess board, the encoder detects the position of the chess
piece. The process will be repeated until the chess game is First, as shown in Fig.6, the 64-to-6 line cascade encoder
ended. This process is shown in Fig. 5. will be designed using nine 8-to-3 line encoders 74LS148 and
three 8-input NAND gates 74LS30 as shown in Fig. 7. The use
of the 64-to-6 line cascade encoder is to convert the active-low
D. Circuit Design decimal input code to active-high binary output code. For
As explained in previous section, the prototype utilizes an example, if a chess piece is moved to the position ‘a8’ on the
Arduino Mega 2560 as the controlling unit that receives the chess board which represents the decimal code ‘7’, the IR
input data from the sensors, and transmits the processed data LED from the photodiode at the ‘a8’ position will detect the
to the output devices. However, a disadvantage of Arduino chess piece, and then produces the current to the cascade
Mega is the input and output pins are not enough for the encoder. The cascade encoder encodes the decimal code ‘7’
proposed prototype. The prototype requires sixty-four sensors into binary output ‘000111’ as a position code to be
and sixty-four LEDs. Thus, as shown in Fig. 6, we have transmitted to the Arduino. Therefore, the 64-to-6 line cascade
developed digital electronic circuits for the chess game encoder functioned as a position detector for the chess pieces.
prototype to overcome this shortcoming. Next, the second digital electronic circuit is a 64-to-1 line
multiplexer which is a circuit cascaded using nine 8-to-1 line

453
multiplexers 74LS151 as shown in Fig. 8 that was based on
the work done in [7]. The 64-to-1 line multiplexer is used to
send the role identification signal from the photodiode in the
selected position to the Arduino.
Finally, the last digital electronic circuit is a 64-bit serial-
in, parallel-out shift register that is designed using eight 8-bit
shift registers 74HC595 as shown in Fig. 9 based on the work
done in [8]. The Arduino sends the 64-bit binary data (0 and 1)
into the 64-bit shift register bit-by-bit. After that, the shift
register produces the parallel output current to lighting the
LEDs on the possible positions if the bit data is equal to one.

Fig. 8. Block diagram for the 64-to-1 line multiplexer

Fig. 9. Block diagram of the 64-bit serial-in, parallel-out shift register


Fig. 7. Block diagram for 64-to-6 line cascade encoder

454
(a) (b)
Fig. 12. LEDs displaying the possible destination for pawn. (a) Pawn at
current position before being lifted. (b) Pawn is lifted resulting to LEDs to
switch ON at 2 different positions (valid destinations for pawn).

Fig. 10. Rules of the pawn moves

(a) (b)
Fig. 13. LEDs displaying the possible destination for knight. (a) Knight at
current position before being lifted. (b) Knight is lifted resulting to LEDs to
switch ON at 8 different positions (valid destinations for knight).

Two-dimensional array Y[ ][ ] is used for the LED display


purpose. The data of Y[ ][ ] is transferred to the SIPO shift
register in order to display the possible destinations of the
current chess piece by lighting of LED. The analysis of valid
destinations of pawn is programmed into Arduino using if
statement. The flow chart of the program for analysis of valid
destinations of pawn is shown in Fig. 11. Fig. 11(a) shows the
flow chart of the program for white pawn, whereas Fig. 11(b)
shows the flow chart of program for black pawn.
We take an example of white pawn movement based on
Fig. 11(a). At the beginning, when a pawn is moved, the
program analyzed the status of the chess piece placement at
one and two squares in front of the position of the current
chess piece. If there are no chess pieces at the positions, the
data Y[R-2][C] is equal to ‘1’ in order to switch ON the LED
(a) (b) on two squares in front of the current position of the white
Fig. 11. Flow chart of the program for pawn movement for (a) white pawn, pawn. The Y[R-1][C] is stored as ‘1’ if the square in front of
and (b) black pawn the current chess piece is empty. Due to the diagonally capture
mode for pawn, the Y[R-1][C-1] or Y[R-1][C+1] is stored as
‘1’ if a diagonal square in front of the current chess piece has
Analysis of Valid Destinations for Pawn black chess piece.
The developed Arduino program is required to analyze the
valid destinations of the current chess piece during a chess IV. RESULT AND ANALYSIS
game. There have some rules for the movement of pawn, The electronic chess set is designed to show correctly the
knight, rook, bishop, queen and king. In this section we will valid destinations of the chess piece.
describe a simple algorithm that can provide valid destination Fig. 12 shows the result of the possible destinations for a
for a pawn to move. The algorithm to provide valid destination pawn. Fig. 12(a) shows the pawn is placed at position ‘f2’,
for other chess pieces will not be described here. whereas Fig. 12(b) shows the LED at the positions ‘f3’ and
First, the rule of the pawn moves is shown in Fig. 10. A ‘f4’ are switched ON to display the possible destinations for
pawn moves one square in a forward direction. Another the pawn when it is lifted from the current position.
important rule for pawn movement is its first move. It may Fig. 13 shows the result of the possible valid destinations
move either two squares or one square for its first move. for knight. Fig. 13(a) shows the current position of the knight
These squares must not be occupied by any other chess piece. at position ‘e4’. Fig. 13(b) shows the LED display for the
The next rule for pawn movement is it moves one square possible destinations for the knight when it is lifted from the
diagonally to capture the opponent’s chess piece. current position. The valid destinations/positions for the

455
knight are ‘c5’, ‘c3’, ‘d6, ‘d2’, ‘f6’, ‘f2’, ‘g5’ and ‘g3’. The [8] C. Maw. T. Igoe, Serial to Parallel Shifting-out with a 74HC595.
Retrieved on November 2006, from http://www.arduino.cc/en/Tutorial/
prototype electronic chess set is capable to display 8 valid
destinations for the knight in ‘L’ shape movement.
Table 1 shows the accuracy of the electronic chess set in
term of position detection and role recognition of each chess
piece. It shows that the prototype has less accuracy for chess
piece recognition which is 80.95%. Nevertheless, the
electronic chess set is capable to detect the chess pieces’
position correctly.

TABLE II. ACCURACY OF THE ELECTRONIC CHESS SET


Success event Number of test Accuracy
Position detection 63 63 100%
Role recognition 51 63 80.95%

V. CONCLUSION
In conclusion, we have achieved the objective of
developing a chess set using electronic circuits and MATLAB
software for chess education. The developed prototype set is
capable of: (i) detecting the position and type of the chess
piece, (ii) showing the valid destinations for the current chess
piece and (iii) displaying the real situation of the chess game
in computer screen. With this prototype, This prototype can be
utilized as an interesting children game that is capable to
provide practical chess training using real hardware compared
to computer games in a virtual mode.

ACKNOWLEDGMENT
This research was conducted with the ¿nancial support of the
Incentive Grant for Publication (IGSP) Vot U407.

REFERENCES
[1] V. Kongkarn & S. Sukree, “A Framework for Applying an Intelligent
Agent to Monitor, Interpret, and Report Risk of Online Computer Game
Addiction in Children and Early Adolescents,” Proceedings of the IEEE-
EMBS International Conference on Biomedical and Health Informatics,
pp. 372-375, 2012.
[2] N. M. Mahmood, Che Ku Long, C. K. M. S., I. A. Ghani, & R.
Sudirman, “Low Cost Electronic Chess Set for Chess Tournament,”
Proceedings of the IEEE 7th International Colloquium on Signal
Processing and its Applications, pp. 123-126, 2011.
[3] C. Matuszek, B. Mayton, R. Aimi, M. P. Deisenroth, & L. F. Bo,
“Gambit: An Autonomous Chess-Playing Robotic System,” Proceedings
of the IEEE International Conference on Robotics and Automation, pp.
4291-4297, 2011.
[4] A. M. Khan, & R. Kesavan, “Design and Development of Autonomous
Chess Playing Robot.,” International Journal of Innovative Science,
Engineering and Technology (IJISET), 1(1), pp. 1-4, 2014.
[5] G. Kaur, A. K. Yadav, & V. Anand, “Design and Implementation of
Artificially Intelligent Microcontroller based Chess Opponent,”
Proceedings of the World Congress on Engineering, 2010.
[6] M. Piskorec, N. Antulov-Fantulin, J. Curic, O. Dragoljevic, V. Ivanac, &
L. Karlovic, “Computer Vision System for the Chess Game
Reconstruction. MIPRO,” Proceedings of the 34th International
Convention, pp. 870-876, 2011.
[7] M. D. Singh, & J. G. Joshi, Mechatronics. India: Prentice Hall, pp. 124,
2006.

View publication stats


456

You might also like