This project integrates IoT sensors, a custom PCB, and Machine Learning (Random Forest) to monitor and predict water quality in catfish ponds (biofloc system) in real time.
- Hardware: ESP32 microcontroller, sensors (DS18B20 for temperature, pH-4502C for pH, SEN0189 for turbidity), I2C LCD.
- PCB Design: Custom schematic & PCB designed with EasyEDA, integrating all sensors and ESP32.
- Firmware: Arduino IDE with WiFi + Firebase RTDB + OTA update support.
- Cloud & Database: Data transmission to Firebase Realtime Database (RTDB).
- Machine Learning: Random Forest model trained on water-quality dataset (98.05% accuracy, F1-score 0.94).
- Web Dashboard: Flask backend + HTML/Bootstrap frontend hosted on Firebase, showing real-time graphs, logs, and predictions.
Developed with Arduino IDE for ESP32. Main workflow:
- Initialize WiFi, Firebase, sensors (pH, temperature, turbidity), LCD, OTA.
- Check WiFi connection → restart if failed.
- Read sensors periodically.
- Every 3 minutes → average sensor values.
- Send data to Firebase RTDB.
- Reset variables and repeat.
- Schematic design in EasyEDA
- Custom PCB (10x9 cm, single-layer)
- Assembled with ESP32, sensors, and LCD
- Sensors → ESP32 → Firebase RTDB (every 3 minutes)
- Firebase → ML Model (Random Forest, time-series based)
- Prediction results stored & visualized on dashboard
- Preprocessing: resampling (5s → 3m), interpolation, labeling, SMOTE balancing
- Model: Random Forest (hyperparameter tuned with Randomized Search)
- Evaluation: Accuracy 98.05%, F1-score 0.9478
- Dashboard view with real-time water quality & predictions
- Log table with filter + CSV export
Link: https://rf-bioflok.web.app/