Introduction: Chess Robot

Picture of Chess Robot

--This project was my graduation project at Kuwait University-College of Engineering & Petroleum--

Chess is a very famous and common game worldwide. The main purpose of the design is to develop a stand-alone chess robot using an intelligent system to provide more entertainment with low cost as much as possible for home use.

The system is designed such that:

· No external hardware or software is needed.

· The user interface is simple

· Low power, can run on batteries (6 v) or AC adapter (220-240 v)

Step 1: Basic Idea and Needed Components

Picture of Basic Idea and Needed Components

The overall system has three major parts: the hardware circuits, the chess board, and the robotic arm.

The first element to design is the chess board. The chess board has 64 blocks (positions) where the check pieces (checkers) move on. In order for the system to determine their movement, there is a sensor underneath each block to sense whether a piece has moved or not. Then sensors will send the result to a controller and the controller will determine how the robot should move.

The robot is designed such that it can reach all the 64 blocks. The game starts with the player’s move, and then the sensors are be affected by that move. Finally, the controller will determine the player movement and tells the robot where to move.

we will need:

1-servo motors (for the robotic arm, basically 6)

2-reed sensors (64)

3-Propeller microcontroller

4-chess board

5-10kohm resistors

6-100 ohm resistors

7-1k ohm resistors

8-2.2k ohm resistors

9-0.1uf capacitors

10-3.3v voltage regulator

Step 2: Connecting the Reed Sensors

Picture of Connecting the Reed Sensors

The first thing to design is the chess board. For an appropriate size, the board size is set to be 40 by 40 Cm, with 2 by 2 Cm for each square.

Under each square, there is a magnetic sensor called “Reed Switch”.

These switches are sensitive to magnetic fields. Whenever a magnetic field is sensed, the switch will turn on, otherwise it will be off. Operation of reed sensor is shown in fig (5). Inside the switch there are two pieces of metal. When a magnet approaches, the two leads will touch each other (attracted) which will cause a “closed circuit”, otherwise it is an “open circuit”.

Now, each checker has a small magnet beneath it that will affect the sensors. By moving the checkers around the sensors will be opened and closed accordingly.

Next, the circuit that will handle the 64 sensors is designed. As it described before, each sensor will cause either an open or closed circuit. Before connecting them to the microcontroller, some standards are set. In order for the microcontroller to determine whether the sensor is open or closed, the output of each sensor must be either 1 (high) or 0 (low). A circuit that accomplishes this task is needed. Without setting these standards, the sensors states will be “float” when they are open, and NOT zero. What is needed is to add a couple of resistors on each sensor, that will make sure that the output of the sensor is either 1 (high) or 0 (low).

Step 3: Connecting the Sensors to the Microcontroller

Picture of Connecting the Sensors to the Microcontroller

Now that the sensors are adjusted to 0 or 1, they can be connected to the main controller. However, microcontrollers in general can’t handle this huge amount of sensors (64). So, a decoding circuit is required. A multiplexer is used to do the decoding. A multiplexer (MUX) is a chip that acts as switch, where it connects multiple outputs to a single input and switches between them.

In the design, 4-multiplexers with 16 channels each (that is a total of 64) are used. Then a single output in addition to the “select” pins will be connected to the controller, occupying a total of 9 I/O pins

The decoding circuit takes the 64 input from the sensing circuit and decodes them to 9 outputs, which will be fed to next part of the design, the main controller.

Step 4: The Propeller Microcontroller

Picture of The Propeller Microcontroller

The controller specifications are very critical. The circuit of the controller includes the following:

· Fast microcontroller with 32-I/O, capable of handling the heavy artificial intelligence algorithms.

· Capability to drive high power servo motors.

· Capability to do video generation

By following the previous specifications, the microcontroller is chosen to be the “PROPELLER” microcontroller. The propeller is 32-bit multi-core system, running at 80 MHz. capable of video generation and parallel processing. It is powerful enough to run the whole system.

P0 to P8 are used for the multiplexers, P9 to P15 are used for controlling the servo motors

Step 5: The Circuit Designs and PCB's

Picture of The Circuit Designs and PCB's

Attached are the circuit designs (schematics+PCB) for the entire system.

Step 6: The Robotic Arm

Picture of The Robotic Arm

I is not nessesary to design the arm by your self. You can buy it ready made if you want. There are many robotics arm that you can purchase from RobotShop or Trossen Robotics. The most important thing is that the size of the robot and the chess board are appropriately chosen.

After the design of the robot is completed and built, a control system is needed to move the robot to the correct position. The robotic arm control is an open loop, which means that there is no feedback from the arm to the microcontroller. However, the servo motor itself is a closed loop system; so, its stability can be ensured.

The control system is done using the Master-Slave method. The microcontroller will send commands to the robotic arm servo motors, and they will move accordingly.

Since servo motors receive digital signals with pulse durations, it is easier to use the durations instead of angles. All the positions (64) are found practically using a servo controller with special computer software that enables the control for each servo. Since the robotic arm is 4-DOF, 4-values are needed for each position, each value is for a single servo

For a smother movement, each block on the chess board has two robotic arm configurations: Position #1 and Position #2. A movement using these two positions is done in 4 steps:

1) The microcontroller tells the robotic arm to move to the specified block, at a HIGH vertical altitude (Position #1)

2) The microcontroller tells the robotic arm to move to the specified block, at a LOW vertical altitude (Position #2)

3) Pick up the checker

4) Return to Position #1 of the same block

5) To move the checker to another block, go to step 1.

Those positions are found practically after fixing the robot with the chess board.

Step 7: Software

One of the advantages of the system is that it is a stand-alone
system; no external software or hardware is required (no need to connect it to a computer). Therefore, the software that will be running the whole system is very essential, and runs at the heart of the system. Many aspects regarding the capabilities of the software are considered:

1. Determining the player’s movements.

2. Checking whether the player movement was legal, and notifying him if it was illegal.

3. Finding a suitable movement for the robotic arm.

The first step is to determine which piece the player is moving, and what is the destination. This is done using an algorithm that reads all the positions (using the sensors) before and after the player moves the piece. The algorithm will compare the data before and after the movement and looks for the positions that were changed. Once the algorithm finds the positions, it can set a movement as a ‘source’ to ‘destination’, which will then go to the next step: certification of the movement.

When the movement is checked, there can be one of two outputs:

· Turn on yellow LED’s if the movement was illegal

· Flash yellow-green-red LED’s if the movement was legal

If the player movement was illegal, the system will not proceed until the player corrects his/her movement. Once the movement is corrected (and checked again by the system) the system will proceed to the next step: finding a suitable movement for the robot.

Design of chess algorithms can be very challenging. Here I will attach the code used. It is a modified version of a chess algorithm developed for the Propeller microcontroller.


grandmastermac (author)2017-12-10

Hi Yousef, congratulations on a very nice project. Out of interest, have you done anything further with it since creating it?

BharanidharanK (author)2016-10-03

First of all congratulations as you made big progress and managed to bring it to closure. I've similar thoughts, but I'm cracking my head on "How would you identify the piece, when you can promote or underpromote a pawn, if you are using reed switches??". My approach is to use rfid tag under each piece and have antennas under each square... and rest is almost same... in terms of using multiplexer, using engine etc..

Onenamiyi (author)2016-08-03

Does the robot think by itself or a user controls its movement

Onenamiyi (author)2016-08-03

Does the robot think by itself or a user controls its movement

Su Myat007 (author)2016-01-08

Can we use arduino instead of micro controller?

AnirudhT1 (author)Su Myat0072016-07-30

Arduino ITSELF is a microcontroller on a circuit board.

ehansen247 (author)2016-05-04

What glue should we use to attach the reed sensors?

SAYE250 (author)2016-03-10

Hi !! good job . your project is very exelent . Can you help me??? Can you send the micro programming of this chess robat for me???

AE_ (author)2015-10-22

does it think on its own to move the piece and to play?

T0BY (author)2015-08-05

Crikey! Very impressive!

Ulquiorra Cifer (author)2015-08-02

What an amazing design!Your robot arm is so great.I am searching such small robot arm with high precision for days.If your robot arm is able to do more things,that would be better.

JackL9 (author)Ulquiorra Cifer2015-08-04

I'm searching a high precision robot arm as well, fortunately I have found one.If you want to know how to bulid a high precision robot arm, you can come here and you will get what you want:

dragonsupergods (author)2015-07-24

oh you are the great designer

T0BY (author)2015-06-26

OMG. You are very clever.

Zachary Goode (author)2015-03-07

Awesome project. But one question... Do you know remember what the specifics of the psu are?

I'm not sure what do you mean by "PSU"

Jimmy-Dinner (author)yousefnimat2015-05-09

I think he means power supply unit

gdesale (author)2015-04-19

could you connect it to the uarm which looks is on the website:

gdesale (author)2015-04-19

ehich robotic arm did you say you world recommend connecting this to

evanthebrain (author)2015-01-13


tbell1623 (author)2014-11-23


iam_maker_leo (author)2014-11-20

Wow... Great...

I love this project...

I like BADUK(GO) which is board game like chess have only black stone, and white stone...

Anyway I imagined before making BADUK ROBOT which is working via internet with ethernet shield...

I think I can use your project...

Thank you.

RezLar (author)2014-11-17


This tutorial looks awesome. I have a few quick questions.

1. Aprox how much did this cost to get the pieces for?

2. What was the most difficult part of building it?

3. Is there any advice you would recommend to people trying to build it?

Thanks for your time!

Mehdi Raza (author)2014-11-13

That's really a cool robotic arm and the application is very intersesting. Thankyou for sharing it. :)

Well I have few questions regarding the structure of the robot and I hope you will answer them :

1) Which material you use for robot structure?

2) How did you synchronize the servo motors at joint 1(means how servos move simultaneously with the sequential controller)?

3) Does your robot move smoothly (continuous motion) ? If yes how did you manage the servos to move smoothly?

4) Have you done the kinematic analysis of the robot?

5) Have you implement Inverse Kinematics on your robot?

yousifnimat (author)Mehdi Raza2014-11-14

Thank you for your interest in the Chess Robot project. I will try to answer all the questions.

1) the robot is made of wood. it is simple, cheap, strong, and light.

2)if I understood your question correctly, your are asking how the servos at joint one are moving together.

a)the servos are exactly the same.

b)they are fixed to the base with the exact same initial position.

c) both are receiving the exact same signal.

d) both are moving at the same speed.

if the conditions above are satisfied, then they will behave the same.

3) the robot does move continuously. first of all, all the 64 blocks positions of the chess board are saved in the memory. each block (of the 64) has 4 saved positions required to move the 4 servo motors of the robotic arm (4 joints). if you send those positions to the 4 servos at the same time, the servos will move simultaneously until the robot reaches the desired position, which results in a continuous smooth motion.

4) if you mean the inverse kinematics, no.

if you mean the calculations of torque and speed requirements, then yes they are done to properly choose the servo motors.

5) the inverse kinematics were not implemented in this robot. the reason for that is that inverse kinematics are based on the calculation of angles. since this robot uses servo motors, the inverse kinematics is very difficult to implement. servo motors are based on positions. you can tell a servo to move to a certain position, but it is very difficult to tell a servo to rotate at a certain angle. if you want to use inverse kinematics, you should use stepper motors instead of servos.

I hope I were able to answer all of your questions.

Mehdi Raza (author)yousifnimat2014-11-16

Thankyou for your response.

1) Which type of wood you used? (Ply wood)?

2) I must say that your lucky to have those servos which results the same position on the same input pulse. Actually, I have also made a robotic arm as my FYP. The servos I got were of same type, same company, same model but couldn't produce the same position for given input pulses. :).

Did you connect both the servo's to the same pin of the controller? or you did something else?

3) By continuous motion I mean, Does your robot make jerks while moving from one box to other (which is far away from the initial position)?

4) For torque calculation, how did you calculate the weight of the link # 1 (which includes parallel arms)?

autopoietic (author)2014-11-14

That is really impressive, well done.

I tried to create a magnetic chess board for remote chess whilst at college. The magnet movement was intended to avoid the 3D issues (and create an illusion of pieces moving themselves) and though the movement worked fine (, I got into all sorts of problems with pieces sticking together...

yousifnimat (author)autopoietic2014-11-15


It will definitely work with some more adjustments

timofthedeep (author)2014-11-14

wow good work

yousifnimat (author)timofthedeep2014-11-14


Raphango (author)2014-11-13

Awesome project! Congratulations!!

yousifnimat (author)Raphango2014-11-13

Thank you!

Raphango (author)2014-11-13

Awesome project! Congratulations!!

Honus (author)2014-11-10

My oldest son and I play chess almost every night- this could be a great project for us to do together. Thanks for sharing it!

yousifnimat (author)Honus2014-11-11

You are welcome.

I was thinking of improving the system such that it can be connected to the internet so the robot will represent anothor player on the WEB.

maddi020 (author)2014-11-11

Omg I love chess and your great vid ;p lol

yousifnimat (author)maddi0202014-11-11

Thank you

I am glad you liked it :)

Patrick S (author)2014-11-11

Awesome! I'm impressed especially in the precision grasping when using servos. If you were ever interested in a CS approach you could use openCV to implement some computer vision to make sure the hand didn't drift over time and was always able to grab pieces.

yousifnimat (author)Patrick S2014-11-11

Thank you!

indeed, the positions need to be tuned more. The problem of image processing is that a computer is needed to do the mathematical computations, which was against our idea of "stand alone system"

About This Instructable




More by yousifnimat:Chess Robot
Add instructable to: