IoT Aquarium Monitoring and Management System
AquaSphere: A Real-Time IoT Aquarium Monitoring and Management System
This title emphasizes the core functionality (monitoring), the technology stack (IoT), and the application domain (aquarium), making it sound professional and comprehensive.
Project Description
AquaSphere is an intelligent, cloud-connected system designed to automate the monitoring of critical water parameters in an aquarium. It leverages an ESP32 microcontroller as the central hub, collecting data from a suite of sensors and from a secondary Arduino. This data is displayed locally on an OLED screen, uploaded in real-time to a Firebase cloud database for remote access and historical analysis, and can be used to trigger alerts. The system is built to provide aquarists with a comprehensive view of their tank’s health, enabling proactive care and ensuring a stable environment for aquatic life.
Key Features
Multi-Parameter Sensing: Simultaneously monitors four crucial water quality metrics: pH level, Dissolved Oxygen (DO), water temperature, and water level/distance.
Real-Time Cloud Connectivity: Uses Wi-Fi to transmit all sensor data to Google’s Firebase Realtime Database, allowing users to view their aquarium’s status from anywhere in the world via a web or mobile app.
Local OLED Display: Provides an at-a-glance view of all sensor readings and system status (Wi-Fi connection) directly on a built-in screen, ensuring functionality even if the internet is down.
Modular & Scalable Architecture: The use of two microcontrollers (Arduino and ESP32) separates sensor reading logic from communication and display tasks, making the system robust and easy to debug or expand.
Infrastructure for Automation: The code includes a foundation for relay control (commented out), ready to be expanded for automatic actions like turning on fans for cooling, pumps for oxygenation, or solenoids for top-off water based on sensor thresholds.
Sensors & Hardware Used
Sensor/Component Purpose Pin Connection (ESP32)
ESP32 Microcontroller Main brain. Handles WiFi, Firebase, display, and sensor data aggregation. –
Arduino (e.g., Nano) Secondary microcontroller dedicated to reading analog sensors (pH and DO probes). Serial2 (RX: GPIO16, TX: GPIO17)
DS18B20 Waterproof Temp Sensor Measures water temperature with high accuracy. GPIO 4 (OneWire Bus)
HC-SR04 Ultrasonic Sensor Measures the distance to the water surface, calculating water level and volume. Trig: GPIO12, Echo: GPIO13
pH Sensor Probe & Circuit Measures the acidity/alkalinity of the water (pH level). Connected to Arduino
Dissolved Oxygen (DO) Sensor Measures the concentration of oxygen dissolved in the water. Connected to Arduino
SSD1306 OLED Display Shows real-time readings and system status locally. I2C (Address 0x3C)
Relay Module (commented out) Designed for future use to control equipment like lights, pumps, or chillers. GPIO 25 & 26
System Overview & Workflow
The system operates through a clear pipeline of data acquisition, processing, and output:
Data Acquisition:
The Arduino continuously reads the analog values from the pH and DO sensors, packages them into a string (e.g., “P7.25D8.10”), and sends it to the ESP32 via its hardware serial port.
The ESP32 uses the DS18B20 sensor to read the water temperature.
The ESP32 triggers the HC-SR04 ultrasonic sensor to measure the distance to the water surface, which correlates to the water level.
Data Processing & Communication:
The ESP32’s loop() function listens for the data string from the Arduino.
Upon receiving a valid string, it parses the pH and DO values.
It then checks if the WiFi and Firebase connection are active.
Data Output:
Local Display: The parsed data, along with the temperature and distance readings, is immediately sent to the OLED display for local monitoring.
Cloud Upload: If connected, the ESP32 pushes all four data points (pH, DO, Temp, Distance) to specific paths in the Firebase Realtime Database (e.g., /Aquarium/pH). This upload is throttled to once every 10 seconds to avoid overloading the database.
Serial Monitor: All data is also printed to the Serial Monitor for debugging purposes.
Control (Future Enhancement):
The commented-out relay code shows the intent to automatically turn equipment on/off on a timer. This can easily be modified to activate relays based on sensor thresholds (e.g., turn on an air pump if DO drops too low, trigger a refill if the water level is low, or activate a chiller if temperature is too high).
This project represents a complete end-to-end IoT application, perfect for showcasing skills in embedded systems, sensor integration, wireless communication, and cloud services.








