Raspberry Pi Bat Detector

...and how to do so...
RELATED
PRODUCTS

Post

This is not really a music project, but it is an audio gadget.

I built a real-time pitch-shifting time-stretching device, using a Raspberry Pi Zero running in 'bare metal' mode (i.e. without any operating system). It's basically a kind of granulator which slows down incoming audio by up to 4 octaves, but works in approximately real-time by overlapping the slowed down sounds as necessary.

Image

I originally designed it for listening to slowed down birdsong, but the mics I used are responsive up to 100KHz so it's turned out to be a rather effective bat detector - it's very cool to hear them chirping as they fly overhead at dusk.

I recorded the output of a session, trimmed out the silences and tidied it up a bit: Pipistrelle bats audio

There is more info on the project here.

Post

What did you use for the high-frequency audio capture?
my other modular synth is a bugbrand

Post

The microphone is a PDM device that emits a stream of 1's and 0's that encode the acoustic pressure - the more 1's in a given interval, the higher the pressure. It's clocked at nearly 5 MHz, so it's quite capable of encoding 100KHz audio. You have to do some noise-shaping/filtering on the stream to reconstruct an audio signal, particularly if you're interested in the higher frequencies, but the processor on the Pi has a built-in 'peripheral' that does some of that for you - I did the rest of the job, and stored/added the signal into a circular buffer.

It's working the processor pretty much flat out, I had to cut a few corners to get it to produce an acceptable sound quality, but in the end I was pretty happy with the result.

Post

Nice work, fascinating sounds.

Post

Good work
gadgets an gizmos..make noise https://soundcloud.com/crystalawareness Restocked: 3/24
old stuff http://ww.dancingbearaudioresearch.com/
if this post is edited -it was for punctuation, grammar, or to make it coherent (or make me seem coherent).

Post

cool.
pipistrelle are cute little critters too.

Post

Love it. Very cool idea.

Post

excellent quality sound

Post

This is amazing work! Not just tech-wise but also the end result per se. I read in EM back in the days that with a mic that goes up to 60 kHz, you can record insects on/under tree bark. When down-pitched, the sound is supposed to be very cool. (If you try it and it works, then please upload the track, because I have always wanted to know what it sounds like.)

Hmmmm.... just came to think of that we have six or seven unopened boxes of Pis in the office. Hmmmmm...... :wink:
Thu Oct 01, 2020 1:15 pm Passing Bye wrote:
"look at SparkySpark's post 4 posts up, let that sink in for a moment"
Go MuLab!

Post

Thanks - the audio file was tidied up a bit, but it pretty much reflects what you hear live. I'll have to try listening to tree bark some time, sounds intriguing!

If you have Pis floating around, have a go - but watch out, it's addictive! I've recently discovered the 'circle' bare-metal environment, which is really very good - it makes things much easier.

Post

kryptonaut wrote: Fri Nov 08, 2019 8:47 am Thanks - the audio file was tidied up a bit, but it pretty much reflects what you hear live. I'll have to try listening to tree bark some time, sounds intriguing!

If you have Pis floating around, have a go - but watch out, it's addictive! I've recently discovered the 'circle' bare-metal environment, which is really very good - it makes things much easier.
Hi again,

I read the stuff on your web page and also noticed your thoughts on different sounds and communication amongst bats. My brother is a scientist in biology and he asked a colleague about this, in relation to your webpage. Here is the answer (it's a Google translate, so linguistically it's a bit off, but you get the picture):
Yes, bats can have many different sounds, and many of them tend to be species-typical. Each species uses a special sound to orient and find insects, ie. sonar sound. This song has a characteristic rhythm, frequency, etc. Some species alternate between two or more different sonar sounds. Their sonar also varies a bit depending on where and how they fly.

In addition to this, they have a lot of social sounds, the most characteristic of which is usually the male's leprosy when they claim mating revelry. You may have heard gray-skinned bats yourself? It claims mating revelry around the castle and cathedral in Uppsala [Sweden] in October and you can then hear a rhythmic ticking sound without a detector.

The example below [i.e. your MP3 file] with the pipistrell is also a typical social song. Now I do not know what it is for a pipistrell that he has heard, but our usual pipistrell in Sweden, Pipistrellus pymaeus, has a sonar which is at 52 kHz. It also has a species-characteristic swirling sound that can be heard at many different frequencies, down to 20 kHz. In time expansion [i.e. down-pitching] it sounds like a drill.
(Must say Google Translate is actually very good! :o )
Thu Oct 01, 2020 1:15 pm Passing Bye wrote:
"look at SparkySpark's post 4 posts up, let that sink in for a moment"
Go MuLab!

Post

I love bats and I love this project! Cool!

Post

SparkySpark wrote: Fri Nov 08, 2019 10:52 pm I read the stuff on your web page and also noticed your thoughts on different sounds and communication amongst bats. My brother is a scientist in biology and he asked a colleague about this, in relation to your webpage. Here is the answer (it's a Google translate, so linguistically it's a bit off, but you get the picture):
Thank you very much for your interesting post. I haven't been aware of any clicks without using the detector, but I remember as a teenager I used to be able to hear bat calls, presumably pipistrelles, right at the limit of my hearing range. That was around 40 years ago though, and I can no longer hear such things - hence building the detector! :)

Post

kryptonaut wrote: Mon Nov 11, 2019 8:40 am
SparkySpark wrote: Fri Nov 08, 2019 10:52 pm I read the stuff on your web page and also noticed your thoughts on different sounds and communication amongst bats. My brother is a scientist in biology and he asked a colleague about this, in relation to your webpage. Here is the answer (it's a Google translate, so linguistically it's a bit off, but you get the picture):
Thank you very much for your interesting post. I haven't been aware of any clicks without using the detector, but I remember as a teenager I used to be able to hear bat calls, presumably pipistrelles, right at the limit of my hearing range. That was around 40 years ago though, and I can no longer hear such things - hence building the detector! :)
:)
You're welcome, it's very interesting actually. I personally wasn't aware bats were communicating with their sounds... but then again, why shouldn't they? Nature is fantastic and I'm glad you get this opportunity to experience it. Let us know if you can hear the insects eating wood!
Thu Oct 01, 2020 1:15 pm Passing Bye wrote:
"look at SparkySpark's post 4 posts up, let that sink in for a moment"
Go MuLab!

Post

SparkySpark wrote: Mon Nov 11, 2019 11:46 pm
kryptonaut wrote: Mon Nov 11, 2019 8:40 am
SparkySpark wrote: Fri Nov 08, 2019 10:52 pm I read the stuff on your web page and also noticed your thoughts on different sounds and communication amongst bats. My brother is a scientist in biology and he asked a colleague about this, in relation to your webpage. Here is the answer (it's a Google translate, so linguistically it's a bit off, but you get the picture):
Thank you very much for your interesting post. I haven't been aware of any clicks without using the detector, but I remember as a teenager I used to be able to hear bat calls, presumably pipistrelles, right at the limit of my hearing range. That was around 40 years ago though, and I can no longer hear such things - hence building the detector! :)
:)
You're welcome, it's very interesting actually. I personally wasn't aware bats were communicating with their sounds... but then again, why shouldn't they? I too grew up in Uppsala and remember hearing the bats by the river. Haven't heard them for a while, now that you mention it. Must be because of the --> :phones: :wink:

Anyway, nature is fantastic and I'm glad you get this opportunity to experience it. Let us know if you can hear the insects eating wood!
Thu Oct 01, 2020 1:15 pm Passing Bye wrote:
"look at SparkySpark's post 4 posts up, let that sink in for a moment"
Go MuLab!

Post Reply

Return to “DIY: Build it and they will come”