I'm planning to make an electronic chess board from scratch using an arduino. I've already completed the chess engine that the A.I. will use (something around 2400-2500 human ELO rating); you can see the code here: GitHub - crybot/Napoleon: Re-designed Chess engine and converted in C++
The idea is to move the pieces with an electromagnet positioned under the board and moved by two stepper motors.
To translate the rotary motion of the motors i've thought of two design: the first is based on a sort of rack and pinion (but the toothed string is actually stationary and the rotational movement of the gear should move it toward it); the second option is to use lead screws or ball screws to let the electromagnet move around the XY plane.
I'm tempted to choose the first option for ease of implementation and for the cost, but i'm not sure if the high precision required for the task would still be there at high speeds of the motors (it would be nice if I could reach every square of the board from any other square in less than 2-3 seconds), would it be better to use lead screws to control the motion of the electromagnet?
Belts or a rack and pinion will work fine. There are millions of 3D printers that use belts (like the Makerbot) to drive the extruder head and those are capable of reliable, sub-millimeter accuracy.
Or you could go even lower-tech and use a capstan wheel on the servo motor to pull a cord around a pulley. Provided you have at least twice the number of wraps around the capstan as actually needed for the required linear travel, you can fix the centre of the wraps to the capstan and hence eliminate any slippage problems. Much like was used on old style chart recorders and radio dials.
Chagrin:
Belts or a rack and pinion will work fine. There are millions of 3D printers that use belts (like the Makerbot) to drive the extruder head and those are capable of reliable, sub-millimeter accuracy.
Use rubber+glass fibre belts, not polyurethane+steel belts - they are too stiff at low
load forces (but great for heavy loads + big traction). I've used MSL belts before which
are 0.08" pitch
In my experience it's difficult to get good speed with a leadscrew and stepper motors. When you go with a plan like that you typically find yourself using inexpensive threaded rod from the hardware store, and then the problem there is that the thread pitch of typical, coarse thread, metric or standard rod is still too fine to get the speed you'll want.
As an example, using 1/4", 20 TPI threaded rod and a stepper motor spinning at a well-performing 1500(*) RPM puts you at (1500RPM / 60seconds / 20TPI) 1.25" per second. That's over 12 seconds to move across a small, 16x16" chess board. If you don't want to start ordering stuff through the mail, and you're lucky, the most coarse, standard threaded rod you'll find is 1/2" ACME threaded rod which is 10 TPI, but that's still 6 seconds to traverse the board. If you do choose to mail order special rod like TR8x8 with 2 starts you're still at around 6 TPI and 4 seconds to cross the board. 4 seconds isn't too bad, but certainly tedious if you try to reset all 32 pieces at that speed.
(*) Probably not a practical expectation to reach 1500 RPM with an Arduino in a complex project like the one described.
Leadscrews are used for two reasons: precision and force. Neither seems relevant here.
A typical CNC set up with powerful steppers driving leadscrews generates enough
force to damage itself if the limit switches fail, but the precision can be sub-micron
(the accuracy won't be, though).