Posts | Comments

Planet Arduino

Archive for the ‘ChessBoard’ Category

You can play chess just as easily on a $2 set from a thrift store as you can on a $2,000 ornate set from a bespoke retailer. But that doesn’t stop people from building or buying those fancy chess sets. If you’re the DIY type, you may even be interested in an electronic chessboard like this one from the NVE Corporation team, which was made possible by practical magnetic switches.

This is an electronic chessboard that registers moves and speaks them out loud. That can make it useful for people who don’t have good eyesight. It also allows for the possibility of recording entire matches on a connected computer. Chessboards like this aren’t uncommon, but this project was simplified by the use NVE’s GMR magnetic switch sensors. Those detect the presence of magnets in the bases of the chess pieces, with enough tolerance to account for variation in placement and board thickness.

An Arduino UNO R3 board monitors all 64 of those switches through a matrix similar to keyboard. When a player picks up a piece, the Arduino notes the square that changed states. Then, when the player puts down the piece, the Arduino records that square, too. It can then output PWM (pulse-width modulation) audio to an amplifier board that says, for example, “B7 to B6” using the Talkie library.

By updating a running log of every piece’s position, it would also be possible for it to instead say “pawn to B6.” But the current implementation doesn’t do so.

The post Practical magnetic switches make this electronic chessboard possible appeared first on Arduino Blog.

Chess is a tricky game to learn, even before you get into various strategies and tactics. The simple act of memorizing the different piece’s moves can be overwhelming to people new to the game. To make it easy to determine where pieces can go, Redditor Bakedbananas is building an illuminated chess board that displays a player’s possible moves.

This is still a work in progress, but the short video does a great job of demonstrating the concept. The entire board is lit from underneath and normally shows the standard checkered pattern. But when a person lifts up a piece, the surrounding squares change color to indicate where the player can place that piece. The starting square is yellow, and squares the piece can move to are green. Red squares indicate positions that a piece would normally be able to go, but which are blocked by other pieces.

Bakedbananas hasn’t posted many technical details yet, but some information is available. The pieces and board, including the translucent squares, are 3D-printed. An Arduino Mega 2560 board detects the presence of pieces on squares using Reed switches and magnets in the pieces’ bases. But the Arduino cannot identify each unique piece. For that reason, it must track every piece’s movement from its starting position in order to keep a running record of the type of piece located at each square.

There is still a lot of work required to finish this project, but it is very promising and we can’t wait to see the final result in action!

The post This illuminated chessboard displays possible moves appeared first on Arduino Blog.

Unsatisfied with the present options for chess computers and preferring the feel of a real board and pieces, [Max Dobres] decided that his best option would be to build his own.

Light and dark wood veneer on 8mm MDF board created a board that was thin enough for adding LEDs to display moves and for the 10mm x 1mm neodymium magnets in the pieces to trip the reed switches under each space. The LEDs were wired in a matrix and connected to an Arduino Uno by a MAX7219 LED driver, while the reed switches were connected via a Centipede card. [Dobres] notes that you’ll want to test that the reed switches are positioned correctly — otherwise they might not detect the pieces!

A small LCD screen and four buttons also connect to the Arduino for configuring options a number of options, computer difficulty, and play styles, while a Raspberry Pi acts as the main computer.

The Raspberry Pi is using ChessBoard 2.05 as a rule set with consideration for special moves (such as en passant and castling). It’s currently unsupported but used with permission by its creator, John Eriksson. The chess program Stockfish is the actual engine; be sure to adjust the skill of the AI, as it defaults to an ELO of 2600! Unfortunately, it’s a rather finicky program, only running on Python 2.7. If that doesn’t appeal to you, [Dobres] has provided a nice list of other options to help you with your own build.

He has recently updated his design and done away with the need for the Arduino in the process which — especially if you use the Pi Zero — drops the cost of this project significantly. That should leave you with enough room in your budget to build a robot to make the moves for you!

[via Max Dobres]


Filed under: Arduino Hacks, Raspberry Pi


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook