What Does The Bat Say? Tune In With This Heterodyne Detector

Bats are fascinating animals, and despite all the myth and creepiness surrounding them, they really remind one more of a drunk bird lost in the night sky than the blood-sucking creature they’re often made out to be. Of course, some really fall into that category, and unlike actual birds, bats don’t tend to grace us with their singsong — at least not in ways audible for us humans. But thanks to bat detectors, we can still pick up on it, and [Marcel] recently built a heterodyne bat detector himself.

Bat Detector in its enclosure
The bat detector (and an insight to the beauty of German language, where a bat is a flutter mouse)

The detector is made with a 555, an MCP6004 op amp, and a 4066 analog switch — along with a bunch of passives — and is neatly packed into a 3D-printed case with a potentiometer to set the volume and center frequency for the detection. The bat signal itself is picked up by a MEMS microphone with a frequency range [Marcel] found suitable for the task. His write-up also goes in all the mathematics details regarding heterodyning, and how each component plays into that. The resulting audio can be listened to through a headphone output, and after putting together an adapter, can also be recorded from his smartphone. A sample of how that sounds is added in his write-up, which you can also check out after the break.

In case you want to give it a try yourself, [Marcel] put all the design files and some LTSpice simulations on the project’s GitHub page. If you are curious about bat detectors in general and want to read more about them, follow [Pat Whetman] down that rabbit hole, or have a look at this one made in Python for something more software-focused.

(Banner image by Signe Allerslev)

29 thoughts on “What Does The Bat Say? Tune In With This Heterodyne Detector

      1. The anglosaxon word is flittermouse. Bat is a loanword from old Scandinavian that has only survived in Värend dialect as “nattbatta” (night flutterer).

  1. The audio quality is great.
    [ not that we really know what the bat hears ]
    Considering some cheapish bat “detectors” I’ve heard over the years, this one sounds far clearer crisper.

    1. That can be an artifact. Heterodyning mixes two frequencies f1 and f2 and you get f1 + f2 and f1 – f2 out. One of the results drops in the audible range while the other lifts even higher and gets filtered out.

      Now if the local oscillator f2 isn’t a sine wave but a square wave, the output will contain all the harmonics of a square wave and the bat’s sound will become “crisper” simply because of harmonic distortion.

      1. The harmonic of a square wave is sum of its odd frequencies in decreasing magnitude. i.e. f0, 3f0, 5f0 7f0….

        Let’s say your bat is squeaking at around 60kHz sine wave and your Lf = 55kHz square wave, you would get the following beat frequencies:

        lf = f0, beat = 5kHz, 115kHz (can’t hear)
        lf = 3f0, beat = 105kHz (can’t hear), 225kHz (can’t hear)
        lf = 5f0, beat = 215kHz (can’t hear), 335kHz (can’t hear)

        The question is does the harmonics makes a difference to what you can hear?

          1. May be you should have the same courtesy of actually showing your math for your statement?

            >how square is a wave comic off of the 555

            If you actually look at the schematic, it is using a 4066 as a balanced mixer followed by a 7kHz low pass filter.

          2. >you should have the same courtesy

            What exactly am I being accused of? I answered the guy’s question: he harmonics can pick up sounds from even higher up and put them over the sound of the bat.

        1. Oh, and if you’re dealing with a duty cycle other than 50/50 then you’ll also get the even harmonics.

          So what you have is a comb of all the harmonic frequencies in different amounts, where each and every harmonic frequency creates its own version of the bat’s voice and shifts it down by different amounts.

        2. The LO frequency in the sound sample was:
          >40 or 45 kHz

          So you’ve got a non-ideal heterodyning mixer that is pulling down frequencies from something around 40, 80, 120 kHz. Of course the bat’s voice isn’t a single frequency either because she’s chirping across the spectrum all the way up to 150 kHz, so the voice you’re getting out is three different frequency bands of the same sound all overlaid together.

          An example of a bat’s chirp with spectrograms:

          https://tcabasa.org/wp-content/uploads/2016/05/BatCapture-e1462451222711.jpg

          1. It would be interesting to hear what that would do to a human voice, where your mid and high registers were all mashed down over your low register. Would it just sound like a mess, or could you actually make out words?

          2. It’s interesting that bats use such a wide band of sound:

            http://www.spektrogram.chiroptera.se/wp-content/uploads/2015/11/PpygM00078.jpg

            Of course it makes sense because the smaller the insect, the smaller the wavelength must be to get a reflection, but also the attenuation changes with frequency so not only do you have the time delay, but the frequency itself causes a difference in drop-off over distance. You don’t get high frequency reflections from very far off, so the bat can choose to look near or far, like you can focus your eyes near and far.

          3. @Luke the Daleks from Doctor Who were IIRC done using a ring modulator, so I’m guessing it would sound like three different versions of that, all layered.

            You could figure out pretty easy in Audacity what it would actually sound like though.

  2. Sounds interesting, I’d be tempted to add a second oscillator and use the other half of the 4066 to mix another band down. Then you could cover twice as much spectrum. Maybe with a stereo output! When I saw the sampling method used to do the mixing, I started thinking it’s a Nyquist effect, which might make it easier to visualise for some.

    1. It’s not sampling/Nyquist thing. You can get a similar effect by folding, but here the input waveform is inverted periodically instead, which is mathematically equivalent to a special case of multiplication.

Leave a Reply to AKA the ACancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.