This is a very cool demo. There are a couple of ways to improve this technique, improve accuracy, reduce power, and improve noise rejection.
The biggest wins are in improving the waveform from this one (called "continuous wave" or CW in the radar/sonar literature) to one with more bandwidth. One option is to sweep the frequency continuously (FMCW) or with breaks. Another option is to switch from this continuous noise to pulses of noise, just turning the sound on and off. Pulsing like this increases bandwidth (because the "turning on and off" introduces higher-bandwidth edges) very simply. Modulating the frequency during the pulse helps more, creating a wolf-whistle like "chirp".
Doing the signal processing for these alternative waveforms is a little bit trickier than the technique this page uses. It can be done in the time domain with correlation, or in the frequency domain with the the FFT and simple multiplication.
"Another option is to switch from this continuous noise to pulses of noise, just turning the sound on and off"
You can get ranging information if you use a generating polynomial to spread the transmitted signal into noise and then change it rather often and correlate past transmitted data with whats received. This probably makes a lot more sense if you already understand what I'm talking about. By example:
Your generating polynomial for psuedorandom noise says 2,42,9,73,1
You transmit 20000+2 Hz 20000+42 Hz you get the idea.
So you transmitted a 2, 42, 9, 73, 1 signal. OK.
Now reflecting back are multiple faint signals saying 2, 42, 9, 73, 1 at different delays shifted in time because the objects are different distance away...
Why this helps is you only get one range data point when you send a beep or a CW signal, but now you get a discrete range data point every time your generating polynomial switches freq, which is probably pretty often.
Also its basically unjam able unless the thing trying to jam you happens to know your generating polynomial. Of course you can use something cryptographically more advanced as a random number generator. We are now entering deep (classified?) radar and ECM and EECM stuff. This rabbit hole goes down quite a bit further of course. Cool eh?
If you're willing to sit on a desk chair and be pushed around with your laptop at a constant speed, maybe you could make a synthetic aperture sonar. Maybe. That would be impressive.
> We are now entering deep (classified?) radar and ECM and EECM stuff.
I doubt that this particular technique is classified, it is fairly well known and dates back to the early days of EW. One interesting angle is that the basic technique (frequency hopping) was invented by a famous actress and a composer (http://en.wikipedia.org/wiki/Hedy_Lamarr#Frequency-hopping_s...).
Its a little tricky since producing a sine wave at high frequency on an arduino without extra hardware is hard. Likewise adjusting it finely is also hard. Also if you have a sensor and not a plain transducer, you can't change its programming.
Also, piezoelectric transducers can have a somewhat limited frequency range.
I've actually been looking into making some high quality sonar equipment from scratch, but getting good datasheets on ultrasonic transducers has been a royal pain in the butt.
The biggest wins are in improving the waveform from this one (called "continuous wave" or CW in the radar/sonar literature) to one with more bandwidth. One option is to sweep the frequency continuously (FMCW) or with breaks. Another option is to switch from this continuous noise to pulses of noise, just turning the sound on and off. Pulsing like this increases bandwidth (because the "turning on and off" introduces higher-bandwidth edges) very simply. Modulating the frequency during the pulse helps more, creating a wolf-whistle like "chirp".
Doing the signal processing for these alternative waveforms is a little bit trickier than the technique this page uses. It can be done in the time domain with correlation, or in the frequency domain with the the FFT and simple multiplication.