Skip to the content
PCBKitNew board
2 layers127 × 20.7 mmEBoard pcb, the printed circuit board in 3D

EBoard pcb

aherve/eChess31

Electronic board to play online, OTB chess

Size
127 × 20.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
14
Nets
56
Pads
113
Tracks, vias
219, 0
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
28 Dec 2024
Updated
29 Sep 2026

Overview

EBoard pcb is an open-source printed circuit board by aherve, from the aherve/eChess repository on GitHub, published under the AGPL-3.0 licence. It is a 2-layer board of 127 × 20.7 mm with 14 parts on 56 nets, routed with 219 tracks and 0 vias.

It is built around the 74HC595. Its parts include 9 connectors, 3 ICs and 1 capacitor. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

eChess: play online chess, but over the board

extension

https://github.com/user-attachments/assets/bde2e431-92bb-4959-bb7b-e80072c71205

Demo game against a lichess bot. The phone showcases the game for demo purposes, but isn't actually required to play

How it works

  • The board is equipped with 64 hall effect sensors, and 64 LEDs.
  • The board can communicate via usb to a nodejs program that runs on an embedded raspberry PI with touchscreen
  • The program can communicate with both lichess API and the physical board

overview

Piece detection

The general principle is to hide magnetic hall effect sensors under the board to detect piece presence. White & black pieces have a hidden magnet in them, in different orientations, respectively

Using linear sensors we are then able to detect between 3 distinct states:

  • white piece (low voltage)
  • black piece (high voltage)
  • no piece (~ half the supply voltage)

In addition to the sensors, a 8x8 LED matrix is used to display the opponent's moves on the board. An arduino microcontroller interfaces with an embedded go program to control the LEDs, read the sensors, and communicate with the lichess API.

Showing the moves

Each square is equipped with a blue LED that can be lit to signal the opponent's move. It's bright enough that we don't miss a move, and discreet enough that it doesn't distract from the game.

The electronics

For the board to work, is is necessary to:

  • read inputs from the program, and light any combination of leds on a 8x8 grid
  • read the state of 64 hall effect sensors in near real time, and send the state to the program whenever a change is detected

Since the arduino has a limited number of pins, two 74HC595 shift registers are used to control the LEDs with multiplexing, and an additional 74HC4051 multiplexer is used to control the sensor rows. Each of the sensor outputs are connected to one of the analog inputs of the microcontroller (arduino conveniently has 8 of them).

The sensor matrix

According to their spreadsheet, the power-on time of the the hall sensors is somewhere from 175μs to 300μs. This is slow enough that we can't use multiplexing to power the sensors. Instead I went for a 8x8 matrix where all of the sensors are always powered. Their input readings are then selected using some BJT transistors whose switch time is in the order of 30ns (so about 8 500 times faster than the sensors power-on time)

Details of the sensor matrix, only 4 sensors are shown. Sending QA=1, QB=0 and reading A1 input would provide a reading of the bottom-right sensor of this diagram

Electronics overview

The three 74HC595 shift registers are chained, and connected to the arduino as follows(only 4 sensors are shown for simplicity):

overview complete overview of the electronics. Full kiCad files can be found in the kiCad directory

With this setup, the microcontroller can use multiplexing to control the LEDs and read the sensors in near real time, while using very few pins from the microcontroller.

The final build

For the build I soldered 64 leds, hall effect sensors, and transistors directly to a wooden board I build and painted. The shift-register ICs are wired to the microcontroller thanks to a custom PCB whose files can be found here

pcb soldered pcb with arduino nano, IC sockets and some connectors

internal internal view of the board

pcb closeup closeup of the pcb after installation

extension1

extension2

Microconctroller setup

Arduino nano is used. It's cheap, small, and conveniently has 8 analog inputs, which is perfect for this use case.

workflow

The arduino loop does the following:

workflow

  1. Read all the sensors

    Using multiplexing, read all states from the 64 hall sensors and build a board state from it. If a state change is detected, then we serialize the board state and send it to the computer.

  2. Read the LED input state

    Read from usb and set the desired LED state

  3. Display the LEDs

    For each lit LED from the input state, light the corresponding LED on the board, wait 2ms, and turn it off.

Since we are multiplexing the display, the entire loop needs to be fast. Fast enough that you don't see any flickering while we are reading 64 sensors and communicating via USB between each LED blink.

Serializing the position

A chess board has a very convenient size of 8x8, which allows to represent a row with exactly two bytes:

  • first byte signals positions of white pieces on row a
  • second byte signals positions of black pieces on row a
  • third byte signals positions of white pieces on row b
  • ...etc until 16 bytes are sent to fully represent the board
  • at the end of a serialization, three 255 bytes are sent to signal the end of the transmission. Since (255, 255, 255) would represent at least one row filled with both white and black pieces, there is no ambiguity in the transmission.

This protocol allows the board to send partial states between led blinks, which removes any flickering from the display. The program can wait for a (255, 255, 255) sequence to know that the board state is fully transmitted, and in case of data corruption, it can ignore a broken state, and start over everytime a (255, 255, 255) sequence is detected.

encoding Example of how a row with 2 white pieces and 1 black piece would be encoded

The program

Lastly, the main program is written in go, and communicates with the arduino. It will read both the board state and the game moves from lichess to reconcilate the position, and determine when a move should be played (i.e. sent to the server), or when some LEDs should be lit. The user interface is provided by a touchscreen, and everything runs on a raspberry zero.

The code can be found in the app directory

Conclusion

I've been playing with this board for quite a while now, and it has been a tremendous experience so far. It's definitely not suited for fast time controls, but lichess only provide their real-time API for rapid & classical time-controls anyway (has to do with anti-cheating measures I believe).

Playing lichess games while looking at a physical board is a delight, and has become my main way of playing chess at home.

Parts

14
QtyValueFootprintReferences
8Conn_01x04_SocketConnector_JST:JST_PH_B4B-PH-K_1x04_P2.00mm_VerticalJ1, J2, J3, J4, J5, J6, J8, J9
374HC595Package_DIP:DIP-16_W7.62mm_SocketU1, U2, U3
1Arduino_Nano_EveryModule:Arduino_NanoA1
1CCapacitor_THT:C_Disc_D3.8mm_W2.6mm_P2.50mmC2
1Conn_01x01_SocketConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_HorizontalJ7

Questions

How big is the EBoard pcb PCB?

It measures 127 × 20.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the EBoard pcb use?

14 parts, built around the 74HC595. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the EBoard pcb KiCad files?

From the aherve/eChess repository on GitHub, at the commit this page was made from: the board is eBoard_pcb/eBoard_pcb.kicad_pcb and its schematic eBoard_pcb/eBoard_pcb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the EBoard pcb design in my own project?

Its repository publishes it under the AGPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers45.7 × 31.8 mmLEDx16 board, the printed circuit board in 3D

    LEDx16 board

    tardate/LittleArduinoProjects

    a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

    36 parts803MIT
  • 2 layers228.6 × 100 mmMongus48, the printed circuit board in 3D

    Mongus48

    ChrisChrisLoLo/beyblock20

    The magnetic, modular, 20-key macropad that can join together to form an ortholinear board

    124 parts335GPL-3.0
  • 2 layers245.1 × 160 mm8-Bit CPU 32k, the printed circuit board in 3D

    8-Bit CPU 32k

    slu4coder/Minimal-64x4-Home-Computer

    My DIY TTL home computer with VGA and PS/2 and 4x the processing power of a Commodore C64 or Apple II.

    139 parts326
  • 2 layers100 × 95.1 mmProtoboard-6x4-breakout, the printed circuit board in 3D

    Protoboard-6x4-breakout

    electroniceel/protoboard

    Advanced protoboard layout with 1.27mm pitch for smd parts

    4,745 parts311CC-BY-4.0
  • 4 layers140 × 100 mmDc usv, the printed circuit board in 3D

    Dc usv

    TobleMiner/DC-UPS

    A small DC UPS, designed to keep small appliances like consumer network equipment running during power outages

    351 parts223CERN-OHL-P-2.0
  • 2 layers100.5 × 218.3 mmTraktorino, the printed circuit board in 3D

    Traktorino

    silveirago/traktorino

    The open-source DIY MIDI Controller for DJs.

    96 parts220
  • 2 layers287.8 × 126.7 mmNoName, the printed circuit board in 3D

    NoName

    AlaaSaadAbdo/battoota

    Keyboards

    267 parts188
  • 2 layers100 × 100 mmTommyPROM32-595, the printed circuit board in 3D

    TommyPROM32-595

    TomNisbet/TommyPROM

    Simple Arduino-based EEPROM programmer

    36 parts187