Skip to content

aaravs-s/Imperium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Imperium

An Autonomous, Sensor-Driven Chessboard with Electromagnetic Piece Control

Abstract

Imperium is a fully autonomous chessboard that detects and moves pieces using a precision electromagnetic gantry, per-square Hall-effect sensing, and CNC-style motion control. The system integrates custom mechanical design, multi-PCB electronics, and firmware-level motion planning to deliver seamless, repeatable gameplay without manual calibration.


System Overview

flowchart LR
    Pieces[Chess Pieces — Magnets]
    Sensors[Hall Sensor Matrix — 64 Squares]
    Mux[16:1 Multiplexers]
    MCU[ESP32 Master Controller]
    Drivers[TMC2209 Motor Drivers]
    Motors[Stepper Motors — T-Bot Gantry]
    Magnet[Electromagnet]

    Pieces --> Sensors
    Sensors --> Mux
    Mux --> MCU
    MCU --> Drivers
    Drivers --> Motors
    MCU --> Magnet
Loading

Project Media

Completed System

image

Figure 2: Fully assembled Imperium chessboard

Videos


Hardware Architecture

Mechanical Subsystem

image

CAD Figure: T-Bot gantry layout and belt routing

Gantry Design

  • Type: T-Bot (CoreXY derivative)
  • Motors: 2× NEMA 17
  • Linear motion: 2× MGN12 rails (450 mm)
  • Drive: GT2 belts & pulleys
  • End effector: Electromagnet (custom mount)

Design Rationale

  • Compact footprint compared to CoreXY
  • Sufficient precision for chess (no micron-level requirement)
  • Reduced part count and cost

Sensing Architecture

Hall Sensor Matrix

flowchart LR
    Square1[Square 1]
    Square2[Square 2]
    SquareN[Square 64]
    Mux1[16:1 MUX]
    MCU[ESP32]

    Square1 --> Mux1
    Square2 --> Mux1
    SquareN --> Mux1
    Mux1 --> MCU
Loading

Figure 5: 64-square Hall-effect sensor grid

  • Sensors: KTH-1601 (46 Gs threshold)
  • 1 sensor per square (64 total)
  • Mounted beneath ~3 mm acrylic

Why Hall Sensors

  • Instantaneous response
  • No ghosting (unlike reed switches)
  • Reliable removal detection

PCB Sheet Layout

flowchart TB
    PCB1[Hall PCB Sheet 1\n16 Sensors]
    PCB2[Hall PCB Sheet 2\n16 Sensors]
    PCB3[Hall PCB Sheet 3\n16 Sensors]
    PCB4[Hall PCB Sheet 4\n16 Sensors]
    Master[Master PCB]

    PCB1 --> Master
    PCB2 --> Master
    PCB3 --> Master
    PCB4 --> Master
Loading

image image

Figure 6: Hall sensor PCB sheet (100 mm × 400 mm)

Each PCB sheet contains:

  • 16 Hall sensors
  • 1× 16:1 multiplexer
  • Local decoupling capacitors
  • Ribbon cable interface

Total sheets: 4


Control Electronics

Master Control Board

image image

Figure 7: Master PCB functional block diagram

Core Components

  • MCU: ESP32
  • Motor drivers: 2× TMC2209 (UART)
  • Power:
    • 12 V rail (motors + electromagnet)
    • Buck converter → 3.3 V logic
  • Electromagnet switching via transistor

All schematics and footprints were custom-designed in KiCad.


UART Motor Control

Chess pieces are moved exclusively along square edges rather than diagonals. This design choice:

Prevents collisions with stationary pieces

Simplifies motion planning

Ensures consistent and predictable movement paths

The gantry executes all moves as a sequence of orthogonal segments.

UART enables:

  • Sensorless homing
  • Stall detection
  • Current tuning
  • Advanced diagnostics

Control Flow

  1. Board State Detection
    Hall sensor matrix scans current piece positions.

  2. Move Translation
    Chess moves converted into constrained paths.

  3. G-Code Generation
    Custom G-code enforces non-diagonal movement.

  4. Execution
    G-code executed by FluidNC on ESP32.


Bill of Materials (BOM)

image

📎 Full BOM:
https://docs.google.com/spreadsheets/d/1yp7t6AiXMwJCAfVlhCX7udocGjks9lOOFWkv4rPJByo/view


Results

  • Reliable autonomous gameplay
  • Accurate per-square detection
  • Consistent homing and positioning
  • No recalibration required between games

Future Work

  • Chess engine integration
  • Companion UI / mobile app
  • Faster traversal paths
  • Noise reduction
  • Fully enclosed consumer-ready housing

References


About

A self moving chessboard controlled by electro-magnets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors