Omnidirectional Proximity Sensor - Page 1
Forum section: electronics / projects

author: resistor
author_rank: Regular Contributor
timestamp: November 01, 2014, 08:11:56 am
content: Hi folks,I'm looking for ideas on how to implement a concept I have that requires two devices to light up when they come within (approximately) 5 feet of each other. The precise range is not very important, nor is perfect symmetry of the detection radius. Approximate range measurement would be useful, but not required. So far the ideas I'm come up with are:1) Each unit periodically transmits a uniquely coded ultrasonic ping. They both listen for the other's ping, and turn on if they're heard it recently. Range measurement can be by measuring the power of the chirp?2) Similar thing, but using RF to transmit a low-power sine wave on two unlicensed bands.How implementable do you believe these ideas are, and are there other ideas that I should consider as well?

author: tggzzz
author_rank: Super Contributor
timestamp: November 01, 2014, 08:56:25 am
content: Quote from: resistor on November 01, 2014, 08:11:56 amYou would have to consider how multipath echoes and obstacles might affect the system. Choosing an appropriate code will help, but it won't be a panacea any more than it is with RF systems.I am skeptical that power is a good analogue of distance, but it might be sufficient for your purposes. The environment will be critical, e.g. in the middle of a field would be more reliable.I would have thought time-of flight is likely to be better, and since the speed of sound is much less than the speed of light, it could be practical at short range.I don't know whether you will be able to use the same codes as RF systems, since the physics of the wave propagation is different. Research would be needed!QuoteThe traditional way is an FM modulated sine wave - keyword FMCW radar. The range discrimination depends on the chirp.Also have a look at ultra-wide band (UWB) radar.Maybe emitting a light pulse, having retro-reflectors on the other device, and measuring the time-of flight might work. The time differences would be small, but time-to-digital converter ICs can work with very short time intervals.There are products around that detect when two components are separated from each other, and then emit a warning. Classic use-case is detecting when a child has wandered off. If you can understand the limitations and how the operate, then you might be able to gain some useful knowledge. But I suspect there will be significant differences between 100ft and 5ft.If you have two antennas driven from the same amplifier on one object, then the other object might be able to distinguish the phase difference between reception from each. That would give an elliptical range indication.

author: fcb
author_rank: Super Contributor
timestamp: November 01, 2014, 10:56:37 am
content: None of your ideas will work very well, due to factors mentioned by tggzzz. Although with some fairly major modification, the ultrasonic can be made to work. Here goes:Time of flight.Have each unit send out a pulse train (8cycles? @40KHz at a vaguely random interval say every 250 to 1000ms. Go 'deaf' to avoid hearing the return echo. When a pulse is detected (from another unit), wait a predetermined time (say 50ms) and send a reply of your own, repeat until bored etc..By measuring the time between sending your own pulse and receiving reply (minus 50ms) will give you the time of flight; hence distance. And as the return signal will reduce dramatically at larger distances, you won't have a problem with distant echoes.I'd acquire a couple of SR04 modules, find the schematic and go play.

author: resistor
author_rank: Regular Contributor
timestamp: November 01, 2014, 06:48:54 pm
content: Thanks for the pointers and suggestions!To clarify the use case a bit further, this is for a performance art display. Each of the performers will be wearing costumes equipped with multicolor LEDs, and the goal is for the LEDs to change color as the performers come closer together/move away.The takeaways I have from that are that:- The sensing needs to be omnidirectional.- Perfect symmetry of the sensing bands is not important, nor is high precision.- Ranging information is desirable, but not required since I could simply use a couple of non-ranging systems tuned to different ranges to achieve the same thing.- Needs to small enough to attach to a costume.It sounds like the ultrasonic time-of-flight might be my best bet?

author: tggzzz
author_rank: Super Contributor
timestamp: November 01, 2014, 07:41:43 pm
content: Ah, so you don't actually need to know the distance at all - all you need to know is nearer/further. That simplifies things considerably.Have an observer who visually determines how far apart they are and manually controls the LED colour/intensity via a radio link to the LEDs on each performer. Simple to implement and more flexible: the observer could change colour or intensity or flashing period based on the emotional content of the performance.I'm irked that I didn't bother to ask why you wanted to do this; I normally do.