Author Options:

Help coming up with how to make robotics project (RFID/iButtons/sensors/chess/microcontrollers)? Answered

Hi all! :3

For my 2-year high-school robotics project (last two years of High School) we were allowed the freedom to choose whatever project we felt like working on, as long as it got approved by the teacher.

Me, being a huge fan of chess, decided to make a chess-related project. Unfortunately, I dashed into it without giving it much thought. So I'm here asking you guys if you can think up of a way for me to achieve this. Afterwards I'd like to take it a step further and have it not be related to chess at all, and make my own board game with my own rules, but that's afterwards.

Alright, I'm really bad at explaining things (English = not my native language), but here goes.

I'd like to make an interactive chess board. The chess board would be grid-based, obviously, with possibly LEDs inside each square. I'd also have my 16 (or well, 32) chess pieces that would all be custom made. (I have access to any materials I need, so don't worry; I have a big budget, 3d printers, plenty of microcomputers and microcontrollers, you know. All I need to know is what to get X'D) Now let's say I place/take off a piece on the board. I'd want the grid to light up the corresponding squares/blocks. E.G: I pick up a pawn, and the square right in front of it lights up. So You understand what I mean? If possible there could be some button on the chess piece. Heck, it doesn't have to be a chess piece, as the shape would make it weird. I can just have blocks with a button on top and a little sticker indicating what piece it is. Anything like that works.

I'm guessing the board would have some kind of microcontroller/microcomputer integrated into it that would process the logic for the lights/movements. The part that really gets me most is how it will know what chess piece it is and how I would go about implementing the code and such.

If you had to make this, and had 2 years time, how would you make it? What kind of materials would you use?

I've been doing a bit of research on this, and through my research it seems like using Arduino or something of the like along with iButtons or some sort of RFID/NFC would be ideal. I don't want to do anything optical, like utilizing cameras, etc. I'd like each piece to store memory and information related to it and for it to be able to be read and written by the board (well, the microcontroller/microcomputer). Again, I don't have that much expertise with anything related to radio frequencies, or a lot of the part of the hardware-side of the project, I'm more of a software-buff. But I really want to learn which is why I'm doing this!

I have a bit over a year's experience in C++ and Java, since that's most likely going to be required.

Anything helps!

Thank you so much for your help! :')


Ok, just to sum it up:
Using RF scanners and tags you would either need a reader to put the piece on before placing on the board or an active ID tag that only get's activated when lifted.
What you use depends on how much you want to program, costs of parts and how they work together at close distance with 64 pieces.

Positions can be obtained two ways.
a) With an active tag and the switches in the fields
b) With a passive tag by tracking the movement entirely through the software.
A would give added security for cheating and a save identification every time, B only works if the software is cabable of tracking every move.

I think the easiest solution in terms of hardware is:
Passive tags and a reader used on each piece before placing it on the board.
Pressure, capacitive or inductive sensors or to start with a simply switch on each field of the board to check if the status changed.
You would need a to use some fancy coding to address the different fields.
Since we have 8 in two directions encoding a byte per row or column should be the easiest.
This way the program can simply use a table that corresponds to each byte value and check the occupied fields.
In return the changed info when lifting a piece is compared with the stored ID for the field and the program knows what type of piece it is, e.g.king or queen.
A different part of the program uses the collected info for a chess simulation and to suggest possible moves.

Seems you have a lot of programming ahead of you....

Thank you very much for your help! I think this is all I need to keep in mind before I get started, right? X3

I am certain you will apapt and make changes on the way.
Most likely in the sensor and ID department but the main hurdle will be the programming and linking into a chess program.
Both the electronical and programming part would make a great Instructable, so don't forget to take a lot of pics and to keep notes about the progress / changes.
If you get it together and working it has potential to be featured for sure.

Hehe, thank you ^.^ I'll get working on it in a few weeks :3 I hope to be able to post it up here when I'm done.

I had another thought on the matter :)
You say you want to be able to identify each piece no matter of position.
You also want to know where on the board each piece is located.
You want to be able to suggest or display the possible move of a lifted piece somehow. Please correct me if I got it wrong here!

Using RF id tags could solve the identification problem, but in conjunction with the position on the board unless you include 64 close proximity sensors in the board and read all of them.
So I was thinking "back to the basics!".
What if you use sensors (does not matter which kind, like touchscreen or switches) for each field on the board to check if it has a piece on it?
Each piece has a unique ID tag or simple low range transmitter sending an identification code when lifted (with a switch on the bottom).
Identification with software somehow like this:
All pieces on the table - no transmission of ID.
Lift piece by piece and place on a field on the board - software has ID of piece and now location on the board.
All locations and what (if any) piece is on the board is now available.
When you make a move the software checks the code that is being transmitted and receives the information from the board which field has changed the status from "occupied" to "empty".
Software can suggest the next possible move for the piece you are holding.

You get the picture...
Best option of course would be passive RF ID tags that get activated when a piece is lifted as otherwise you would need a power supply in each piece.
Although you can get tags that get the power to transmit entirely from the RF signal by the ready I would not know if they can be modified to be "usuable" with a switch. Easiest way would be a switch in the antenna loop, maybe you can find something that works better.

Hmm... I have a question. If I were to do that same approach (with the non rfid sensors + the rfid reader), how would I guarantee that the piece that the sensor picks up is the one that's on the board? Couldn't there be interference and it could end up picking another piece instead? Would it be using that switch?

That is the thing, each tag needs to be dormant as long as the piece is on the board or table.
Only when lifted the tag should become active as otherwise there is no telling what or where to go.

Yeah. That's a pretty great solution :) So that means I'd be using active RFID for my pieces, correct?

that's a great idea! Thank you so much! I was actually thinking of doing the same thing, but I had no idea how to actually make it work. This gave me some insight. Thank you!
(Is there any specific hardware you would suggest, for anything?)

I have not played the idea through so I did no searches for suitable sensors or hardware.
But I guess anything from RF ID over Bluetoth up to microcontroller with RF output will work if implemented correctly.

More a matter of finding what fits into the chess pieces and having a suitable power supply if required.
For the pressure sensors I would not bother with anything fancy for the start and use simple micro switches on every field.
Once confirmed all works well they can be replaced with capacitvie or inductive sensors.
The touchscreen idea needs to be abandoned as there is no touchscreen that can handle the simultanious input of 64 pieces.

Oooh, another thing. Even though I rather not use this, do you think it could work?

What if at both ends of the board I place an RFID reader, and I just have the players register the pieces in the game before playing? So they place it on the scanner block, and then when they lift it off and place it somewhere else the software will assign that block to the piece that was previously left in the scanner block.


Could work but means you have to use use the scanner block with every move, not very relaxing if you ask me.

do you really think I'd have to use it every move? Wouldn't the software store the pieces info right after that? And it would memorize it's position as well?

One approach could be:
At the start all pieces are in a fixed position, this is stored in the controller as well.
Each square has a pressure sensor.
You press down on the piece and the microcontroller lights the square up and displays possible moves (as the position is stored).
Take the piece to the field of choice and press again to confirm new position to be stored.
If you use quite sensitve sensors it would be enough to check for the weight of the piece on the field in question - no weight empty, fixed weight with a chess piece.
This way you avoid complicated sensors in the pices or a lot of RF ID tags.
Downside is the more in programming for 64 pressure sensors, unless you use a touchscreen as a base and map the chess grid so the controller can use that information.
God thing would be that you can change the chessboard image or even include graphic animations for moving the pieces.

(didn't mean to mark as best answer, sorry)

That would work, but I'd like each piece to be identifiable regardless of the starting position :(


That only leaves you with 64 identification tags of some sort, one for each chess piece.
On top of that you would need a receiver under each quare, again 64 of them.
Even if you go totally basic and use a blik code in each piece it is lot of hardware you need.
Good luck!

Yeah, you're right. Having to get all that hardware bothers me a bit. Thank you!


3 years ago

You don't sound like you have programmed stand alone hardware.

What serious project interfaced to real world non-keypad have you made work ?

Hehe, you may be right there ^.^'

"Serious"? None, I'm sure. But at least I've done quite a few gadgets using Arduino and Raspberry Pi. I know that's not much to go on, so I'm sorry there...

Thanks for your reply :)

That sounds like enough software knowledge to light 64 squares if not play a competitive game of chess you will need to study the 4x4x4 or 8x8x8 cube instructables on this site for the hardware to make your board.

I would use base magnets in your 3D figures and hall probes or reed switches under each square to inform still a 64 scan to detect movement.

If you get specific on details you will get more detailed assistance.

Thank you very much for your help! I'm sorry if I haven't been very clear on anything, it's not intentional, xD!

Is this what you are referring to?

I understand the movement detection, but what if I want each piece to be
identifiable individually? Like for example, I lift off the horse from
the board and I get a console output reading "Horse". I'd love for them
to be identifiable like that, in a manner that it doesn't require them
being set up in specific spots in the beginning of the game. So I can
have all the pieces in complete disarray in the beginning and the game
will still know which is which. That is why I suggested utilizing RFID
tags or something of the like, and using a microcontroller like Arduino
or a microcomputer like the Raspberry Pi to keep track of the game

Perhaps something like this would work?

Thanks again!

Yes, and yes you have the budget. I would worry if you could differentiate 16 unique RFID pieces on 64 squares.

Yeah... That's what concerns me the most :/ Any suggestions there?



So what you want is 32 unique RFID tags and perhaps a shield every 9 squares to avoid double detect except to one, two, three pick up arbitrated by soft logic for a unique of 64 square assuming motion only detection is reasonable. Otherwise a tiny RFID could confuse the every square detector game.

Or use the placement piezo shock to trip your read logic.

Or in fact just use an X-Y acoustic position with a broad-beam RFID.

Anyway you can see there are as many technical solutions as there is money.

What will impress your teacher more, a purchased solution, or a clever one !

Hmm.. That's not a bad idea, thanks :)

A clever one of course :3

BTW it is no big problem for a micro to know the start positions of each piece and track where it moves. I know people who play blind chess and use only brain power to keep the position of each piece.

sorry, I became confused here a bit. what exactly are you referring to? Is it actually not that hard to differentiate the 16 different pieces with the RFID?