Bat detector

Hi,

it is really fantastic to follow the developments by you, Cor & Edwin. This is a superb project!

Just my subjective view on the question which microphone to use [my experience from the last five years in two sentences ;-)]:

* ICS40730 is the best available and tested ultrasound MEMS mic --> use it, if you want best sensitivity and SNR
* FG23669 is the most robust mic I know of (which reliably works for bat ultrasound reception) --> use it if you want a very robust mic that can for example withstand two weeks of rain without any cover [but take into account the low sensitivity]

As you know, for my students I use Passive Ultrasound recorders designed by Jean-Do. Vrignault (and I have also built and tested his Active Recorder).

https://framagit.org/PiBatRecorderPojects/TeensyRecorders

I own and regularly use about 25 Passive Recorders by Jean-Do. Vrignault at the moment. The original design by Jean-Do. formerly used the SPU0410LR5H, but after proposal of the ICS40730, now many of the french bat conservationists use the ICS40730 in their units [several hundreds have been built and prove to be perfectly functional and interpretable - even when the recordings are given to french first class bat experts]. However, the ICS mic is highly fragile when it comes to moisture and rain, which can easily and quickly kill that mic.

For my students I use the same Teensy-based hardware and software developed by Jean-Do., BUT I use the FG23669, because that mic is so robust (as Ivano already said in his post) that it can withstand rain and dust. BTW, Jean-Do. also uses the same connectors proposed by you.

Just my two cents: the search for an optimally linear frequency graph in a mic will not be so highly relevant, I think. The highly frequency-dependent attenuation of ultrasound in air will be the major point making it so hard to detect high ultrasound emitting bats in the field. That is the reason why you can only detect a Lesser horseshoe bat (at 105kHz) within a maximum distance of about 5 metres, because at larger distances the attenuation in the air is so large that it is physically impossible to detect anything outside that distance. In contrary, Nyctalus noctula with its 18-20kHz calls is detectable over hundreds of metres, not because the calls are so loud, but mainly because of the much lesser attenuation of those low frequencies in air. Air moisture is also a factor and increasing moisture in the air increases the attenuation of high ultrasound frequencies.

Have a look at figure 2 here [note that the attenuation is already stated in dB]
https://en.wikibooks.org/wiki/Engineering_Acoustics/Outdoor_Sound_Propagation

Having said that, I am still curious about the measurements by Ivano with his high end equipment by B&K !

One last point: The Bat Detectors mentioned above and the Bat Detector of this thread all have their place and specific purpose:

Passive Recorder by Jean-Do. Vrignault:
* semiprofessional field recorder without heterodyning and without realtime display, just for making good and automatic/manual recordings of bats
* time scheduled and adjustable threshold etc.
* water proof case ! [but beware of the mic and choose the right one]

Active Recorder by Jean-Do. Vrignault:
* same functionality like PassiveRecorder, but additionaly
* Active Heterodyne Recorder (digitally) and manual recordings with small OLED display and an innovative small graphical display (not comparable with a real full spectrum view display)
* nice custom case, but not waterproof

Bat Detector in this thread (in development by Cor & Edwin):
* full spectrum active recorder with large TFT spectrogram display
* not water proof
* automatic threshold driven recording

I really like this diversity of DIY recorders (which all have their specific niches and advantages/disadvantages, and there are some others on the internet) which are now of such a good quality that they are really competent compared to commercially sold recorders (No, I will not mention any comparison here ;-) although I have compared about 15 commercial/non-commercial products with the above mentioned DIY units :)).

Keep up the good work!

Best wishes,

Frank DD4WH
 
Last edited:
Hi Frank,

Thank you for your comments, the "hole" in the sensitivity of the ICS microphone does indeed not really seem to affect the termination of bat species, there is not a huge difference signal to noise ratio. I still prefer the SPU but this is just a matter of opinion.


It looks like you missed a part of the possibilities of this detector.

Bat Detector in this thread (in development by Cor & Edwin):
* full spectrum active recorder with large TFT spectrogram display
* not water proof
* no automatic time-scheduled and threshold driven recording

There is an automatic recording feature that has no scheduling but if activated is starts a recording after detecting ultrasound.

You can set a minimum strength ad a minimum frequency, if both parameters are met a recording will start.
X seconds after the loss of strong/high enough signals de recording will stop, or recording will stop after a set time limit. A new recording will start after a new strong ultrasound signal has been detected.

I think you would call that a non scheduled threshold recording.

Kind regards,

Edwin
 
Hi Edwin,

thanks for your correction! That was my fault, I altered my post accordingly!

Yes, you are right, depending on the gain of the preamp, you will get a lot of noise anyway and the differences between mics will not be so obvious. Most commercially available bat detectors have way too much gain (my personal opinion), so their SNR (better: distance between their noise level and digital full scale of the ADC) is really low compared to what would be possible theoretically. But maybe it is not SNR that we have to maximize, because loud and nearby passing bats is not our main focus anyway (and distorted recordings of Pipistrellus would just be discarded by the user), but the silent and faint passing-by Myotis and Barbastellus and Plecotus? Those three genera with more silent calls will probably be better detected using a little more preamp gain (which increases general noise level, but hopefully increases sensitivity a bit). However, if you intensively use automatic ID software, distorted recordings (because of higher preamp gain) could increase the number of false IDs, so there is a trade-off here depending on your application.

Keep up the good development!

Best wishes,

Frank
 
hi

there is no better sensor than another. My Momimic is not the "state of the art" of the ultrasonic analog microphone. I am always trying to find the best solution and even if in these years I did a lot of improvements i am still not completely satisfied. Unfortunately ultrasound behaviour is not similar to audio and high the frequency and athe perfect solution is not at the corner. You are right about leaks around the microphone: all around the sesnsor hole the cone must be tightly conected and sealed. Every gap around the microphone hole works as a reflector increasing and reducing the sensitivity according to the resonant frequency.
Also measuring the frequency response is not easy at all but the problem is not the reference microphone but the sound source. I have a complete signal generation from the waveform to the high voltage preamplifier completely linear but the ribbon speaker (the best I tested between hundred of speakers with different typology) is not linear. I also tryed to simulate a 10 band equalizer up to 200kHz with the aim to flattern the emission but with scase results. In my opinion the best is to generate a sweep from 0 to 192kHz with different levels so that the result is a linear frequency response emission, probably divided in two ranges.
On the sensor side I am not completely satisfied about the FG sensor since many users are not happy about the sensitivity if compared to MEMS. For this reason I plan to design a new microphone preamplifier with two parallel mems and a preamplification very close to the signal output. This will greatly reduce the interferencies. The 23kHz you find is probably generated by some part of the circuit probably the teensy itself and a low frequency cut is not probably the best solution. I never put a low frequency filter because many people like to record audio too and a cut below 23 kHz will cut many bat species and some of them emits down to audio range. What I want to do is an antialiasing filter (mandatory for the MEMS) and a simple equalizer to ingrease the gain at high freuqencies.
I hope to give a contribution to the sensor side for the moment since I plan to use this as additional element for Ultramic384K and as main pre interface for the small mic too.
There is something not clear to me: why do you use an audio codec? have you tryed to use the internal ADC? how much is the sampling rate of the Teensy? else it is necessary to use an external ADC. For the output I think a high frequency PWM could replace the codec, you don't need high fidelity in output but you need good recordings. I never like to go beyond the specifications of the IC manufacturer.
You are talking about SNR of different sensor but coupling two cheap MEMS could give better results than a single good quality sensor ... but I need to test them in ultrasound field because it is quite complex from a mechanical point of view.
A personal consideration: the spectrogram reported in the datasheet beyond 40kHz and almost never real.
The PCB design, the isolation of the analog and digital ground, the signal layout, low noise power regulation are the main factors for a good result to solve the interferencies.
Ivano
 
Hi Ivano,

just a comment on the codec:

* the first version of the Bat detector of this thread (four years ago ;-)) had a codec because I had a Teensy audio board at hand and it was easier to handle for me than fiddling with the internal ADCs
* as you can see in the links given above, Jean-Do.s´ PassiveRecorder does use the internal ADCs of the Teensy 3.6 at 500ksps sample rate maximum. It works very well, even when recording to SD card (he uses a large buffer).
* as far as I know, the internal DAC of the T3.6 is used by Jean-Do. for production of the heterodyne sound in his Active Recorder, so there is no need for PWM
* it seems the quality of the recordings with the internal ADC (real resolution of the internal ADC is about 13bit) is similar to the Teensy audio board codec (rated at 16bit, but with the preamp gain of that board etc., it seems the real resolution is lower than 16bit

So, its just a matter of taste whether you use the Teensy audio board codec or not. There are several threads on this forum where the quality of "overclocked" Teensy audio board sampling is evaluated.

I am really interested about your idea of coupling two MEMS. How do you do that and what advantage does that have?

Regards,

Frank
 
Hi,

I like to hear/see people come up with new ideas, combining two MEMS ... interesting !! Using the ADC ... questions .

Just to add my grain of salt ... as I am mainly busy with the software ... If you look into the code of the current teensy_batdetector you will see that we have added the option of using the ADC directly thus bypassing the SGTL5000. In a way that is more or less identical to what other users use on this forum (I stole the idea from WMXZ). Edwin has been busy testing this option and at the end it felt like there was no advantage at all in using the ADC.

If the ADC does work better for the purpose of this instrument (its a detector that you use when going around, its not stored in a box with a battery waiting for signals) I would definitely like to provide that option. As stated, the code is ready for it (there is a //#define USE_ADC_IN // use A2 (pin16) for direct microphone input on line 85 of main.cpp).

regards
Cor
 
As Cor explained we did already try the ADC input, also the line-in of the audio board was tested already.

Line in was not better than mic in and line in ment we did not have the full advantage of the microphone amplifier.

For the ADC input we did have the same problem that we lost a bit of the versatility of the audioboard but the main "problem" is that the power supply of the SD card is not separated from the rest of the Teensy. These SD cards draw a lot of current that can be seen in the recordings. The recordings just looked better when recorded via the audioboard. This is why it is important to let the audiocircuits work on a separate voltage stabilizer.

I hoped the ADC would in fact work better since we are kind of abusing the SGTL5000 on the audio board on higher sample rates that it was made for.
Specially the appearance of harmonics was something I hoped to be better but I guess that is something any recorder will have to cope with. Using the ADC did not help us getting better recordings.

As Cor mentioned it still is in the code, also some other experimental thins are hidden in an advance option definition. These are not for normal use and are not in the precompiled hex. Or activated in the source.

So the best recordings still were made using the audioboard using that also gave us the most control over our microphone amplifier. So two reasons to keep the codec as input.

Edwin
 
ok for the ADC, in the future we could think about this ADC:
https://www.ti.com/product/ADS8685
about 5.5€ on Digikey for a single unit
The paired MEMS could be placed front to front on the same PCB with an audio guide and amplification and filters close to them.
I will try to do a schematic in the next days and a prototype. I use Altium Designer but it can export to EAGLE
Iv
 
Right now I'm buying from Voir the VV-M126 membrane, it seems to be the best for ultrasound. I'll let you know as soon as arrived
Iv
 
Ivano,

* is there a similar ADC with 500ksps that could be powered on a single 3V3 supply? That would enable users to power them with a single 3V7 lithium 18650 cell. The ADS8685 seems to be using a minimum of 5V single supply. Alternative would be to use a 5V USB power bank. However, they often shut off their voltage when there is no power draw . . .
* excellent to hear about the membrane, would be perfect to have a membrane-covered weatherproof MEMS design ;-)
 
I'm using AD7988-5 but it is quite expensive, however on my Ultramic384K even if powered from USB there is a capacitive step up converter bringing the power to 5.5V and a low noise ldo to bring to 5V.
I could propose other solution instead of this battery but we can talk later after solved the microphone section
Iv
 
@DD4WH Frank

I would like to incorporate the ZoomFFT in the Teensy_batdetector. That way we could look (in more detail) at the more interesting part of the spectrum instead of looking at the full (and sometimes rather empty) spectrum. I have looked at your code and also some of the graphics on the forum in other threads. But currently its unclear to me how easy/difficult it would be to add this to our current setup and if it would also be very demanding on the T3.6 processor.

At first glance the routine in your SDR sourcecode looks as if you simply gather directly from the audio-source (as if it were an audio-processing routine) and use subsequent samples (blocks of 128 measurements) to build a larger sample which you then pull through an FFT. And that FFT is not the FFT256 object we allready have in the audio-library but a seperate piece of code (inside the routine). Am I right ?

regards
Cor
 
Yes, exactly.

An ultrasound signal ZoomFFT example with real figures:


  • with the original routine in the software, 256 samples are taken as input for the FFT [the internal routine uses an overlap of 50%, so 256 samples are processed for every audio block of 128 samples every 0.67msec at 192ksps sample rate] --> 128 real samples as output --> at 192ksps sample rate, the frequency span of the spectrum/spectrogram is 96kHz, the bin width is 192kHz / (2 * 128) == 750Hz
  • if you want bin width 4 times smaller, you want a zoom factor of 4
  • We need to define the frequency band we want, because now with zoom 4 our frequency span is also 1/4 of the original frequency band (96kHz / 4 = 24kHz), We define 40kHz as our shift frequency, so we can see 40 to 64kHz on the spectrogram (ideal for Pipistrellus pipistrellus and P. pygmaeus)
  • now we shift the incoming audio signal by 40kHz by multiplying with a numerically controlled oscillator [at 192ksps sample rate]
  • we apply a lowpass filter with a cutoff frequency of 24kHz (this is obligatory to prevent aliasing!)
  • we take every fourth sample and discard all other samples
  • now the signal of interest (40kHz) is at baseband and at a sample rate of 48ksps
  • we now calculate the 256-point-real-to-complex-FFT and obtain 128 bins with a bin width of 48kHz / (2 * 128) = 187.5Hz

The original FFT is processed every 0.67msec. If you use a zoom factor of 4, you only take every fourth sample. Thus, it needs four times longer until you have acquired enough samples for the FFT, thus 2.67msec. Now, the trick is that you do not wait until you have all the samples collected, but you allow for „overlap“ in the samples and perform the FFT with the same rhythm of 0.67msec. [please note that this also takes four times the processing power compared to non-overlapping samples for the FFT and also takes more memory]

I have collected more information on the ZoomFFT in this Wiki:
https://github.com/df8oe/UHSDR/wiki/Spectrum-display-Magnify-mode-=-Zoom-FFT

I am not experienced in programming audio library blocks, but my gut feeling is, it could be easier to just use a queue object from the lib to get the samples and perform all the calculations in the main loop and not inside an audio lib object (because there are different sample rates involved). However, for people also interested in using the ZoomFFT, if you design a specific audio library object, you will get much more credit ;-).

Best wishes,

Frank DD4WH

BTW: this brandnew publication will rapidly become the professional standard for the identification of bat calls from spectrograms in Germany. Maybe it also helps others with ID of bats in Central Europe.
https://www.bestellen.bayern.de/app...l.htm,KATALOG:StMUG,AKATxNAME:StMUG,ALLE:x)=X
 
Last edited:
Hi Frank,

Thanks for the help, I see that this will take considerable time to create. For the moment being I am letting this rest.

regards
Cor
 
Last edited:
Anyone try the Bat detector with a parabolic dish to find powerline noise? I just wonder if would be sensitive enough to detect the weak discharges on powerline insulators.

I am trying to track down some leaky powerline insulators?
 
Hi Craig,

Never tried that, I dont know what spectra and power a powerline emits.

regards
Cor
 
Anyone try the Bat detector with a parabolic dish to find powerline noise? I just wonder if would be sensitive enough to detect the weak discharges on powerline insulators.

I am trying to track down some leaky powerline insulators?

An acoustic camera would be one approach - although not cheap! An ultrasonic acoustic camera, there's a bat project!
 
I guess you should be able to hear discharge sounds, MFJ is selling the 5008 as device to detect ultrasonic discharge sounds with a parabolic dish.

MFJ is normally producing HAM radio equipment, apparently they use this to locate arcing insulator that also have impact on receiving radio signals.


I have no idea what technique is used but since it is presented as a ultrasonic receiver you should probably also hear these sounds on our detector.
My best guess is that MFJ is using Frequency Division because there does not seems to be a way to tune it.

If you only need this detector for finding arcing power lines a simple FD bat detector with a dish will probably work fine.
I have no Idea how well the MFJ dish is formed, a good dish normally costs quite a bit of money.

Oh, and building the detector form this tread would probably cost around 100-150 euro's where an FD detector only uses about 10-20 euro's of materials.

Edwin
 
If you only need this detector for finding arcing power lines a simple FD bat detector with a dish will probably work fine.
I have no Idea how well the MFJ dish is formed, a good dish normally costs quite a bit of money.

Cheap wok lid is worth trying as a dish (!)
 
Ultrasinic dish powerline noise

Hi Edwin

I believe that the MFJ is a 40khz FD detector. In relative terms its expensive for a such a simple device.

I believe that a detector with broader frequency response that is not so frequency selectivey might be a better option especially if it has sensitivity. A tunable design will do however the Teensy with its waterfall will be much more informative to understand how these insulators arc. Thats my own personal technical interest not an "experts" view.

I think I will build the Teensy just out of technical interest and see how well it works, i see the Teensy project more as a"ultrasonic accurate level measuring instrument" that would have more value and also add a technical dimension to understanding whats going on. So the cost is reasonable rather than just copying a cheap circuit while learning nothing!


Thanks for the information, I just thought i would ask before starting the build.

Craig




I guess you should be able to hear discharge sounds, MFJ is selling the 5008 as device to detect ultrasonic discharge sounds with a parabolic dish.

MFJ is normally producing HAM radio equipment, apparently they use this to locate arcing insulator that also have impact on receiving radio signals.


I have no idea what technique is used but since it is presented as a ultrasonic receiver you should probably also hear these sounds on our detector.
My best guess is that MFJ is using Frequency Division because there does not seems to be a way to tune it.

If you only need this detector for finding arcing power lines a simple FD bat detector with a dish will probably work fine.
I have no Idea how well the MFJ dish is formed, a good dish normally costs quite a bit of money.

Oh, and building the detector form this tread would probably cost around 100-150 euro's where an FD detector only uses about 10-20 euro's of materials.

Edwin
 
Hi Mark

Good thinking there however the weight might be a issue. I am sure I can find a cheap "wok like object" made out out of cheap pot metal that melts in the rain for expirmentation. The local Asian grocery shop has all sorts of plastic bowls that are close to parabolic in shape. If I cant find something suitable I will just get something 3D printed in one of the 3D printing shops that make things like this more economical to print. All part of the fun of learning, its not only about the cost. I have boxes full of experiments that i dont want know how much it really "cost"
 
This is what a professional Ultrasonic dish looks like, just out of interest. I believe it costs about 5000 US Dollars!
 

Attachments

  • radar engineers dish.jpg
    radar engineers dish.jpg
    116.8 KB · Views: 82
It would be nice if something as simply as an oriental frying pan or lid could work, unfortunately the higher te pitch the shorter the wavelength and the lager the chance that the sounds are reflected are not in phase. If you have a 40kHz soundwave the wavelenth is just over 8mm. I you imagine two waves bouncing off a dish that is 2mm off, the sound travels 4mm longer on one part compared to the other which creates 180degree of fase difference. The negative pressure counteracts the positive pressure of the other wave. The result is 0 and you don't hear a single thing.

There where it could have worked for speech, for ultrasound it is not of much use. Or at least not nearly as good as a perfectly made parabolic reflector. Please try it and prove me wrong. I would love to know the model of that piece of cookware.

Kind regards,

Edwin
 
Back
Top