0
\$\begingroup\$

I am trying to play a sound when two devices are more than a certain distance apart, say 30ft.

Some notes:

  • The device this is for is very small, about the size of a large keychain
  • I would like a wireless solution
  • There may or may not be a line of sight between the two devices, e.g. they could be in a different room in a house
  • As far as error tolerance, this distance does not have to be exact, say 30ft +/- 10ft even

I am a programmer and am very green with hardware, so I am hoping to be pointed in the right direction. Thanks very much in advance!

\$\endgroup\$
  • \$\begingroup\$ The lowest tech solution is: Tie a 30-ft. string to the devices, when they are more than 30 feet apart, the string opens or closes a switch. If you'd like something a little more specific, you should mention what characteristics your devices have, budget, power source, etc. \$\endgroup\$ – JYelton Sep 13 '13 at 21:05
  • \$\begingroup\$ What error tolerance do you need? (e.g. 30ft +/- 5ft or ...) Is there line of sight between the two devices? Do they (or should they) stay in the same room? (assuming they are indoors) \$\endgroup\$ – Oli Glaser Sep 13 '13 at 21:36
  • \$\begingroup\$ Updating now, sorry for the lack of clarity. I did not even realize such factors came into play! \$\endgroup\$ – bitpshr Sep 13 '13 at 22:00
  • \$\begingroup\$ You might as well dismiss point one about wanting a low tech solution - if you want radio it will not be a low tech solution - hey it needn't be complex but low-tech and radio distance measurement don't sit on the same bench. \$\endgroup\$ – Andy aka Sep 13 '13 at 22:40
  • \$\begingroup\$ Scratch the low-tech then :) removed... \$\endgroup\$ – bitpshr Sep 13 '13 at 22:54
2
\$\begingroup\$

Bluetooth Low Energy is probably the best solution for you, because proximity is one of the intended applications and there is even a proximity profile. Unless you want custom hardware, a nice Kit that can help you get started is TI's Sensor Tag

You can read about the proximity profile in the Bluetooth Website

TI even states proximity to be an application and they might support what you want with a little software.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Good info, will definitely check it out. \$\endgroup\$ – bitpshr Sep 15 '13 at 0:21
1
\$\begingroup\$

If your devices maintained line of sight, you could use an ultrasonic transducer, or a speaker/microphone combination, or possibly an LED and a phototransistor. Acoustic solutions allow less precise alignment, whereas optics allow more precision.

An ultrasonic transducer measures the time that a sound pulse is reflected back, which would give decent accuracy but require some sort of surface on one device from which sound reflected. This probably would not work well with a device you intend to keep very small.

Having one device emit sound pulses and the other detect it could work better, measuring the relative strength of the sound pulse received would indicate how far apart the devices are. But once you introduce obstacles and rooms of a house, not to mention surfaces which reflect or absorb sound, this method is no good.

You could use a radio transmitter and receiver, which would be less susceptible to line of sight issues, but radio frequencies are subject to a lot of attenuation from different types of material. Your accuracy could be affected by more than 10 feet depending on what type of wall(s) and objects are between the devices. Take a pair of cheap walkie-talkies and you'll see what I mean. The signal may be strong at some distance outdoors, but in the house you might find the range severely reduced. Tuning the transmitter/receiver for the desired range detection could prove difficult as well, if you're not familiar with using RF components in your devices.

There are other sensors for proximity detection, that use magnetic fields for example, but they (to my knowledge) are not designed for the ~30 foot range you need.

Without knowing more about the project, it's hard to provide a good suggestion.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.