Bat Detector

This is one of those fun projects that'll bring a smile to your face. When I heard my first Bat using this detector it reminded me of the thrill I had years ago when I heard my first radio station coming through on a homemade crystal set. I wanted to build this as I always enjoy sitting in my garden after sunset watching the local Bats flittering overhead and thought that hearing them as well would add a further dimension to the experience, which it certainly does. The function of a Bat detector is to pick up the ultrasonic sound that a Bat emits for its echo location (which is too high for us humans to hear) and convert it down in frequency to something that we can hear. There are various ways to achieve this but one of the simplest methods is frequency division. As its name suggests, it takes the high frequency sound that a Bat makes and divides it down to a frequency within our hearing range. Click the play button below to hear a sample of what a Bat sounds like when heard with this bat detector


The circuit has three stages. A preamplifier to boost the signal from the microphone, a divider to down convert the frequency of the Bat to something we can hear and a power amplifier to drive the loudspeaker. The preamp is based on a standard dual opamp and although various types will work, I found the TL072 to be the 'liveliest'. It has two stages, each configured as an inverting amplifier. The first stage is set to a gain of 22 with the second being set at 68. Multiplying these two figures together gives an overall gain of 1496. Experimentation revealed that the circuit was more stable with less gain on the first stage and more on the second. Having too high an overall gain causes the circuit to break into oscillation and so the final figure chosen was a balance between stability and sensitivity

The output from the preamp is fed directly into the clock input of a CD4024 divider IC. This IC has outputs at differing division ratios but the one used here is divide by 16, which gives the perfect detection frequency bandwidth. For example, a 40 kHz signal at the microphone divided by 16 would become 2.5 kHz with 80 kHz becoming 5 kHz, both well within our hearing range. In fact, much higher frequencies could be detected but the limiting factor is the microphone. Microphones are generally used for audio and as such their spec sheets usually only show the frequency response up to about 20 kHz (the top end of our hearing range... well a young persons hearing range anyway!) but in practice some mics do go much higher and can be useable at ultrasonic frequencies. Of course, the output will be much lower but a good preamp should be able to compensate for any losses

Veroboard layout

When designing something like this you have to forget everything you know about Hi-Fi principles as they don't apply here. I wouldn't want to look at any of the waveforms in this circuit with an oscilloscope as I would probably be horrified. The thought of feeding an analogue signal directly into a logic chip is bizarre, but as the signal contains high and low levels it actually triggers the input quite nicely! Because the output level of a logic IC has a constant amplitude, what you hear will not be a perfect representation of the sound a Bat makes (more complex heterodyne detectors are available that will convert amplitude as well) but overall the results are pretty good. To keeps things simple, rather than using a full blown audio amplifier on the output I just used two transistors in push pull configuration as there is enough drive from the divider IC to give plenty of volume from an 8 ohm speaker, which incidentally remains completely silent until a Bat is detected. Because the CD4024 draws very little current and the transistor output stage is biased as class B, the overall quiescent current is mainly just that of the opamp (about 7mA at 9V). I just managed to squeeze it all onto a 9 x 25 hole veroboard so I've shown the cuts and links below in more clarity as it's quite densely packed. Note on the main layout above that some of the pins on the CD4024 DIL socket are shown as White dots instead of Black dots to indicate they've been snipped off and removed

Track cuts and links looking at underside (cuts underneath, links on top)

It doesn't matter how good the electronics is if the microphone used doesn't respond to ultrasonic frequencies, so selecting a suitable microphone is very important if the detector is to work properly. First I tried a dedicated ultrasonic transducer (like the ones used in old fashioned TV remote controls) but didn't have much success. Maybe it was a dud! So after some research on the internet I found three likely candidates which I purchased in order to test. The first was an electret microphone insert popular with Bat detector builders... the Panasonic WM-61A which although now discontinued, is still available from a few eBay sellers at a reasonable price (beware of fakes though!). Then there's the Primo EM258 which is in production, inexpensive and suggested as an equivalent to the Panasonic. My final choice was a MEMS type microphone (Micro-Electro-Mechanical System). These relatively new devices use micro sensors fabricated from silicon and can work well up into the ultrasonic region. The one I tried (and settled on) was the Knowles SPU0410LR5H-QB which although being about twice the price of the electret inserts, still isn't overly expensive

After trying all three I concluded that the MEMS type without a doubt had the best sensitivity. The electrets worked fine and I heard many Bats with them but the range just wasn't as good as with the MEMS. All these mics require a voltage supply to work as they have an integral preamp stage. This voltage is usually (according to the spec sheets) around 2 to 3 volts but they can take a bit more. With electrets you can usually get away with just a feed resistor from the main power rail (with some de-coupling for good practice) but with a MEMS I prefer to ensure the supply can't exceed the maximum rating. As I settled on the MEMS microphone for the finished project this is what the circuit concentrates on but I also give details below of how to connect an electret mic if preferred. Note: Not all electrets work at high frequencies but people report they've had more success with ones that are physically smaller. If you don't have a 'Test Bat' available, a good way to know if the circuit is working is to jangle a bunch of keys in front of the mic. In fact you can even be in the next room and the detector should easily pick them up and produce a sqeaky, clicky, raspy sound (well that's the best I can describe it anyway). An actual Bat sounds much more pleasant! Other test sounds are the letters 'S' and 'F' (by coincidence my initials)

Using an electret microphone

To use an electret mic instead of the MEMS mic there are only a few minor changes required to the circuit. The microphone is fed from the 9V supply rail via two resistors in series (2K2 and 6K8) with a 100n decoupling capacitor connected from their junction down to ground (changes to the main schematic are shown in Red)


The enclosure chosen for this project is a 140 x 66 x 28mm Hammond 1593YBK. It's big enough to fit all the components inside, small enough to be pocketable, has a battery compartment and a recessed lid for an overlay if you want to personalise it. The MEMS microphone was purchased from micbooster.com (FEL Communications LTD.) who can supply it pre-mounted on a small PCB which makes life much easier believe me! The PCB has the three connection points... supply plus (+), supply minus (-) and mic output and there's a handy mounting hole as well. The best choice of loudspeaker for this enclosure is a 40mm (approx) low profile mylar type. An overlay for the Hammond box can be download here (set print height to 5"). A useful accessory for the detector (that you may already have) is a mobile phone tripod mount. This is the perfect way to hold and angle the device in position

After the Bat detector prototype had performed flawlessly during testing, as happens quite often in this hobby, when I came to install everything 'neat' in the enclosure a serious issue came to light. Acoustic feedback! The whole thing burst into oscillation which at first I thought was due to electronic instability, but then I came to my senses realising that putting it in a plastic box wouldn't affect the electronics and that there must be something else going on. At first I didn't twig that it was audio feedback because it sounded too harsh and spiky, which come to think of it isn't that surprising considering how the circuit operates. It shouldn't happen though, as filtering in the preamp should stop any low frequencies from the speaker being fed back through the circuit. A wild guess as to what was happening is that maybe square waves produced by the speaker contain harmonics which are amplified by the smooth internal walls of the enclosure, much like when you put a seashell to your ear it amplifies the ambient noise around you (which we think is the sea). I tried adding a Zobel network to the output stage as I thought this might dampen down any 'ringing' produced by the inductance of the speaker but it made no difference, which I was kind of glad about as I'd deliberately left it out to preserve precious board space. Anyway whatever the cause, simply placing some balls of cotton wool inside the case, particularly behind the mic, kills the feedback stone dead!

Internal view


micronic.co.uk  for  Panasonic WM-61A (also available on eBay outlet)
micbooster.com  for  Knowles SPU0410LR5H-QB  and  Primo EM258
rapidonline.com for Hammond 1593YBK (also available on eBay outlet)

UPDATE: The circuit performs wonderfully but I think it actually may be a bit too loud! Although I love hearing the Bats echoing round the garden my neighbours may not so I'm working on a mod to add a volume control. Watch this space!