Building a Hydrophone Buoy Control System for Whale Research Using Raspberry Pi, NixOS and Rust

Building a Hydrophone Buoy Control System for Whale Research Using Raspberry Pi, NixOS and Rust

In the summer of 2022 me and my partner were visiting a small town called Andenes in the north of Norway. We often visit the region in the summer for hiking and relaxing in the nature, but this summer we had planned something a bit more special. We had booked a whale watching tour with a local company called Whale2Sea with hopes of seeing a sperm whale.

During our initial trip we unfortunately didn't see any whales, but met one of the researchers Tiu Similä and learned that her research team could use some help with a device they were building for recording sperm whale audio.

Fast forward to November 2023 we have been a part of the project we now call the Hydrophonitor (a hydrophone monitoring system) for a little less than a year and a half. We recently visited Andenes again for a longer 2-month period and this time we got to see many different whales and record their audio with our new system.

Acoustic Monitoring of Cetaceans

Fishing our prototype buoy out of the water.

The imperative to acoustically monitor cetaceans, particularly whales, stems from a scientific need to comprehend their communicative behaviors and ecological interactions. This auditory surveillance is pivotal in propelling cetacean conservation into public discourse, highlighting the cognitive complexity and expressiveness of these marine mammals.

Marine bioacoustics primarily employ hydrophones, submerged microphones, to capture cetacean vocalizations. When deployed from vessels, these devices enable direct and immediate auditory data acquisition. However, the utilization of passive acoustic buoys presents a less invasive alternative, offering prolonged, autonomous recording capabilities. This methodological shift enhances our understanding of cetacean acoustic patterns, providing critical data for behavioral analysis and conservation strategies.

The auditory data, comprising diverse cetacean vocalizations, are instrumental in elucidating their communication systems, migratory behaviors, and responses to environmental fluctuations, thereby underpinning both scientific research and conservation initiatives.

The hydrophones dangle about 10m below the buoy.

Designing the Hydrophone Monitoring System aka. Hydrophonitor

The Hydrophonitor, a hydrophone monitoring system, initially deployed using Raspberry Pi Linux and scripts, evolved to embrace NixOS. NixOS was selected for its declarative configuration approach, which enhances reproducibility and streamlines system service configuration via systemd. This transition allowed for more robust packaging of custom programs. The software stack transitioned from Python to Rust, leveraging Rust's Serde library for efficient data modeling, particularly in developing a GPS recorder. Future development plans include integrating a depth recorder to augment the system's data collection capabilities.

Project Status

The Hydrophonitor project has successfully implemented a functioning system on Raspberry Pi using NixOS. However, challenges persist, particularly with the GPS functionality and the real-time clock system. Efforts are currently focused on developing a comprehensive Command Line Interface (CLI). Additionally, KaskelottiOS is being developed as a specialized NixOS configuration tailored for marine acoustic research, aiming to provide an all-encompassing solution for this field.

Did you find this article valuable?

Support Julius Koskela by becoming a sponsor. Any amount is appreciated!