Project showcase

Wooden Chess Board with Piece Recognition © GPL3+

Arduino & Rapberry Pi based chess computer that uses Stockfish ,recognises piece positions using reed switches and signals its move

  • 24,403 views
  • 40 comments
  • 71 respects

Components and supplies

12994 02
Raspberry Pi 1 Model B+
Runs the Stockfish Chess Engine
×1
A000066 iso both
Arduino UNO & Genuino UNO
Monitors the chess board and tracks chess pieces
×1
Lite on ltl 1chg
3 mm LED: Green
×1
reed switch
×1
SparkFun MAX7219 LED display driver.
×1
Centipede Shield
×1

Apps and online services

About this project

This site describes a fully working chess computer that recognises piece positions using reed switches and signals its move using a LED on each square.

It runs from an Arduino which controls the board, connected to a Raspberry PI which runs the chess engine Stockfish and a chess rules library called Chessboard. It is completely self contained, just plug it in, press the green button and you are playing.

Key Features:

Play chess by moving pieces  and the computer signals its move using by flashing an LED

  • Stockfish chess engine with a maxiimum rating of GM with an ELO level around 2900
  • 21 levels of play
  • Set personality: agressiveness and cowardice
  • Play as black or white
  • Play human vs human
  • Validates moves against full moves of chess, signals error & allows re-move
  • Recognises and makes special moves: Castling; En Passent, Pawn Promotion
  • Provides hint if stuck
  • Option to save game as pgn

How it Works:

The next few pages explain how it works, there are two parts:

Harware: electronics and the board

Software: The programs that drive it

Why an Arduino and a Rapberry PI?

An Arduino is great for real time control of the devices on the chess board, but it does not use a conventional operating system like Unix/Debian/Raspian. Therefore Stockfish and most other strong chess engines won’t run on it. I believe there are a few chess engines that do run on Arduino http://chessprogramming.wikispaces.com/Arduino  , but they will not be as strong as Stockfish.

My interest in building chess computers started with Arduino and at the time the Raspberry Pi had not been released. Six months later it was and I realized I needed a different computer so I added the Raspberry Pi to run the engine.

If I was starting again today I would just use just the Raspberry PI with no Arduino,  and I explain how you would get it to control the board here.  However now that I have a great board that I can barely beat on level 3 out of 21, I have no reason to build another one.

I see that some people are designing robot arm playing chess computers, that sounds really cool. In that case I would use an Arduino to control the arm, board sensors etc and use a Raspberry Pi to run the chess engine.

Why the Stockfish Chess Engine?

Its the most powerful configurable Open Source multi-platform robust Chess engine

See here for more detail.

“I know what you’re thinking, punk. You’re thinking “is it mate in six moves or only five?” Now to tell you the truth I forgot myself in all this excitement. But being this is a 64 bit Stockfish, the most powerful chess engine in the world and will blow you defence clean off, you’ve gotta ask yourself a question: “Do I feel lucky?” Well, do ya, punk?”

Credits:

Original inspiration from these sites:

http://sishchess.blogspot.co.uk/p/building-sish-board-tutorial.html

http://usbchessboard.yolasite.com/

Which set me off building a USB chessboard for connection to a PC based computer program. After that the next step was to build a complete chess computer.


For more details on this project go to: 

www.chess.fortherapy.co.uk


Comments

Similar projects you might like

Smart Access [Home/Office Automation]

Project in progress by Ajmal Muhammad P

  • 1,134 views
  • 5 comments
  • 6 respects

SPCPM (Solar Powered City Pollution Monitor)

Project tutorial by 3 developers

  • 641 views
  • 0 comments
  • 2 respects

Internal Timers of Arduino

Project tutorial by Marcazzan_M

  • 4,679 views
  • 9 comments
  • 35 respects

Mini CNC Laser Wood Engraver and Laser Paper Cutter

Project tutorial by Maggie Shah

  • 253 views
  • 0 comments
  • 0 respects

Sigfox kWh Meter

Project tutorial by jassak

  • 4,596 views
  • 3 comments
  • 11 respects

Automatic Sliding Door for the Garage

Project tutorial by DVDMDN

  • 9,208 views
  • 18 comments
  • 47 respects
Add projectSign up / Login