Holbrook bat detector

Printed circuit board

Two-layer PCB from DirtyPCBs

Fnished project

The finished project in an Altoids tin

Magazine cover

We even made the cover of the local church paper

In late 2017 I traveled with a group of friends to volunteer at Holbrook Indian School in Arizona. With several engineers in the group, we decided to put together a series of STEM-focused activities for the students. I wanted a circuits-related activity for the high-school students, something tangible and engaging, that we could pull off in an afternoon---no easy feat. Having them actually build something seemed like the best approach, and after considering simple blinking LEDs and noise-makers, I thought, why not a bat receiver?

Why bats? No particular reason, but I'd already been playing with ultrasonic translator (bat receiver) circuits, there are plenty of bats in Arizona, and I thought we could tie this together with some demonstrations for the younger kids, the overall theme being sound waves; so, I set out to design a simple and inexpensive circuit. This was a fun exercise, because at work I mostly write software; circuit design is just a hobby. BOM (bill of materials) cost is almost irrelevant in a typical hobby project where only one or two copies will ever be built, but it becomes significant when twenty kits are called for. The final cost including PCB fab and all parts ended up being ~ $10 per unit, not too shabby. Besides choosing inexpensive parts, this cost was enabled by sourcing several of the "macroscopic" parts (battery holders, switches, knobs, Altoids tins) on Ebay, and using DirtyPCBs' low-cost prototyping service.

Circuit design

MEMS microphones make the sensing element easy. According to technical support at Knowles, almost any bottom-port, analog-output MEMS device will have significant ultrasonic response (20-100 kHz, say); it's not necessary to choose a mic advertising ultrasonic coverage. Most of them seem to have a resonance peak past 20 kHz, but for this non-critical application I was not concerned with response flatness. I chose the Invensense ICS-40720, not the cheapest option, but I already had some on-hand from earlier experiments. The microphone is followed by a high-pass RC filter to reduce its sensitivity to loud audible sounds in the environment.

Downconversion to the audible range is accomplished using a double-balanced switching mixer, taking advantage of the differential microphone signal. A 74HC4060 RC oscillator/divider drives the pair of SPDT CMOS switches; a 555 timer might have been used instead but the '4060 was also very cheap and I had some concerns about the duty-cycle accuracy in a 555-based oscillator. I attempted to use a log pot for quasi-linear tuning but still managed to get the footprint backwards, which necessitated cutting a trace to achieve log(exp(.)) tuning instead than exp(exp(.)). Different versions of the '4060 have inconsistent equations in their datasheets for determining the output frequency vs R and C, so I recommend experimentation.

I selected the LM4808 dual op-amp for differential to single-ended conversion, low-pass filtering, and headphone driver, largely on the basis of cost and compatibility with low-voltage supplies (bipolar 1.5V from a pair of AA cells).

I made an early decision to use surface-mount technology for this project. While through-hole components have an [undeserved, IMO] reputation for being easier to work with, I wanted the students to learn something about practical circuit assembly in the "real world". All ICs (except for the microphone) are in SOIC or SOT packages and all passives are 1206 size. As a bonus, most of the passives were already in-hand, leftovers won at auction from my previous employer. (Any unusual component values are because those were what I had in stock.) The students donned gloves and applied solder paste by hand without a stencil, then placed the parts with tweezers, then watched as we reflowed boards on a cookie sheet using a hot plate. Students at another station then soldered the through-hole wires, pots, and switch.


I learned that high-school students are much better at applying paste and centering parts than I am! On the whole, the finished boards look great, especially for a first effort. Most of them did require some rework, for a few reasons: First, the MEMS microphone is tricky to get right; second, I messed up a Mouser order so the CMOS switches I brought with me were SC-70 size instead of SOT-23, requiring some "creative" lead bending; and third, my solder paste was several years old, which probably contributed to the microphone soldering issues. Nonetheless, all of the boards were salvageable.

An ultrasonic dog whistle is handy to demonstrate the finished receiver. I recommend a fancier one, like the all-metal ACME, which can be tuned to be nearly silent at audible frequencies. (Many cheap whistles advertised as ultrasonic are not sufficiently high-pitched.) For a more impressive in-class demo, I found, through trial and error, a cheap USB sound dongle with output response up to about 30 kHz, and an "L010" ultrasonic speaker with broadband response from Kemo electronics in Germany. I then took a music clip and shifted it up to 20-30 kHz in MATLAB (equivalent to single- sideband modulation), then saved this as a WAV file at 96- or 192-kHz sampling frequency. With this laboratory setup it is possible to fill the room with music which is completely inaudible until "tuned in" by the ultrasonic translator. (An interesting consequence is the extremely pronounced Doppler effect when moving the source or receiver; although the fractional Doppler shift is independent of frequency, when the absolute shift at 25 kHz is translated to a few hundred Hz it becomes proportionally much larger. Even small hand motions cause obvious pitch shifts.)