Skip to main content
Version: FILS English

Smart Chess

Physical chess meets electronics: a sensor-equipped board that wirelessly connects players to chess engines while preserving the tactile experience of traditional gameplay.

info

Author: Țînțareanu-Mircea Mihai-Cezar
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-JustTOE

Description

Picture this: It's Saturday night. You've returned from university, exhausted your gaming options, and suddenly spot your old chess board gathering dust in the corner. Nostalgia hits and you feel like a game of over the board chess is exactly what you need. But there's a problem—who's going to play with you? Enter the Smart Chess project. No more desperately calling friends who can barely distinguish a rook from a pawn, or interrupting your father's weekend relaxation time. And let's be serious, no online chess platform could ever beat the tactile feeling of moving chess pieces across the board. Now you are going to face much better oponents and take a taste of the real deal!

Motivation

I have always been into chess. Ever since I was a kid I participated in countless chess competitions across the country. Although I had always had strong oponents and friends to play with, there were times where I was simply left alone, with no one to play against. I wanted to play over the board chess, the real deal, not in browser over some interface. This project bridges that gap—delivering the traditional, tactile chess experience that I love but updated for the 21st century.

Architecture

The core of the system revolves around the detection of chess piece positions through Hall effect sensors and Bluetooth communication with a chess engine.

This project diagram illustrates the connectivity of the system utilizing a Arduino Nano ESP32 as the main controller. The Arduino Nano ESP32 is connected to various components including four multiplexers which are connected to sixty four hall effect sensors themselves, as well as an LCD 16x2 Character Display with an I2C controller.

Architecture2


Arduino Nano ESP32:

  • Role: Acts as the "brain" of the system — reads sensor data, manages chess game state, communicates via Bluetooth, and controls the LCD display
  • Connections: GPIO pins for multiplexer control (S0-S3) and multiplexer input, I2C interface for LCD, Bluetooth for laptop communication
  • Features: Dual-core operation (BLE on APP core, sensor reading on main core)

Hall Effect Sensors (A3144):

  • Interface: Digital
  • Role: Detect the presence of magnetic chess pieces on the board
  • Connections: Each set of 16 sensors connects to a multiplexer. The sensors are arranged in an 8x8 grid (64 total)
  • Operation: Triggered by neodymium magnets attached to chess pieces, outputs digital state

Multiplexers (CD74HC4067):

  • Interface: GPIO
  • Role: Manage input from 64 Hall sensors using only 4 control pins and 4 signal output pins
  • Connections: Control pins (S0-S3): GPIO5-8 Signal output: GPIO-9,10,17,18 16 inputs from Hall sensors
  • Function: Select one of 16 channels at a time based on control pin states

LCD 1602 with I2C Interface:

  • Interface: I2C
  • Role: Displays chess engine moves and current game information
  • Connections: I2C communication protocol (SDA/SCL pins)
  • Display: 16 characters × 2 lines for move notation and game status

Laptop with Bluetooth:

  • Role: Runs Stockfish chess engine and processes move calculations
  • Communication: Receives board state via Bluetooth, returns calculated moves to ESP32
  • Function: Provides AI opponent for the physical chess board

Power System

  • Primary: +12V DC power supply unit (PSU)
  • Regulation: Step-down voltage regulator converting to +5V DC
  • Distribution: Powers all components (sensors, multiplexers, ESP32, LCD)

Log

Week 6 - 12 May

Once the project had been approved I had began researching the components that I needed as well as building the framework of the chess board. Since then I have assembled a debug board with all the necessary components in order to test the behavior of the sensors and I have also started builiding the data transmission pipeline with the use of Bluetooth.

setup2

Week 7 - 19 May

Week 20 - 26 May

Hardware

Arduino Nano ESP32: Acts as the brain of the operation, running the Rust firmware

Hall Effect Sensors: One for each square (64 total), detecting magnetic presence

CD74HC4067 Multiplexers: Manage the input from 64 sensors

Chess Board: Standard 8x8 board with internal sensor array

Chess Pieces: Standard pieces fitted with neodymium magnets

1602 LCD with I2C Controller: Displays chess engine moves and game information

Here are some pictures of the project:
Please do note that the images are subject to change as this is just a debug setup.

Chess board:
board1 board2

Hardware:
setup1 multiplexers

Schematics

Here is presented the KiCad schematic:

KiCad

For ease of understanding, only one Hall effect sensor is represented as to not clutter the schematic.

Bill of Materials

DeviceUsagePrice
Arduino Nano ESP32The microcontroller190 RON
64x A3144 Hall Effect SensorsDetecting magnetic presence2.25 x64 RON (30% off)
4x CD74HC4067 MultiplexerManages the input from 64 sensors5.77 x4 RON
LCD 1602 with I2C Backpack InterfaceDisplays chess engine moves and game information14.99 RON
Step-down voltage regulatorReduces the voltage from 12V DC to 5V DC24.99 RON
AWG22 Silicone Wire KitSensor VCC and GND wires50 RON
AWG24 Silicone Wire KitSensor output wires50 RON
64x 10k Ohm ResistorConnecting 5V and open collector output of sensors0.07 x64 RON
Plastic chess piecesThe chess pieces37 RON
Cardboard chess boardThe chess board31 RON
32x 20x2mm N35 Neodymium magnetThe magnets3.5 x32 RON
12V 2A Power SupplyThe power supply24.99 RON

Software

LibraryDescriptionUsage
esp-halesp-halBare-metal (no_std) hardware abstraction layer for Espressif devices
esp-wifiesp-wifiBluetooth initialization library
esp-allocesp-allocA simple no_std heap allocator for RISC-V and Xtensa processors from Espressif.
blepsblepsBare-metal BLE protocol stack for embedded systems
embassy-executorembassy-executorAsync task executor for embedded systems
esp_hal_embassyesp_hal_embassyEmbassy support for esp-hal
hd44780-driveresp_hal_embassyImplementation of the embedded-hal traits for the HD44780.
  1. esp-hal examples
  2. hd44780-driver documentation