Skip to main content

AquaSmart: Automated Aquarium Management with IoT

00:02:57:30

The problem with keeping fish

Aquariums are more demanding than they look. Water temperature, pH, oxygen levels, feeding schedules, and algae buildup on the glass all require consistent attention, and missing any of them long enough will harm the fish. For anyone who travels or just has a busy schedule, that level of daily maintenance is a real obstacle.

AquaSmart started as a way to solve that problem for myself. The goal was a system that could handle the routine tasks automatically, surface warnings when something was off, and let me check in or intervene from anywhere.

What it does

The system runs on a Raspberry Pi and handles four main functions.

Feeding. A 3D-printed feeder sits above the tank and uses a screw mechanism to dispense food on a set schedule. The screw design crushes food before dispensing it, which prevents clumping and keeps portions consistent. Feeding times are configurable through the dashboard and can also be triggered manually from anywhere.

Tank cleaning. A repurposed car windshield wiper motor drives a cleaning arm across the inside glass surfaces of the tank. It can run on a schedule or be triggered remotely with a single tap in the app. Algae on the glass is the most visible sign of a neglected tank, and automating its removal keeps the setup looking clean without any physical intervention.

Water quality monitoring. Temperature, pH, and oxygen sensors feed continuous readings into the Raspberry Pi, which syncs them to Firebase in real time. If any value drifts outside the configured acceptable range, the system sends an alert. Historical data is stored and visualized so patterns are easy to spot.

Remote control. Everything is accessible through a Flask-backed web interface and a React Native mobile app. Both pull live data from Firebase and allow full control of the feeder, wiper, lights, and pumps. The app works from anywhere with an internet connection.

Hardware

The core components are a Raspberry Pi as the main controller, a DC motor for the wiper and feeder mechanisms, a relay module to switch higher-power devices like the pump and lights, and the water quality sensors for temperature, pH, and dissolved oxygen. All cable routing and mechanical mounts are custom 3D-printed, which keeps the physical setup compact and easier to maintain.

Software

The control logic is written in Python. Sensor readings are collected and processed locally on the Pi, then synced to a Firebase Realtime Database. The Flask server exposes an API that both the web dashboard and the React Native app talk to. Data visualization is handled with Matplotlib and Plotly, displaying trends for each monitored parameter over time.

What I learned

Getting the software to work was the easy part. The harder problems were mechanical. The wiper arm kept binding on its bracket until I reprinted it three times with a slightly different geometry, and the feeder screw would jam or dispense inconsistent amounts depending on how coarsely the food was ground. I spent more time iterating on printed parts than I expected going in.

On the software side, the biggest headache was sensor noise triggering false alerts constantly. I ended up smoothing readings over a rolling window before acting on them, which helped a lot. The Firebase sync also had issues when the Pi lost its connection briefly, so I added a local queue that would flush once the connection came back. Neither of those fixes was complicated, but they were not obvious until the system had been running long enough to surface the problem.