Picture of How to Build an Arduino Powered Chess Playing Robot
Judging by the sheer number of chess related Instructables, I think it's safe to say the community enjoys the game.  It can be difficult, however, to find someone who plays on the same level you do.  To solve this dilemma, and to increase my playing skills, I built this arduino powered chess playing robot.

The board works like any other xy table, with a few key differences.  First, the x axis has an extra servo attached to it, which raises and lowers a magnet.  The magnet is attracted to pieces on the chess board above, allowing them to move.  Second, embedded in the board are 64 magnetically activated reed switches, allowing the arduino to know the location of each piece. 

What I love about this project is its adaptability.  If you decide you're done with it as a chess board, it can instantly convert into a CNC mill by modifying a few pieces.  I'll talk more about this possibility at the end.

All in all, though I learned a lot from this project and had fun building it, the board was not as successful as I had hoped.  The magnets were way too powerful, so extra pieces would almost always drawn in when they shouldn't have. However, with a few thoughtful changes I think this could have been a better, more functional project.  Until I build another, better board, though, I think this Instructable still serves as a pretty good guide to make your own chess robot.
1-40 of 60Next »
willyana5 months ago

Hi, i didnt found any video of this working, can you show us?

up !

GiovanniT6 months ago

I am sorry for the stupid question but I am a beginner.

I would like to know were to find this algorithm in the Mac,and how to set up this to recive the imputs from the arduino.

rishilaish6 months ago

why skp file is in tmp format? Cannot download.

What's the accuracy on this?

DJCPU10 months ago
Can you contact me i can't make one but I'd like to buy one 229-412-8125 Gus
paquiton961 year ago

What if it has to move a horse over another pieces?

Lol! Good question!


tomshirvo1 year ago

That's what people can use VHS tapes for these days. Cool project!!

If at all possible, you really shouldn't cut of jacks like that. Get a socket that fits the plug and use that, its just a better idea because then it will be easier to take it apart to make something else with, or even just to fix it.
NoseyNick4 years ago
Not bad! Personally I'd have saved the cost of the Mega by adding a shift register to the uno though.

Instead of 64 seperate inputs, you'd need 8 row wires, 8 column wires... 2 arduino outputs go to "clock" and "ser" on a shift reg (EG 74HC595) so you can choose to power one row at a time. Connect each square as row-reedsw-diode-col. Then the 8 cols go to 8 arduino inputs... or even through the other type of shift register if you need to reduce that down to 3 pins.

64 diodes and a shift register are much cheaper than a mega, and your wiring is likely to be neater too. Really cool project though, thanks for sharing! Love the XY construction, makes me wonder why this technique isn't used for CNC projects (much? at all?) :-)
Come to think of it... Look up Charlieplexing. This technique is usually used to light LEDs, but can be used for input too - EG https://en.wikipedia.org/wiki/Charlieplexing#Input_data_multiplexing . Your reed switches would need diodes in series (but diodes are REALLY cheap), and the code is more complicated (funky tristate stuff (ab)using IO lines for rows AND columns), but you could read all 8x8 (in fact 8x9) with 9 I/O lines, so an Arduino Uno ought to be plenty.

... oh, and use an electromagnet instead of a Z-axis servo :-)
maxjus (author)  NoseyNick4 years ago
That's a really excellent suggestion! I'll try that should I ever revisit this project. Yeah, I've always wondered why more CNC tables don't use this gearing technique.
akadi2 years ago
wouldn't it have been easier if you just built a robotic arm that can move the pieces and used the same program with the arduino board you could have also used magnets and the other pieces wouldn't get attracted too because the robotic arm is more precise
Ramssess942 years ago
Where i can download the code of XY??
in my computer out korean letters
Vogonslurp2 years ago
Hi Max
I love your project, it's just such a good idea!
I have a question regarding the coding though. What changes have to be made to Sjeng in order for it to function? I'm more of a java person, but I do know a little C. I have Windows, so unfortunately no Mac.
MrRoboBrain2 years ago
Nice project man, good work and idea! My advice for one of the changes would be to change your magnet with electro magnet.
something12 years ago
I was wondering how does the arduino get instructions from the chess engine and how does it send a move please tell me I need to know.
will36752 years ago
Really cool project but what does it do with a piece like the knight that might have to jump over other pieces?
Hello! thats a great project man ! i'm a 4th year mechatronics engineer and i wonder if i can program this arduino on PC cause i don't have mac ! plaz help me with this :) thank you anyway
crabbypup3 years ago
for everyone still looking for the sjeng application, you can find it here: http://sjeng.org/indexold.html

also, where is the code to program the two arduinos? and are the arduinos attached just by USB, or are they wired together first? the 'ible isn't really clear on this. thanks!
diy_bloke3 years ago
impressive. I am not gona build this, but I have been thinking about a raised 4x4 ft plant bed in which individual plants would be watered via a similar setup. Would not be moving chesspieces but a nozzle. This has given me some idea's
amirhemat3 years ago
i am
amir hemat
plz add me
cheukhengc3 years ago
If the horse need to jump out on the first step, how will it move?
tjesse4 years ago
Can't wait to see what you will do next. How is the laser?
maxjus (author)  tjesse3 years ago
It's pretty fantastic!
but what if your chess set is wood?
mickey12vt4 years ago
That's awesome.
tinker2344 years ago
hey at think geek . com they are selling harry poter chess set be cool to make a program so i can say e4 to ee5 something like that
WizenedEE4 years ago
Why don't use the integrated pull up resistors in the arduino (a digitialwrite on a pin does it) instead of using external ones?

Also, couldn't you use just one arduino? The mux shield can go on top of the motor shield. They both use pin 2, but you can cut the trace and rewire it, and that costs way less than $30. Even better, you could add a fourth multiplexer and use just one uno.

This project is really cool, though.
scottinnh4 years ago
Congrats on a well done and ambitious project.

When will you have the upgraded version which allows 2 player over the Internet? [grin]
sponges4 years ago
Congrats! :)
maxjus (author)  sponges4 years ago
Thanks! I ordered some ferric chloride for my business cards :)
MBurg4 years ago
When a piece is captured do you just remove it from the board? Also can you just lift up your piece and place it on the spot you want to move to or must you drag it on the board? I am guessing the size of the chess pieces matters you want them small enough to move by other pieces. I hope I try this out, also would like to add support to be able to play against people online and be able to use the board just like one of those DGT eboards they don't move the pieces for you tho at what they want for them they should.
grenadier4 years ago
ben_k4 years ago
Congratulations on winning! Have fun with the laser cutter.
ynze ben_k4 years ago
Congrats! Great idea and I'ble. Have fun laser cutting!
Congradulations...Enjoy your prize....
Awesome! I'd love to see a longer game though! Who ever said you couldn't play chess by yourself!?!? =D
1-40 of 60Next »