First project · Noctiluca

Noctiluca: build a hydrophone

This project is called Noctiluca. A hydrophone is a waterproof microphone you lower into the water. With a few electronic parts and a little code, you can record and listen to underwater life. Here are the parts, the plans and the code to build one.

Step 1

The parts

Simple, affordable parts. The heart of the build is a piezoelectric sensor, which turns vibrations in the water into an electrical signal.

PartRoleNote
Piezoelectric sensorPick up sound vibrations in the waterPiezo disc, 20 to 35 mm
Shielded cableCarry the signal without interference2 to 5 m, shielded mono
PreamplifierBoost the weak raw signalOp-amp mic module
Epoxy resinMake the sensor fully waterproofSolvent-free resin
Heat-shrink tubingProtect and insulate the jointsA few diameters
3.5 mm jack connectorPlug into the recorderMono or stereo jack
RecorderCapture and save the soundsComputer, Raspberry Pi or audio recorder
Weight and floatSet the listening depthSmall weight and buoy

Tip: a preamp module with adjustable gain makes the first tests much easier.

Step 2

The wiring plans

The idea: the waterproof sensor sends its signal to the preamp, which sends it to the recorder. Follow it in order.

Signal flow
Piezo sensor | (vibrations in the water) v Shielded cable | v Preamplifier --> power | (boosted signal) v Recorder (3.5 mm jack) | v Audio file .wav
Steps
  • Solder two wires to the piezo disc, one to the center and one to the rim.
  • Connect the wires to the shielded cable, insulate each joint with tubing.
  • Fully coat the sensor in epoxy resin, with no air bubbles.
  • Let it cure, then test for leaks in a glass of water.
  • Plug the cable into the preamp and set a medium gain.
  • Connect the preamp to the recorder through the 3.5 mm jack.
  • Add the weight and float to choose the depth.

⚠️ Safety and respect for wildlife

Always stay with an adult near the water. Never play loud sounds underwater, and keep your distance from animals: the goal is to listen without disturbing them.

Step 3

The code

A bit of Python to record the sounds, then turn them into an image (a spectrogram) to see what you captured.

record.py
# Record 30 seconds of underwater sound
import sounddevice as sd
from scipy.io.wavfile import write

fs = 44100        # sampling rate
duration = 30     # seconds

print("Recording...")
audio = sd.rec(int(duration * fs), samplerate=fs, channels=1)
sd.wait()
write("ocean.wav", fs, audio)
print("Done: ocean.wav created")
spectrogram.py
# Turn the recording into an image
import numpy as np
import matplotlib.pyplot as plt
from scipy.io import wavfile

fs, data = wavfile.read("ocean.wav")
if data.ndim > 1:
    data = data[:, 0]   # keep a single channel

plt.specgram(data, Fs=fs, cmap="ocean")
plt.ylabel("Frequency (Hz)")
plt.xlabel("Time (s)")
plt.title("Sounds captured underwater")
plt.savefig("spectrogram.png", dpi=150)
print("Image saved: spectrogram.png")

Install the tools

A single command, in a terminal, to install the libraries used here:

pip install sounddevice scipy numpy matplotlib
Step 4

Record on your phone with NOCTILUCA

NOCTILUCA is a small free app for Android. Plug the hydrophone into your phone's headphone jack and the phone becomes the recorder from Step 2: watch the sounds live on a scrolling spectrogram, and save uncompressed WAV files you can study on a computer.

What it does
  • Live spectrogram: see the sounds as you listen.
  • One-tap recording to uncompressed WAV (48 kHz / 16-bit).
  • Raw, unprocessed input: no noise filter, no auto-gain.
  • Recordings saved to Music/Noctiluca, ready to copy to a computer.
  • Works fully offline, in the field.
Get the app

Android phone or tablet, Android 7.0 or newer. A 3.5 mm headphone jack (or a USB-C audio adapter) is needed to plug in the hydrophone.

Download NOCTILUCA · Android (.apk)

Version 1 · about 7 MB · free. Android only (no iPhone yet).

Read the full user guide →

Android will warn you — this is normal, just confirm

Because NOCTILUCA is a personal project, it is not on the Play Store. So when you install it, Android will show a warning saying it does not recognise this app. This does not mean there is a problem — it is the standard message for any app installed outside the Play Store. You simply have to confirm the installation: allow installs from your browser, and when Play Protect shows the “unknown app” alert, tap Install anyway (sometimes hidden behind “More details”). Full step-by-step in the user guide.

An idea, a question, an improvement?

The project is open. Write to me to share your tests or your advice.

Get in touch