# Ultrasonic Frequency to distance

Assuming it exists or I can hack one of those together, would it be possible to have the beacon emit multiple frequencies to detect the distance from the base(robot)?

Let me explain better. As the receiver spins in a circle it listens for specific frequencies. Theoretically, the beacon could output 2 frequencies that have different maximum distances.

When the receiver detects the longer range frequency, if it doesn't detect the shorter range one, then the object must be outside the short-range radius.

Ideally, I would like to be able to have multiple radii in 5 foot increments up to 20 feet(ish). The small radii are why I ruled out RF.

So now that my use-case is explained: Do different frequencies have different ranges?

Edit: To clarify Use-case, both the robot and the beacon will be mobile so fixed base stations are not an option.

• Amateur radio has "Fox Hunting" (finding a hidden transmitter). Some use directional antennas, but others use fixed antennas and measure the phase of reception. This may be applicable to your ultrasonic project. Several fixed microphones and one ultrasonic source, should furnish direction and distance. You may find it worth your time researching it. Dec 1, 2013 at 15:34
• Thank you. I ended up clarifying my use-case better on the post I linked to. Basically, The robot and the beacon will be mobile, so fixed base stations are not an option. Others may find your comment useful though. Dec 1, 2013 at 21:26
• Sorry for the confusion from my comment. The ultrasonic source and microphone array would be on the robot. Like a man with two eyes, carrying a flashlight. Dec 1, 2013 at 22:36
• The source and the array would be on the robot? If I understand your original comment right now, you mean the array would be on the robot, while the beacon would be the source. If you look at my linked question, there I am asking more about what I think you are referring to. Dec 2, 2013 at 2:23
• Didn't get this done in-time to edit my previous comment: This question was more to ask how ultrasonic would be able to determine ranges based on signal frequency or amplitude, and PeterJ seems to have done that. I appreciate your input though. Dec 2, 2013 at 2:29

The sensitivity of ultrasonic transducers does vary over frequency. The following example is from a Kobitone 255-400PT16-ROX datasheet. It would also be fair to assume it would fall further outside the normal operating frequencies that are shown below.

However in my opinion using it do determine distance isn't likely to be a good solution. When operating outside normal ranges you may find differences in performance between parts but for experimental / hobbyist purposes I see no harm in trying it as a simple solution.

Another way you could go about it is to change the amplitude of the signal at the ultrasonic emitter end and encode it with a digital signal that indicates the transmission level used. That does get quite a bit more complex though. If you wanted to take a look at going that way perhaps the VirtualWire project would be worth a look at for encoding and decoding the digital signal.

• The varying amplitude sounds like a good idea. Can the receiver tell the amplitude simply from the signal? I'm guessing not. Otherwise, encoding the signal wouldn't be necessary. Just want to make sure :) Dec 1, 2013 at 4:07
• @cMFG, a receiver could be made that would tell the received strength, but without the digital signal you wouldn't know the difference between it being transmitted at a lower level versus it being further away. Another probably simpler way is just to wait until you stop receiving a signal at all, so the last known minimum frequency / data received depending on the way you go will give you an idea of the distance. Dec 1, 2013 at 4:14

I just answered a seemingly unrelated question here:what is the best method for device location services, that I think may be relevant.

If I understand your question correctly, you want proximity sensors to measure the distance between a robot and a reciever. You may want to reconsider RF, since systems based off of it can be fairly accurate. The project site is here:

http://www.ns-tech.co.uk/blog/2010/02/active-rfid-tracking-system/

You might be able to modify the code to work to your purposes. Maybe setting it look for the measured amplitude of the signal and calulating the distance from that. I would build in some way of calibrating the whole thing. This could probably be scaled up to great size and accuracy if you used multiple recievers. Also, using a triangulation based approach may be useful. I'm not sure if this will be acurate enough, but it might be somewhere to start.

Also, you could consider a machine vision based approach. You might be able to rig a Kinect to recognize your robot if you put a distinct marker on it. Then, you could just program it to measure the distance to the marker. Then you would have to find a way to transmit the distance information to the robot over the air. Only downside would be limited range (approx 11 feet). Microsoft released a computer version, and there are lots of online resources for it:

http://www.dashhacks.com/kinect.html

Conversly, you could put the kinect on the robot and have the robot measure the distance to the marker. In this scenario, instead of having a beacon in your pocket, the Kinect's computer vision would recognize your body and you would be the 'beacon'. This way, you wouldn't have to transmit any information to the robot over the air. Only downside is that the robot would have to have some pretty sophisticated processing on board. Theoretically, you could put the kinect on the robot, have the robot transmit the raw kinect data to a remote computer for processing, and then transmit location data back to the robot, thus avoiding having to put major processing power in the robot.

I hope I've given you a few good ideas for alternatives and I wish you luck.