Going Batty

I'm a big fan of bats. I even went so far as to make a video at Natterer's Wood in Bury St Edmunds.

bat_crossing

I have borrowed a "bat detector" (a device for listening to the ultrasonic noises made by bats as they fly and hunt) a few times, and it has always been very interesting, but I have never had one of my own. There are several types of bat detectors on the market, with wildly varying prices and capabilities. The lowest priced ones need to be tuned for specific frequencies of bat sounds, and don't offer any recording or analysis features - fun but pretty much toys. The fancier ones with these kinds of features can end up very expensive.

In short, this seems to be an area of technology ripe for exploring with a Raspberry Pi.

There have been some discussions on the Raspberry Pi forums about this sort of application, but I haven't seen any detailed project information yet. There are plenty of instructions around the web on how to build a manually-operated bat detector, usually of the "heterodyne" type, but it seems to me that the relatively large amount of processing power and storage in a device such as the Raspberry Pi should allow for some of the features only found on very high end devices - digital recording, frequency shifting, data analysis, even programmable unattended recording.

As with most such projects it needs a bit of software and a bit of hardware. The most essential bit of hardware is some way to get the sound of the bats into the memory of the Raspberry Pi, but this also seems to be the most complicated. Bat sounds range from about 20KHz to 60KHz or above, almost all bat sounds are outside the range of unaided human hearing.

ULTRASONIC SENSOR TRANSDUCERS

When I first looked at building a bat detector, many years ago, the consensus was that the only cheap input device available was the "ultrasonic transducer". These were used in the very earliest TV remote controls, before infra-red became the standard. These days they are occasionally used in range-finders for measuring distance. I started by looking at these, but they are relatively hard to get hold of, quite expensive, and very limited in frequency response. These days there are better options.

diycalvsnocal

It turns out that a lot of "electret" microphones are actually surprisingly good at capturing ultrasonic sounds. The main problem from the point of view of someone building an unltrasonic device is that the manufacturer datasheets usually only show performance up to 20KHz. Gossip has it, though, that many common microphones actually perform quite well across a wide range of frequencies. They may not be up to audiophile hi-fi standards but certainly acceptable for catching sounds we otherwise could not hear. A popular choice seems to be the Panasonic WM-61A, which can easily be found on ebay.

spu0410lr5

Going even more high-tech than that, some of the MEMS microphones commonly found in phones, tablets and MP3 players are also good at ultrasound. One of then, the Knowles SPU0410LR5H-QB, even has its ultrasound performance described in its datasheet. This tiny device is about 3mm square and contains its own micro output amplifier. It would be a great solution if only I could think of a way of soldering it!

As for the rest of the hardware I'm not so sure. For high-quality audio input the device would need an analogue to digital converter (ADC) running at a reasonable enough speed to capture sounds at the high frequencies we are concerned with, perhaps a sampling rate of around 200KHz. It's possible, though, that a simple one-bit digital input might be enough to get a recognizable signal. I remember back in the very early 1980s connecting an audio input to one IO pin of an Acorn Atom computer, and being surprised by how intelligible the recorded sound was, so I may try that approach first. Also, as bats are not so often found indoors, the Pi would need to be battery powered and have some sort of controls for starting and stopping recording, etc.

Then there is the software. For me the most important bit is to record the sounds for later processing, but I understand that it's a bit tough to make recordings if you can't monitor what's being recorded - that'a a great way to miss all the interesting stuff, so either some sort of frequency shifted audio output, or some sort of display indicating the presence/strength of ultrasound signals would be very useful.

While I'm not going to "down tools" on my other projects to get this done, it will certainly be on my mind. I might just buy some microphones and have a play, though.

No related content found.

6 Comments

  1. Pingback: I feel like I’m becoming a giant! | Raspberry Alpha Omega

  2. have you come any further in this project?

    Im about to start the very same project, and could definitely need some companionship on my way.

    The discussion about microphone has evolved a bit the last year. there is now two microphones in my interest.
    http://www.batsound.com/
    http://www.dodotronic.com/acoustic-devices/ultramics (they even have it running on a raspberry!)
    I know i should probably just build one my self, but i’m not that good at electronics, so ive bought my way through that. (just ordered the petterson, and willing to buy the dodotronic as well).

    My tasks at hand is how to read/record the microphone input and how to make the recording sound triggered – i only want it to record, when theres something to record.

    further improvements could be:
    Solar-power
    Server-upload via 3g modem
    Gps tracking

  3. I have been lusting after the SongFinder that translates high frequencies into a hearable range (assuming high frequency loss is your primary problem). I bought a TI board, but was never able to get the FFT filtering examples to compile so was never able to build my own version. My next attempt was to use PD-Extended to create a test and I was successful although there seemed to be a lot of delay (which might be tolerable). I did not try the next step of installing my sample program on a Pi, but PD does run on the Pi.

    I would prefer to have a FFT Audio Filter example to play with rather than using PD — I am assuming the interpreted code would be slower. So far, I have not been able to find any sample filters to even begin experimenting with — with the model in PD, I think I have the basics down although I don’t really understand some of the processes (perhaps because of the style of programming in PD?).

    Has your work progressed beyond the hardware? I suspect that many microphones are pretty good into the ultrasonic range — certainly all are more than adequate for birding!

Leave a Reply

Your email address will not be published. Required fields are marked *