-
-
AquaForecast System Architecture — IoT-Based Water Quality Monitoring and Machine Learning Prediction System
-
Flask Backend Implementation and Local Server Running in VS Code
-
ESP32 Programming and Sensor Data Transmission Using Arduino IDE
-
ESP32 Serial Monitor Showing Wi-Fi Connection, Sensor Readings, and SAFE Water Prediction
-
Muddy Water Sample Used for AquaForecast Water Quality Testing
Inspiration:
We got the idea for AquaForecast because water quality is very important for our daily life. We wanted to create a simple system that can help identify whether water is safe or unsafe. So, we decided to combine IoT sensors with Machine Learning to make a water quality prediction system.
How We Built It:
First, we collected the Water Potability Dataset from Kaggle and prepared the data for training. The dataset contains different water quality parameters such as pH, hardness, solids, chloramines, sulfate, conductivity, organic carbon, trihalomethanes, and turbidity.
We handled the missing values using mean imputation and trained a Random Forest model using Python and Scikit-Learn. After training the model, we connected it with a Flask web application.
For the hardware part, we used an ESP32 along with a pH sensor and turbidity sensor. The ESP32 collects the sensor values and sends them to the Flask server through Wi-Fi. The Machine Learning model then uses the data to predict whether the water is safe or unsafe.
What We Learned:
While working on this project, we learned how Machine Learning can be connected with a real-world application. We learned about data preprocessing, model training, Random Forest, Flask, APIs, ESP32, and sensor data.
We also learned how the frontend, backend, Machine Learning model, and hardware can work together as a single system.
Challenges We Faced:
One of the main challenges was connecting the ESP32 with our Flask server through Wi-Fi. We also faced challenges with pH sensor calibration because the sensor gives voltage values that need to be converted into accurate pH readings.
Another challenge was the imbalance in our dataset, where there were more unsafe samples than safe samples. Our current model gives around 66–68% accuracy, so we are planning to improve it further.
Future Improvements:
In the future, we plan to use SMOTE to handle the class imbalance and compare Random Forest with XGBoost. We also want to test the system with real water samples and add more sensors to collect additional water quality parameters.
Overall, this project helped us gain practical experience in Machine Learning, IoT, and web development while working on a real-world problem.
Built With
- api
- arduino
- code
- css
- data
- esp32
- flask
- html
- ide
- iot
- javascript
- joblib
- kaggle
- numpy
- pandas
- ph
- python
- quality
- rest
- science
- scikit-learn
- sensor
- turbidity
Log in or sign up for Devpost to join the conversation.