Gas station without pumps

2016 February 17

Ultrasonic rangefinder with loudspeaker

Filed under: Data acquisition,freshman design seminar — gasstationwithoutpumps @ 23:29
Tags: , ,

Continuing the series Ultrasonic rangefinder project , More testing for ultrasonic rangefinderUltrasonic rangefinders arrived, and Ultrasonic rangefinder without amplifier, I tried today to look at creating pings with a non-resonant transmitter: a cheap, mid-range 8Ω loudspeaker that I’d used for the applied electronics class.  It was a buyout special from Parts Express, and so is no longer available.  There is an analysis of this speaker (or another one like it) in Better model for loudspeaker.

I was curious whether I’d be able to get it to produce sound at 40kHz, so I hooked it up to a pair of output pins of the Teensy 3.1 and used the microphone and preamplifier to listen to it with the Teensy, as in Ultrasonic rangefinders arrived.  The results were disappointing (as I expected).  The loudspeaker made an audible click, but the waveform showed no evidence of 40kHz signal, even with 10 cycles of excitation. I got echos, but they were of the click rather than of a ping, and were essentially independent of how many cycles of excitation I provided.

I then tested the loudspeaker and microphone combination with my FG085 function generator, and saw that the amplitude of the response varied enormously with frequency (and that some of the largest responses were ones I couldn’t hear—my deafness does not seem to be uniform in the higher frequencies).  There are zeroes around 21750Hz and 28500Hz, and no signal above 31750Hz.  The microphone and preamp were still working at 40kHz, so the problem is with the loudspeaker, not the mic or preamp.

I should probably get a cheap little speaker that is rated to 20kHz, and see whether it can actually go to 40kHz.  Digikey has some $1 and $2 speakers that look suitable, except that they seem to be designed to be pressed against a PC board with a spring, which might make them hard to connect to a breadboard.  For about $3, I could get one with pins, but the high-frequency response seems not as good.

I could also try making a pinger at 20kHz, instead of 40kHz, and see whether I can get decent pulse shapes with the existing speaker.

I managed to get a 20kHz ping recorded from the loudspeaker, but I had trouble getting a clean ping, as there was always echo off the floor, my hand, or the tabletop (whatever was supporting the loudspeaker) producing another burst very soon after the first one, interfering with it. I tried separating the mic and loudspeaker to record the direct wave (without much echo), but that was still unclean. I think I need to have a good baffle to make a clean pulse, and a directional mike would be better than the omnidirectional one I currently have.

Here is a sample recording with the loudspeaker putting out 5 cycles (10 half cycles) at 20kHz and a bounce off the bottom of my table.  The messiness of the return echo is partly interference from bounces off the floor behind the mic and speaker, and partly the unevenness of the bottom surface of the table (which is made of aluminum slats).

The burst begins almost exactly when I would expect it to, but it is not as clean as I would like to see.

The burst begins almost exactly when I would expect it to, but it is not as clean as I would like to see.

I think that with non-resonant transducers I could get cleaner deconvolution of the echoes, but first I have to find a way to reduce the multi-path problem (perhaps with a directional mike and a baffled speaker?).

3 Comments »

  1. […] rangefinder, Ultrasonic rangefinders arrived, Ultrasonic rangefinder without amplifier, and Ultrasonic rangefinder with loudspeaker I tried measuring the (magnitude of) impedance of the transmitter in the same way that I measured […]

    Pingback by Ultrasonic transmitter impedance | Gas station without pumps — 2016 March 13 @ 13:00 | Reply

  2. […] In Ultrasonic rangefinder with loudspeaker, I suggested that non-resonant transducers should be able to “get cleaner deconvolution of the echoes” and last week I wrote a program to try to design a ping that would do that. […]

    Pingback by Ultrasonic transmitter pulse shaping | Gas station without pumps — 2016 March 13 @ 18:46 | Reply

  3. […] without amplifier, I tried seeing if we could use the transducers without an amplifier. In Ultrasonic rangefinder with loudspeaker, I tried using a midrange loudspeaker to generate the pings (but was limited to about […]

    Pingback by Ultrasonic rangefinder tests with tiny loudspeaker | Gas station without pumps — 2016 August 18 @ 23:31 | 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

Create a free website or blog at WordPress.com.

%d bloggers like this: