Description

A project to design and build a tiny useful bat detector and to spread appreciation for these amazing creatures.

This project actually breaks two world records; as of this writing it is the world’s smallest bat detector and it is also the world’s simplest bat detector.* There are only four main components; a battery, a microphone, an amplifier and the LEDs. The microphone works into the ultrasonic range and feeds into the amplifier which rolls off the lower voice level frequencies and amplifies the higher frequencies. The LEDs just display the output of the amplifier. What could be simpler?

A major benefit of this project is that it is a building block for more advanced bat detection projects. I'll discuss that more in a future discussion below.

*For those fun loving grammar folks out there I should probably say it is the world’s smallest and simplest detector of bats. This does not measure the size of bats nor does it test their intelligence.

Details

The Concept

Most bats navigate at night by echolocation, sending out ultrasonic pings to get a picture of the world around them. This device detects those pings.

Since bats are in short supply this time of year, I cobbled together a bat call simulator which I call Robobat. Robobat is used to test this bat detector. It sends out chirps in the ultrasonic 40kHz range and I can vary the number of chirps per second.

Here is the "final" version of the bat detector in a test:

Robobat (off camera) was configured to chirp at two per second, four per second and
10 per second for five seconds each. The first set includes the sound
of an audio bat detector and the second set is with only Robobat.

Those three different chirps/second (two, four and ten) approximate the chirps/second of three of the bat species in my neighborhood. This bat detector can be used for somewhat crudely learning what kinds of bats are around you. Pro bat detectors can use more than 20 characteristics of bat calls for identification.

You can hear me turning an audio bat detector on and off. The narrowed eyed version with glowing bat charm eyes is on the left and the wide eyed version is on the right.

The video rate is interfering with the blinks - they are much more regular than that.

Here are some earlier tests of my LED bat detectors, including WS2812s and the great old school LM3914!

The Design

Overview

The bat calls are received by the microphone and are amplified with a voltage gain of about 10,000 times. Since the reference voltage is about 1.2 volts the LEDs will not light when there are no calls, but when the bat calls the voltage will exceed the forward voltage of the LEDs and light them. Isn't that too simple? Will it work?

The Microphone

The most constraining part is the microphone. Ideally you would want a flat response up to about 200khz and, while there may be microphones capable of that, the expense is far beyond the current project scope. To make matters worse, microphone frequency response is usually typified up to 20 kHz at most. Inexpensive electret and MEMS microphones present usable, though limited alternatives. For this project I chose the Knowles SPU0410HR5H MEMS microphone. The response is a bit lumpy and likely drops off somewhat above 80kHz but it is cheap, durable and will work well for this project.

The above is for the bottom port version but should be similar. This is the hardest part to solder and requires some form of reflow soldering. I fry mine.

The Amplifier

The design of this amplifier is a common one used for amplifying electret microphones. Sparkfun and Adafruit both use versions of this circuit that are meant for normal human sound ranges. For this project I’ve shifted the frequency response up into the ultrasonic and rolled off the voice frequencies.Talking around this bat detector will not set it off except for pronouncing the letter “S” or similar.

A simulation of the response of this design:

And the schematic:

I’m using the OPA2322 dual op amp because of the decent bandwidth at these gain levels and because it operates down to 1.8 volts.

R1 and R2 provide for a voltage gain of about 100 for the first stage and R5 and R6 do the same for the second stage adding up to a total of about 10,000. This is more than is needed for analyzing bat calls but we are just lighting LEDs here and this makes this detector more sensitive. C1 and C3 roll off the voice frequencies and C2 and C4 roll off unwanted higher frequencies that might destabilize the amplifier.

I had to add a 100nF capacitor in parallel with R4 to eliminate oscillation when I went to higher gain. I just stack it on top of the resistor.

R3 and R4 set a reference voltage of about 1.5 volts, half of the battery voltage.R7 and R8 do the same thing for the second stage but I’ve lowered the value of R8 prevent the LEDs from dimly lighting when there are no bats around.

R11 is a 0 ohm resistor used on the wide version for jumping a trace rather than using the bottom layer.

Project Logs

Bonus bat fact: In a single midsummer night, the 15 million Mexican free-tailed bats from Bracken Cave in central Texas eat more than 140 tons of insects.That’s about the same weight as 20 elephants or one medium sized Blue Whale.

Disclaimer: the following is probably not practical but is definitely fun.

While experimenting with these bat detectors I tried to think of simple ways to display frequency; one of the main ways of identifying different kinds of bats. Since an oscilloscope is essentially a dot that scans across a screen at specific rates to display frequency and voltage, why not spin a bat detector to simulate the moving dot?

In that spirit I designed an elongated board using the same schematic and blue tacked it to a USB fan.It is difficult to see in the video and photo but it is possible to see some of the components of the ultrasonic chirps.Varying the speed and setting up triggers might provide better details but that will have to wait for another day.

Made it, works great ! One thing the high pass is a little low could do with it being about 15khz. Its too fidily for me to test different caps. Can you or any one recommend what to do to cut out frequencies below 15khz.

I’m more of a fiddler than a filter wiz so I don’t have a precise answer for you. Maybe someone else does. I selected the values partly by fiddling.

C1 and C3 roll off the lower frequencies so you could try replacing one of those with a 1nF capacitor. If it seems to help but you need a little more you could replace both. Reduce the capacitance further if you need more roll off.

Two things to keep in mind:

1.) This filtering is crude as you can see from the simulation chart. Part of the idea was to roughly even out the response of the microphone. Reducing the capacitance shifts the response to the right on the chart so it also has the same effect of reducing the response on higher frequencies. It's all a matter of trade offs.

2.) Many things produce ultrasonics that we are not aware of. Rustling clothes, jangling keys, clinking silverware and glassware, rubbing fingertips, usb chargers and power supplies, TVs, monitors, computers, etc. If people are around and doing the usual rustling and clanking the detector will pick it up. Tell them to Namaste tf out.

Anyway, have fun and enjoy bats; they are pretty cool. Have a look at Hystrix’s bat detection pages as noted in the Resources section of the project details for lots more ideas. I am working on similar things but it is far more fiddly than this and therefore very hard to document.

They are amazing animals once you take a closer look at them. I attach my tiny bat detector to my larger ones with a little blue tack to add a visual cue to what they are doing. It is as sensitive as any of my other detectors.