Automated Marine Aquarium Controller
ESP32-based smart controller for a saltwater aquarium — automated chemical testing, precision dosing, programmable lighting, and real-time alerts. Includes a custom RGB spectrometer prototype for in-situ water analysis.
- Client
- Personal project
- Year
- 2024
- Role
- End-to-end hardware, firmware, and software
- Stack
- ESP32Embedded SystemsSensorsAutomationPCB
The problem
Saltwater aquariums are chemically demanding. Maintaining stable alkalinity, calcium, and magnesium levels requires daily testing and manual dosing — easy to miss, easy to overdose. Commercial controllers exist but are expensive, closed-source, and rarely expose the raw data needed to understand what's actually happening in the tank.
What I built
An ESP32-based controller handling the full automation loop: scheduled chemical testing, peristaltic pump dosing, programmable LED lighting, and push alerts when parameters drift outside target ranges.
The most technically involved piece is a custom RGB spectrometer prototype — designed to perform in-situ colorimetric water analysis without sending samples to an external reader. The spectrometer uses a set of narrow-band LEDs and a photodiode array to measure absorbance at specific wavelengths, correlating readings to ion concentrations.
Firmware runs on FreeRTOS, managing the sensor sampling schedule, dosing logic, and a lightweight web interface for configuration and live data. PCB designed in KiCad; enclosure printed in PETG for chemical resistance.
Outcome
Fully automated water chemistry maintenance with configurable target ranges and alert thresholds. The RGB spectrometer prototype successfully distinguishes reagent color shifts for standard aquarium test kits, validating the measurement approach for future refinement.