Ideas For A Sensor

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
rstofer
Posts: 115
Joined: Sun May 15, 2005 1:01 am
Contact:

Ideas For A Sensor

Post by rstofer » Sat Jul 09, 2005 1:52 am

Suppose I decide to implement the 3D TicTacToe (Cubic) game with a 3 axis arm and stepper motors. Most of you have probably seen the game; it is 4 levels of 4x4 grids (the top 3 are transparent) and each player uses colored chips and attempts to be the first to get 4 in a row.<p>I can build the arm (I think) and perhaps place the chips by holding them in a vacuum chuck (just an opening, really). I think I can pick them up from a stack - how they get into a stack is a separate issue.<p>How do I sense where an opponent has placed a chip? I am open to all sorts of brainstorming here.<p>Physically, the layers are about 6-1/4" square with about 2" between levels. Ordinarily, the chips are colored yellow and blue but that is optional.<p>In a perfect world, the determination of a player's move would be done in a parallel fashion; the arm would not traverse all squares looking for a move.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Ideas For A Sensor

Post by philba » Sat Jul 09, 2005 3:06 am

In all these, I assume that you know which chips have been placed previously by either player so you only need to be able to detect the presence of a chip, not opponent's vs yours...<p>You'll need to sense 64 locations so sensor cost is an issue, I presume.<p>magnets in chips, HE sensors on the board for each position. easy logic interface. cost might become a factor.<p>Phototransistor on board for each position. make sure ambient light is fairly strong. chip blocks light. tune PT circuit to handle ambient variations (like shadows and such) as well as light blocking chips higher up in the stack. I'm pretty sure it can be done. easy logic interface. you might have to make the PT locations opaque, though. you can get 1206 SMD PTs for pretty cheap. <p>simple microswitches?<p>If the chips were conductive, you could set up a scanning switch matrix.<p>what I don't like about any of these is the need for visible wires.<p>A vision based system would allow you to avoid wires but chips can block the view of other chips. You'd need multiple cameras at different angles. An obvious algorithm doesn't spring to mind. <p>Phil<p>[ July 09, 2005: Message edited by: philba ]</p>

ezpcb
Posts: 98
Joined: Tue Apr 19, 2005 1:01 am
Contact:

Re: Ideas For A Sensor

Post by ezpcb » Sat Jul 09, 2005 3:22 am

1. Hall sensor for magnetic chips, player distinguished by polarity of chips;
2. reflecting optical sensor, one side is black, the other side is white, player distinguished by strength of reflected signal;
3. color sensor, easy to handle multi players
4. whirlpool (I hope this word is correct) sensor, chip made by plastic and metal. It's not difficult to measure the distance of the sensor to the metal surface, player can be told by this.
5...to be continued
http://www.EzPCB.com
High Quality PCB for Electronics Hobbists, Pay for Chrokee, Get Land Rover

rstofer
Posts: 115
Joined: Sun May 15, 2005 1:01 am
Contact:

Re: Ideas For A Sensor

Post by rstofer » Sat Jul 09, 2005 3:35 am

The top three layers are transparent so that patterns through the levels can be observed by the player. Physical objects that obstruct that view are not workable.<p>The following assumptions can be made: First, all levels are clear when the game begins. Second, the computer know where it has moved and where it has detected player moves. It only has to find the most recent move.<p>A vision system is possible using fiber optics or a very small camera. With fiber optics the sensor could be long enough to read 4 squares at a time. Still this would require visiting all the levels (really only half the levels, on average).<p>The computer can also determine where a good player is most likely to have played. But, there would be no guarantee that the guess was correct.<p>MANY years ago I was involved in a project where we used air flow to determine the position of a DC-10 wing panel before it was clamped and riveted. Back pressure was a function of distance. This could be workable and it would be easy to add 4 sensors to the probe. But again, the probe has to visit a lot of cells.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Ideas For A Sensor

Post by philba » Sat Jul 09, 2005 3:47 am

hmmm, you got me thinking...<p>conductive clear plastic - does it exist? maybe thingly metalized glass? ok, that's probably over the top.<p>I wonder if some sort of capacitive system could be made to work. scan in x and y for each level (32 altogether). the values should tell you how many chips in each x or y you scan. from that a little linear math gives you the positions. Worth trying out though I suspect the capacitance will be to small. <p>If you can get clear resistive plastic, maybe you could adapt the above idea to resistance measurement. Make the chips conductive and they will decrease the resistance in x and y. Lots of ADCs or comparators needed.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Ideas For A Sensor

Post by philba » Sat Jul 09, 2005 3:59 am

<blockquote><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><hr>Originally posted by rstofer:
...<p>A vision system is possible using fiber optics or a very small camera. With fiber optics the sensor could be long enough to read 4 squares at a time. Still this would require visiting all the levels (really only half the levels, on average).
...
<hr></blockquote><p>Actually, I was thinking of 2 or 3 fixed position cameras such that every position was visible by at least one camera. You'd need to position them so that absence/presence was unabiguous. i think you can get away with 2 cameras.<p>by the way, very thin wires might not be that disruptive and if the levels were transparent but colored, the wires might be very hard to see. 'twer it me, the cost advantage of PTs would be hard to let go of!<p>You've kept me up past my bed time with this one.<p>Phil

rstofer
Posts: 115
Joined: Sun May 15, 2005 1:01 am
Contact:

Re: Ideas For A Sensor

Post by rstofer » Sat Jul 09, 2005 4:15 am

Yea, I know! It's 4 AM and Norton Ghost just started doing an incremental backup.<p>While the chips probably couldn't be magnetic, they could be steel and detected by some kind of metal detector. Only the player's chips would be detected.<p>They could be pennies and detected by continutity via a probe. I think embedding wires in the plastic may be a little difficult - neat, but difficult.

hamsterears
Posts: 40
Joined: Sun Feb 16, 2003 1:01 am
Contact:

Re: Ideas For A Sensor

Post by hamsterears » Sat Jul 09, 2005 2:59 pm

How about conductive traces on the boards?<p>Use a conductive trace pen, when the chip shorts across the traces it reveals it's location.

cato
Posts: 366
Joined: Sun Sep 07, 2003 1:01 am
Contact:

Re: Ideas For A Sensor

Post by cato » Sun Jul 10, 2005 4:51 am

I'm confused. Apparently we are talking about a real game (not a computer game). I assume the robot arm is used because its too tough to place your marker on an internal position. Although I suppose its possible you are talking about a computer vs. human game.<p>In any event, if all players use the robot arm to place the piece, you should be able to keep track of where all the pieces are, without any sensors (other than any that might be required to control the arm)

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Ideas For A Sensor

Post by philba » Sun Jul 10, 2005 3:02 pm

I believe its a physical board and a robot playing a human opponent.

rstofer
Posts: 115
Joined: Sun May 15, 2005 1:01 am
Contact:

Re: Ideas For A Sensor

Post by rstofer » Sun Jul 10, 2005 6:56 pm

It's a real, physical game usually played with 2 players. The gameboard consists of 4 levels about 6" sqaure, 2" apart. The upper 3 levels are transparent and the bottom level is solid brown. Each layer has an array of 4 by 4 squares.<p>The object is to place chips in such a way as to form 4 in a row in any direction in 3D space before the opponent does the same.<p>My game would have a computer as one opponent and a human as the second. I have quite execellent Fortran code for the computer portion complements of "Programming the IBM 1130" 2d ed. by Louden/Ledin. I ran into this in 1969 when I was doing a lot of work with the 1130 and have ported it to an 8080 in assembly code (an Altair 8800 for those that go back a ways) and finally to Fortran under CP/M. Now I'll move it to C and an Atmel ATmega128.<p>I will try messing about with my CMU-Cam and see if vision is feasible. That would be the classy way to go. I would also consider using pennies for the human player's chips. I could probe these with the mechanical arm in columns of 4 - but that seems slow.

User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: Ideas For A Sensor

Post by Chris Smith » Sun Jul 10, 2005 9:50 pm

RFID<p>Nuts and Volts June 05 page 77.<p>That should work.

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Ideas For A Sensor

Post by philba » Mon Jul 11, 2005 1:26 am

rfid has lots of problems to overcome for this application. reader distance, tag cost (need active tags for longer distance), multiple tag interference. Plus I'm not sure how one would determine the actual location of a chip with an embedded tag. given the need to have the top 3 layers of the board clear, you couldn't use multiple reader loops.<p>I agree the camera approach is far away the best. Probably the biggest issue for an atmega128 is memory for the image buffer. It might not need to very high resolution since, once you figure out where the board is, you only need a couple of pixels with chip color to determine presence. There might be a mono approach that would require even less memory. Or perhaps you could scan with out using an image buffer in memory. Just read through the pixels and look for the values at precomputed locations. Especially if you can fix the location of the camera relative to the board (or cameras, if one can't see all locations). You might be able to create a "training" mode where you teach the program how to determine where the chip locations are. Place one chip, tell the computer where it is and it uses that info for its scan algorithm. Repeat for the next location. Probably only need to do this for the corners and you can determine where the other chip locations are. Hmmm, the more I think about it the easier this seems. devil's in the details, though. fun problem.

bodgy
Posts: 1044
Joined: Tue Dec 04, 2001 1:01 am
Location: Australia
Contact:

Re: Ideas For A Sensor

Post by bodgy » Mon Jul 11, 2005 4:49 am

I can think of two possibilities.<p>E-Filed sensors - check out Motorola or Freescale depending on what they call themselves this month.<p>Qprox capacitive sensors. www.qprox.com<p>Coil sensor similar (but smaller) to those used in metal detecting/GDO/loop hearing aids.<p>Colin
On a clear disk you can seek forever.

rstofer
Posts: 115
Joined: Sun May 15, 2005 1:01 am
Contact:

Re: Ideas For A Sensor

Post by rstofer » Mon Jul 11, 2005 8:23 am

The MAVRIC controller adds 128K of RAM around the ATmega128 - see www.bdmicro.com.<p>I like the idea for teaching the controller. I means I may not have to try to compute the various aspect ratios.<p>As chips block the levels, I am not certain I will be able to see chips at lower levels, assuming some specific oblique angle. It would be acceptable to move the camera vertically and perhaps even change the tilt angle although, once established, it shouldn't be necessary.<p>It would also be acceptable to emphasize the cell boundaries with black stripes such that analyzing the image is made easier.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests