Draft-Instructable-Automated Chess Board - Hall Sensor
Draft-Instructable-Automated Chess Board - Hall Sensor
Hi, I’m Ethan. I created this automated chessboard as a school project, and I believe I might be
the first person in Malaysia to build one that can play a complete game! I had a mentor,
@skolodi, who encouraged me to make this Instructable to document the steps I took to make it
work. I hope this guide helps others take on and enjoy the challenge of building their own
automated chessboard!
This project is complex and will require a good deal of planning and preparation. Before you
spend any money, take time to understand the project thoroughly using tools like Simulide,
Fusion 360, and EasyEDA. It’s important to recognize that certain skills are essential to
complete this project. If you lack these skills, you may need to rely on outside help, such as for
soldering, testing, understanding design schematics, creating 3D models, coding with Arduino,
or even having a dedicated workspace to store everything.
To help, I recommend making a Skill Check Table to identify areas where you might need
assistance. For example:
1. Skills - If Lacking:
a. Soldering - Seek help at local PCB Store or Electronic Store
b. 3D modelling - Consider watching some Youtube tutorials
c. Arduino Coding - Start with beginner tutorials
● Create a personal skills checklist in Excel, noting what you need to learn before
beginning.
● Make a comprehensive list of parts and tools in Excel to help manage the project’s
budget in terms of both cost and time.
Finally, all my files—Excel templates, Fusion designs, and other resources—are available for
download, but remember that success hinges on your understanding. Take the time to simulate
and analyze the project first. Only once you feel confident should you consider investing further
time and money.
Remember, you will work with electricity , so take safety care about that.
Introduction:
This project builds upon the foundation laid by Greg's original automated chessboard. While
Greg's design is somehow effective, this version includes significant upgrades—particularly in
sensor technology, which greatly improves tracking accuracy and functionality. Before spending
money, it’s a smart idea to read through Greg’s project comments, especially those from others
who have attempted it. By understanding their experiences, you can anticipate potential
challenges and save time on your own build.
Afterward, come back here to get started—and don’t forget to check the comments on this guide
as well! Other users may share new versions and improvements that could be helpful for your
build
One of the key upgrades is the use of analog Hall sensors instead of digital reed switches. The
linear Hall sensors provide a more reliable and responsive solution, addressing the limitations of
the original design’s basic digital sensors, which could only detect if a piece was present (1) or
absent (0). While this basic setup could register when a piece was removed, it couldn’t
determine where the piece moved, especially in “capture/eating” situations. You could imagine it
as a simple 1/0 matrix where a "1" changes to "0" when a piece is removed, but the system has
no knowledge of the piece's new position. To address this, we now differentiate between white
(-1) and black (1) pieces, enabling the code to track both the presence and colour of each piece
(black or white).
Using only a single digital sensor (1/0) per square presents limitations, especially in situations
where it’s unclear where a piece has moved. By upgrading to a system that differentiates
between values of -1, 0, and 1, the board gains complete move-tracking capabilities, allowing
for a complete game.
To enhance tracking further, the following are some of the various sensor options that can be
explored:
1. Using analog sensors (the option used in this Instructable) - These offer nuanced
readings, which makes it easier to distinguish between black and white pieces.
2. Duplicating digital sensors - This approach, though effective, requires two sensors per
square, creating space management challenges.
3. Implementing NFC technology - With NFC tags on each piece, not only the colour but
the specific piece type could be identified, providing the highest level of accuracy (similar
to professional FIDE boards). However, NFC is a costly alternative option.
In addition to improved sensors, this version also uses an Arduino Mega instead of a Nano. This
upgrade resolves the memory issues that caused the original system to decalibrate mid-game
and offers more pins for potential future upgrades.
Lastly, this version replaces the breadboard with a custom-designed PCB, which keeps
everything neat and stable. While breadboards are ideal for prototyping, they can introduce
troubleshooting issues, such as misconnected or loose wires. With a PCB, all connections are
pre-set on the board itself, minimising connectivity issues and making the setup much more
reliable.
These are just some of the improvements stated in this version, and each enhancement
contributes to a more refined, accurate, and durable automated chessboard.
1. Simulation
Before starting the physical build, it’s crucial to simulate each component of the project. Begin
with simpler simulations to understand the basics, then move on to simulating the full
chessboard system.
For example:
● In this video (beginning at minute 7), you can see the simulation of Code Version 10.3.4:
Debug Version 10_3_4 Automated Chess - Correction of Automatic Chess Piece
Positioning.
● You can also use this Wokwi link to simulate Code Version 8.
While there are many simulation tools available, Wokwi and Simulide were sufficient for me to
understand the project and run tests without the physical board nearby.
Creating your own simulations can be one of the best ways to understand the wiring and code
thoroughly.
And here the Arduino IDE: https://www.arduino.cc/en/software Remember search the Legacy
IDE (1.8.X)
For setting the simulide and making simulations, you will find a lot of tutorials on youtube.
- Set the address of the ArduinoIDE 1.8.X on the compilator. Make or open any circuit
(Left part) So you can Configure it on the Right part.
Change the “Uno” to the Board you have.
- Each code & test of this project is stored on the Drive of this project (you will see the link
on a later step) , and all can be simulated.
For this step, I invested [25 hours over 10 days] and $0.
A custom PCB design by @skolodi is available for this project, which can save you significant
time. However, it’s essential to understand the layout, as this will simplify troubleshooting and
allow you to make modifications if needed.
The mainboard design already includes necessary upgrades, like replacing the L293 H-Bridge
with an L298N for higher current handling and swapping the Mini360 with an MP1584EN to
prevent overheating. This version should be suitable for most builds, but you may still need to
make small adjustments based on your specific hardware requirements.
Whether or not you make modifications, taking time to study the design can be a valuable
learning experience, enhancing your understanding of component interactions and boosting
your confidence with troubleshooting and upgrades.
On PCB Sensor, I prefer to make a hole on the PCB for the centre of the Sensor…so, no
superficial component will allow that.
- Why are there different sizes of PCB Sensor (37,40,45mm per square)?
There are upgrades, starting with 37mm (Greg’s square size) then 40mm per square, on both
you have to deal with the equilibrium between magnetic force on the neighbours pieces (Add
an Iron ring, Mumetal or Permalloy for shield the magnetic field). I Use the 45mm per square
version, and don't have to deal with that.
For easy glue it to the board (Acrylic in my case) and help to not go down in the middle.
I’m sure you will have more questions, please make it, me and the community will try to answer
it.
For this step, I invested [HH hours over DD days] and $0.
Nothing to buy yet. This step is to make a BOM and add on the list the Tools need to buy. With
that you can get a budget cost of the Project.
Some suppliers do not sell the quantity you need, so you have to buy more for a minimum
request from the seller (That affects the budget cost). Other cases it is better to buy more
quantity than needed, to have spare parts. I broke on the progress, 1 Arduino Mega, 2 motor
Drivers and 1 Electromagnet, until I got the correct welds and connections. I hope that does not
happen to you, so a better understanding of the project reduces the risk of damaging some
components on the go.
If you have to get some components outside of your country, remember to add the price of the
delivery and the customs. Sometimes that cost is bigger than the product.
Is important to be tidy. I made a folder for each component, to store there the datasheet, and
the relevant information from the supplier. So I can verify them later with the Fusion Design and
with the PCB design and reduce the possibilities of a bad purchase.
For this step, I invested [HH hours over DD days] and $0.
4. Fusion Design
I'm a student, so I had a free student licence for Fusion360. Here is the link if you’re a student
too:
https://www.autodesk.com/education/edu-software/overview?sorting=featured&filters=individual
Fusion has an EDA design, but, as you see on the previous step, the PCB was designed on
EasyEda. In Fusion I made the Mechanical design of the Automated Chess Board and joined all
the parts (Electronics, profiles, PCB).
Greg's design uses plastic joints for the Trolley and pulleys, I prefer to do my own design with
Openbuilds stuff. I keep the Belt design (Instead other better options, like linear bearings). I
change the square size to 45mm each, and give extra space for moving the eaten pieces
outside the board.
.
You can do your own Core X-Y Design, but for not having to adapt the code and keep the same
trolley movements, have to follow this Lay-Out.
You see, I use a big piece of wood as a floor, to store the project, and move it, without plugging
in & out every time I have to store it.
Here is the Detail of the Core X-Y
Other View of the Core X-Y. But…you have to enter on the Fusion to see the Design better.
And I hope you made your own design.
But respect the Lay-Out for not having to make changes on the code.
With That Lay-out, you allowed this movements of the Trolley: (Dir: High or Low, set the
orientation of the rotation)
For make an horizontal move with the Trolley, we have only 4 options:
- from a to h (A_H)
- from h to a (H_A)
- from 1 to 8 (F1_F8)
- from 8 to 1 (F8_F1)
In all the 4 options we need the 2 motors working at the same time. And depending on the
rotation of each motor, the trolley will make the move we expected.
For make a diagonal move with the Trolley, we have only 4 options:
- from a1 to h8 (AH_18)
- from h8 to a1 (HA_81)
- from a8 to h1 (AH_81)
- from h1 to a8 (HA_18)
In all the 4 options we need only 1 motor working and the other off at the same time. And
depending on the rotation of the motor, the trolley will make the move we expected.
So, to make the same distance (for example 1 square=45mm) with a horizontal & diagonal
move…you will need the double of the rotations on diagonal than an horizontal move. Because
on diagonal you use only 1 motor. This is an important point, because in Greg's code set a
parameter similar to sqrt(2). It makes sense to make a diagonal move…but on Core X-Y , the
move is always a step made on the belt. So if only 1 motor is working, we have to duplicate the
steps to make the same distance. (The parameter on the code has to be a number similar to 2),
but, we will see that part later.
I Use a lot of parts from https://grabcad.com/library And use Openbuilds designs to join the
parts. I use mini wheels, if you use normal wheels, you have to change the design, because the
distance of the wheels will be different.
I added a Spring (1.2mm × 20mm, 10mm) to pressure the Coil to the top, and always have the
same distance between the Acrylic and the Electromagnet.
I built the Core X-Y with 500mm 2020 Vslot profiles. Of course on the Videos I uploaded, you
can’t find the 50mm difference. I recommend increasing it and use 550mm profiles.
So I updated the Fusion design to 550mm. Remember, the better way is to do your own design.
I know…bigger Core X-Y, bigger cost (More Space on the Table, Larger Profiles, Bigger Acrylic)
but you will work more comfortably and reduce possible mistakes and may avoid some
components being broken.
For the Joints between profiles, I prefer to use an internal 90° corner. So, Metal joins with Metal,
to have a strongest structure.
I use the “hammer” bolts inside the profiles to join other parts, like in the foots, they are easy to
put in & out the profile without disassembling the structure. And to reduce the different kinds of
bolts…I use it everywhere.
You can export each piece from Fusion to dwg or stl file. So you can cut it with Laser, or 3D
printed. For the Trolley, Pulley support, Foots, Microswitch support, Motor support, I prefer to
use wood and cut it with a laser.
The Chess pieces are designed here too. Remember, if you use less than 45mm square, you
may add an Iron ring, Mumetal or Permalloy to shield the magnetic field inside the piece, and
not get the pieces to go on a ride together.
They are hollow inside, for added weight (Iron Dust, for example) and space on the base for clip
it with the magnet.
The external Diameter is set by the size of the Square. If the Square is 45mm, the Diameter of
the piece must be less than: (45/2)-3= 19.5mm (rest the 3mm for having a gap when the trolley
moves a piece between them.
For this step, I invested [HH hours over 195 days] and $0.
In this step I use a part of the BOM of the project, and focus on the Electronic parts.
The main concept is to understand the ampere consumption expected, and verify the power
needs. I did not put here the headers, buttons, connectors, etc. Only the electronic components
with the estimated ampere consume.
6.5V Ampere Consume (In your case, maybe you change the 6.5V to other, like 6.0V, keep
reading for know why)
5V ampere Consume
This estimated ampere consume, helps you, not only for defining the 12V power for supplying
all the project. It will be useful to find some short Circuit when you weld the components and
power it on. If you measure more amperes than the expected…something goes wrong, so put
an eye there.
But with H-Bridge and PWM, it consumes 1.6A. (You will set your own PWM parameter on a
test, if you go on with this project)
The PCB Mainboard is prepared, (has parallel the L298N, take a minute for see the datasheet
ot the L298N) for managing up to 3A Electromagnet.
Another Spoiler alert…If you have a power font, like in the picture (Can limit the current, for
example to 0,5A) will be great for the first test step. (To avoid burning something, if you made a
short circuit when welding the components) But later (when you’re sure no short circuit there) is
better to change it to a classical 12V power Font to reduce the space on the table.
I want to send special thanks to my School teacher, for borrowing the Power Supply (many
times). I could make a lot of tests with that and reduce the number of components I broke in the
process.
For this step, I invested [HH hours over DD days] and $0.
Not make all of the chess pieces now! Only make 3 of them for a test (experiment).
Why only 3? Is to put 2 on a side and pass 1 in the middle. The piece will not levitate, so the diameter of
the piece is a key.
Is for define:
● External Diameter of the Chess Piece
● Magnet Force and Dimension
● Weight of the Chess Piece
● Hall Sensor
● Magnetic Shield
● Electromagnet
● H Bridge
The External Diameter of the Chess piece will define the size of the Square Size of the board. The Size of
the Square Size defines the size of the Board. The Size of the Board defines the Size of the Core X-Y.
So…to make it simple…have all the pieces with the same diameter is a good idea.
The Magnet Force (N35;N52, etc) and the Dimension of the Magnet (Cylindrical, cube, ) defines the
distance of attraction of the Magnetic Field. It has to pass through the gap between the board and the
Sensor, but not have to interfere with the nearby pieces to repel/attract them.
If the Gap to the bottom is, for example, 7mm (2mm PCB + 5mm Acrylic), and select the Magnet for that
gap, the distance with the near piece must be bigger than 7mm to not have magnetic field interference
from other pieces. That will make a giant board with small pieces. Afortunately, the Linear Hall Sensor
can measure the magnetic field, so with the code, we can differentiate the magnetic field of the chess
piece located upper the Sensor, to other near pieces on its reading.
Type N3 N3 N3 N3 N3 N3 N3 N3 N3 N3 N3 N3 N3 N3 N3 N5 N3 N3 N3
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 2 5 5 5
D 5 6 7 8 5 9 10 6 5 7 6 8 9 7 10 6 8 9 10
[mm]
H[m 1 1 1 1 2 1 1 2 3 2 3 2 2 3 2 3 3 3 3
m]
The weight of the Chess Piece is important, they have to be heavy, for it not be repelled or attracted by
another piece when touched. But not too heavy to be ridden by the Electromagnet.
The Hall Sensor, if we use a digital one (1,0) is not good for differentiating the magnetic field of the piece
located above the sensor, from another near it. So that is another reason to use an analog sensor. After
testing a lot of sensors, I advanced with the 49E Linear Hall Sensor. No need to buy the 64 sensors now,
with only 3 you can make the first test (experiment).
You will be able to answer: Is the piece detected? Can the North and South pole be differentiated by the
Sensor?
If the pieces touch each other, do they join it? So, you can experiment to add a Magnetic Shield.
For example, add an external Iron ring round the base of the Chess piece. If not enough , you can add a
film of Mumetal or Permalloy to increase the magnetic shield.
For example, a 1/2” Iron conduit pipe, with 3,2mm thickness, and a cylindrical N32 Magnet Diam
10mmx2mm. Three of them can stay together without magnetic join between them, and no Mumetal or
Pemalloy needed. I use Plasticine to fill the pipe and center the magnet instead making a 3D case inside,
for a quick experiment, and repeat it with a lot of magnets and lot of different size pipes.
Experiment with the Electromagnet. It has to be strong to move the above piece with the Gap selected
(7mm on the example) and not move the nearby pieces.
I test a lot of Electromagnets.
All of them have a different strong and ampere consume. From 0,2A to 3A.
The Ampere consume is important to define the H-Bridge. If the Electromagnet consumes 12V - 3A and
you use a H-Bridge designed for 0,8A…of course it will break.
The problem is, the Electromagnets I buy do not have datasheets ! So, a lot of H-Bridge Tested.
DRV8871, L293 and finally, the L298N is the one with the best results in my case with the Coil Diam
21mm Height 22mm.
The Electromagnet (Coil) gets very hot, so handle it with a support (I use a simple screw as you see on
the images) Or you can make the Trolley (you will need it later).
So, after the Test, the External Diameter of the chess piece I selected is 20.0mm, and on one Square you
must put 2 of them (The piece must pass between 2 pieces) and have an extra distance for possible
mistakes (3mm) The Square Size will be: 20mm+20mm+3mm= 43mm -> 45mm is the Square size I
selected.
No extra Magnetic Field (Iron Ring or Mumetal or Permalloy) needed in my case for that Size.
Small Experiment
I started this experiment with a small wood board, just to test the Electromagnet & Pieces
(Remember to make only some pieces, maybe you need to change something and build other 3
pieces is cheaper than made 32), and magnets to verify if the 45mm square size defined before
works fine. No motors or sensors connected. Just to see if the pieces can move with the
Electromagnet and not go for a ride together. You can connect the H-Bridge L298N to any
arduino you had (Nano, Uno, Mega) to run it with the PWM.
Take care to parallel the H-Bridge to get more than 2A on the output.(You have to manage to
do it with a breadboard, or do this experiment after having the Mainboard PCB ready). You can
add some Hall Sensor under the board to make a complete test.
This is the Polarity of the Chess Pieces, which matches with the Code.
Once the Square Size is tested and defined, you can set the Size of the Board, So you can
Define the Size of the Core X-Y. In my case, define the square size to 45mm. If you use, for
example, 40mm or less you have to deal with adding a magnetic shield on the piece. I advance
with a 45mm square size, so I don't have to deal with that issue.
Buying the Core X-Y materials.
If after testing you made some changes, remember to change it on the Fusion Design.
I imagine you know how to build a Core X-Y (eccentric nuts, adjust the wheels, verify the middle
profile has the same distance to the edges after moving it) If not, please, see tutorials on
Youtube. (There are a lot)
I prefer to use wood and laser cut it. Instead buying the Openbuilds or 3D printed it. Of course
your case may be different.
Buying Electronics.
This step is the most complicated for me. Not all the components are available in my country.
Not all the suppliers show the datasheet of their components. It’s easy to buy the incorrect
component.
So, it is important to be tidy. I made a folder to save the expected datasheet, and try to see if it
matches with the supplier info. (Mechanical dimensions, electronic parameters, etc)
For example, buy a Screw Terminal with pitch 2.04mm and the needs is 5.08mm
So, if in your country you get different parts…it is better to modify the PCB design to adapt it for
the components you can get (Or modify the component to adapt it to the PCB, or put more
attention on the buying time).
As you see, I put terminals on the wires. The crimper tool has to match with the terminal
diameter and it has to match with the agw of the wire (It’s obvious, right?) but…It’s common to
have the wrong crimper and then, the agw of the wire is different from the diameter of the
terminal.
Take the time to verify each component before buying it. You will save money and time.
For this step, I invested [HH hours over DD days] and $0.
Is usual to read in the project comments…I plug everything and it does not work. And
debugging it will take a lot of time and, maybe, give up in the middle. (And you just spend
money on the components and you can’t see any light to turn it on)
If you can get a Power font with limit current, set it on 12V and 0,5A.
With no one component plugin, and no one code uploaded to the Arduino, no ampere
consumption. So if the Power Font gets the 0,5A, something is wrong with some welding.
After that, you can plug in one by one components at a time on the PCB Mainboard. With no code
uploaded, no one component must run. So, again, if the Power Font gets the 0,5A, something is
wrong with some welding between the components.
With 0,5A, no expectations of breaking any component, but if you get the 0,5A, turn it off as soon
as possible. And search for the welding failure. (May be clean the weldings with alcohol
isopropilico helps)
When no expectations of Short Circuit, increase the limit of the Power Font, up to 5A. No
consumer will be registered if no code is uploaded on the Arduino. So Motors, LCD, MatrixLed,
Arduino Mega, etc, must be consuming very little ampere.
TIP: For the connection between PCB Mainboard, with PCB Sensorboard, this is how my cables
look like.
Run with the multimeter the continuity test between both PCB, to be sure you do not connect it
wrong.
You need:
- PCB Mainboard With:
- Arduino
- MP1584 (5V)
- 12V External Power
- LCD with I2C
You can use any code, but put inside the lib #include <LiquidCrystal_I2C.h>
That is the Lib used on the project for the LCD.
You can also use the code:
Test_LCD_V1.ino
Is on the Folder Test on the Drive of the project. (As the rest of the test code)
If you had to change something on the code, for making it work, for example the Address (0x27
to 0x20 on the address of the I2C of your LCD). Remember the changes you made, for change
on the rest of the following codes.
You can run any example code (See the pins connected to the Arduino) or run the code:
Calibrate_Nema_v01
Not complicated on this step, to put the motors on the Core X-Y or set the microsteps, or
change other parameters on the code.
Or you can search for continuity on the wires of the motor. Maybe different factories use different
wire colours, so, not guided by the wires colours, search continuity.
For example If Red & Blue have continuity, you may find 1 coil. And the other two wires (usually
Black & Green) must be the other.
.
You can run any example code (See the pins connected to the Arduino) or run the code:
Test_H-Bridge_Electrom_V01
Take care the Coil (Electromagnet) can be very hot. So this test is better to use a small board
test.
Like the one I show on the spoiler alert a few lines before.
Remember the number you set for the PWM who works better in your case, for putting it on the
rest of the codes.
You need:
- PCB Mainboard With:
- Arduino
- MP1584 (5V)
- MP 1584 (6.5V)
- 2 Buttons (W&B)
- 12V External Power
- White & Black Buttons
- PCB Sensor Board (1-4)
- Computer to see the Serial Monitor of the Arduino
You can run any example code (See the pins connected to the Arduino) or run the code:
Understand_Matrix_Mux_EK_V02_3_1
If you pass this, you have done with the Basic Test.
For this step, I invested [HH hours over DD days] and $0.
8. Set the specific parameters of your project on the Code. Advanced Test Time.
So, you have a lot of parts and you see they can work separately. Now is time to join them and calibrate
the Core X-Y to the hardware you have.
Run “Calibrate_Trolley_XY_v01.ino”
In that code, the main concept is to get the trolley to move in the expected directions.
You will set your own parameters on the code (Highlighted on Green the values you have to configure):
int microsteps=8;
I Use the TMC2208 Driver, with 8 Microsteps works fine for me.
To set the microsteps on your driver…see the datasheet.
The PCB Mainboard is prepared for that.
For 8 microsteps, no one jumper is needed.
The two motors must have the same microsteps.
Some Tips:
● Belt. Do you use the GT2, 2mm per step?
● Pulley. Do You use the GT2, 20 teeth, 5mm bore?
Does it have a 12,1mm diameter measure on the teeth?
● Nema Motor. Is it 1.8° per step, 200 steps for a complete rotation?
● Is it the Square Size you define 45mm?
Put that input on the excel,
You need:
- PCB Mainboard With:
- Arduino
- MP1584 (5V)
- MP 1584 (6.5V)
- Core X-Y with:
- Motors
- Belts
- Trolley
- 12V External Power
- White & Black Buttons
- 3 extra Buttons (D9,D8,D16)
- Computer to see the Serial Monitor of the Arduino
I Put on the Profile, adhesive marks for see the square size, and can compare if the trolley moves exactly
1 square, and if it keep doing on the 8 squares.
In this example:
Change
wiring (8
Run “Calibrate_Trolley_Diagonal_v01.ino”
In that code, the main concept is to get the trolley to move in the expected diagonal directions.
You will set your own parameters on the code (Highlighted on Green the values you have to configure):
const float DIAGONALFACTOR = 2.01;
As said before, to make the same distance (for example 1 square=45mm) with a horizontal & diagonal
move…you will need the double of the rotations on diagonal than an horizontal move. Because on
diagonal (for CoreX-Y) you use only 1 motor.
The expected value is 2.00, but in my case, with 2.01 does not accumulate significant mistakes after 8
accumulated diagonal moves.
So, you have to test and configure the DIAGONALFACTOR number that works for you.
And remember, keep the parameters you are setting for changing the code on the next tests and games.
Run “Calibrate_Start_Position_option2_V01.ino”
In that code, the main concept is to get the trolley to move to the microswitch (Calibrate) and then move
to the initial position (Home)
So here you need the same hardware used on the previous test, and you must add to the Core X-Y the 2
Microswitch.
So You need: All in!
Before Glue the PCB on the Acrylic…place a scale paper of the PCB…to be sure you will put it on the
correct place.
Fix the Acrylic to the Core X-Y. (If the Acrylic moves…the position of the Home will change, and we don’t
want to configure the new home position every time)
Glue the PCB Sensor on the Acrylic. You may add a “painter” tape to protect the PCB.
Put a lot of attention where you put the microswitch. They will limit the move of the Trolley. And the
Trolley must not have to touch the Mux on the Sensorboard (To avoid breaking it).
You can find this example video on youtube for this code.
https://www.youtube.com/watch?v=8FfK4k_X0yY
You will set your own parameters on the code (Highlighted on Green the values you have to configure):
float TROLLEY_START_POSITION_X=0.0;
float TROLLEY_START_POSITION_Y=0.0;
Remember to change the code with the parameters you get on all the previous tests.
The distance depends on the location of each microswitch with the home position. (Setted on h7 on the
code)
Run “Move_piece_On_Board_V01.ino”
In that code, we verify each piece. To see if they can move around the board, and not get to ride other
pieces.
So you need all in, including all the 32 pieces.
Remember to understand the code, preview the expected moves will do the trolley (Ask Chat GPT if your
code skills are low) to put in pieces near the route of the trolley.
After this test, your board and chess pieces are ready for the next code.
Run “Understand_Matrix_Mux_EK_V02_3.ino”
In that code, the main concept is to get the board finished.Verify all the 64 sensors can work together and
have the expected measurements.
You will set your own parameters on the code (Highlighted on Green the values you have to configure):
Remember to change the code with all the previous parameters you get.
After measure the 64 positions, for example with all the pieces on the estar position, see them on the
Serial Monitor:
For example this:
Files 1&2 (White side with the pieces on it) all the hall values are bigger than 730. So if the measure is
bigger than 730, the code will translate it as a “-1” (White piece on the board)
Files 7&8 (Black side with the pieces on it) all the hall values are smaller than 570. So if the measure is
less than 570, the code will translate it as a “1” (Black piece on the board)
Files 3-6 (No pieces on this case) All the values are between 570-730. So if the measure is between that
values, the code will translate it as a “0” (No piece on the board)
After you configure the hall_min & hall_max that works for you, repeat the test for search if every square
& sensor works as expected.
Remember to keep all the parameters you configure with all the tests, for changing the codes from the
Drive, to your own parameters.
That is the last test…now, ready to play a game! But it will be for configuring the last parameter.
For this step, I invested [HH hours over DD days] and $0.
Is the moment. The first game. But, I spoiler maybe you need to set one more parameter.
const float FIXUP_POSITION = 15.0*microsteps/SQUARE_SIZE;
When you play with magnets, maybe not always the magnet follows the centre. It depends on a
lot of factors. (Gap between electromagnet and magnet, magnetic force, other I don’t know)
So, if the piece, after moving, does not get on the centre of the square, you may add an
additional distance on the trolley moves.
So, maybe you don’t need to add anything, so, just put 0.0.
Play and test until you get a number that works for you.
For this step, I invested [HH hours over DD days] and $0.
10. Resume
Money: $500
Parts Broken:
● Change the AI chess on the code, for an online web like chess.com
To make that, I have to change the way to send the position of the board with the AI.
The FEN (Forsyth-Edwards Notation) is the protocol chess.com uses, instead of the
matrix used in this project.
● To do that, needs to add an internet connection to the project.
● Another change may be to add a Voice command, why not!
● Add light on the chess board for show the possible moves, the best move, etc
This is a never ending project. Maybe I will try to make some of them, but I hope someone will
use this Instructable, make his own board, make some upgrades and upload them for all of us.
12. Files
You can Find all the files on the Drive of the chessexperiment.2023
https://drive.google.com/drive/folders/1rh6ds6UVU-dB2ga8G3-tS-meIWQRwnUf?usp=drive_link
And find some help videos of the project on the Youtube channel:
https://www.youtube.com/@ChessExperiment-zd9ey
I had the Idea to put the code on Github to manage the versions...but for now, just put the last
stable version on the Drive, and the Ongoing versions on a different folder.
13. Acknowledgements
Thanks to :
● @Greg06 , with his Instructable I can introduce in this Project
● My Family, for give me the support for do this project
● My School and Teachers, I did it as a school project, and I couldn’t start without their
motivation and support.
● My mentor @skolodi for his guide and changes on the project to make it work.
● To you, for reading this. I hope to see your own board soon.
I hope this Instructable functions as a guide for every one who wants to make the project and
make it better.
5. Supplies + Budget (include my spreadsheet?)
Yes, include your excel. But again, motivate the reader for made his own. May be need more tools, or no
need a 3rd for weld the PCB
6. Fusion Design
Start with the Excel Layout, is the Main. Where suposed to be the Motors, the pieces. If the proyect not
follow that Layout, the code must be adapted.
Include The 550mm profile design.
Motivate the reader for made his own design.
Mention how to obtain an student free licence
Mention where can download the parts (Grabcad, and OpenBuilds)
Why openbuilds? (Is tested, and the location for the holes for the wheels is seted)
Remember the reader, each component can be different on the Store, for example the most common
mistake is to buy normal Wheels instead miniwheels.
7. Part List
The part list with cost.
The consume (Ampere) Expected
So the power needed for 12V, for 5V and for 6,5V
Mention why use different 6,5V for the Hall Sensors
The importance to have a power with limited current, if some short circuit is there and not found it
Not buy all together, may be some test must needed first, for example Magnets , Coil, Piece
Motivate the reader for made his own experiments.
Show your results.
Comment here the issues with small pieces (For 37mm squares) they go to a ride together, so need a
magnetic shield for solve that with Mumetal. Can show a small experiment with mumetal if you have an
old broken hard drive.
But, you advance with 45mm square and not have to deal with that.
Mention you prefer to cut with laser some components for the mechanical part, instead buy them, for save
cost, and because some change made on the Open Builds, so, have to made it.
9. Experiments
10. Trolley
I guess you can put a complete item here, show the spring, necessary to get close to the board
The deign for touch the microswitches
11. Core X-Y
Show the process to made it.
Remember to the user, you did it with belts, like Greg06, but can do with rails or other mechanism.
The importance is to keep the LayOut, for not have to adapt the code.
Mention the issues you have. The bolts not touch the pulley, so put shims, and the shims must have
specific dimensions for not interfere with the wheel, etc
Show how to know if it's fine, the distance from the trolley to the profiles must be the same (remember?)
The foot of the Core X-Y
13. Wiring
Show the PCB Mainboard, the PCB Sensorboard, how to read the complete eschematic for connect them
with the components
The test for find the colours for connect the motors and have the expected movements on the trolley (Put
the Excel with the combinations)
14. Test
Mention all the test for get the Parameters. Remember no matter the reader made the same project, they
have to run the test for set their own parameters.
(I guess on new version, the parameters to be seted by the user, can go on a separate file, like
"User_Param.h"
Mention how you solve the code understanding with Chat GPT
16. Future
Mention the Ideas for add wifi
For change the code for connecting to chess.com
To add voice command
17. Resume
Time:
Money:
Parts Broken:
…
18. Files
Put here the link of the Drive of Chessexperiment?
19. Acknowledgements
Thanks to :
- @Greg06 , With his Instructable I can introduce in this Project
- My Family, for give me the support for do this project
- my School and Teachers, for…
- my mentor @skolodi for his gide, I hope this Instructable function as a guide for every one who
want to make the project and make it better
- …
0. Warning:
Make a table...with the Skill and if you not have it, how to fix it.
For example: Welding -> Repair store
Finaly, on this warning, mention all the Excel, Fusion Design, is uploaded, but mention the probabilities of
succes on the proyect, is to made at lest their own excel and Fusion Design, start with no spend money,
first understand the proyect, simulate it, and then..if is on your budget, advance.
1. Introduction (talk about Greg's project and this is an updated version of his)
Mention the Upgrades, for examplethe most important change is with the Sensor. Digital Sensor (1,0)
when one piece is eaten, the system only see 1 piece is not more there, but they don't know where it
moves.
Can put a Matrix board with 1 and 0, resalting 1 convert on 0, but the rest no change.
And , If we differenciating white (-1) from Black (1) , we can deal with that issue.
show in the table the code can know where the piece go.
Mention we have more options for that.
● Duplicate digital sensors (My first attempt, but not convincing me for the space of 2 sensors on 1
square)
● Use Analog Sensors. (The one we move one)
● Use NFC for each piece (So you can differentiate not only the colour, you can differenciate
each piece, I guess is the system used on FIDE) But is very expensive
3. Simulation
Mention how to simulate.
Start with easy simulation, and the Board Simulation
Here undertsand and show the Exchematic
Can add the time you spend on each step. (For example 3 days per week, 3 hs each day) So at the end
can mention it takes , for example, 1.000 Hs of work on the lapse of time 9 month?
4. PCB Design
Show how to acces to the design on oshlab / easyeda.
Can copy them, modify it.
Motivate the reader to do that