I've read a lot about ultrasonic ranging (measuring distance with an ultrasonic sensor), but I haven't been able to determine why such methods only work in the ultrasonic range. Why not infrasonic? Or audible range? Since were just dealing with sending out waves and measuring the time it takes to come back, why can't we do this at any frequency?
the maximum possible accuracy of any sound-based imaging scheme depends on the wavelength of the sound relative to the size of the things you wish to detect with it. This is because an object is poorly-coupled to a sound wave if its dimensions are less than the wavelength of the sound. High spatial resolution for imaging or distance measurement hence requires the shortest possible wavelength, so ultrasound is used.
For example, if you want to locate something to an accuracy of 1 centimeter, you need sound waves at least that small, and preferably smaller. This means frequencies of at least 34 kilohertz, or higher.
A first reason is because of distance resolution. Ultrasonic ranging works by sending pulses and listening for the echos. A pulse includes at least one wavelength of the sound, and typically a few, with some damping as a function of time. The shorter the pulses, the more precise the time of flight estimations. With higher frequencies, the pulses are shorter.
Another reason is because of range. Since your usually are using the same transducer to send the pulse and detect the echo, you would want your transducer to stop emitting before you look for the echo. This means that you can determine the range of closer objects only if the frequency is large enough as you need basically all of your pulse to have left the ultrasound transducer before it gets reflected and back to you. Using an emitting and receiving transducer may be difficult at the emitted signal is very strong and a receiving transducer may be blinded easily by this strong signal while it is emitted.
Another factor is lateral resolution. To get a good distance measure, you must have most of your signal coming from a specific distance. Lower frequencies will have longer wavelengths and the wave will be reflected from a laterally larger space, which may not all be at a single distance.
If you want to look for objects that are farther, you can use other frequencies. SONAR works in the audible range.