Earlier today I made a comment:
One of these days (when I’m not working on my book or teaching classes) I’ll have to get out the ultrasonic rangefinders again and experiment with them to find out what the problem really is. I think that the problem is that they are just sending a pulse and listening for the echo, and that the echoes are weak from small targets. It would take some sophisticated signal processing to detect and deconvolve the echoes when they are weak, and the cheap sensors just don’t have the capability to do that.
The MaxBotix MB1020 that I have only claims a 1″ resolution, which is probably not good enough for physics labs (they also make sensors for which they claim 1mm resolution). It sends out a 42kHz square-wave burst and provides 3 different ways of interfacing the return value. It has a free-running mode that could interface well with PteroDAQ.
The Ping))) sensor that I have uses a 40kHz square wave (8-cycle burst), but does not report a resolution—I suspect that resolution is limited by the noise in the filter that detects the return pulse, and varies a lot depending on the strength of the return signal. It requires sending a pulse to the sensor to initiate each measurement—something that PteroDAQ doesn’t currently offer (though we’ve thought a bit about how to add that sort of capability to PteroDAQ).
Since it is Sunday today, and I was feeling too fuzzy-headed to do any more work on the book, I decided to use my new microphone pre-amplifier and the Bitscope oscilloscope to look at the pings put out by the Maxbotix MB1020 and Ping))) ultrasonic rangefinders. (Note: I bought both of these 4 years ago, and they may well have changed designs somewhat since then.)
The electret microphone I’m using only has specifications to 20kHz, but it looked like it had slow rolloff, so I figured it would still respond at 40kHz.
The Ping))) sensor datasheet says that it sends out 8 cycles of 40kHz waveform when triggered, so I wrote a little routine to trigger it repeatedly (on an Arduino Duemilanove board, so 5V power). The Maxbotix sensor triggers itself as long as power is supplied, so I powered it off the same board, again at 5V.
With the gain on my mic preamplifier turned all the way up, I got good records of the signals:
The Ping))) sensor can get away with allowing long ringing, because they listen to the echo with a different transducer. I also looked at the signals going to the transmit transceiver, which goes from 3.4V when off to –4.5V for the 8 pulses, then shows the ringing:
The Maxbotix chip has a more complex output waveform:
The Maxbotix sensor is louder, and I was wondering whether they were doing active cancellation to try to stop the ringing—they need to have the ringing stop quickly in order to turn the transducer around and use it as a receiver.
The input pulse to the Maxbotix transducer is more symmetric, a 9.4Vpp signal instead of the 7.9V non-centered signal for the Ping))) sensor.
Clearly they are not doing active cancellation of the ringing. Another possibility just occurred to me—they may be driving a 40kHz resonant transducer at 42kHz, and the complex envelope could be a beat pattern between the driving signal and the natural resonance. But if that were the case, I’d expect the ringing to shift frequency towards the 40kHz resonance, and I’m not seeing that shift, even when I use the Bitscope to zoom in on the later parts of the ringing. Despite not seeing a frequency shift, I think that the beat pattern in the best explanation I have for the waveform envelope. That envelop shaping would also explain why Maxbotix is using 42kHz signal, when 40±1kHz seems to be the standard spec for most cheap ultrasonic transducers.