Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 25 of 652

Thread: Bat detector

Threaded View

  1. #1
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Central Europe

    Bat detector

    With the new possibility to set the sample rate of the Teensy audio board to higher rates, it should be possible to build a bat detector with the Teensy 3.5/3.6. Thanks chip and Pete for your suggestions and Frank B for the higher sample rate possibilities! :-)

    Bats use echolocation with ultrasound and use frequencies from 12 to 125kHz. Most bats, however can be detected, if you use a sample rate of 192ksps, that means the usable upper limit frequency is < 96kHz, which is quite nice and covers the vast majority of the bat species occuring worldwide (with the exception of most horseshoe bats). [Audio frequencies > 96kHz are very heavily attenuated in the air anyway, so you would have to be very close to a bat calling at 100kHz (a few meters!) to detect it]: --> so, I think a bat detector detecting frequencies < 96kHz is a very useful thing.

    It would be very cool, if we could use the basic Teensy 3.5/3.6 [sorry, probably not possible with Teensy 3.2 and smaller] with its Teensy audio shield plus an electret mic (those tiny little ones) without further hardware to detect bats!

    First, I think, we have to look at some basic questions, before starting to program the Teensy:

    1. the samples come in such a high rate from the audio lib in that sample rate, that we can only do some very light audio processing, we have only (128/192000) = 667ĩsec for a block of 128 samples. [FFT256point should be possible, but a 512point or 1024point FFT is probably not possible]
    2. Is there an analog anti-alias filter in front of the ADC of the SGTL5000 Teensy audio board? If yes, we do not need to work any further in this thread, because that would make it impossible for us to process audio > 48kHz through the audio board.
    3. To lower the processor usage, we could do the following: sample at 192ksps, decimate the audio, process the audio, and interpolate.
    4. Zoom FFT: To get high resolution to look at the bat calls, we need many many points in the FFT, > 1024. That is of course not possible in that high sampling rate, even with the fast Teensy 3.6. We could use a technique called Zoom FFT to have a detailed look at only a small portion of the frequency spectrum with a small FFT (say 256 points). ZOOM_FFT
    5. Before doing all that, a first start could be: get the audio at 196ksps (queue object) --> software DDS or sinewave object with user adjustable frequency (12 – 96kHz) --> multiply that with the incoming audio --> hear batsound at 0-20kHz : that is called a heterodyne detector

    What do you think about this? Any answers to the above questions or any further suggestions/ideas greatly acknowledged!

    Last edited by DD4WH; 10-31-2016 at 01:30 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts