As somebody who loves technology and wildlife and also needs to develop an old farmhouse, going down the bat detector rabbit hole was a journey hard to resist. Bats are ideal animals for hackers to monitor as they emit ultrasonic frequencies from their mouths and noses to communicate with each other, detect their prey and navigate their way around obstacles such as trees — all done in pitch black darkness. On a slight downside, many species just love to make their homes in derelict buildings and, being protected here in the EU, developers need to make a rigorous survey to ensure as best as possible that there are no bats roosting in the site.
Obviously, the authorities require a professional independent survey, but there’s still plenty of opportunity for hacker participation by performing a ‘pre-survey’. Finding bat roosts with DIY detectors will tell us immediately if there is a problem, and give us a head start on rethinking our plans.
As can be expected, bat detectors come in all shapes and sizes, using various electrickery techniques to make them cheaper to build or easier to use. There are four different techniques most popularly used in bat detectors.
- Heterodyne: rather like tuning a radio, pitch is reduced without slowing the call down.
- Time expansion: chunks of data are slowed down to human audible frequencies.
- Frequency division: uses a digital counter IC to divide the frequency down in real time.
- Full spectrum: the full acoustic spectrum is recorded as a wav file.
Fortunately, recent advances in technology have now enabled manufacturers to produce relatively cheap full spectrum devices, which give the best resolution and the best chances of identifying the actual bat species.
DIY bat detectors tend to be of the frequency division type and are great for helping spot bats emerging from buildings. An audible noise from a speaker or headphones can prompt us to confirm that the fleeting black shape that we glimpsed was actually a bat and not a moth in the foreground. I used one of these detectors in conjunction with a video recorder to confirm that a bat was indeed NOT exiting from an old chimney pot. Phew!
A great example of open source collaboration and iteration in action, the Ardubat was first conceived by Frank Pliquett and then expanded on by Tony Messina and more recently, simplified by Service Kring (PDF).
The Ardubat is a frequency division detector based on a TI CD4024 chip, fed by two LM386 amps. Bat detections are sent to an SD card which can be analysed afterwards to try and get some idea of the species. However, since this circuit works by pre-distorting the analog signal into a digital one and then dividing down, none of the amplitude information makes it through.
The Bat Detector 2015 is again based on the CD4024, but uses a compact four channel amp, the TL074CNE4. Three of the channels feed the frequency divider chip and the fourth is a headphone amplifier. It’s a very neat design and the signal LED is fed directly from the CD4024. It comes as a complete DIY soldering kit for about $10 including postage. Yes …. $10 !!!
One of the biggest limitations with these detectors is the ultrasonic sensors themselves, which typically have a frequency response similar to the curve shown here. More recently, ultra-wide range MEMS SMT microphones have been released by Knowles, which work well right up to 125,000 Hz and beyond! Some bats, most notably the Lesser Horseshoe, can emit calls of up to 115,000 Hz. However, these older style sensors are incredibly good at detecting about 90% of the bats found here in the UK and are much more sensitive than heterodyne detectors.
The ‘professional’ option that I chose was the UltraMic384 by Dodotronics , which uses the Knowles electret FG23629 microphone with a 32-bit integrated ARM Cortex M4 microcontroller, capabable of recording up to 192,000 Hz in the audio spectrum. There are also some good DIY Hacker options such as the Audio Injector Ultra 2 for the Raspberry Pi, which can record at up to 96,000 Hz — but this is not quite good enough for all bats. Be aware that sampling rate is twice the audio frequency which can be quite confusing. An UltraMic sampling at 384 KB/s will record at 192 KHz.
These types of Full Spectrum devices can produce high resolution sonograms, or spectrograms using Audacity software. This is very helpful for wildlife enthusiasts who want to know what the actual bats species is, although even with the best tech, it’s still sometimes very difficult or impossible to determine species, especially within the Myotis genus.
So now we are fully equipped to check for bats in the derelict building using the DIY detector in conjunction with a video camera and a few pairs of human eyeballs. The full spectrum detector will be set to record right through the night and be used to check if there’s any activity we might have missed and tell us at the very least what genus the bats are.
All we need now is some Machine Learning to automatically identify the species. ML is a new frontier for bat detection, but nobody has yet produced a reliable system due to the similarity in the calls of different species. We know neural networks are being applied to recognize elephant vocalizations and the concept should be applicable here. A future project for an intrepid hacker? As for the Ardubat – it’s crying out for a better microphone, if not the expensive FG23629 then the 50 cent Knowles SMT SPU0410LR5H, which also has a great frequency response curve.
[Main image: Myotis bechsteinii by Dietmar Nill CC-BY-SA 2.5]