Go Back   Home > Forums > Design & Build > Parts
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Parts Where to get, and how to make the best bits. PCB's, caps, transformers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 27th May 2007, 10:06 PM   #1
diyAudio Member
 
Join Date: Feb 2007
Location: Boston, Massachusetts
Default OT: Touchless switching w/ magnets or something

Not audio, but definitely electronic, so figure I'd try my luck asking here first...

Let's say I have a chess board. What I want to do is have a sensor of some kind under each square that will tell me whether that square (i) is empty, (ii) has a white piece on it, or (iii) has a black piece on it.

My first thought was to use reed switches beneath each square and embed a small magnet in the base of each piece. However, a reed switch can only give me on/off, and not whether the square contains a black or white piece.

One option is to install the magnets in the pieces with either the north or south pole facing down. Could I use something like a Hall Effect sensor (either one or a pair) to detect the presence and polarity of the field? I want to avoid anything which requires too strong a magnetic field to prevent the pieces on the board from attracting or repelling each other too much. If it sounds like I know what I'm doing, you can credit google, not me...

Or maybe someone would suggest something completely different? I've thought about RFID tags and optical sensing methods, but they both struck me as being either expensive or too sensitive to the position or alignment of pieces on the board. Since I'll need to sense 64 squares I'd prefer to keep the cost per unit to a minimum.
  Reply With Quote
Old 28th May 2007, 01:54 AM   #2
diyAudio Member
 
I_Forgot's Avatar
 
Join Date: Jan 2005
Location: Phoenix, Az.
If the white/black pieces start on the sides of the board each time, the software can track their positions as the game is played.

How about a board that is transparent to IR? You can use emitter/reflective-detector pair looking up through the board for each square.

I_F
  Reply With Quote
Old 28th May 2007, 04:26 AM   #3
BWRX is offline BWRX  United States
diyAudio Moderator Emeritus
 
Join Date: Jan 2005
Location: Pennsylvania
Capacitive based sensors could work.
__________________
Brian
  Reply With Quote
Old 28th May 2007, 04:42 AM   #4
diyAudio Member
 
Join Date: Feb 2007
Location: Boston, Massachusetts
Darn it, you're right. At first I thought it could not be done in software with only an on/off switch, but I realize now that it could be.

If you have a grid with 4 squares like so:

A | B
---------
C | D

The situation I was having a hard time figuring out was where you had (for example) a white pawn at C capture a black pawn at B. I was having a hard time because I was only thinking about sensing at (B), which would be "ON" when the black pawn was there and on when the white one took its place. However, it was only the tenth time I thought about it that I realized that I also needed to be looking at square C, which would be empty after the move occurred.

This does raise the complexity of the software to a non-trivial level, but I was thinking about going that way eventually anyway (to be able to track the progress of the game, keep score, etc.), so might as well go whole-hog, no? Now all I need to do is learn microcontroller programming and a few other things....
  Reply With Quote
Old 28th May 2007, 06:47 AM   #5
radtech is offline radtech  United States
diyAudio Member
 
Join Date: Dec 2006
One possibility would be to use reed relays with bias magnets, two reeds per square with a small magnet under each relay, one with north pointing up, one with south up, just strong enough to activate the relays, keeping both closed.

When a piece is put on a square the polarity of a magnet in the base would aid the field of one bias magnet, keeping it's relay closed, while opposing the other, opening it... which relay opens would tell you the color of the piece.

Getting it to work in practice might be a bit tricky, but I think it's theoretically possible.

Of course it would be nice to be able to sense what type of piece was on a square, pawn, rook, king, etc...
  Reply With Quote
Old 28th May 2007, 07:11 AM   #6
Dag is offline Dag  Sweden
diyAudio Member
 
Dag's Avatar
 
Join Date: Feb 2005
Location: Goteborg
Cool project! Maybe you can use neodymium (for white) and ceramic (for black) and then use two reed switches with different sensitivities.

Both on = White
One on = Black
Both off = Empty

  Reply With Quote
Old 28th May 2007, 06:17 PM   #7
BWRX is offline BWRX  United States
diyAudio Moderator Emeritus
 
Join Date: Jan 2005
Location: Pennsylvania
Quote:
Originally posted by radtech
Of course it would be nice to be able to sense what type of piece was on a square, pawn, rook, king, etc...
Technically you don't even have to sense what color piece is where. You know the starting positions for each piece, so all you have to do is keep track of where each piece moved to. As sansbury mentioned, you know what piece moved where because only one piece is moved at a time. The software will need to remember which spaces are occupied and which ones are not, then compare the changed state of occupancy to the previous state to figure out which piece moved where. The software will also need to take into account that pieces can capture other pieces.
__________________
Brian
  Reply With Quote
Old 28th May 2007, 06:46 PM   #8
diyAudio Member
 
Join Date: Sep 2004
Location: UK
Quote:
Originally posted by BWRX


Technically you don't even have to sense what color piece is where. You know the starting positions for each piece, so all you have to do is keep track of where each piece moved to. As sansbury mentioned, you know what piece moved where because only one piece is moved at a time. The software will need to remember which spaces are occupied and which ones are not, then compare the changed state of occupancy to the previous state to figure out which piece moved where. The software will also need to take into account that pieces can capture other pieces.
Dangerous!

No room for errors or mistaken moves!

Imagine what happens if a false move is made and needs retraction?

Relying on starting position and INFALLIBLE track of moves is not good science!
  Reply With Quote
Old 28th May 2007, 08:58 PM   #9
BWRX is offline BWRX  United States
diyAudio Moderator Emeritus
 
Join Date: Jan 2005
Location: Pennsylvania
Quote:
Originally posted by cliff
Imagine what happens if a false move is made and needs retraction?

Relying on starting position and INFALLIBLE track of moves is not good science!
It shouldn't be that hard to store multiple position tables or arrays to memory, unless there is only a very limited amount of memory to work with.

Why isn't it good science? The starting positions for all pieces will ALWAYS be the same (if they're different you aren't playing chess) and only one piece is allowed to move at a time, so you will be able to deduce what piece moved from where. Granted, it would not be able to account for user errors such as pieces being placed in the wrong spot before the game starts, but the program could prevent pieces from moving to incorrect spots, thus preventing the need to retract moves. Then again how complicated does he want this to be? It'd be easier just to play a free chess game on your computer!
__________________
Brian
  Reply With Quote
Old 29th May 2007, 02:45 AM   #10
gootee is offline gootee  United States
diyAudio Member
 
Join Date: Nov 2006
Location: Indiana
Blog Entries: 1
I think you "could" do it, as has been discussed, with simple "occupancy" sensing for each square and software that kept track of which pieces moved where, although I have trouble with how to handle captures, unless you are sure to be able to sense the perhaps very short time of non-occupancy for the square on which the capture occurred. I don't think the software would even necessarily have to know the rules of how pieces were allowed to move, then (although you might want it to know that, for added features).

But I also think that if it were easy and cheap enough, it might be nice to have some direct way to sense exactly which piece was on any square. After all, what if you're setting up a "continuation" game, rather than normal starting positions??

A couple of possibilites come to mind. I'm sure there are much better ones. But I've only thought about this for 90 seconds or so, so far. These are just very rough ideas, straight off the top of my head:

Commercial "RFID" devices might be expensive. But you might be able to make your own, much more cheaply. There is not much information to be conveyed. So it could be quite simple. It could even be as simple as assigning each and every piece a unique transmission frequency, and having a receiver for each square that had a way to distinguish the frequency (frequency to voltage converter, perhaps? Or maybe that part could be done only in one place, as each square is polled). And there is probably some much more efficient type of "coding" that could be done, that would also be simpler to implement, and/or more bulletproof.

You could probably even make it "RFID"-ish without really using RF transmission, if the bottoms of the pieces were metal and the squares had contact areas built into them.

You could take that "metal contacts" idea further and make each square out of two separate contact areas, each filling about one half of the square, and have each piece have three contacts on the bottom, to guarantee that two of them would always be available that were each on a different side of the square's contacts (they'd have to sense it and then "autoswitch" to use the right two contacts; might be trivial), which would then open up _LOTS_ of very easy, cheap (yet sophisticated if necessary or desirable) possibilities, without any RF or other messy sensor schemes at all; anything from resistors to serial protocols would have a ready-made hard-wired link. (Note that you'd need each of the contacts on the bottoms of the pieces to be smaller than the gap between the square's two contacts.)

Another way might be to use several colors of LEDs, if there exists a good way to sense what colors are present. But it might be easier to just pulse the LEDS with digital codes. That is a well-known technology, and could be done with infrared LEDs and sensors.

Capacitive sensing could work, too, if the AMOUNT of capacitance could be set, and then sensed accurately-enough. That shouldn't be difficult at all, IMO.

You could also position a digital camera somewhere and have a frame-grabber in a computer with image-processing and image-recognition software, and do just about anything you can think of, that way. And it's totally non-invasive and could work with any unmodified chess set.

Sorry. My 90 seconds are up. I'm sure there must be much better ways.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html

-
  Reply With Quote

Reply


Hide this!Advertise here!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Magnets, Magnets,Magnets! skooter Car Audio 10 25th September 2008 08:30 PM
Where to buy magnets Tenson Multi-Way 1 16th May 2007 12:47 AM
Relay with magnets Netlist Parts 16 20th June 2006 08:17 AM
Grill Magnets Mos Fetish Multi-Way 2 16th August 2004 06:09 PM


New To Site? Need Help?

All times are GMT. The time now is 03:40 PM.

Page generated in 0.13381 seconds (81.00% PHP - 19.00% MySQL) with 10 queries

Copyright ©1999-2012 diyAudio