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.
Lower forward voltage LEDs will make maximum use of the battery. Red, orange and yellow are mostly less than two volts. Some greens are < 2v and some are closer to three volts. So far the orange LEDs have been the brightest.
The most exciting recent bat detector project is one developed by [hystrix] using the Raspberry Pi and the Cirrus audio card. For less than $100, a little soldering and lots of Linux work you can have a hackable bat detector. Spectrograms, pitch shifting, automated recording, and full spectrum recording are all possible. One of mine is currently set up to start recording bat calls at sunset, stop at sunrise, convert call to spectrograms which are uploaded to my google drive so I can view them from anywhere. Rinse and repeat, untouched by human hands.
The Simple Bat Detector by Tony Messina was the first one I assembled. A version of the kit was featured on Hackaday in 2008. More recently Tony and Frank, his German friend, designed the Ardubat. Their sites are loaded with information about bat detection.
Frank's blinken bats were the inspiration for producing a visual bat detector.
The Batbox Baton is one of my favorite bat detectors.One button makes it easy to use and it has speaker so a group can listen to it. No dials or complications but it has a wide detection range. A great family bat detector. It can connect to a computer for analysis or to your car stereo so you can detect bats at 40MPH just by holding it close to an open car window.
An excellent book for learning more about the bats of the US and Canada is “Stokes Beginner's Guide
- Spinning version!
I don’t expect it to be the world’s smallest bat detector for longer than it takes to finish this sentence. Much smaller components are easily available. The layout can be squeezed. It can be two sided.You can use a smaller battery. Simple!
Most of the parts are already Ebay bulk. A much cheaper op amp would work just fine as long as it can operate at that voltage with an adequate frequency response. The PCB and other parts get vastly cheaper in quantities.
Keep in mind that this is a building block to greater things. Once you have a microphone and an amplifier, the signal can be fed into anything: the venerable LM3914 bargraph driver, a divider chip ala the famous Simple Bat Detector, a set of active bandpass filters to light LEDs at different frequencies, an ADC of a DSP or a microcontroller, a Raspberry Pi via a Cirrus card or directly into an Arduino. Accurate automated species identification is difficult to say the least, but you could do some basic sorting. For instance in my neighborhood I know there are at least three species because one calls at about 20kHz, one calls at about 35kHz and another calls at about 55kHz. Since bats are very social, they often fly together while talking to each other at all kinds of frequencies, so identification gets much more difficult. The Doppler Effect also kicks in as they whirl around in the sky. Try to get single bats traveling at a straight steady rate.