Chess-Master-Board
PublicLoading…
A Standalone PCB Chess Board with OnBoard Machine
A chess board that sees every piece, lights every move, and thinks alongside you - no external modules required.
Overview
Chess Master Board
With the power of electro-magnetism this master board is capable of reading every move that the players are making. The powerfull chip with the built in machine gives us the power of a ~2000 ELO player that computes the best moves within 2 seconds and finally the built in RGB LED matrix sends light signals towards the player with the best move suggestions for you to beat every opponent.
A completely standalone project that requires no external connection gives us the ability to use this board anywhere that we want to. Thanks to the sleep-mode option we recieve a massive battery life extention and we can move on with the game just in case if we decided to pause it.
The chess machine follows every official chess rule and it has included every possible recommendation pattern thanks to the RGB LED matrix. Just put the pieces on their starting squares, press the two buttons for a short period of time and ENJOYYY
Built as an open-source hardware product - every schematic, PCB file and line of firmware is available to reproduce, modify and improve.
Zine
Motivation
Some people (like me :)) want to play the game in real life but seem to lack the power of quick decision making while they lose to their opponent. Ofcourse you can achieve that on your smartphone or a PC with a helper like stockfish but what if you dont want to use your digital hardware for playing the game???
With that issue on my mind i created Chess Master Board with a different concept:
What if the board itself was the computer?
The helping buddy that you need! Hidden inside of the medium sized chess board with just a 5 second double hold on the buttons you awake the mastermind that will help you againts any enemy.
The design is inspired by the tactile satisfaction of phisical chess and will to win your opponents while they struggle for survial:
- No screen needed - the board communicates through light
- No IoT connection needed - the engine runs entirely on device
- Shipped and open-sourced product so anyone can build it, modify it and improve it
The project is also an increidible journey into embedded hardware and PCB design for any enthusiast willing to endulge himself into the type of engineering.
Assembly Guide
Hardware
Notice: Always follow the order Main→Upper→Clock PCB for assembling the hardware
A visual representation of the whole project has been given with the file:
If you dont prefer via the files you can always refer to the visual representation via OnShape.
Hardware/FULLY_ASSEMBLED_PROJECT.step
1. Order the PCBs and 3D Model
Navigate to: (For PCBs)
Hardware/KiCad/Gerbers/
Upload the included Gerber files to your preferred PCB manufacturer and order the boards.
Navigate to: (For 3D Model)
Hardware/3D_Printing/ (Both zip files)
Due to github memory restrictions they are split into 2 files. G-code Pieces features the black/white collection of pieces ready for printing and the V3 Chess 3D.zip is equipped with the full set of information and g-code files for printing the board. There is also a step version of the files from V3 Chess 3D.zip file, use those also if you need them.
Upload the G-Code files to your preferred manufacturer and order the parts.
The latest version is recommended but if you prefer any older version feel free to use it.
2. Order the Components
Whether you want to order it trough a PCBA concept or to solder it manually you should refer to the BOM file.
Hardware/BOM.csv
Hardware/Component Libraries.zip
All of the files for the components are placed into a zip file due to memory constraints.
Order all parts before starting your assembly and sort them out because there will be a lot of them.
3. Solder SMD Components
Considering that you have chosen to solder them personally you should follow the following steps:
Start with the smallest SMD passives before moving to ICs (Refer to the schematic alway before soldering):
- All 0402 decoupling capacitors (100nF) across the board
- Bulk capacitors (1μF, 4.7μF, 10μF, 22μF) near power Ics
- USB-C CC resistors (5.1KΩ)
- All signal and bias resistors per schematic
Recommended tools:
- Flux
- A strong soldering iron with a fine-tip
- Tweezers
- Solder paste + hot air
- Helping hands with a magnifying glass
4. Solder Power ICs
Solder the power subsystem in order - validate each stage before starting the next:
- U3 (BQ24074RGT) - Li-Ion charger, VQFN-16. Solder with hot air; confirm EPAD contact/
- TH1 (NTC thermistor) - battery temperature input for the charger IC (Notice: If you are unable to find an NTC thermisto, a 10K ohm resistor will work just fine as a subsitude)
- U4 (TPS61023DRLT) + 1uH1 (XEL4030-102MEC) - 5V boost converter for LED rail.
- U5 (AP2112K-3.3TRG1) - 3.3V LDO for ESP32 and logic
- U145, U146 (REUF300) - PTC resettable fuses on power rails
- U144 (USBLC6-2P6) - USB ESP protection
- J2 (USB4110GFA) - USB-C receptacle
- D1, D2 - charging status LEDs
Verify whether 5V and 3.3V rails are correct before including anything else.
5. Solder the Sensor and Shift Register Array
- U79-U142 - 64x AH1806-W-7 hall effect sensors (SOT-23, active-LOW)
- U6-U13 - 8 74HC165BQ shift registers (SSOP-16/QFN, daisy chained)
- Verify sensor orientation - pin 1 marker must align with PCB silkscreen
6. Solder the LED Array
- U14-U77 - 64x APA102C RGB LEDs (5050)
- Theese are orientations-sensitive - follow the schematic and confirm the cathode corner marker before placing every row
- Ensure every LED sits completely flat before reflow; a lifted pad will break the entire following part of the chain.
7. Solder the Level Shifter
- U143 (SN74AHCT125D) - bridges the ESP32's 3.3V outputs to the 5V APA102C DATA and CLK lines
- Without this component the APA102C will be under constant failirue.
8. Install the ESP32-S3 Module
- Solder U1 (ESP32-S3-WROOM2) onto its castellated pads.
- The antenna area requires a 15mm keepout zone on the base PCB - no copper, no vias (except the screw nearby).
- Confirm the via grid under the module makes solid contact with all EPAD ground pads
9. Install the Display and Connectors
- DS2 - 2.23" 128x32 OLED, I²C interface
- J1/J4 on Main PCB Samtec ZF1-15-92-X-WT-X board connectors
- J3 on Upper PCB Samtec ZF1-15-92-X-WT-X board connectors
- J7 on Clock PCB Samtec ZF1-15-92-X-WT-X board connectors
10. Install User Interface Components
- S3, S4 (TL3315NF250Q) - player clock buttons
- SW2 (Omron B3FS) - Boot button
11. Install Battery Holders and Cells
- Solder BT1, BT2 (Keystone 1043) - 18650 cell holders
- Do not insert cells untill all soldering is fully complete
- Confirm polarity markings on PCB silkscreen before inserting cells
12. Assemble the Enclosure
Materials needed for assembling:
- 32x Neodymium magnet in circle with dimensions: 20mm diameter x 5mm height
- 6x Neodymium magnet in a rectangle with dimensions 5x10x2mm
- Glue, any type just make sure to get a strong one
- 11x M3 screw nuts (more is fine in case you loose some)
- Notice: If you dont get screws with the OLED screen you will have to acquire them personally
Steps for assembling
The main part of the assembling is sticking the magnets in their appropriate places. There are 2 places where they should be placed:
- The rectangular magnets should be placed 3x on the lid used for closing the bottom of the chess board where on one side you will find 3 rectangular holes and 3x inside of the chess board where you will the same 3 rectangular insertions. Apply glue inside of them and stick the magnets inside. BE CAREFUL and place the pair of three magnets with opposite polarities. So if the closing lid has the north pole facing outwards, make sure to have the south pole facing outwards on the chess board.
- The circular magnets are designated to go into the chess pieces. Same procedure, apply glue and stick them. Make sure to place the south pole outwards because otherwise the hall effect sensors will have a poor reading
- Every PCB has their own designated screw holes and how they should be placed. Every PCB next to the screw hole has the side on where it should be placed. (for eg. UR- Upper Right, DR - Down Right)
- The Push buttons should be inserted from inside of the chess board before putting the screws on for the Clock PCB so that the buttons stay locked on top of the buttons built-in on the PCB.
- Verify detection by powering the board and placing every piece on their starting square during first boot.
Firmware Installation
1. Install ESP-IDF
git clone --recursive https://github.com/espressif/esp-idf.git ~/esp/esp-idf
cd ~/esp/esp-idf
./install.sh esp32s3
source ./export.sh
Follow the official Espressif guide for WIndows and macOS variants.
2. Clone the Repository
git clone https://github.com/Ajakovski/chess-master-board.git
cd chess-master-board
cd Firmware
3. Set Target and Build
idf.py set-starget esp32s3
idf.py build
4. Flash the Firmware
Connect via USB-C. If the board does not enter download mode automatically, hold BOOT and tap EN, then release BOOT.
# Linux
idf.py -p /dev/tty/USB0 flash
# macOS
idf.py -p /dev/cu.usbserial-XXXX flash
# Windows
idf.py -p COM3 flash
5. Monitor Serial Output
idf.py -p /dev/ttyUSB0 monitor
Exit with 'Ctrl+]'.
BOM
If you are refering from the BOM.csv file please use a converter csv to table because it will be hard for you to read the documentation. And as always you can recall from my githubs BOM anytime you want
| Designator | Function | Value / Part | Package | Qty | Price (USD) | Link |
|---|---|---|---|---|---|---|
| U1 | MCU Module | ESP32-S3-WROOM-2 N32R16V | LCC-54 | 1 | $12 | Mouser |
| U79–U142 | Hall Effect Sensor | AH1806-W-7 | SOT-23 | 64 | $20 | Mouser |
| U6–U13 | Shift Register | 74HC165BQ_115 | QFN-17 | 8(10) | $2.21 | Mouser |
| U14–U77 | Addressable RGB LED | APA102C | SON-6 (5050) | 64(100) | $10.5 | AliExpress |
| U143 | Level Shifter | SN74AHCT125DR | SOIC-14 | 1 | $0.46 | Mouser |
| DS2 | OLED Display | 128×32 2.23" I²C | SSD1305 | 1 | $10 | AliExpress |
| BT1, BT2 | 18650 Battery Holder | Keystone 1043 | THT | 2 | $6.82 | Mouser |
| U3 | Li-Ion Charger IC | BQ24074RGT | VQFN-16 | 1 | $2.48 | Mouser |
| U4 | Boost Converter (5V) | TPS61023DRLT | SOT-6 | 1 | $1.4 | Mouser |
| 1uH1 | Power Inductor | XEL4030-102MEC (1µH) | XEL4030 | 1 | $2.17 | Mouser |
| U5 | 3.3V LDO Regulator | AP2112K-3.3TRG1 | SOT-25 | 1 | $0.25 | Mouser |
| U144 | USB ESD Protection | USBLC6-2P6 | SOT-666 | 1 | $0.63 | Mouser |
| U145, U146 | PTC Resettable Fuse | RUEF300 (3A) | Radial | 2 | $1 | AliExpress |
| TH1 | NTC Thermistor | NTCG103JF103FT1S | 0402 | 1 | $0.11 | Mouser |
| J2 | USB-C Receptacle | USB4110GFA | SMD | 1 | $1.27 | Mouser |
| J1, J3, J4, J7 | Board Connector | Samtec ZF1-15-02-X-WT-X | SMD | 4 | $6.8 | Mouser |
| S3, S4 | Player Clock Button | TL3315NF250Q | SMD | 2 | $0.28 | Mouser |
| SW2 | Boot Switch | Omron B3FS | SMD | 1 | €0.62 | Mouser |
| D1, D2 | Charging LED | Q65111A7377 | 0402 | 2 | $0.92 | Mouser |
| R3, R4 | USB-C CC Resistor | 5.1kΩ | 0402 | 2 | $0.20 | Mouser |
| R5 | Charge Current Set | 800Ω | 0402 | 1 | $0.10 | Mouser |
| R6 | Charge Set | 1.2kΩ | 0402 | 1 | $0.10 | Mouser |
| R7, R107, R108 | Charge Set | 2kΩ | 0402 | 3 | $0.30 | Mouser |
| R8, R11, R13, R35, R36 | Pull / Bias | 100kΩ | 0603 | 5 | $0.50 | Mouser |
| R9 | Pull / Bias | 100kΩ | 0402 | 1 | $0.10 | Mouser |
| R12 | Bias | 750kΩ | 0805 | 1 | $0.10 | Mouser |
| R10 | Current Limit | 330Ω | 0402 | 1 | $0.10 | Mouser |
| R16–R19, R23, 39,40, R43, R44, R45-R106 | Pull-up / Pull-down | 10kΩ | 0402 | 71 | $0.77 | Mouser |
| R34 | Pull-up / Pull-down | 10kΩ | 0201 | 1 | $0.10 | Mouser |
| R14, R15, R22, R24, R25, R30, R31, R41, R42 | Series Damping | 33Ω | 0402 | 9 | $0.9 | Mouser |
| R37 | Voltage-divider | 3.3kΩ | 0402 | 1 | $0.1 | Mouser |
| R38 | Voltage-divider | 6.8kΩ | 0402 | 1 | $0.27 | Mouser |
| C (various) | Decoupling / Bulk | 100nF, 1µF, 4.7µF, 10µF, 22µF | 0402/0603/0805/1206 | 105 | $16 | Amazon |
| C17, C18 | CP_EIA-7343-20_Kemet-V | 100µF | 2917 | 2 | $8.68 | Mouser |
| Neodymium magnets | Circle | N35-N52 | 20x5cm | 32(40) | $20 | Amazon |
| Neodymium magnets | Rectangular | N35-N52 | 5x10x2mm | 6(100) | $7.6 | Amazon |
| BT1, BT2 | Li-ion Battery | 3.7V 3400mAh | 18650 | 2 | $5.76 (I have them) | AliExpress |
| X | FFC Connector | 15-pin | 500mm | 3 | $6.82 | Amazon |
| X | M3 Screws | M3 | 10mm | 50 | $5.5 | AliExpress |
| X | M3 Nuts | M3 | 25 | $3.5 | AliExpress | |
| X | Main PCB | PCBWAY as second alternative | 5 | 70$ | JLCPCB | |
| X | Upper PCB | 5 | 130$ | JLCPCB | ||
| X | Clock PCB | PCBWAY as second alternative | 5 | 58$ | JLCPCB | |
| X | Main Chess Board 3D | 1 | $80 | 3dprintmk | ||
| X | Chess Board Lid 3D | 1 | $15 | 3dprintmk | ||
| X | Buttons 3D | 2 | $7.5 | 3dprintmk | ||
| X | Chess Pieces 3D | 2 | $15 | 3dprintmk | ||
| Mouser Total | $105 | with cargo | ||||
| Amazon Total | $71.79 | with cargo | ||||
| AliExpress Total | $56 | with cargo | without batteries | |||
| PCB Printing | $332 | with cargo | ||||
| 3D Printing | $120 | with cargo | ||||
| TOTAL | approx. $680 |
Notice: Theese shipping costs are for a 3rd world country so if you are from the EU or USA there are high chances of having lower shipping costs
Notice: These are just recommendations that i have found to be secure and hopefully the cheapest option. Do your own research if you think that better deals exist on the current market depending on when you are buying it.
Features
- Piece Detection - 64 hall effect sensors, one per square and magnets inside the chess pieces
- RGB LED Feedback - the guide for your victory, shows active checks, best move and more!
- Onboard Chess Engine - mcu-max, ~2000 ELO at depth 8-10
- Dual Player Clocks - dedicated hardware button per player
- OLED Display - cool visual representation of time left, current player, machine state and battery percentage
- 18650 Battery Powered - dual Li-Ion with onboard USB-C charging
- Deep Sleep - power saving mode and game state retained in RTC memory across scleep cycles
- Protected Power Rails - PTC fuses and USB ESD protection on all external-facing lines
- Fully Custom PCB - designed for shipping standards
- Open Source - complete hardware + firmware available
- Closing Lid - high quality lid with magnets for a neat experience if you decide to change the batteries
Hardware Stack
| Subsystem | Component | Description |
|---|---|---|
| MCU | ESP32-S3-WROOM2 | 32MB Flash, 16MB PSRAM, Xtensa LX7 dual-core |
| Sensors | AH1806-W-7 x 64 | Active-LOW hall effect, SOT-23 |
| Sensor Interface | 74HC165BQ x 8 | Parallel-in shift registers, daisy-chained |
| LEDs | APA102C x 64 | Addressable RGB, SPI-compatible, 5V |
| Level Shifter | SN74AHCT125D | 3.3V → 5V for APA102C DATA + CLK |
| Display | 128x32 OLED 2.23' | I²C Interface |
| Battery | Li-Ion 18650 batteries | |
| Charger | BQ2407RGT | Single-cell Li-ion, USB-C input, NTC-monitored |
| 5V Rail | TPS61023DRLT + XEL4030-102MEC | Boost converter for LED chain |
| 3.3V Rail | AP2112K-3.3TRG1 | LDO for ESP32 and logic |
| USB Protection | USBLC6-2P6 | ESD protection on USB-C lines |
| Fusing | REUF300 x 2 | 3A PTC resetable fuses on power rails |
| Firmware | ESP-IDF (FreeRTOS) | C, HAL + state machine architecture |
| Chess Engine | mcu-max | MIT, pure C, negamax + alpha-beta, depth 8 |
PCB Design
The PCB was designed specifically for this project and its layout.
Key design requirements met:
- Via grid under module EPAD for grounding and thermal performance
- Shared GPIO12 clock routing for APA102C chain and 74HC165 shift register chain
- Integrated external pull-up for GPIO3
- Passive components placed per Espressif hardware design guidelines
- USB-C CC resistors for correct sinking identification
- Charging temperature monitoring via NTC thermistor
- 3 individual PCBs communicating between FFC cables
- 2x4 Layered PCBs for great signal integrity and power supply troughout the whole board
- Every piece is precisely placed according to the 3D chess board for the best workfoll
PCB Layout
Main PCB
Some pictures may have been deformed in order to adjust their dimensions
Upper PCB
Clock PCB
Schematic
Refer to the PDF file for better overview PDF
Main PCB
MCU/IC section
Power Management section
Upper PCB
Hall Effect sensors
RGB LED Matrix
Clock PCB
Component Placement
Main PCB
Upper PCB
Clock PCB
Sorry for not including every 3D model (2.23" OLED, 2 push buttons and the BQ2407RGT charger). The folders that i managed to find from the web didn't have a 3D .step model
Enclosure
- Simple to assemble
- Firm and high-quality material for premium feel
- The board is made out of PETG material
- 100% fill on the top giving us crystal transparency for out LEDs
- Tolerances given accordingly
- Chess Pieces are made out of PLA
Feel free to change the material type according to your desire but PETG is most recommended for transparency
Firmware (ESP-IDF)
Firmware features:
- FreeRTOS game state machine
- HAL drivers for all peripherals
- mcu-max chess engine integration (UCI interface, iterative deepening)
- Deep sleep with RTC memory retention
- Shared CLK sequencing between APA102C and 74HC165 chains
Chess-Master-Board/
|--- Firmware/
| |--- main/
| |--- hal/ # LED, sensor, OLED, button, battery drivers
| |--- engine/ # mcu-max integration
| |--- game/ # FreeRTOS state machine + chess rules
| |--- main.c/
| |--- CMakeLists.txt
| |--- partitions.csv
| |--- sdkconfig
|--- Hardware/
| |--- 3D_Printing/
| |--- KiCad/
| |--- BOM.csv
| |--- Component Libraries.zip
|--- Pictures/
|--- LICENSE
|--- README.md
|--- Chess Master Board Zine.pdf
|--- chess-master-board-journal.md
Current Status
- Initial Concept
- Layout Finalized
- PCB Design
- Schematic
- Firmware - HAL Drivers
- Firmware - Game State Machine
- Chess Engine Integration
- Deep Sleep + RTC Retention
- Battery Monitoring
- 3D Models
- Final BOM
- Create a Zine
- Final Build
- Create an IoT Version
- Upgrade the 3D model
- Improve the PCBs
- Make different size variations
Contributing
Contributions, suggestions and feedback are welcome!!!
If you'd like to improve Chess Master Board:
- Fork or clone the repository
git clone https://github.com/Ajakovski/chess-master-board.git
cd chess-master-board
- Create your feature branch (if forked)
- Commit your changes
- Open a pull request
For significant hardware changes, open an issue first to discuss before investing time in layout work. Any new HAL driver must be self-contained in its own .c/.h pair.
If you build one, open an issue with photos.
Creator
Ajakovski aka. Marsovac
Hey my name is Andrej and im from Macedonia, Kratovo. Im 17 years old and i really enjoy making cool project which are all posted on my github.
Main focus while building the project:
- Individual planning and structuring
- embedded systems engineering
- schematic construction and following electrical concepts
- first PCB construction EVER!!!
- phisical product design
- to participate Fallout from HackClub
- connect with other likewise enthusiasts
- chess
License
This project is licensed under the MIT License - see LICENSE for full terms.
Chess engine: mcu-max - MIT License
No comments yet. Be the first to ask about this board.