Gas station without pumps

2015 September 6

Ultrasonic rangefinder pings

Filed under: Uncategorized — gasstationwithoutpumps @ 23:00
Tags: , , ,

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 seems to do 8 pulses as claimed (though it may be 9), and then lets the transducer ring for a long time.

The Ping))) sensor seems to do 8 pulses as claimed (though it may be 9), and then lets the transducer ring for a long time.

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 initial part of the waveform is the driving signal—the ringing afterwards is from the transducer, not from the op amp.

The initial part of the waveform is the driving signal—the ringing afterwards is from the transducer, not from the op amp.

 

The Maxbotix chip has a more complex output waveform:

The Maxbotix pulse is at 42kHz as claimed, but the envelope is rather complicated.

The Maxbotix pulse is at 42kHz as claimed, but the envelope is rather complicated.

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.

The Macbotix sensor has 13 cycles of excitation, and the sensor does not seem to exhibit much ringing afterwards electronically (though it certainly did when listening with the mic).

The Macbotix sensor has 13 cycles of excitation, and the sensor does not seem to exhibit much ringing afterwards electronically (though it certainly did when listening with the mic).

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.

2 Comments »

  1. Would it be possible to not use a seperate microphone but instead just measure from the recieving transducer (on the ping sensor) from its on board op-amp?

    Comment by Dimas — 2016 February 4 @ 16:19 | Reply

    • Yes, I could probably tap into the Ping))) sensor, and I think that’s a good idea.

      But I’ve been using the Maxbotix sensor, which uses the same transducer for transmitting and receiving. I wanted to use a non-resonant microphone, so that I could see what the signal really looked like, without the ringing added by a resonant receiver. I might take a look at the resonant receiver using the Ping))), comparing it to the microphone signal, but that will have to wait.

      I just discovered this week that PteroDAQ is not working with Mac OS 10.11, and I need to fix that before I get to play more with ultrasonics.

      Comment by gasstationwithoutpumps — 2016 February 4 @ 16:33 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: