Detecting and Processing 40kHz Ultrasonic Data


I’m looking for a microphone capable of sampling 100kHz frequencies so that it can accurately process 40kHz, but I haven’t found anything compatible with Arduino so far. I’m fairly new to Arduino however, so I was wondering if perhaps I am just missing something. One of my main points of confusion is that when a microphone says it’s capable of reading 40kHz, does it mean sampling or processing?

Any advice would be appreciated!

What are you trying to do?
This is not hobby microcontroller territory.

Microphones themselves don’t generally “sample” - that’s done by additional hardware.

I disagree, this absolutely is hobby microcontroller territory, go checkout the bat detector
projects around the Teensy for instance.

I2S MEMS microphones are the obvious "sampling" microphone - although I'm not sure if any
support 96kSPS (standard sampling rates for I2S are 48k, 96k, 192k)

Ultrasonic response of microphones isn't well documented, I'd again refer to people making
bat detectors for this kind of knowledge - from what I glean the right choice of electret mic
will give usual response for bats (note that high sensitivity isn't needed for bats, they are
extremely loud ultrasound emitters)

An ultrasonic transducer, like the type used on the HC-SR04 ultrasonic ranging module, works fine as a microphone.

The frequency response is limited, and peaks at around the design frequency, typically 40 kHz.

I'm trying to gather some data for a work project, which involves analyzing and recording ultrasonic frequency data at 40kHz so that the frequency distribution can be tracked. The way it was explained to me was that double the frequency at a bare minimum is required to do so, and that some extra leeway is desired for more precise measurement. I wish I could clarify more but embarrassingly enough I'm trying to understand it myself right now.

One point of clarification that would be nice though is that do I need a microphone that can detect up to double my desired frequency? Or do I just need my sampling rate to be double?

If you want to capture 40 KHz data, you need a mic that will capture at 40 KHz, and an ADC that can sample at 80KHz minimum, and 400KHz ideally for 10x sample rate.

Could you start with the mic and an oscilloscope instead?

The microphone only needs to cover the frequency range you wish to record. The digital sampling rate needs to be twice the bandwidth of the signal being sampled which means at least twice the highest frequency of interest for a baseband signal, that is a signal that goes from zero to the highest frequency component in the signal. Thus if you want to capture a nominal 40 kHz signal with 10 kHz bandwidth, your highest frequency would be 45 kHz so you 'd need a microphone that went to at least 45 kHz and a sample rate of at least 90 k samples/second.

Can you tell us more about the source of the "ultrasonic frequency data at 40 kHz and what sort of bandwidth you might expect?

If the signal is strongly band-limited around 40kHz you can always mix it down to audio frequency
with for instance a SA612 or Tayloe mixer and a suitable local oscillator frequency (from an Arduino
PWM pin perhaps?)

If the signal is strongly band-limited around 40kHz you can always mix it down to audio frequency
with for instance a SA612 or Tayloe mixer and a suitable local oscillator frequency (from an Arduino
PWM pin perhaps?)

At the risk of further confusing the original poster, if the signal is inherently band-limited (or a band pass filter is employed prior to the digitizer to make it so), bandpass sampling can be employed to effectively down shift the signal without an analog mixer. That is, for a bandpass signal, one can intentionally alias it in useful ways.

The bigger point is that one is unlikely to find an Arduino-ready plug and play microphone that has flat response to/beyond 40 kHz*. What I found in a quick look at datasheets was microphone elements that had useful response up to perhaps 100 kHz, but which had higher response at normal audio frequencies. This implies that executing the project probably involves picking such a microphone element and design/build of analog bandpass filtering and amplification to condition the signal for an ADC. Specifying the bandpass filter gets back to the question of what exactly are the expected features of the source signal to be captured.

I got some clarification and I think they actually only need a microphone capable of picking up frequencies up to 50kHz but require a sampling rate of 100kHz, but as was pointed out, most microphones I can find (and also the ultrasonic sensor) all seem to peak in effectiveness at around 40kHz. What exactly is affected as frequencies exceed that range though? Does the microphone just become less sensitive to them? Or are there other issues (e.g. random noise).

Does the microphone just become less sensitive to them?

Yes. Good microphones that cover ultrasonic frequencies are very expensive. Look for "bat detector microphones".

The electrostatic transducer used in the old Polaroid ultrasonic focusing cameras has a relatively flat response to over 100 kHz, but requires a 300V bias supply. You can salvage them from cameras bought on eBay, or buy them from Senscomp

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.