discussion / Acoustics  / 20 June 2023

Building a new recording device for sound localization

Hi all, Nice group! I'm building an acoustic monitoring device that I wanted to share as it may be of interest to some people and also I'd like to know of any requirements that people in bioacoustic research would like in such a device.

Currently I have the following working:
* Raspberry pi device with software that is recording from  a USB microphone (Currently cheap one, with mic replaced with em172 capsule).

* Time synchonization with GPS and PPS, system time is around 1us accuracy, typically lower

* Multi-thread C program that records from this source storing the files in a date based structure marking the start and end date/times to microsecond accuracy. The start time should be extremely accurately record, I'm expecting sub 1/2ms but still have to test and confirm this.

* Used defined file record length period. I'm currently using 10 mins because each new time in re-aligns the time to u-sec accurate time.

* Have intentions to connect an i2c thermometer and then also include the start of file temperature.

* File rotation program to compress to flac (Or if useful, other formats)

I've started with a cirrus-logic cm108 based USB recorder with em172 capsules because of historical reasons. But I've just ordered some Seeed Studios 2 mic pi hats that I intend to add to the system.

In principle, I'm expecting to be able to build a recorder system with extremely accurate GPS based timing for less than 100 euros that can record at sample rates up to 48000 Hz that should be ideally suited for sound localization. All of the components should be off the shelf and easily available (Caveat, pi's are currently more difficult but that is expected to ease in July). In any case, the microphone hat should be very readily obtainable.

Let me know if this is of interest to anyone and if you have any special desires or requirements you would like to have in the system above what I've mentioned above.

PS. I also have another very mature project (More than 10 years old that would be really suited for poacher or animal detection and alerting using the most advanced computer vision objection detection algorithms available (yolov6 and yolov6). But that's for another discussion.




Lars Holst Hansen
@Lars_Holst_Hansen
Aarhus University
Biologist and Research Technician working with ecosystem monitoring and research at Zackenberg Research Station in Greenland
Conversation starter level 3
Popular level 3
Poster level 2
Reactor level 3
Involvement level 3

Hi Kim!

This sounds like another super cool project of yours!

I have a little background in bioacoustics and remember an ALS (Acoustic Location System) used at my uni that cost tens of thousands of dollars. This was back in the 1990's ...  

The good folks at Open Acoustic Devices are working along the same lines as you.

Cheers,

Lars

Hi Kim,

Your project is very doable!  There isn't that much of an issue regarding timing accuracy, since a 1ms timing error corresponds to just 1 foot of localisation error (roughly).  Further, the recording clock which likely derives from the Pi clock will be good to only 10ppm, corresponding to a 6ms drift over the 10 minute recording.

You don't mention what kind of audio event you're trying to localise, and this is relevant because TDOA does well with impulsive sounds like gunshots but will have trouble with sounds like chainsaws that have do not have a clearly defined starting point to synchronise to.  In which case it would make sense to resort to beamforming instead.

All the best!

Hi Kim! (I think i tried posting this reply earlier, but it seems to have disappeared)

Wanted to add that it also sounds very doable and was curious if you were in touch with the folks making a microphone+GPS system for localizing elephants: 

And an interesting thought came to my mind in that there is a new super fancy type of GPS (

https://learn.sparkfun.com/tutorials/what-is-gps-rtk/all

 

that I was talking with Nate from Sparkfun about, and it can give you CENTIMETER accuracy (which is probably overkill for elephants, hahahah), and 30 nanosecond accuracy. Which with my back of the napkin calculations

If 200khz waves have 5000 ns periods you could localize BATS with plenty of sampling time overhead left i reckon?

an RTK system starts at like $600, so the cost is higher than regular GPS, but still far below the price of tens of thousands of dollars

Nate said they already have examples of sound localization with RTK, for instance popping a balloon.

https://docs.sparkfun.com/SparkFun_RTK_Firmware/menu_ports/#pulse-per-second

 

 

for sound localization in smaller areas, such as a room size, this person also just shared designs for a DIY phased array of microphones:

 

https://benwang.dev/2023/02/26/Phased-Array-Microphone.html

 

This is the current state.

It contains:

  • Raspberry pi zero w
  • GPS with PPS signal
  • Em172 mic capsule 
  • Cheap USB sound card for digitising audio
  • Adapter cable

Oh I haven’t added the temperature meter on this one yet. But it’s there.

The em172 microphones are used in nature recording have a high sensitivity high SNR and low self noise.

Despite being cheap, the low cost USB sound card has a high SNR. Don’t know about the frequency response.

This can be built for just under 100 euros.

The time accuracy hovers around the 1 microsecond of error. The sound files are thus aligned very accurately.

With a 15 euro power bank it can record for more than 24 hours.

Technically speaking, if needed this setup has the reliability to add a 4G model for remote access and the wat it’s setup you could also listen live whilst recording because I use the jackd2 real time audio distribution in its architecture.

I’m busy building 4x of them so I can do some field trials for publication.