Finding position in 3d space

Hi

I have an installation where a number of 300mm cubes are placed on a play field in any order and potentially stacked on top of each other. I want each cube to have a an arduino inside and report its position and orientation via wi-fi. The play field is an area aprox 1500mm x 1500mm

I'm fairly confident I can use an acceloremeter and gyro to get orientation. Is there a sensor out there that will give me position? If three cubes were stacked on top of each other I want to know the order they are stacked. So I don't need to know absolute position if I know which cubes are next to other cubes. In the past I used a camera but the users get in the way.

Thoughts so far: Some kind of local gps. Not sure if that's possible Near field chips in each surface detect nearby cubes Any other ideas? Any comments about the feasability of these ideas?

GPS will give you X and Y. To determine Z, you could see if X + Y + cube dimensions indicate conflict (ie stacked) and then use barometric pressure (?) to determine Z.

Although if your pressure sensor is on one side of an inverted cube sitting on top of another cube right side up (ie the sensors are next to each other), it may be within noise and not differentiated sufficiently.

Colour detectors from each face detecting no colour on bottom face (lying on the ground) to some colour (on top of another cube).

I've seen projects where people have used clever combinations of surface contacts to work out which faces of items are plugged into each other, but I think that would only be feasible if the stacked blocks are precisely aligned. Is that going to be the case here?

I don't know of anyone who has got 'indoor GPS' working, and getting resolution down to centimeters (as I guess you will need) would be extraordinarily challenging. The easiest way I can think of to get X+Y position would be to use an overhead camera and object detection software. Sensors in the block could work out which way up it is and which way it is oriented. Perhaps you could use some sort of pressure/force weight sensing to work out the stacking order?

The play field is an area aprox 1500mm x 1500mm

1.5 metres x 1.5 metres?

Can you give more details of the requirement.

The playing field is a 1500mm square.
The cubes have side 300mm

How high is the play field?
How many cubes are there in total?
Are the cube edges always parallel with the field edges?
Are the cubes always placed flat i.e. they cannot be propped at an angle?
When two cube faces touch does the whole face touch?
When cubes are stacked are the edges of the cubes always aligned i.e. neatly stacked not twisted?
How many cubes can be stacked in a column, 5?
Do the cubes always form one group, where all the cubes in a group touch, or can there be separate groups?

I am sure GPS will not differentiate between 300mm cubes even if they are outside.
The suggestion of surface contacts sounds like a good one to me, but more info on the problem is required.
I would start thinking about a 3 x 3 x 3 problem then see if the solution can be extended to 5 x 5 x 5.

An interesting aside, modular self-configuring link and cube robots (scroll down)

DGPS (Differential GPS) can get down to 10cm resolution. This would probably require deploying one or more DGPS stations inside your room. $$$.

3D location is an old problem. Using radio is challenging because the signals travel at light speed, but there's an easier option: sound. Basically you can re-implement LORAN (http://en.wikipedia.org/wiki/LORAN) with sound waves instead of radio waves. You'll need a few ultrasonic (or even audible) transmitters with known locations in your room, and then a receiver in each 300mm cube. Each receiver listens to the pulses and calculates it's own position based on the time it takes the various pulses to reach it.

I believe you'll need one primary and two (or three?) secondary known-location transmitters for your cubes to get a 3D fix. They will need to be as separated as possible in X, Y, and in Z (i.e., northeast corner floor, southwest corner, ceiling, etc).

Thanks for all your help so far

The cubes can literally be in any orientation or structure on the playfield. They may or may not be wholly or completely touching, they can be in any combination of groups. The playfield is a platform 1.5metres x 1.5metres, aprox 300mm off the ground. There are 8 cubes at the moment, although I would like to make the number higher. Max 3 in a stack is needed, but more than 3 is desirable. In regards to grouping it would be desirable to know the relative distance between all cubes.

The cubes won't necessarily be precisely aligned when stacked, they could be partially touching or rotated. So surface contacts are probably out. But I was thinking RFID/Near field for this reason. Does anyone have any experience with RFID? Would an RFID transceiver in each side be possible and then it would detect an adjacent cube in a whole range of positions? How directional is RFID? Would it reject the other sides (non touching/close) of other cubes (Or the other sides of its own cube?)? Can a siginal strength value be taken from an RFID system that might indicate distance or at the least be used to reject non touching sides? OR is RFID strong enough and omni directional so you could put it in the centre of each cube? Basically I'm familiar with RFID security swipe systems. Does anyone know of implementations with longer detection range than that?

Ultrasonics could work, does anyone know of any projects that have implemented this? The installation generates sound (the cubes are a sound interface), and could be used in very noisy environments. May also be used outdoors with wind. Does anyone have any experience with ultrasonic receivers/microphones? Do they have good rejection of other sources/frequencies? A bit of googling indicates ultrasonic micrphones are directional. Would one mic in the centre of each cube work or will I need to do a mic on each surface? The cubes are made of aluminium and plastic. If ultrasonic waves perform the same way as sub-ultrasonic high frequency sound I'd imagine there would be some attenuation inside the cube. Would it be reasonable to use a very powerful transmitter that penetrates the cubes? I'm familiar with the four spheres maths used in GPS. Does anyone know of a library for calculating this on Arduino or would you think the Arduino dumps the raw data to wi-fi and let's an external computer do the maths?

That sound delay idea is excellent. No, there is no software or prior apparatus you can get for free or for less than a wage. No, loudness is not important. Ordinary levels are plenty is filtering at 38 Khz sound familiar to you. I like it. 4 Beacons.

Would it be practical to have a light sensor (LDR or photodiode) on each face so that a dark face is assumed to be touching another face. I think one can infer things from how many and which faces are dark, perhaps augmented by another "gravity" sensor that can identify top and bottom.

...R

Something like this, but on steroids: http://90.146.8.18/en/archives/center_projekt_ausgabe.asp?iProjectID=10931

Assume each box has a unique ID. Assume each side has the same nomenclature. The datagram would be cube ID + side ID.

You should be able to get away by just using induction... coil centered for each side of the cube driven by a FET from a digital pin.

An experiment will need to be conducted to determine an appropriate modulation protocol... such as ASCII or Morse, etc. The choice of protocols and error-correction needs to be weighed with the idea of repeated transmission... that is, eliminating error correction and just going for the best of 10 receives.

The coil on the inside of an adjacent box will pick up the magnetic impulses and send to the analog input for decoding. A high bitrate should not be required as the datagram is short.

Induction coupling should be inexpensive... just similar coils, an RF tuned circuit is not necessary. Coils are both transmitters and receivers, cutting down on sensors. Power can be adjusted easily by placing a small resistance in the FET sourcing voltage. The "trick" is to generate a signal strong enough to induce a pulse into an adjacent cube but not too strong.

You will likely need to create a send-receive algorithm with a fall-back, retry scenario. Listening and sending will have some collisions but the adjacent partners can eventually work out a rhythmic pattern.

Ray