Skip to main content
Version: ACS CC

Automated Chessboard

A fully automated chess system featuring a CoreXY magnetic mechanism for autonomous piece movement.

Description

The Automated Chessboard project involves the development of a fully automated chess system that allows both human-versus-human gameplay (with move validation) and human-versus-AI gameplay.

The core innovation and complexity lie in the hidden mechanism that moves the pieces autonomously. This utilizes a CoreXY rail system positioned beneath the playing surface. This allows an electromagnet to navigate under the board and drag the magnetic chess pieces to their new positions. The detection of piece locations on the board is achieved through an 8x8 matrix of 64 magnetic sensors.

Motivation

This project was undertaken to integrate complex mechanical design with embedded software and artificial intelligence. The goal is to demonstrate how embedded Rust can be used to manage precise motor control (CoreXY kinematics), high-density sensor arrays and algorithmic decision-making in a real-time, physical interactive system.

Architecture

The system architecture comprises the following modules:

  • Processing Module: An STM32 microcontroller serves as the central processing unit, running both the game logic (chess engine) and the motion logic (step generation).
  • Actuation Module: Controls the physical movement using two Nema 17 stepper motors and a powerful electromagnet.
  • Detection Module: A grid of 64 magnetic Reed sensors read via external multiplexers, compensating for the limited GPIO pins on the microcontroller.

Log

Weeks March 16th - March 29th

Researched and finalized the bill of materials. Placed orders for the necessary electronic and mechanical components. Initiated the 3D printing process for the custom magnetic chess pieces.

Weeks March 30th - April 12th

Prepared the physical structure by cutting the V-slot aluminum profiles and the OSB base panel. Successfully assembled the main outer frame of the chessboard and completed the 3D printing of the structural parts.

Weeks April 13th - April 26th

Installed the CoreXY mechanical drive system, including pulleys, timing belts, and the Nema 17 stepper motors. Developed and executed the initial test scripts to validate motor movement and control via the A4988 drivers.

Hardware

The hardware setup includes an STM32 microcontroller, 64 magnetic Reed sensors for piece detection, two Nema 17 stepper motors for the CoreXY movement and a 12V electromagnet to physically drag the pieces.

Schematics

block_diagram

Photo

frame_photo

Bill of Materials

DeviceUsagePriceLink
STM32 MicrocontrollerMain processing unit121 RONLink
Nema 17 Stepper MotorCoreXY movement2 x 67 RONLink
A4988 Stepper DriverMotor control2 x 8 RONLink
12V Electromagnet (5kg)Moving the chess pieces7.51 EUROLink
TIP122 Transistor + DiodeElectromagnet control5 RON-
Reed SensorPiece detection matrix64 x 1.86 RONLink
CD74HC4067 MultiplexerSensor matrix reading4 x 4.76 RONLink
LCD DisplayUser interface12 RONLink
Endstop limit switchAxis calibration (homing)2 x 5.23 RONLink
Push buttonUI control2 x 1.33 ronLink
V-slot profiles and beltsMechanical frame5 x 24.79 RONLink
Mini V wheelsSmooth movement along the axes93,68 RONLink
Neodymium magnetsInside the chess pieces37.92 RONLink

Software

LibraryDescriptionUsage
embassy-rsAsynchronous frameworkEfficient task management and hardware abstraction
embassy-stm32HAL for STM32Controlling PWM for steppers and GPIO for sensors
defmtLogging frameworkReal-time debugging and telemetry
  1. Automated Chessboard by Greg06 (Instructables)
  2. CoreXY Kinematics Theory