--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

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

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

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

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

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

Step 6: 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.

<p>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 &quot;How would you identify the piece, when you can promote or underpromote a pawn, if you are using reed switches??&quot;. 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..</p>
<p>Does the robot think by itself or a user controls its movement</p>
<p>Does the robot think by itself or a user controls its movement</p>
<p>Can we use arduino instead of micro controller?</p>
<p>Arduino ITSELF is a microcontroller on a circuit board.</p>
<p>What glue should we use to attach the reed sensors?</p>
<p>Hi !! good job . your project is very exelent . Can you help me??? Can you send the micro programming of this chess robat for me??? </p>
<p>does it think on its own to move the piece and to play?</p>
Crikey! Very impressive!
<p>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.</p>
<p>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:<a href="https://www.instructables.com/id/Build-a-multi-controlled-high-precision-desktop-ro/" rel="nofollow"> https://www.instructables.com/id/Build-a-multi-controlled-high-precision-desktop-ro/</a></p>
<p>oh you are the great designer</p>
OMG. You are very clever.
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 &quot;PSU&quot;
<p>I think he means power supply unit</p>
<p>could you connect it to the uarm which looks is on the website:</p><p>http://store.ufactory.cc/complete-assembled-metal-kit/</p>
<p>ehich robotic arm did you say you world recommend connecting this to</p>
<p>Wow... Great...</p><p>I love this project... </p><p>I like BADUK(GO) which is board game like chess have only black stone, and white stone...</p><p>Anyway I imagined before making BADUK ROBOT which is working via internet with ethernet shield...</p><p>I think I can use your project... </p><p>Thank you.</p>
<p>Hello,</p><p>This tutorial looks awesome. I have a few quick questions.</p><p>1. Aprox how much did this cost to get the pieces for?</p><p>2. What was the most difficult part of building it?</p><p>3. Is there any advice you would recommend to people trying to build it?</p><p>Thanks for your time!</p>
<p>That's really a cool robotic arm and the application is very intersesting. Thankyou for sharing it. :)</p><p>Well I have few questions regarding the structure of the robot and I hope you will answer them :</p><p>1) Which material you use for robot structure?</p><p>2) How did you synchronize the servo motors at joint 1(means how servos move simultaneously with the sequential controller)? </p><p>3) Does your robot move smoothly (continuous motion) ? If yes how did you manage the servos to move smoothly?</p><p>4) Have you done the kinematic analysis of the robot? </p><p>5) Have you implement Inverse Kinematics on your robot?</p>
<p>Thank you for your interest in the Chess Robot project. I will try to answer all the questions.</p><p>1) the robot is made of wood. it is simple, cheap, strong, and light.</p><p>2)if I understood your question correctly, your are asking how the servos at joint one are moving together.</p><p>a)the servos are exactly the same.</p><p>b)they are fixed to the base with the exact same initial position.</p><p>c) both are receiving the exact same signal.</p><p>d) both are moving at the same speed.</p><p>if the conditions above are satisfied, then they will behave the same.</p><p>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.</p><p>4) if you mean the inverse kinematics, no. </p><p>if you mean the calculations of torque and speed requirements, then yes they are done to properly choose the servo motors.</p><p>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.</p><p>I hope I were able to answer all of your questions.</p>
<p>Thankyou for your response.</p><p>1) Which type of wood you used? (Ply wood)?</p><p>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. :).</p><p>Did you connect both the servo's to the same pin of the controller? or you did something else?</p><p>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)?</p><p>4) For torque calculation, how did you calculate the weight of the link # 1 (which includes parallel arms)?</p>
<p>That is really impressive, well done. </p><p>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 (http://bit.ly/114PVGo), I got into all sorts of problems with pieces sticking together...</p>
<p>Amazing. </p><p>It will definitely work with some more adjustments</p>
<p>wow good work</p>
<p>Awesome project! Congratulations!!</p>
<p>Thank you!</p>
<p>Awesome project! Congratulations!!</p>
<p>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!</p>
<p>You are welcome.</p><p>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.</p>
Omg I love chess and your great vid ;p lol
<p>Thank you</p><p>I am glad you liked it :)</p>
<p>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.</p>
<p>Thank you!</p><p>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 &quot;stand alone system&quot;</p>

About This Instructable




More by yousifnimat:Chess Robot 
Add instructable to: