IOT Based Water Quality Monitoring System
by piyushdhumale07 in Circuits > Sensors
86 Views, 4 Favorites, 0 Comments
IOT Based Water Quality Monitoring System
The IoT-Based Water Quality Monitoring System is a smart solution designed to continuously monitor and analyze water quality in real time. This system uses multiple sensors to measure important parameters. This project was developed to address the growing need for efficient and automated water monitoring in areas such as households, industries, agriculture, and water treatment facilities. By reducing manual testing and providing instant data access, the system improves decision-making and helps maintain safe water quality standards.
Supplies
Components Used:
- ESP32 / ESP32MCU (WiFi Module)
- pH Sensor Module
- Turbidity Sensor
- TDS (Total Dissolved Solids) Sensor
- Temperature Sensor (DS18B20 / LM35)
- Breadboard
- Jumper Wires
- Power Supply (5V / USB)
Software & Tools:
- Arduino IDE
- Firebase / IoT Cloud Platform
- Web Dashboard (HTML, CSS, JavaScript)
System Overview and Working Principle
This project is an IoT-based system designed to monitor water quality parameters in real time. The system uses multiple sensors such as pH, turbidity, TDS, and temperature sensors to collect data from the water source.
The ESP32MCU (ESP32) acts as the main controller, which reads data from all sensors and processes it. The collected data is then transmitted to a cloud platform using WiFi, allowing users to monitor water quality remotely through a web-based dashboard.
The dashboard provides real-time values, graphical analysis, and alerts if any parameter goes beyond safe limits. This helps in ensuring water safety and enables quick decision-making.
Circuit Diagram and Connections (ESP32)
In this step, all sensors are connected to the ESP32 microcontroller. The ESP32 is used because it provides multiple analog input pins and better performance compared to ESP8266.
🔌 Connections:
- pH SensorVCC → 5V
- GND → GND
- Output → GPIO34 (Analog Input)
- Turbidity SensorVCC → 5V
- GND → GND
- Output → GPIO35 (Analog Input)
- TDS SensorVCC → 5V
- GND → GND
- Output → GPIO32 (Analog Input)
- Temperature Sensor (DS18B20)VCC → 3.3V
- GND → GND
- Data → GPIO4
- Add a 4.7kΩ pull-up resistor between VCC and Data
Hardware Setup and Assembly
In this step, all components are physically assembled and arranged inside an enclosure to create a compact and functional system.
The ESP32 microcontroller is placed securely inside the box and connected to all sensors using jumper wires. The pH, turbidity, TDS, and temperature sensors are properly interfaced with the ESP32 according to the circuit connections.
All components are carefully organized to avoid loose connections and ensure stability. The wiring is arranged neatly to prevent short circuits and improve reliability.
The system is powered using a USB cable or external power supply. Indicator LEDs on the ESP32 and sensor modules confirm that the system is receiving power and functioning correctly.
The sensors are positioned in such a way that they can be easily placed into the water sample for accurate readings.
Programming the ESP32 and Data Transmission
In this step, the ESP32 is programmed using the Arduino IDE to read sensor data and send it to a cloud platform for remote monitoring.
First, the required libraries for WiFi and sensors are installed in the Arduino IDE. The ESP32 is then connected to a computer using a USB cable and the correct board and port are selected.
The program is written to read analog values from the pH, turbidity, and TDS sensors, and digital data from the temperature sensor. These values are processed and converted into meaningful units.
The ESP32 connects to a WiFi network using the provided SSID and password. Once connected, it sends the sensor data to a cloud database such as Firebase in real time.
This allows the system to store, analyze, and display data remotely on a web dashboard.
Downloads
Web Dashboard and Data Visualization
In this step, a web-based dashboard is created to display the sensor data in real time. The data sent by the ESP32 to the cloud (Firebase or any IoT platform) is fetched and displayed on a user-friendly interface.
The dashboard is developed using HTML, CSS, and JavaScript. It shows live values of pH, turbidity, TDS, and temperature. Graphs are also used to visualize changes in water quality over time.
The system continuously updates data, allowing users to monitor water conditions remotely from any device. Alerts or warnings can be added if any parameter exceeds safe limits.
This makes the system more interactive and useful for real-world applications.
Final Output and Testing
After completing the hardware and software setup, the system is tested using real water samples.
All sensors are placed in the water, and the ESP32 starts collecting and transmitting data to the cloud. The values are displayed on the web dashboard in real time.
Different water conditions can be tested to observe changes in pH, turbidity, TDS, and temperature. The system successfully detects variations and updates the dashboard accordingly.
This confirms that the IoT-based water quality monitoring system is working efficiently and can be used for real-time applications.