Smart chess clock
is used to limit the total time of every chess game, so that there is no need to end up spending days finishing chess games. With a chess clock, players have a set amount of time for all their moves they make. This encourages them to think quickly and make strategic decisions, as they know they don't have time to waste. Additionally, it prevents players from taking too long to think, which can help speed up the game and reduce the amount of time it takes to finish.
by searching i've found number of similar project which helped me to guess my finial project future
I appreciate all of them for sharing their projects and efforts as I've learned much from their experience and perspective.
software i used
for preparing the stl files for printing
for designing process and exporting files for fabrication
fo preparing the dxf files for laser cutting
materials and machine
3D printing by using PLA materials
cutting plywood
3 mm thickness
i'd like to make my chess clock portable so you can separate between clock and board and take the clock in your bag easily,
---> So my designs should divide into there parts ( main clock - board - chess pieces )
Main part clock:
first sketch base part
i sketch right side then mirror it about center line
ground base part before new sketch
sketch back part
Note that we usually make tab with slot 3mm which equal to plywood thickness but this tab's length is 10 mm which larger than usually one cause it will pass through over than two plywood.
rule number 1 : create new component before new sketch
use rectangular pattern for regular repeat define rectangle to make good shape at the edge
sketch front part by projection back and base parts
drag and drop Arduino uno in fusion file then joint it with base
sketch side part by projection back, base, front and Arduino slots
right side will create by mirror tool
remove useless slots in mirror side
sketch top part by projection also, i make this suitable holes for push buttons and led holder i'll use.
sketch the holder part for hold screen, this part will incline by angle 45
now clock main parts is ready
Board
sketch stand right side by projection also.
here two holes are used to fix board's stand and clock part without unfasten or disassemble the main clock part, only you flip the board then unscrew two bolts
Note that it has two slot, the rectangle one is used to let wire pass through it to connect board sensor and the main clock part and circular one to avoid fraction between the bolt's head and right stand board
mirror right stand without specfic slots and holes that was used.
sketch board with dimension 300 * 280
sketch simple in front stand and mirror it to back one to finish four stand board.
make one 3 mm hole in the center of board to easy fix sensor.
chess pieces
i got chess pieces from this site ⬇️
they have simple and awesome shapes, I've chosen the one with 30 mm squares.
3d printing chess pieces with setting as shown in ultimaker Cura program, it printed on Prusa i3Mk3
start to print 16 black pieces they have taken about two hours and 22 grams then i've change the filament to white and repeat all pervious process.
for laser cutting i've used Laserwork program to adjust cutting setting, i've exported every component as dxf files from Fusion with dxf extension.
cutting setting
some edit with Laserwork, here write text speed cut on part and scan for png file
cut, speed cut and scan setting
chess board scan and cut
Note that it is important to rotate the PNG file by an angle of 90 cause the chess board's right corner square must be a white square for two players.
Electric components
LCD i2c
bread board
5 small push buttons
vibration sensor module (801s)
two big push buttons
Arduino UNO
this project circuit is required to have LCD screen and at least 7 push buttons,
i've simulate this simple circuit on TinkerCad as shown
here is Tinkercad's link for project ⬇️
later I've added and organized wiring to be easier to understand as shown
as this project doesn't have any types of motor or other components which requiring high voltage,
So it will work with 5V by Arduino pins.
I've used 9V power adapter to plug in Arduino.
code is based on #Ronald Rezende code, i start to build my code on his one, he had made great one but I've edited and added a lot of lines on it to serve my own feature.
first i check his code in reality, i determined some points it have to change first one is that he was use LCD screen without i2c so i have to exchange these lines to work with my I2C screen
⬇️ ⬇️
define variables for five push button
➡️
➡️
second i figure out that i should change the method reading push LCD buttons which control time for play he was using one analog pin connected with 5 push buttons and vary resistors, it was great idea to run 5 push button with one pin but the problem was in it's not accurate, this signal has gotten distracted alone and read wrong value also it required many complex wiring and resistors . ➡️
if black time has done.
smart detectable board code:
to change roles between white and black by smart way i put vibration sensor to sense pieces movement. here is code for it, also when you put automatic mode on the sensor run and players push buttons are working together.
put this if condition first
how LCD buttons work
so to solve this problem i've separeted every push button with only one pin
add some conditions to make sure that when sensor is high whose had played white or black.
opposite it for another player
assemble board parts was easily and quickly.
knowing how vibration sensor and wire.
wiring and fix the sensor uder the board
assemble clock main part with electronic parts
test sensor reading
test minimum feature for clock part and assemble them together, "which have to count descending for one player and stop another player counter".
I've asked my instructors Menna allah Galal and Ahmed Sami also my peer Rowan Mabrouk many times in coding. So thanks for all of you.
while testing the code i was struggling cause i couldn't fully understand why Ronald used keypad buttons with one pin in his code.
Ahmed Sami advised me that i have to read and understand all of Ronald's code if i decided to use his code and he helped me to exchange the combined keypad to separate push buttons with pull_up input.
after I've assembled main clock parts i figure out that there are some parts not fit well as it required to mount by two bolts and nuts and actually one bolt is not good enough.
Don't use only tab slots to fix parts.
the main part is not stable at all.
forget to make slot for screen.
one bolt is not good enough.
so I came back with Fusion to edit these mistakes step by step and the final main clock became stronger.
if i have more time later, i will work on detecting movements on every single square to be more precise and turn the physical board into a digital board so you can watch live matches from away city or country.
I appreciate your feedback 🤍
it'll take less than 1 minute ⬇️