Hearing a stopped pump with an old phone's microphone
Pumps, filters and air pumps are the heart and lungs of an aquarium. Once they stop, oxygen in the water drops noticeably within a few hours, even faster in summer. Yet these failures are often silent. Someone usually notices a power cut, but when a pump jams or an aging air pump gives out, the room just gets a tiny bit quieter, and that’s easy to miss.
A spare phone happens to have a sensor that’s cheap to leave on all the time: the microphone. This article explains how Keepova uses it to hear when equipment stops.
The challenge: homes are noisy
The obvious idea is “alert when it gets quieter”. But home sound changes all the time: TV, conversation, cooking, traffic outside, air conditioners and fridges cycling on and off. If you only look at volume, switching the TV off triggers a false alarm, and with the TV on you can’t hear the pump stop at all.
So the key is to find a measure that depends only on the pumps and is hard for other sounds to disturb.
The idea: track the noise floor, not the volume
Pumps and air pumps have one useful trait: they run 24 hours a day and make a continuous sound. TV, talking and doors closing come and go, with peaks, dips and pauses.
Imagine taking every short slice of sound energy in one minute and lining them up from quietest to loudest:
- Intermittent sounds only make the loudest moments louder;
- Equipment that runs continuously lifts the quietest moments as well.
That “quietest part of the minute” is the noise floor. Keepova takes the 10th percentile over a 60-second window: even if someone talks or the TV plays during that minute, the noise floor barely moves, as long as the sound isn’t completely continuous.
That gives a very useful rule:
A drop in the noise floor is the signal that equipment has stopped. Other sounds can only cover the noise floor up (push it higher); they can’t make it drop.
More than one number: split by frequency
Different devices sound different: an air pump has a vibrating hum, pumps and filters sound more like running water, and a fridge compressor has its own low-frequency drone. If you only tracked the overall noise floor, a fridge switching off could look like the pump stopping.
So Keepova splits the sound into 40 frequency bands (covering 50 to 6,000 Hz, spaced the way the human ear perceives pitch) and computes a noise floor for each band. At any moment the result isn’t one number but a set of numbers describing what the continuous sound in the room looks like right now.
Specifically, the phone samples mono audio at 16 kHz and runs a spectrum analysis every 32 milliseconds to get the energy in those 40 bands. All of this is computed on the tank phone itself.
Calibration: getting to know your equipment
Every tank and every room is different, so the first time you use Keepova there’s an optional sound calibration step:
- Keep the room quiet while the phone records how things normally sound, as a baseline;
- Following the prompts, turn off the air pump and the filter one at a time for a short while;
- How much the noise floor drops in each band when a device is off becomes that device’s sound signature.
With signatures, Keepova doesn’t just know that “something stopped”; it can tell you whether the air pump stopped or the filter stopped.
Calibration also computes a separability score: is the change when a device switches off big enough compared with the noise floor’s natural ups and downs? If a device is very quiet to begin with (say a canister filter inside a cabinet, or a silent submersible pump), the change gets lost in the noise. Keepova will then tell you plainly that this device is too quiet for sound detection for now, rather than pretending it can detect it and then missing problems or raising false alarms.
Deciding: it has to match, be big enough and last
Keepova continuously compares the current noise floor with the baseline. It only decides that a device has stopped when all of these hold:
- It matches: the shape of the drop is similar enough to that device’s signature (a cosine similarity of 0.8 or more between the two sets of numbers), so a fridge or fan switching off has a different shape and isn’t mistaken for the pump;
- It’s big enough: the drop exceeds a threshold (3 dB by default);
- It lasts: the state persists for about two and a half minutes, ruling out brief fluctuations.
Once confirmed, you get a “pump stopped” alert, usually within a few minutes of the device stopping. When the device starts again and the noise floor stays back at normal for 30 seconds, the event closes automatically.
What about vacuum cleaners and air conditioners?
Loud, continuous noise from a vacuum cleaner, air conditioner or fan lifts the whole noise floor, and at that point you really can’t tell whether the pump is running. Keepova recognizes this “covered up” state: it holds off on alerts during that time and the app shows that sound detection is temporarily unavailable, resuming once the noise has passed. It would rather tell you clearly that it can’t hear right now than guess when it can’t hear properly.
Also, as pumps and air pumps age, or filter media slowly clogs, their sound slowly changes too. The baseline updates gradually, day by day, during periods when everything is normal. Separate baselines are kept for lights on and lights off, and they can be restored from a cloud backup if you switch phones or reinstall.
Privacy: raw audio never leaves the phone
A microphone pointed at your home calls for privacy first. With Keepova:
- Raw audio is processed only on the tank phone: it’s never recorded, stored or uploaded;
- Only statistics such as the noise floor, plus a status like “normal”, “stopped” or “unavailable”, are sent to the cloud;
- Live sound is transmitted only when you turn on audio in the live view from the viewer phone.
Placement tips
- Get a little closer to the equipment: put the phone near the air pump or the pump outlet so it can hear them clearly;
- But don’t let it touch the tank or the air pump: direct contact picks up vibration, which actually makes detection harder;
- Avoid vents and appliances: keep it away from air conditioner vents and router fans;
- Once it’s in place, leave it there: moving the phone changes what it hears. If you do move it, we recommend recalibrating in Settings.
Summary
With one simple, steady measure, the noise floor, a spare phone can listen to your tank’s heartbeat around the clock. It isn’t perfect: very quiet equipment can’t be heard, and it pauses during loud noise. But it knows when it can hear and when it can’t, and it tells you honestly. For an aquarium, knowing within minutes that the pump has stopped can make all the difference.
This article is for general information only and is not a veterinary diagnosis or professional advice. If your fish show serious symptoms, consult an experienced aquarium store or an aquatic veterinarian.