I'm new on this forum and with Arduino, so sorry if I posted in the wrond board or if I don't really knwo what I'm talking about. I would like to use Arduino for a project and I need some advice on whether this is a possible application and what sensors, etc I could use for this.
This is the scenario: we have two objects, Object A and Object B. I need something that would allow Object A to recognise how far away it is from Object B (and vice-versa) and depending on the distance between the two objects a different effect would be triggered (blinking lights, etc.)
I would like to know if there is anything I can use that would detect the distance between Object A and Object B (but not other objects, hence no proximity sensors) and that is not too directional (objects should be free to move, not necessarily always facing each other) and doesn't depend too much on a base that the objects sit on (I would like a lot of freedom of movement). Also I'd like it to be relatively cheap (I know, I want everything, sorry).
Too many variables: how big are the objects, what is the environment, can they move in three dimension or only two or one, how fast can they move, how fast do you need to know (update rate), how far apart can they be...?
Thanks for the reply AWOL. To answer your questions
how big are the objects - I haven't decided on the objects exactly but somewhere between the size of a mobile phone and a shoe box
what is the environment - gallery space, probably bright, white walls and varying between loud (opening) and quiet, but main sound would be human voice.
can they move in three dimension or only two or one - three dimensions would be great but I could settle for two
how fast can they move - not extremely fast, they would be moved by hand
how fast do you need to know (update rate) - doesn't need to be too sophisticated as long as the viewer sees the relationship between moving the object and the effect
how far apart can they be - ideally they'd start recognising each other at about 50 cm distance to 0 cm
Would an ultrasonic transceiver work? If each object sent a different wave range so that the objects could recognise each other? Would they be able to tell the distance from that object?
If I'm not mistaken, ultrasound wouldn't work if you want all objects to be sensing others (the vice versa part of the design). All those waves bouncing around in the same space interfere with each other and scramble the range-finding.
Send the audio how?
Via a speaker?
What do you mean by encoded audio?
So each object has a speaker and a mic on it? And is constantly broadcasting a sound and waiting for a response?
If so, I don't see how you would tag each sound to identify its source and make it recognizable by the receiver. Plus it sounds [sic] as if the environment would be too noisy to permit that, unless you were the NSA and had some tricky filtering and pattern recognition algorithms, which might have a bit of a problem running fast enough on the poor little Arduino.
The algorithm you describe, though, is basically what IR or sonar distance sensors do, I believe.
You could send a sound (ultrasound possibly, but that is quite directional) and a flash of light (IR if you don't want to trigger photo-sensitive epilepsy), or a radio pulse.
The difference of time-of-arrival would be an indicator of distance.
This might be a bit big for your application but Openbeacon (http://www.openbeacon.org/) might do the job. I would love to play with this. Otherwise you could maybe look at an RFID type solution measuring signal strength.
Thank you so much for your replies. I think the encoding is way over my head and the openbeacon looks great but way over my budget. The combination of sound and radio might work though, I'll run it by the person who's helping me with it and see what he thinks.
Also another question: are there inexpensive RFID devices that measure signal strength over more than a few centimetres?
I think this might be possible with passive RFID, but I'm not sure. I tried to do what you are doing with RFID, and it started to get beyond my budget, once I found I had to go into Active. However, my project had to sense multiple devices and their distances. Eventually gave up on this, but if you manage to get the audio method to work, I might have to consider it as well, as it seems it would work with additional objects.
Anyone know how those invisible fence products meant to keep your dog in your yard work? Sounds like exactly the same thing (as the dog approaches the buried wire, he gets a warning, then if he continues to get closer, he gets a shock.)
I've always assumed they were some sort of RFID, but I have no idea.
are there inexpensive RFID devices that measure signal strength over more than a few centimetres?
The problem with RFID is that the signal is transferred by inductive coupling. This varies with distance but it also varies with the angle between the two coils. There is no way to tell if for example the signal strength drops to a low value if the coils are far apart or just close to right angles to each other and very close together.
The audio idea will not work either. Although it sounds like it might if you look at the speed of sound and compare that to the likely wavelength you will find that you will have to time periods that are less than one cycle of the audio. Therefore it is difficult to identify the actual arrival time. It gets a bit better with ultrasonics but not much. What starts out at the transducer as a nice square edge ends up as a rising envelope wave, again the difficulty is where to set the threshold.
I beg to differ slightly.
Screen and tablet digitisers in the 1970s used precisely this method over quite short distances, say of the order of the size of a graphics display terminal.
The puck would give a very short click of ultrasound, and then two linear microphones at right angles to each other would detect the pulse, and fix the position of the puck with pretty good accuracy.
Admittedly, this was a very constrained two dimensional environment.
If I get time I may mock up something with some SRF02s I've got; get one to transmit and the other to slave receive.
Reflections are going to be a problem, as is directionality, as I said earlier.
Yes I know about these system, the major difference is that here the sound is transmitted through the medium of the table. Sound travel in a solid is much more dependable than through air and the use of pressure transducers rather than microphones also helps.
I think it is one of those things that sounds easy but is actually near impossible. There are a few of those about.
the major difference is that here the sound is transmitted through the medium of the table
'fraid not. Free air - they could be picked up off a table and placed around the bezel of a monitor - the puck didn't have to be anywhere near the screen.
A colleague was showing his small child (about 4 years old) how to use a computer and said to her. When I was small computers were the size of a house. She gasped and said "gosh how big was the keyboard then".
I loved my big decks of Hollerith punch cards I had to lug around in giant boxes, walking for miles barefoot in the snow before dawn, just to reach the computer center, drop them off, trudge back all night long to my cabin, then come back the next day only to find that the job hadn't run because I had a bad account code on the first "//" card.