Arduino Nano Chess Clock

by AndersSeverinsen in Circuits > Arduino

5608 Views, 38 Favorites, 0 Comments

Arduino Nano Chess Clock

D1EB59CA-9213-4391-8958-54A9AAF960A3.jpeg
5F585CB7-6749-4B55-A5BF-2B0449A96C2D.jpeg
8443A8A8-BEC4-4B39-9C2D-9E7F812EA6F9.jpeg

Have you also been pulled into the world of chess, after it got extremely popular? Either way it got me the inspiration to make this digital chess clock, powered by an Arduino Nano, and displayed using a LCD display.

The clock can be powered by 5V from three AAA batteries making it portable, or 5V directly from a micro usb cable, with at least 1.5A, for those longer games.

In this guide I will show you how I build it and how you can too.

Supplies

0A831F46-A85B-47B8-85D8-5F0F5EBBFA4F.jpeg

Tools:

  • 3D-printer
  • Soldering iron and solder
  • Wire-cutter
  • A Phillips Head Screwdriver
  • A Computer
  • Optional:
  • PCB-holder and/or a third helping hand

Setting Up the Arduino

arduino.jpeg

We start by setting up the Arduino Nano.

  1. If you haven't already, download and install the Arduino IDE, by going to https://www.arduino.cc/en/Main/Software.
  2. Download my code from below, or on my GitHub here, and open it in the IDE.
  3. Go into Library Manager, search and install the LiquidCrystal library.
  4. Plug in the Arduino Nano, and Go to Tools > Board > Arduino AVR Boards and select Arduino Nano.
  5. Go to Tools > Processor and select your processor.
  6. Then select the port that your Arduino is connected to, and upload the code.

N.B. The code is written for a 16x1 LCD without I2C, so a few simple modifications needs to be made.

If you want to add your own modes, you can do this by adding them to this array:

int modes[8][2] = {{15,10},{10,10},{10,0},{5,10},{5,5},{5,0},{3,0},{1,0}};

The format {x,y} should be read as x being total time for each player, and y is the seconds added after each move.

The three buttons on the front is for play/pause, option, and modes, which cycles through the different modes.

The PCB

3A3326BE-F0CA-4E53-8FFD-3FA76F620021.jpeg
1324E8D3-3B25-4080-9D46-DCFE4DB285C9.jpeg
EC1C4B9C-9580-437F-BA7F-23A170FE8479.jpeg
schematic.PNG

This step is optional, since you could just place all of the components on a perfboard, and manually solder and join everything together. But if you like me, want it to look professional, then designing and having the PCB manufactured, is a must.

The Gerber file can be downloaded for free, on my GitHub here.

Making the Case

fusion.jpeg
fusionrender.jpeg
5EB721B4-3E4C-4DDF-AB8A-F7B5D5F3D75B.jpeg

Now onto the laser cut case, which I quickly designed in Fusion 360.

Then I got the case manufactured in 3mm clear acrylic.

The PCB mounts on four 5mm standoffs, and the same goes for the LCD display.

It is a simple finger joined box, so when assembling it, it may have to be glued together at some places, for it to hold.

The Button

button.PNG
1C9107B3-741A-4FAE-B344-75C8AB17F575.jpeg

Then for the main switch/button, which was a challenge figuring out how to make look and feel like a real one.

The idea is that the magnets makes the button snap to the next state. The button works as a switch, by it being pressed when the copper tape is making a connection.

The magnets is glued in place with super glue, and the copper foil is taped in place.

Onto both ends of the copper tape, I soldered a female jumper cable, and connected it with the male pin headers on the PCB.

Final Assembly

3CD9EC79-CCDE-4C13-AF49-9C2FD1066AFB.jpeg
443C2BB2-DC05-4197-8AE2-443A34B6C3F0.jpeg
EB584AA7-20F1-481A-853C-7ABC63567B98.jpeg

So I hope you like my build. I personally think it was a lot of fun to work on.

Please share it with me, if you choose to make one yourself.

Maybe check out my other projects here on Instructables, and feel free to follow my work here on Instructables, and on my Instagram and Twitter.