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.
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.
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.
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.
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.