IOT Based Water Quality Monitoring System

by piyushdhumale07 in Circuits > Sensors

86 Views, 4 Favorites, 0 Comments

IOT Based Water Quality Monitoring System

a384c32b-24f6-4aaa-9eba-f6979d14d36e.png

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

WhatsApp Image 2026-03-24 at 9.23.00 PM.jpeg
WhatsApp Image 2026-03-24 at 9.23.01 PM.jpeg

Components Used:

  1. ESP32 / ESP32MCU (WiFi Module)
  2. pH Sensor Module
  3. Turbidity Sensor
  4. TDS (Total Dissolved Solids) Sensor
  5. Temperature Sensor (DS18B20 / LM35)
  6. Breadboard
  7. Jumper Wires
  8. Power Supply (5V / USB)

Software & Tools:

  1. Arduino IDE
  2. Firebase / IoT Cloud Platform
  3. 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)

e92c6747-9211-43f7-918d-b52811d9f18a.png

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:

  1. pH SensorVCC → 5V
  2. GND → GND
  3. Output → GPIO34 (Analog Input)
  4. Turbidity SensorVCC → 5V
  5. GND → GND
  6. Output → GPIO35 (Analog Input)
  7. TDS SensorVCC → 5V
  8. GND → GND
  9. Output → GPIO32 (Analog Input)
  10. Temperature Sensor (DS18B20)VCC → 3.3V
  11. GND → GND
  12. Data → GPIO4
  13. Add a 4.7kΩ pull-up resistor between VCC and Data


Hardware Setup and Assembly

WhatsApp Image 2026-03-24 at 9.23.00 PM.jpeg

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

Screenshot 2026-05-03 210921.png
Screenshot 2026-05-03 210909.png
Screenshot 2026-05-03 210734.png
WhatsApp Image 2026-03-24 at 9.27.36 PM.jpeg
Screenshot 2026-05-03 210759.png
WhatsApp Image 2026-03-24 at 9.26.53 PM.jpeg

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

c0887b85-1d43-49af-a2d9-0e2241c1bb1b.png

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.