I play chess pretty poorly and have always wanted to get better, but I don't even own a chess set. I decided I wanted to make my own set, but with a twist. I have made a chess board with a secret drawer that is locked unless the pieces are arranged on the board in a specific pattern. 

The way it works is there are magnetic switches underneath the chosen squares on the chess set and magnets glued to the bottom of every chess piece. When the chess pieces with the magnets are placed on the squares with the magnetic switches, the switches open. The arduino is programmed to move a servo with a lever attached inside of the box when the switches are open. When this lever is lifted, the spring-loaded drawer is no longer held in place and pops out.

To lock the drawer again, press the pushbutton on the side while holding the drawer in. A buzzer will go off whenever the servo lever is being opened or closed.

Step 1: What you need

(x1) Arduino uno (RadioShack #276-128)
(x1) Standard Servo (RadioShack #273-766)
(x6) Switch-Magnetic Reed Flange (RadioShack #55050593)
(x1) Universal 1000mA AC Adapter (RadioShack #273-316)
(x1) M-type Adaptaplug (RadioShack #273-344)
(x1) Grid-Style PC board (RadioShack #276-149)
(x1) SPST Normally Open Pushbutton (RadioShack #275-644)
(x1) 75dB Piezo Electric Buzzer (RadioShack #273-793)
(x32) Round Ceramic Magnet (RadioShack #64-1883)
(x7) 10kOhm Resistor (RadioShack #271-1335)
(x3) Male header pins
(x2) 36"x24"x1/4" plywood
(x1) 1.5"x1.5"x1/8" plywood
(x1) 2"x2"x1/2" plywood
(x1) Chess Piece Set

Step 2: Cut wood

Use a laser cutter to cut the outer box pattern on the 1/4" plywood.

Use a laser cutter to cut the drawer pattern on the other sheet of 1/4" plywood.

Step 3: Glue outer box

Glue together the pieces of the outer box. 

Step 4: Glue drawer

Glue together the pieces of the drawer.

Save the 1/2" squares cut from the same sheet. You will later use these to mount the servo.

Step 5: Pushbutton

Remove the pushbutton's fastening nut.

Solder a red wire to one lug of the button and a green wire wire to the other lug.

Insert the pushbutton into the hole closest to the corner of the box and fasten it in place with its mounting nut. Note: you will need to fasten the mounting nut on backwards because the wood is too thick to screw it on the correct way.

Step 6: Prep Servo

Insert the three male header pins into the three sockets on the servo.

Use the smallest round servo horn for this project. Servo horns are the white gear-like objects that come with the servo.

Detach the servo horn from your servo. 

Step 7: Magnetic Switches

Discard the side of your magnetic reed switch that does not have a wire (this part is simply a magnet that can be used to activate the switch).

Decide what secret combination you would like to open your chess set.  Measure how far from the edges of the board the squares of your secret combination are and draw the locations of the squares onto the back of your board using a pencil. 

Peel off the layer of paper on the bottom of each magnetic switch and expose the adhesive. Stick a magnetic reed switch onto the bottom of your chess board in the middle of each of the six squares you have drawn.

Step 8: Solder

Solder the pins of the servo to the Grid-Style PC board. Solder wires to these three pins that will plug into the Arduino (red for 5V, black for ground, and yellow for pin 8). 

Solder the magnetic switches to the PC board. One side should be connected to 5V (the red wire on the servo) and the other side should be connected to a 10k pull-down resistor and a blue wire that will lead to one of the Arduino's digital pins. The six switches will be connected to the Arduino's pins 2-7.

Solder the buzzer. The black wire should be soldered to ground and the red wire should be soldered to a white wire that will lead to pin 9 on the Arduino.

Solder the pushbutton to the PC board. The red wire should be soldered to 5V and the green wire should be soldered to a pull-down resistor and an additional green wire leading to pin 10 on the Arduino.

Step 9: Drill

Drill a hole into the side of the 1/2" thick piece of wood using a 3/32" drill bit.

Widen one of the existing holes in the servo horn by drilling into it using the same drill bit.

Using one of the silver screws provided with the servo, attach the wheel to the wood. This will serve as the lever for opening and closing the drawer.

Reattach the servo horn to the servo. You should place it such that when the servo is in the zero position, the lever is perpendicular to the body of the servo.

Step 10: Mount Servo and Lever

Glue the four 1/2" squares cut out of 1/4" wood onto the 1.5" square cut from 1/8" wood. One smaller square should be glued to each corner of the larger square. Zip tie this piece to the top of the servo.

Glue this wooden mount attached to the servo by zip ties to the bottom of the top of your board. it should be placed such that when the lever is down, it holds the drawer closed and when the lever is lifted, it lies flat against the top of the box.

Step 11: Program

Load the following code onto the Arduino:

* Secret Compartment Chess Set
* By Nicole Grimwood
* For more information, please visit:
* http://www.instructables.com/id/Secret-Compartment-Chess-Set
* This code is in the public domain.

#include <Servo.h> 
Servo myservo;  // create servo object to control a servo 
int pos = 0;// variable to store the servo position

// Pins for magnetic switches
int switchPin1 = 2;
int switchPin2 = 3;
int switchPin3 = 4;
int switchPin4 = 5;
int switchPin5 = 6;
int switchPin6 = 7;

int servoPin = 8; // Pin for servo
int buzzerPin = 9; // Pin for buzzer
int resetPin = 10; // Pin for reset button

boolean closed; // keep track of whether the drawer is currently open
boolean switchOn; // keep track of whether all magnetic switches are open
boolean resetOn; // keep track of whether reset button is pressed

void setup(){
  myservo.attach(8);  // attaches the servo on pin 8 to the servo object
  myservo.write(pos); // Close drawer on servo by lowering lever to position 0
  closed = true; // drawer is closed initally
  switchOn = false;
  resetOn = false;

void loop(){
  // If drawer is closed and magnetic switches are open
  // raise servo to open drawer
    for(pos = 0; pos < 90; pos += 1){   // moves servo lever from 0 degrees to 90 degrees 
      myservo.write(pos);               // in steps of 1 degree 
    closed = false;
  // If drawer is open and reset is pressed, 
  // lower servo to zero position to close drawer
    for(pos = 90; pos>=-1; pos-=1){     // moves servo lever from 90 degrees to 0 degrees    
      myservo.write(pos);               // in steps of 1 degree         
    closed = true;
    switchOn = false;

// Check if magnetic switches are open 
void switchCheck(){
  int switchVal1 = digitalRead(switchPin1);
  int switchVal2 = digitalRead(switchPin2);
  int switchVal3 = digitalRead(switchPin3);
  int switchVal4 = digitalRead(switchPin4);
  int switchVal5 = digitalRead(switchPin5);
  int switchVal6 = digitalRead(switchPin6);
  // If all of the magnetic switch pins are high
    switchOn = true;
  // If all of the magnetic switch pins are low
    switchOn = false;

// Check if reset button has been pressed
void resetCheck(){
int resetVal = digitalRead(resetPin);
resetOn = true;
resetOn = false;

Step 12: Pieces

Glue a magnet to the bottom of each of the chess pieces.

Step 13: Spring

Mount the spring behind the drawer.

Step 14: Play

Glue the top onto the box and begin storing and playing!
<p>Not trying to troll, but it's surprising how many chessboards are not set up properly. Please google and show us the right way.</p>
<p>Really nice work.</p>
Not only is the project idea really cool and fun, you did a FANTASTIC job photographing and documenting the step-by-step! I also appreciate how well you described your terms, and didn't just assume everyone knew all the technical vocabulary. I think you have really excelled at using this mode of communication - this is a true instructable!
Couldnt agree more!
Very nice! <br> <br>I appreciate your using the Arduino and it's programming. <br> <br>However, are you aware that there is a much simpler method to handle the logic states needed here? A simple latching circuit with an inexpensive relay would perform these tasks quite admirably. <br> <br>Also, to hold the drawer closed, a simple solenoid operating a latching arm could replace the fancy servo a simple solenoid would suffice. I must admit that the solenoid isn't as &quot;nice&quot; as the servo unless the solenoid's movement could be &quot;softened&quot; (dampened) <br> <br>Also, having to ensure the drawer was closed BEFORE resettiing could be eliminated by using a limit switch. It would be connected in series with the reset button using its NO side and the NC side of the reset switch). It would be placed in a position to be actuated upon drawer closure. <br> <br>But, again I laud your use of the Arduino, even though exteremely overused in this application. <br> <br>The Arduino could be then utilized in more complex situations where my discrete method would be quite cumbersome. <br> <br>But that is all that a computational device is, right?. A massive assortment of &quot;OFF/ON&quot; switches that ccan be progrrammed much more readily than the discrete method. <br> <br>Again, please don't see my comments as criticism, rather &quot;Old School&quot; sugestions. <br> <br>;&gt;), Jerry
Jerry, <br>Thanks for your input! I relied more heavily on the Arduino for this project because I do not have as much electronics knowledge, but if I do similar projects in the future I will definitely look into other options more thoroughly! <br>
I love it. It is so creative. I would love you to incorporate the same thing into a desk, like the one from national treasure, where there is some kind of secret drawer. Well anyway you got a huge vote from me and I hope to see new things from you in the future.
Thanks! The desk is an awesome idea. I'll have to look into doing that.
Hmmmm... I usually store my pieces in the drawer below the board, but that seems like it would be problematic with this design. Nice right up though.
I can't open the design files you posted here. Is there a way you can change to a different file type?
It probably doesn't make a difference and certainly doesn't detract from a very design, but if you want the drawer to be on the side of the board where one of the players sits and the button to go on a side perpendicular to the players, you need to change the pattern of the board. This is because the lower right square of a chess board from a player's perspective is always white.
Brillant! I love this idea, amazing ingenuity on your part. Thank you for sharing :)

About This Instructable


243 favorites


Bio: Hey! I am an Electrical Engineering major and I love making fun and useful electronics projects. I am also interested in crafts of all sorts ... More »
More by nikoala3: Whipped Coconut Oil Laser Cut Light Fixture Knitted Flower Headband
Add instructable to: