Page 1 of 3

Ultrasonic Recording

Posted: Mon Apr 05, 2021 1:18 pm
by mglynch
I want to make a DIY ultrasonic bat recorder using the Knowles FG 23329 microphone. I have been using commercial "bat detectors" to record ultrasonic bat and insect calls. I have almost zero knowledge of what is involved in my project, but I would like to use my computer to record at 384k sample rate, using Audacity and MATLAB, and to use a TASCAM DR 100 MKIII to record at 192k sample rate.

I think what I need to do is find a suitable housing for the microphone, attach a suitable interface (ie XLR for Tascam and Microphone Jack for the computer), and provide phantom power for the mic? Is this sufficient, or is there more involved here in processing the signal before feeding it to the computer or digital recorder? Is the phantom power from the Tascam suitable for this?

Re: Ultrasonic Recording

Posted: Mon Apr 05, 2021 1:51 pm
by DVDdoug
Knowles FG 23329
The specs I found say it goes to 10kHz (100Hz to 10kHz). It also runs from about 1.5V (1.3 to 3V). Standard phantom power for studio condenser mics is 48V. Electret condenser "computer microphones" run from 5V supplied from the soundcard in series with the signal (not phantom). Usually, these things are called "microphone elements" since they need power and are not ready to plug-in and use by a consumer. (It might actually work directly into a sound card with 5V, but you might also kill it and your soundcard/laptop probably doesn't go into the ultrasonic range.)

48V can be regulated-down or you could use a battery. Do you know any electronics?
but I would like to use my computer to record at 384k sample rate, using Audacity and MATLAB, and to use a TASCAM DR 100 MKIII to record at 192k sample rate.
Upsampling doesn't gain anything and upsampling in real-time means more processing and more data and a higher chance of glitches/dropouts.

A sample rate of 192kHz guarantees that you can't record signals above 96kHz, but since these are audio devices there is no guarantee that they can record much above the audio range of about 20kHz? Have you confirmed the frequency range of the TASCAM?



P.S.
I trust TASCAM if they say it works at sample rates up to 192kHz but you can't always trust what the manufacturers say because the drivers can re-sample whenever necessary and you never know what the hardware & drivers are doing. The manufacturer can claim recording capability up to 384kHz even though the actual analog-to-digital conversion is happening at 44.1 or 48 kHz....

Re: Ultrasonic Recording

Posted: Mon Apr 05, 2021 2:13 pm
by steve
There's some relevant information about "Ultrasonic Applications for Knowles Electret and MEMS Microphones" here:
https://www.digikey.co.uk/en/ptm/k/know ... _id=810838

Re: Ultrasonic Recording

Posted: Mon Apr 05, 2021 2:24 pm
by mglynch
I will not actually be "upsampling", I will be recording at the data rate that I will use for analyzing the signal. The Knowles FG series microphones are used in ultrasonic applications and have a published frequency response up to 100k and even higher, so I am not worried about the frequency response/frequency range of the microphone. https://www.digikey.com/en/pdf/k/knowle ... icrophones

I do not have any electronics experience, so I will need to get commercially available equipment to power the mic. I'm sure there is something out there, but I have no idea what at this point. I am trying to minimize my learning electronics and concentrate on signal analysis, but at the same time I don't want to spend $600 or $1000 on a microphone. Any ideas on how I can get a decent inexpensive interface that will power the mic and pass the audio through to the computer or recorder?

Re: Ultrasonic Recording

Posted: Mon Apr 05, 2021 2:38 pm
by steve
mglynch wrote:
Mon Apr 05, 2021 2:24 pm
Any ideas on how I can get a decent inexpensive interface that will power the mic and pass the audio through to the computer or recorder?
You may be able to get help here: https://forum.pjrc.com/threads/38988-Bat-detector/

Re: Ultrasonic Recording

Posted: Mon Apr 05, 2021 3:42 pm
by DVDdoug
I will not actually be "upsampling", I will be recording at the data rate that I will use for analyzing the signal.
If the hardware is running at 192kHz but you are "recording at 384kHz", that's upsampling. ;) If you want to upsample it's better to do it after recording because then speed/timing are not a factor. You can change the Audacity Project Rate before exporting or MATLAB can probably do it.
I do not have any electronics experience, so I will need to get commercially available equipment to power the mic.
I'd recommend a battery unless battery life is a problem. A battery makes a good low-noise power source and it's cheap (if you don't have to replace it too often). There a few electret "stage" microphones that run from a battery.

Your datasheet shows shows 10V operation with some added resistors and a capacitor. That should also work with a standard 9V battery but I'd try a 1.5V battery without that other circuitry first.

The interface has a balanced connection but your mic has an unbalanced output. The mic ground has go to one of the signal-inputs on the XLR connector. You might want to look-up how to adapt balanced & unbalanced connections.

You might need some additional amplification beyond whatever gain the interface has. The microphone is less sensitivity at high frequencies and it's probably at a greater distance than a typical audio studio-recording situation. But I don't know... Maybe the acoustic signals are stronger than I think...

Re: Ultrasonic Recording

Posted: Mon Apr 05, 2021 5:05 pm
by kozikowski
You're designing a microphone.

Knowles FG 23329 microphone

I don't know that there is a pre-baked interface for the three bare wires and ground braid this microphone has.

Screen Shot 2021-04-05 at 9.59.47 AM.png
Screen Shot 2021-04-05 at 9.59.47 AM.png (30.86 KiB) Viewed 236 times

You don't plug it into anything. You're expected to solder those wires to a circuit board or electronics module, keeping in mind that the signal is super quiet at that point. The electronics inside the FG are there to shove the sound signal down the cable, they don't amplify anything.

I don't doubt the FG will work at very high frequencies. Most microphones will run outside of their published specifications. But they may not work reliably with good stability and quality. Some microphones push their distortion and noise up there secure in the knowledge that nobody would ever try to record ultrasonic signals.

There is a down-to-earth practical consideration with microphone design. How will you know when you get it working? Do you have a calibrated test bat?

Koz

Re: Ultrasonic Recording

Posted: Mon Apr 05, 2021 7:07 pm
by mglynch
kozikowski wrote:
Mon Apr 05, 2021 5:05 pm
You're designing a microphone.

Knowles FG 23329 microphone

I don't know that there is a pre-baked interface for the three bare wires and ground braid this microphone has.
Screen Shot 2021-04-05 at 9.59.47 AM.png
You don't plug it into anything. You're expected to solder those wires to a circuit board or electronics module, keeping in mind that the signal is super quiet at that point. The electronics inside the FG are there to shove the sound signal down the cable, they don't amplify anything.
I don't doubt the FG will work at very high frequencies. Most microphones will run outside of their published specifications. But they may not work reliably with good stability and quality. Some microphones push their distortion and noise up there secure in the knowledge that nobody would ever try to record ultrasonic signals.
There is a down-to-earth practical consideration with microphone design. How will you know when you get it working? Do you have a calibrated test bat?
Koz
I am trying to design a microphone, true.

I am not looking for a pre-baked interface for the existing 3 wires + ground, although that would be ideal. I am hoping that the line-in is sufficient, w/o a pre-amp, for recording and for computer analysis. That is one part of my question. If I put an XLR connector or Headphone jack directly on the microphone audio line, will this be sufficient input for the computer sound card (monitoring and recording in Audacity and/or MATLAB) or the TASCAM recorder? I am not listening to the output, obviously, because it is ultrasound, but will put it through MATLAB as digital data vectors for analysis.

I am not concerned with whether this microphone will work as an ultrasound microphone, I already have the answer to that, from the manufacturer and from several commercial ultrasound mics that use the Knowles FG electret microphone, so just not an issue. I have a means for testing/calibration, I can worry about that after I have a microphone. But even without testing, I can tell from the data. I do this already with commercially available ultrasound mics from Wildlife Acoustics and Pettersson Elektronik.

Thank you for your input.

Re: Ultrasonic Recording

Posted: Mon Apr 05, 2021 8:01 pm
by mglynch
DVDdoug wrote:
Mon Apr 05, 2021 3:42 pm
I will not actually be "upsampling", I will be recording at the data rate that I will use for analyzing the signal.
If the hardware is running at 192kHz but you are "recording at 384kHz", that's upsampling. ;) If you want to upsample it's better to do it after recording because then speed/timing are not a factor. You can change the Audacity Project Rate before exporting or MATLAB can probably do it.
I do not have any electronics experience, so I will need to get commercially available equipment to power the mic.
I'd recommend a battery unless battery life is a problem. A battery makes a good low-noise power source and it's cheap (if you don't have to replace it too often). There a few electret "stage" microphones that run from a battery.

Your datasheet shows shows 10V operation with some added resistors and a capacitor. That should also work with a standard 9V battery but I'd try a 1.5V battery without that other circuitry first.

The interface has a balanced connection but your mic has an unbalanced output. The mic ground has go to one of the signal-inputs on the XLR connector. You might want to look-up how to adapt balanced & unbalanced connections.

You might need some additional amplification beyond whatever gain the interface has. The microphone is less sensitivity at high frequencies and it's probably at a greater distance than a typical audio studio-recording situation. But I don't know... Maybe the acoustic signals are stronger than I think...
I guess I should qualify my lack of electronics knowledge. I have a Masters in Electrical Engineering, with a concentration in Digital Communications and Digital Signal Processing. I have very little hardware background/experience, but I have a pretty good understanding of the signal processing end of things. My computer sound card is capable of running at 384kHz (according to the manufacturer), so the recording will not be upsampled. The Tascam samples at 192kHz, and the recording from this will also not be upsampled, it will be analyzed at the 192k rate.

The 1.5V battery solution sounds promising. Thanks. I think I can figure out how to do that.

The "unbalanced out" to "balanced in" is something I will definitely have to research. Thank you for pointing that out.

As for amplification, maybe it is best just to try it first and see. Then if/when it doesn't work I will go back to the drawing board.

Thank you for your input. Very helpful!

Re: Ultrasonic Recording

Posted: Mon Apr 05, 2021 8:13 pm
by mglynch
steve wrote:
Mon Apr 05, 2021 2:13 pm
There's some relevant information about "Ultrasonic Applications for Knowles Electret and MEMS Microphones" here:
https://www.digikey.co.uk/en/ptm/k/know ... _id=810838
Thanks