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 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 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 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.
Read more »
I was expecting for it to yell "BAT!" whenever it detected one.