game board with dif...
 
Notifications
Clear all

game board with different e-pieces

37 Posts
6 Users
10 Likes
2,405 Views
(@grossdan)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

Hello,

I'd like to build with my kids a game board -- perhaps 8x8, perhaps larger. Where we can place pieces on the board that are recognized by a micro-controller.  Its not only to know that a piece is location in a cell, but also what type of piece it is.

Its a classic problem -- i noticed that in chess its done, to record moves made on a board - but, i want to do this simpler.

 

Here is my idea ... different kinds of pieces and will have different resistor at the bottom.

Say, if it were chess, then all pawns would have, say, a 100 ohm resistor.

Each cell on the board would have a little plates as contact points, that the legs of the resistor touch, when the piece is put on a cell, and those plates would be connected to some kind of metallic grid.

The grid would be multiplexed, somehow, so that a micro-controller can read for each cell its voltage and thereby recognize the type of piece there.

How to do this needs more figuring out -- but perhaps its going to be like a bus with some tri-state buffers of sort controllable, by an MCU and some circulating shift register thrown it.

 

My question is if there is something easy to use as contact plates and grid -- short of a PCB -- to experiment that I could use to hack a custom grid along side breadboards. 

I guess i won't get away with finally getting into soldering ...

 

Dan

 

 


   
Quote
Topic Tags
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2527
 

@grossdan

Have you considered RFID as the identification part of your system ?

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@grossdan)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@will Yes -- i read papers on that -- but RFID doesn't seem well suited -- its hard to make it contained and local to a cell on a board ...


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@grossdan 

Perhaps not the cheap solution but an array of jack plug sockets would be robust.

Each piece can have a jack plug.

To enlarge image right click and choose open link in new window.

pieceBoard

   
ReplyQuote
(@grossdan)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@robotbuilder its an interesting idea.

 

But, cost is a factor -- i'd like to keep the cost down as much as possible. Also, i now realize that usability is also important to me-- to make the use confortable without the need "stick" a piece into a hole.

But, your suggestion made me think some more -- I wonder if its possible to place a magnet on each piece -- perhaps there are standardized magnets with different strengths -- could these induce a current in some component underneave its cell in a way that can be picked up in some way -- perhaps by translating this into some voltage that can then be picked up by an ADC pin on a MCU

 

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@grossdan 

 

Maybe experiment with a hall effect sensor.  The piece could have an electronic magnet (coil of wire) that pulsed its identity. Or maybe pulse a LED in the bottom of the piece with each square having a light depended resistor LDR as a sensor.

Detecting the presence of an object is easy enough but identifying it is much harder.  I would just use a cheap video camera.

https://dronebotworkshop.com/pixy2-camera/

 

 

 


   
ReplyQuote
(@grossdan)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@robotbuilder indeed, I was thinking about a camera --  but, i envision this used by my kids, and a camera is quickly lost or broken and its probably moved all the time, so its detection becomes unreliable.

Mulling over your comment, I noticed that another objective is to ensure that i don't need to put any power into the pieces.

So, unless the pieces close a circuit, i can't blink anything, or cause a current or voltage to happen.

Unless its a magnet attached to the piece.

 

And if I find a convenient way to create a circuit, when a piece is put on the board, then i resistor should suffice and be of low cost to help make a distinction for type of piece.

I was thinking today that there are those magnet pairs that snap together to create a circuit -- like those put on a window for an alarm.

Perhaps, something like that could be used together, somehow, with a different resistor for some.

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

 

demo

@grossdan 

I don't see why a simple metal washer on the bottom of a piece couldn't short two wires just like the reed switch does when a magnet is placed near it.  This would not identify the piece using a resistor as you would need two terminals to line up with the wires.  However if you know the start positions of each piece software could track the movements. This is how reed switches would be wired up.

https://arduino.stackexchange.com/questions/31885/need-help-in-circuit-diagram-of-88-reed-switch-matrix

 


   
ReplyQuote
(@grossdan)
Member
Joined: 2 years ago
Posts: 47
Topic starter  
Posted by: @robotbuilder

However if you know the start positions of each piece software could track the movements. This is how reed switches would be wired up.

Indeed, you are right -- in some chess board implementations the board tracks placement only and MCU records the moves

But, there are games where you don't have moves -- such as scrabble -- you simply put a type of piece (say a letter E) on the board.

My question here is because I am wondering if this is solved and well known design -- where i can simply go out and by some components -- but, i guess, i will have to experiment to find a cheap and easy solution -- which is not bad either to do with my kids 🙂

Edit:

Btw, there is also the terminology in electronics -- lots of terms I don't know exists -- e.g. reed switch -- never heard of it, so i couldn't search for it. 

 

I wish there was a makers electronic lexicon ... one can browse to learn of all the great, and cheap, stuff that exists and that can be used in projects.

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@grossdan 

Your resistor idea might be a cheap solution but how to line it up with the wires?

demo2

   
ReplyQuote
(@grossdan)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@robotbuilder I was thinking to get some plates from aliexpress, such as those [1] (and try to use only the flat ones somehow ... perhaps i will have little resistor pins sticking out and the board will have two little holes, and each will then touch one of those plates, closing a circuit.

https://www.aliexpress.com/item/1005001488275156.html?spm=a2g0o.cart.0.0.6e3b3c00Gv9UYR&mp=1

 

 


   
ReplyQuote
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
 

You could use magnets to position each piece correctly in the square - a N and S pole on the square and on the piece. It would snap into place. I'm thinking on how one might use inductance to identify the piece... different winds of coils in each piece... but my inductance theory is rusty. It's a thought. I'll ponder.

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
ReplyQuote
(@grossdan)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@binaryrhyme so, your thought is that those magnets in its cell that snap the pieces in place, would induce a current in an inductor embedded in a piece -- if the piece would close a circuit upon touch.

And then, different coils would be the equivalent to different resistors to help identify different current strengths and hence different pieces.


   
ReplyQuote
 Biny
(@binaryrhyme)
Member
Joined: 2 years ago
Posts: 269
 

Two thoughts in one paragraph there. One problem is how to position the piece consistently and relatively precisely. That's the magnet thought. (edit: not just a magnet to stick it on, but polarity to force an orientation.)

That got me musing about using induction as an identifier. The thought would be that each square would have a consistent inductor, with a mechanism to measure the inductance, and each piece would have some means of disrupting the inductance, uniquely. Then you'd know what piece was on what square, without the need for contacts. I looked around for parts that might do something like that, but I've gotten no further than that.

I started thinking a bit about how you would mux the grid as well, lol. Everything I've thought of so far was pretty brute force, but I'm sure there is some kind of clever checksum thing that might be done so you'd only need 2 muxes, one for rows, one for columns, vs. individual inputs for each square, but still in the musing phase on that, too, lol.

I edit my posts to fix typos, correct grammar, or improve clarity. On-screen keyboards are evil.


   
ReplyQuote
(@grossdan)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@binaryrhyme 

I was thinking about a bus architecture -- without yet knowing how this really works.

But, i guess some kind of "synchronized" shift registers, one for rows and one for columns  ensure that a different row and different column is connected via some kind of activated trie-state buffer, to a row and column bus. The MCU would run through both shift registers in a scan loop to continuously read in cell values.

I guess best if this is done with a dedicated little MCU that puts the writes values into some memory, while another MCU reads the values as input -- although read and write will need to be syncrhonized somehow. 

Alternatively, one would need a MCU that can multi-task -- do the scanning as well as other processing at the same time.

Yet, another alternative might be an interrupt architecture -- where a change in a cell when locally detected, causes an interrupt -- perhaps this can be achieve dwith some kind of local memory flip/flop? and a comparator -- or a 555 perhaps for each cell, but, i guess this would drive the cost up ...


   
ReplyQuote
Page 1 / 3