Skip to content

Repository files navigation

Fish logo

FishMaster 

Aquarium Monitoring and Control System using ESP32

FishMaster is an IoT aquarium monitor that tracks water quality and controls feeding using an ESP32 with a Spring Boot backend and React frontend.


💧 Overview

FishMaster is a smart aquarium system that monitors and controls key aquarium conditions through two layers: an embedded local system and a web-based system.

The embedded system uses an ESP32 microcontroller with sensors to measure 3 main parameters (pH, Temperature and Turbidity). Readings appear on a local LCD touch screen, and a servo-driven feeder handles scheduled and condition-based feeding. This setup works entirely offline, so the aquarium stays managed even if the network fails.

The web system adds cloud connectivity. The ESP32 uploads data to a backend, and users can view their aquarium through a mobile or web interface. The dashboard includes charts, historical data, and remote monitoring. If the network becomes unavailable, the system automatically switches back to the embedded mode.


How it Works

The system is designed to work whether or not there is an internet connection.

  • Local System (Offline): The ESP32 reads sensors and controls a servo motor for feeding. It shows the current readings on an LCD screen. If the Wi-Fi goes down, the feeding and monitoring still work.
  • Web System (Online): The ESP32 sends data to the backend. Users log in to a website to see charts, check history, and manage settings for multiple tanks.

fishmaster System Overview diagram
Figure 1: Fishmaster System Overview diagram


☁️ Cloud Architecture

FishMaster uses a hybrid IoT architecture with two main data flows:

  • 🔵 Sensor data: ESP32 publishes readings via MQTT → HiveMQ broker → Spring Boot backend → React dashboard via WebSocket
  • 🔴 Control commands: Dashboard sends commands via REST API → backend publishes to MQTT → ESP32 subscribes and acts (including triggering the servo feeder)

Fishmaster_architecture_diagram
Figure 2: Fishmaster Cloud Architecture — ESP32 → HiveMQ → Spring Boot → React


Main Features

  • Monitoring: Tracks Temperature, pH, and Turbidity in real time.
  • Feeding: Uses a servo motor (SG90) to dispense food on a set schedule. Feeding is paused automatically if water quality is unsafe (e.g. high turbidity).
  • Alerts: Sends a remote notification and sounds a local audible alarm if any water parameter goes outside the safe range.
  • Data History: Saves all sensor readings so you can view trends over time.
  • Local Display: A 2.8" ILI9341 touch LCD on the device shows live data without needing a computer or internet connection.
  • Offline Mode: The device continues monitoring and feeding even when Wi-Fi is unavailable.

System Modules

Hardware (ESP32)

ComponentModel / DetailsQtyPurpose
ESP32ESP32-DevKitC-32E (38-pin, CP2102)1Main microcontroller
Expansion BoardESP32 38-pin GPIO Expansion Board (Type-C)1Easier wiring, stable connections
pH SensorPH 0–14 Liquid Monitoring Sensor1Water pH detection
Turbidity SensorFARDUINO Water Turbidity Module1Water clarity detection
Temperature SensorDS18B20 Waterproof Probe1Water temperature
Display2.8" ILI9341 SPI Touch LCD (240x320)1Local UI display
Audio DeviceActive/Passive Piezo Buzzer / Speaker1Local audible alerts & notifications
Servo MotorSG90 180° Micro Servo1Automatic fish feeder
BreadboardMB-102 830-point1Circuit prototyping
Jumper Wires140 / 560 pcs set (M-M, M-F, F-F)1 setCircuit connections
Resistors4.7kΩ (0.25W, 5%)~10Pull-up for DS18B20
MultimeterHABOTEST HT109L1Debugging & testing
USB CableUSB Type-C1Power & programming
Power Supply ModuleMB102 Breadboard 5V/3.3V Power Supply Module1Provides stable power to breadboard

Software (Web)

ComponentTechnology / DetailsFunction
BackendSpring Boot (Java)Receives sensor data via MQTT, processes it, exposes REST API
FrontendReact (JavaScript)Displays dashboard, charts, alerts and feeding controls
DatabasePostgreSQLStores user data, sensor history and feeding logs
MQTT BrokerHiveMQ Cloud (Free Tier, QoS 1)Handles real-time messaging between ESP32 and backend

📸 Preview


Main dashboard view


Sensor data charts


🌐 Live Demo (Development)

⚠️ This is a development deployment and may be partially functional.

  • No authentication (single client setup)
  • Some features may not work fully
  • Mainly for testing UI and data flow

👉 https://fishmaster.up.railway.app/


Progress

  • Hardware sensor setup
  • Basic backend API
  • Dashboard UI
  • Support for multiple tanks
  • Servo feeder integration
  • Audio alert integration
  • Condition-based feeding logic
  • Support for calibration settings
  • Offline/online mode switching

Made with 🐟 by Abdalla Elshiekh | Powered by ESP32 ⚡ · Spring Boot 🟢 · React 🔷

About

Smart aquarium monitoring system using ESP32, MQTT, Spring Boot, SSE, PostgreSQL, and React for real-time water condition tracking.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages