Bat detector

Hi Seriesman,

the impedance matching of a transistor amplifier is quite complicated.
It looks like this link has some nice information on impedance calculation.
Maybe the transistor amplifier can be matched even better, maybe someone else can help with that.....

I did not do anything to match impedance on the transistor amplifier.
I got rid of moist noise by adding a small cone on the microphone. I worked with a shorter shallow 90 degree cone but found the 20-25 degree cone to be working even better.

I tried to add a short clip to youtube.
https://youtu.be/nAkEEwFL3rs

when I talked about impedance matiching and resistors I ment in the Opamp amplifier.
The impedance of a opamp is usually very high, this seemed to result in an extra high 23Khz spike. As far as I can see most microphone amplifiers with opamp IC's do not match their impedances. In the bat detector with opamp I chose a resistor that comes close to the microphone impedance to connect to 1/2 V+

Edwin
 
Hi Seriesman,

the impedance matching of a transistor amplifier is quite complicated.
It looks like this link has some nice information on impedance calculation.
Maybe the transistor amplifier can be matched even better, maybe someone else can help with that.....

I did not do anything to match impedance on the transistor amplifier.
I got rid of moist noise by adding a small cone on the microphone. I worked with a shorter shallow 90 degree cone but found the 20-25 degree cone to be working even better.

I tried to add a short clip to youtube.
https://youtu.be/nAkEEwFL3rs

when I talked about impedance matiching and resistors I ment in the Opamp amplifier.
The impedance of a opamp is usually very high, this seemed to result in an extra high 23Khz spike. As far as I can see most microphone amplifiers with opamp IC's do not match their impedances. In the bat detector with opamp I chose a resistor that comes close to the microphone impedance to connect to 1/2 V+

Edwin

Hi
Thanks for that. I am not any sort of expert on analogue electronics so impedance matching is something I don't know anything about. I obviously misunderstood that you can improve impedance matching by simply changing a resistor. I have used a machined nylon bolt as the microphone input and I will experiment with a different angle as you suggest. Thanks for the help
 
I just seem to have lost a lot of noise here.....


I am using the V0.2 board with opamp amplifier and a SPU microphone on this one.
I noticed the display update noise could be heared stronger than on the transistor amplifier.

I wanted to have some resistors in the display datalines, as close as i could get them to the Teensy.

These are my new headers....

nonoiseheader.jpg

I used small 1/8 watt 100 ohm resistors on each and every data line, to the display, but also the audioboard, encoders and buttons.
All GND, 5V, 3v3 lines are connected with standard header pins.

Maybe just the display datalines would have been enough but I just wondered if everyting would still work fine with 100 ohm in every dataline.

The display update noise could also be seen on the waterfall display and was best heared in spectrum mode.
Since the display is not updated during recording there was not a big impact on the recording but I think also that looks better.

This is a recording I just made......

nonoise.jpg

Edwin
 
I just seem to have lost a lot of noise here.....


I am using the V0.2 board with opamp amplifier and a SPU microphone on this one.
I noticed the display update noise could be heared stronger than on the transistor amplifier.

I wanted to have some resistors in the display datalines, as close as i could get them to the Teensy.

These are my new headers....

View attachment 17130

I used small 1/8 watt 100 ohm resistors on each and every data line, to the display, but also the audioboard, encoders and buttons.
All GND, 5V, 3v3 lines are connected with standard header pins.

Maybe just the display datalines would have been enough but I just wondered if everyting would still work fine with 100 ohm in every dataline.

The display update noise could also be seen on the waterfall display and was best heared in spectrum mode.
Since the display is not updated during recording there was not a big impact on the recording but I think also that looks better.

This is a recording I just made......

View attachment 17129

Edwin

Hi Edwin

Thats a special setup ;) The lines are indeed very clean, just a hint of the normal noisy lines.

Cor
 
v093: minor changes

Hi,

V093 (available on github) is a minor update, there were problems with setting the sample_rate in the previous version(s) now setting the sample_rate from both the left or rightside encoder should be working properly again.

As a first step in adding a battery-indicator (for those using batteries this might be important) the software now shows at startup the system-voltage.

Cor
 
Hi Edwin

Thats a special setup ;) The lines are indeed very clean, just a hint of the normal noisy lines.

Cor
Hi The build with resistors in data lines looks intriguing. The noise improvement is definite. I am collecting components for a second op amp based build to compare it with my original 1 transistor model so I think I will try that. Very little extra work for what looks like a worthwhile gain.
 
This is starting to become obsessive....

disturbing.jpg

Dangerous stuff this kind of hobby.

I have been out to capture some bat calls and try different cones on my microphone.

As far as I can tell there is much less 23KHz signal to be found when the opamp is used in stead of the transistior amplifier. The long cone that helped to suppress the big signals does not seem to be needed on the opamp.

To create a seal between the microphone and housing I used a nylon bolt with a holle drilled tru and a thin piece of rubber (ring punched out of a bicycle inner tube)

I found a cylindrical hole does not seem to work to well.
It seems to work best is there is no cylindrical part, but a cone all the way tru to the microphone hole in the PCB.

like this
miccone.png

This is the result sofar, I had a bat quite close, like 15 meters away so did not need a lot of codec gain. At these settings I don't see any display update noise anymore.

field.jpg


The cone I used now is quite short with about 60 degree angle.
The power source used is a built-in 5V phone powerbank (4000-5000mA ultra flat powerbank. For the dutch guys... Around 9 euro's at Wibra)

Kind regards,

Edwin
 
Hi,

I'm interested in the bat detection topic and your detector builds look very nice!
Concerning the microphones in use, the ICS 40730 seems to be best choice. Did anyone of you already consider a digital MEMS microphone instead of an analog one?
It would be possible to connect such a mic directly to the Teensy via I2S/PDM without the need for a codec such as SGTL5000. Do you know of any digital microphones suitable for bat detection with similar characteristics as ICS 40730?
Maybe someone has tried anything from these lists, or other digital mics? Does anyone know something about the max. sample rate that the Teensy could provide when reading from a I2S/PDM mic?
https://www.invensense.com/products/digital/
https://forum.pjrc.com/threads/50567-I2S-Microphone-List

Thanks for your feedback!
Frieder
 
I am still using the SPU0410LR5H-QB, the ICS-40730 should have a little less noise but it was hard to tell the difference.

The SPH0641LU4H-1 is the PDM version of the SPU0410LR5H-QB.
I never tried anything with that microphone.

I do not know about any I2C versions.

Edwin
 
This is starting to become obsessive....
Dangerous stuff this kind of hobby.

I have been out to capture some bat calls and try different cones on my microphone.

As far as I can tell there is much less 23KHz signal to be found when the opamp is used in stead of the transistior amplifier. The long cone that helped to suppress the big signals does not seem to be needed on the opamp.

To create a seal between the microphone and housing I used a nylon bolt with a holle drilled tru and a thin piece of rubber (ring punched out of a bicycle inner tube)

I found a cylindrical hole does not seem to work to well.
It seems to work best is there is no cylindrical part, but a cone all the way tru to the microphone hole in the PCB.

like this
View attachment 17153

This is the result sofar, I had a bat quite close, like 15 meters away so did not need a lot of codec gain. At these settings I don't see any display update noise anymore.

View attachment 17154


The cone I used now is quite short with about 60 degree angle.
The power source used is a built-in 5V phone powerbank (4000-5000mA ultra flat powerbank. For the dutch guys... Around 9 euro's at Wibra)

Kind regards,

Edwin

You are getting a nice collection ;) Interesting work on the shape and position of the cone. I wonder if I can add such structure also to the GX16 connector.

Cor
 
Hi,

I'm interested in the bat detection topic and your detector builds look very nice!
Concerning the microphones in use, the ICS 40730 seems to be best choice. Did anyone of you already consider a digital MEMS microphone instead of an analog one?
It would be possible to connect such a mic directly to the Teensy via I2S/PDM without the need for a codec such as SGTL5000. Do you know of any digital microphones suitable for bat detection with similar characteristics as ICS 40730?
Maybe someone has tried anything from these lists, or other digital mics? Does anyone know something about the max. sample rate that the Teensy could provide when reading from a I2S/PDM mic?
https://www.invensense.com/products/digital/
https://forum.pjrc.com/threads/50567-I2S-Microphone-List

Thanks for your feedback!
Frieder

Hi Frieder,

Welcome to the teensy forum. Its known that I2S is possible with a Teensy (see https://forum.pjrc.com/threads/49065-ICS43434-I2S-Digital-Microphone-and-Teensy-3-2_ ) but for the batdetector you need a microphone with enough sensitivity in the higher frequencies (above 20Khz). For most microphones this is not well documented, we are using the ICS40730(not an I2S) and the documentation shows nothing on its sensitivity on higher frequencies. So this can only be found out by trial and error. It would be interesting to know if and how this can be done.

regards
Cor
 
Thanks Edwin and Cor for your replies!

It seems like there are some digital mics with ultrasonic range in the specs, such ICS-41352 (up to 85 kHz). But this one uses PDM and not I2S, which is more difficult to use with Teensy as I understand.

But when skimming over the thread, I just read, that some of you (at least Frank DD4WH) are using the ICS-40730 directly connected to the Teensy ADC via an op amp, instead of using the audio board with I2S codec.
Do you have any experience if this works well? Is there any advantage when using the audio board with codec?
What kind of op amp circuit are you using for this? I was looking at the ADA4897, that is specified for ultrasonic applications.

Thanks,
Frieder
 
Thanks Edwin and Cor for your replies!

It seems like there are some digital mics with ultrasonic range in the specs, such ICS-41352 (up to 85 kHz). But this one uses PDM and not I2S, which is more difficult to use with Teensy as I understand.

But when skimming over the thread, I just read, that some of you (at least Frank DD4WH) are using the ICS-40730 directly connected to the Teensy ADC via an op amp, instead of using the audio board with I2S codec.
Do you have any experience if this works well? Is there any advantage when using the audio board with codec?
What kind of op amp circuit are you using for this? I was looking at the ADA4897, that is specified for ultrasonic applications.

Thanks,
Frieder
Hi,

More about direct recording can be found overhere; https://github.com/WMXZ-EU/microSoundRecorder/wiki
But there are more projects like that, a lot of good information (mainly in french) can be found overhere https://framagit.org/PiBatRecorderPojects

Cor
 
Building a detector

Hi,


In the past few weeks I have been building a detector using the v0.1 PCB designed by Edwin and using the same box (thanks for the support) he is using.
IMG_20190812_154516216_HDR.jpgirst
The image slows from right to left the different designs I have built over time. The rightmost one is an heterodyne I made several of in the 1980's (Betrik Sikken schematic) using an UST as a microphone and running on a 9V battery. The one left of that is one I made in 2017, again heterodyne but with different hardware inside as some of the chips I used in the 80's were not widely available and running from a powerbank. Left of that, my prototype of the detector we are building since 2018 again running on a powerbank. And leftmost the latest, this is now running from a Lipo battery (1500mAh) and is nice and compact and is according to the wishes of my wife (she was the initiator of my investigations for a new bat-detector). I am still planning to extend it with a small speaker and amplifier so its sometimes possible to share the experience with others.

The power of Teensy is something I had not even heard of until last year.

kind regards
Cor
 
v094 several changes

Hi,

I have just uploaded V094 on the github repository.

0.94 important changes:
-Lower menu format on screen now follows the alignment of the encoders/buttons on Edwins PCB. So the encoders control the lower line on bottom part of the screen(SETTINGS) and the buttons control the upper line on the bottom of the screen (MODES).
-EEprom saving was not always when asked to restart in the user mode
-when no SD card was mounted the Left Encodermenu was not cyclic (jumped back to volume)
-when no sD card was mounted user could still set the LEFT button to RECORD or PLAY

minor changes:
-store the detectormode when starting a recording and restore after stopping a recording

bug repair: in previous versions the recording system was not checking if a filename allready existed but only checked the number of files on the SD. If a file was removed (for instance from a PC) this would lead to overwriting existing files.
In the new setup the new filenumber for a recording will be checked against highest filenumber in the allready stored files.
 
Thanks for the 0.94 version Cor.

I ill upload it to my detectors soon.

I have been messing with the ICS-40730, I did not like the signal that remained on just about 22-23Khz.


I tried a differential amplifier but the 23Khz signal remained.


After that I took of the little brass lid, shored it and put it back on. There seemed to be a whole lot of space in this box.

Making the metal can smaller had two effects, the 23 Khz signal has dissapered, only to be found on a higher frequency at around 70Khz.
The other effect is lower sensitivity.
Making the metal can around 1mm thick would probably move the noise outside of out detection range, but will also reduce sensitivity even more.

Since I messed up my microphone and did not want to waste any other I do not have any measurements to prove my findings.


Anyway, it seems the 23Khz noise is in the microphone construction, this is probably why there are no ultrasonic properties described in the datasheet.


I hope someone else can prove me wrong, te ICS-40730 seems te have lower noise but I just don't like the noise on 23Khz.

Kind regards,

Edwin
 
Hi Edwin,

sorry for being silent so long. I have some experience with the ICS40730 and can only say its the most powerful ultrasound MEMS I have ever seen . . . it can pick up ultrasound up to 160kHz and is highly sensitive and ultra low noise.

The noise of the mic is so low that in our setups we could not build a preamp-Teensy combination that would take full advantage of the SNR of the mic (datasheet says 74dB A SNR !). And that means: with this mic you will easily see noise from your preamp and the Teensy that you will NOT see with other mics (the internal noise of the mic will mask the preamp noise and the digital noise of the Teensy !). Thus it is important to measure the dynamic range of your recordings (the noise level) with the different microphones that you test. You can do this with audacity: import a wav/raw file and select a portion of your file and go to analysis->contrast, this will show you the noise level of your recording. Looking at the spectrum / spectrogram alone will fool you, because that does not give you the real dynamic range / noise level / SNR of your recording. It is likely that you will see more artefacts (of the preamp/Teensy digital noise) with a mic that has less noise. But nonetheless the recording will be better / the recorder will be more sensitive because of the lower overall noise level.

With the ICS40730 I regularly achieve a noise level of -62 to -64 dBFS (measured over the whole range of frequencies, so it must be higher than the A measurement) in recordings made with the PassiveRecorder by Jean-Do. Vrignault and 500ksps sample rate and the internal ADC (12 bits) of the Teensy 3.6.
this is a spectrogram of a recording of a finger snap I made a few minutes ago. There is regular noise from the SD card recording (drop in ADC reference voltage during SD card write!), but there are no artefacts like you describe at 23kHz. The x-axis is the time, the y-axis is the frequency from 0 to 160kHz

spectrogram.jpg

By the way, in one of your earlier posts you wrote that you connected the ICS40730 in single ended mode with an additional connection of the middle solder pad --> that is wrong! Leave it unconnected. This is my connection of the ICS40730 in single ended mode (black AGND, red VCC, YELLOW: mic signal out):
mic.jpg
 
Last edited:
Here is a spectrum of a recording with the ICS40730 made in Audacity:

spectrum.png

As you can see, the scale is from -70 to -90dB on the y-axis, so there is no pronounced noise at a certain frequency, its all below -70dBFS, which is as good as we can be with our low end approaches :) ! [note that all frequencies have to be multiplied by 10 ! The wav file is saved as a time expansion file, which simply means the sample rate in the WAV header is written as 50ksps instead of the real sample rate 500ksps]

So, I am a little puzzled by your noise problems, but I really believe they are not caused by the ICS40730, but by something else specific to your setup.

All the best Frank DD4WH
 
Last edited:
Yep I see it now, but its a bit small and only shows the spectrum till 20Khz
Here's one I made of the same microphone with a 1 transistor pre-amp on the PCB Edwin has created.

image.png
 
Hi Corbee,

as I stated, the spectrum is from 0 to 250kHz (500ksps sample rate !), you have to multiply the frequency axis by 10 ;-).

Your spectrum looks good, except for the peak at 23kHz.

How did you connect the ICS40730? Did you connect anything to the central solder pad ?
 
Hi Frank,

I am using one of the mics from Edwin so probably the central pad is connected. That 23Khz peak should be associated with something on the board I am quite sure but ... what is still a question. For the detector this is not really an issue as most bats dont go that low and are a lot louder anyway.

Cor
 
Hi Corbee,

it could well be that the 23kHz noise is associated with the wrong connection of the central pad which must be left totally unconnected in single ended mode. But we do not know if you do not have a closer look at your mic ;-).

Refer to the datasheet for the correct connection or use my photograph in post 418.

It would be very interesting to see a spectrum of your ICS40730 mic when correctly connected.

All the best,

Frank DD4WH
 
Back
Top