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.

Step 1: Parts and Materials

You may have many of the parts for this project already, but if you don't, the whole list costs ≈ $350, depending on where you get your parts from.  Many, many of them can be salvaged, so look to recycle before you buy!
  • 1 Arduino Uno or Diecimila
We'll be using this arduino to drive our stepper motors and servos.  You can pick these up just about anywhere online.  I got mine from Adafruit. $30
  • 1 Arduino Mega
This is the most expensive item in the project.  It'll be dealing with the inputs from each chess square to let the computer know where you've moved.  We're using the mega here due to its speed and number of inputs.  Adafruit $65
  • 1 Mux Shield
The mux shield (short for multiplexer) gives us even more inputs for our arduino mega.  We'll need 64 inputs in total, one for each square.  Sparkfun $25
  • Motor Shield
The motor shield will be controlling our stepper motors and servo.  You'll need to solder it together.  Adafruit $19.50
  • 1 Large chess board with pieces
This one is a little more self explanatory.  We want a large chess board here because the pieces need to be able to move in between each other with disrupting others.  Make sure you measure the diameter of the bottoms of the pieces.  We'll need that in a moment.  I'm not sure where mine is from, but you can pick them up from a flea market for a bargain.  The playable area of my board is 24".
  • 64 NO Reed Switches
Reed switches are magnetically activated switches.  They'll help us find the location of moved pieces.  NO stands for normally open, that is, the circuit is disconnected   Digikey ≈$30
  • 16 10K 1/4 Watt Resistors
These are the pull up resistors for the built in digital pins.  The mux shield, luckily, has integrated pull downs, so we don't need to worry about those. Digikey ≈ $2
  • Roughly 90 feet of 30AWG Wire

This is the hookup wire for all of our sensors. Radioshack ≈ $16
  • Neodymium Magnets to fit your pieces
This is where the measurements from the bottoms of your chess pieces come in handy.  You'll need disc magnets to fit underneath each piece.  For proper strength, they should be about 1/8" think.  A great source for these is K&J Magnetics.  ≈ $55
  • 1 Large Neodymium Magnet
This magnet will be attached to the XY table underneath the board, to move each piece around.  K&J Magnetics $19  Note: This was Waaaay too powerful.  It would draw in pieces it shouldn't have.  You'd be better off going with some smaller ceramic magnets, like you'd find at Staples or another office supply store.
  • 2 Pairs of 24" Drawer Bearings
The size of your bearings will depend on the playable area of your chess board.  These allow for the stepper motors to move back and forth underneath the board. Amazon ≈ $30
  • 2 Stepper Motors
Stepper motors can move in very precise increments.  In the late 90s they were in just about every piece of tech you could find.  The best place to get these are in old dot-matrix printers.  You can them at the flea market for next to nothing!
  • 2 Vex Rack and Gear Sets
The rack gears allow the stepper motors to travel on the drawer bearings.  See the Step 4 for a more detailed explanation.  Vex Store $40
  • 1 Standard Hobby Servo
This servo will be raising and lowering the powerful magnet below the board. You can find them at a hobby shop for ≈ $10, or Amazon ≈ $12
  • 1 2' x 2' Perf Board
The perf board is super thin and will be the mounting surface for all of our reed switches.  The price will vary greatly on this one, but I got mine from Home Depot for ≈ $5
  • 1 2' x 2' x 1/2" MDF Board
Similar to the perf board, I got this from Home Depot for  ≈ $5
  • Various lengths of scrap 1"x2" wood
This wood forms the bridge between the X-Axis drawer bearings.  Go behind any hardware store and you'll see dumpsters full of this stuff for totally free!
  • 5 Minute Epoxy
This stuff is a godsend.  It's used for just about everything in this project, from mounting motors to attaching the rack gears.  I'm in love -- and  I picked mine up from Radio Shack for $3
  • 1 Wood Saw
You probably already have this one, but if you don't, I picked mine up at Ace Hardware for $10 a couple of years ago.

<p>Can you please share the circuit diagram.</p>
<p>Hi, i didnt found any video of this working, can you show us?</p>
<p>up !</p>
The link does not work..
<p>can it play chess itself without any one's help.is it intelligent enough to make moves itself</p>
<p>On motor ass embally code I just get a bunch of garbage as the outpu please help.</p>
<p>how far have you completed?? </p>
<p>how far have you completed?? </p>
<p>is this product for sale???</p>
<p>wow cool</p>
Can you use an arduino uno r3 instead
<p>Can you share complete code for arduino ???</p>
<p>do you stor the code on the VHS tape</p>
<p>Do you have program code of windows compatible? the code you have attached is .pde format can you send it in .ino format?</p>
<p>I am sorry for the stupid question but I am a beginner.</p><p>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.</p>
<p>why skp file is in tmp format? Cannot download.</p>
<p>What's the accuracy on this?</p>
Can you contact me i can't make one but I'd like to buy one 229-412-8125 Gus
<p>What if it has to move a horse over another pieces?</p>
<p>Lol! Good question!</p>
<p>That's what people can use VHS tapes for these days. Cool project!!</p>
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.
Not bad! Personally I'd have saved the cost of the Mega by adding a shift register to the uno though.<br> <br> Instead of 64 seperate inputs, you'd need 8 row wires, 8 column wires... 2 arduino outputs go to &quot;clock&quot; and &quot;ser&quot; 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.<br> <br> 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?) :-)<br>
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. <br> <br>... oh, and use an electromagnet instead of a Z-axis servo :-)
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.
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
Where i can download the code of XY?? <br>in my computer out korean letters
Hi Max <br>I love your project, it's just such a good idea! <br>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. <br>Thanks!
Nice project man, good work and idea! My advice for one of the changes would be to change your magnet with electro magnet.
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.
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
for everyone still looking for the sjeng application, you can find it here: http://sjeng.org/indexold.html <br> <br>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!
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 <br />
hello <br>i am <br>amir hemat <br>iran <br>plz add me <br>tanx
If the horse need to jump out on the first step, how will it move?
Can't wait to see what you will do next. How is the laser?
It's pretty fantastic!
but what if your chess set is wood?
That's awesome.
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
Why don't use the integrated pull up resistors in the arduino (a digitialwrite on a pin does it) instead of using external ones?<br><br>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.<br><br>This project is really cool, though.
Congrats on a well done and ambitious project.<br><br>When will you have the upgraded version which allows 2 player over the Internet? [grin]
Congrats! :)
Thanks! I ordered some ferric chloride for my business cards :)
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.
Congratulations on winning! Have fun with the laser cutter.
Congrats! Great idea and I'ble. Have fun laser cutting!

About This Instructable




More by maxjus:Build a Thermal Flashlight - Light Painting with Temperature Track Honeybees With Temperature Restore and Modify an Original DMG Gameboy 
Add instructable to: