๐ŸŒŠ IoT Water Quality Monitoring System

ESP32-Based Real-Time Environmental Monitoring Dashboard

Controller: ESP32 DevKit V1 Status: Online Last Updated: --:--:--

๐Ÿ“‹ Project Overview

๐ŸŽฏ Objective

Develop an automated IoT-based water quality monitoring system using ESP32 microcontroller with multi-parameter sensor integration, real-time data visualization, cloud connectivity, and automated alert mechanisms for maintaining water safety standards.

๐Ÿ”ฌ Technology Stack

  • Microcontroller: ESP32 DevKit V1 (WiFi + Bluetooth)
  • Sensors: pH, Turbidity, Air Quality, Moisture, Distance
  • Actuators: Servo Motor, Relay, Buzzer, LED
  • Communication: MQTT/HTTP Protocol
  • Frontend: HTML5, CSS3, JavaScript
  • Backend: Node.js / Python (Planned)
  • Cloud: AWS IoT / ThingSpeak (Planned)

๐Ÿ’ก Key Features

  • Multi-parameter real-time monitoring
  • Automated servo-controlled valve system
  • Audio-visual alert system (Buzzer + LED)
  • Water level measurement (Ultrasonic)
  • Cloud data logging and analytics
  • Mobile-responsive web dashboard
  • Remote control via WiFi
  • Threshold-based automation

๐Ÿ“Š System Status Overview

๐ŸŸข

Sensors Active

6/6

๐Ÿ“ก

WiFi Connection

Strong

โšก

ESP32 Uptime

99.8%

๐Ÿ””

Active Alerts

0

๐ŸŒก๏ธ Real-Time Sensor Readings

pH Level

PH-4502C Module

Analog Input: GPIO34

โœ… OK
7.2
Safe Range: 6.5 - 8.5
๐Ÿ“ Location: Main Tank ๐Ÿ”„ Update: 2s ago
Range: 0-14 pH | Accuracy: ยฑ0.1

Turbidity

SEN0189 Module

Analog Input: GPIO35

โœ… OK
5.0 NTU
Safe Range: 0 - 10 NTU
๐Ÿ“ Location: Inlet Pipe ๐Ÿ”„ Update: 2s ago
Range: 0-3000 NTU | DFRobot

Air Quality (Gas)

MQ-135 Sensor

Analog Input: GPIO32

โœ… OK
150 PPM
Safe Range: 0 - 300 PPM
๐Ÿ“ Location: Storage Area ๐Ÿ”„ Update: 2s ago
Detects: NH3, NOx, CO2, Smoke | Heating: Required

Water Level

HC-SR04 Ultrasonic

Trig: GPIO5, Echo: GPIO18

โ„น๏ธ
75 %
Tank Capacity: 100L
๐Ÿ“ Location: Main Tank ๐Ÿ”„ Update: 2s ago
Range: 2-400cm | Resolution: 0.3cm

Soil Moisture

Capacitive Moisture

Analog Input: GPIO33

โœ… OK
65 %
Optimal: 60 - 80%
๐Ÿ“ Location: Filter Bed ๐Ÿ”„ Update: 2s ago
Type: Capacitive | Corrosion Resistant

Water Temperature

ESP32 Internal / DS18B20

OneWire: GPIO4

โœ… OK
24 ยฐC
Safe Range: 15 - 30ยฐC
๐Ÿ“ Location: Main Tank ๐Ÿ”„ Update: 2s ago
Accuracy: ยฑ0.5ยฐC | Waterproof Probe

๐ŸŽ›๏ธ System Controls & Actuators

๐Ÿ”ง SG90 Servo Valve Control

GPIO Pin: 13 PWM: 50Hz Angle: 0-180ยฐ
0ยฐ

Servo Status: CLOSED

Current Angle: 0ยฐ

Last Action: System Start

๐Ÿšจ Alert System Control

LED Indicator

GPIO: 2 Type: Built-in LED

Status: OFF

Active Buzzer

GPIO: 15 Type: Active
๐Ÿ”Š

Status: SILENT

5V Relay Module

GPIO: 27 Type: NO/NC
โšก

Status: OFF

๐Ÿ”Œ Hardware Architecture

ESP32 DevKit V1

Dual-Core 240MHz

WiFi + Bluetooth

๐Ÿ“ฅ Analog Inputs (ADC)

  • GPIO34 โ†’ PH-4502C (pH Sensor)
  • GPIO35 โ†’ SEN0189 (Turbidity)
  • GPIO32 โ†’ MQ-135 (Air Quality)
  • GPIO33 โ†’ Moisture Sensor

๐Ÿ”Œ Digital I/O

  • GPIO5 โ†’ HC-SR04 Trigger
  • GPIO18 โ†’ HC-SR04 Echo
  • GPIO4 โ†’ DS18B20 (OneWire)

๐Ÿ“ค Output Controls

  • GPIO13 โ†’ SG90 Servo (PWM)
  • GPIO2 โ†’ LED Indicator
  • GPIO15 โ†’ Active Buzzer
  • GPIO27 โ†’ 5V Relay Module

๐ŸŒ Communication

  • WiFi โ†’ MQTT Broker
  • HTTP โ†’ Web Server
  • Bluetooth โ†’ Mobile App

๐Ÿ”” System Alerts & Event Log

โ„น๏ธ
2026-02-27 10:30:00 AM ESP32 initialized successfully - All sensors connected
โœ…
2026-02-27 10:25:00 AM All parameters within safe range - Water quality: EXCELLENT

โš™๏ธ Complete Hardware Specifications

๐Ÿ–ฅ๏ธ Microcontroller

Model ESP32 DevKit V1
Processor Dual-core Xtensa LX6 @ 240MHz
RAM 520 KB SRAM
Flash 4 MB
WiFi 802.11 b/g/n (2.4 GHz)
Bluetooth Bluetooth 4.2 & BLE
GPIO Pins 30+ (18 ADC channels)
Operating Voltage 3.3V (5V via USB)

๐Ÿ”ฌ Sensor Modules

pH Sensor PH-4502C (0-14 pH, ยฑ0.1 accuracy)
Turbidity SEN0189 (0-3000 NTU, DFRobot)
Air Quality MQ-135 (NH3, NOx, CO2 detection)
Distance HC-SR04 (2-400cm, ยฑ3mm)
Moisture Capacitive (Corrosion resistant)
Temperature DS18B20 (Optional, ยฑ0.5ยฐC)

โšก Actuators & Outputs

Servo Motor SG90 (0-180ยฐ, 4.8-6V, 9g)
Relay Module 5V Single Channel (10A/250VAC)
Buzzer Active Buzzer (3-5V DC)
LED Indicator Built-in + External (3mm/5mm)

๐Ÿ’ป Software Stack

IDE Arduino IDE / PlatformIO
Programming C/C++ (Arduino Framework)
Libraries WiFi.h, WebServer.h, Servo.h
Protocol MQTT, HTTP, WebSocket
Frontend HTML5, CSS3, JavaScript
Backend Node.js / Python Flask (Planned)
Database MongoDB / InfluxDB (Planned)
Cloud Platform AWS IoT / ThingSpeak (Planned)

๐Ÿ”‹ Power Requirements & Circuit Design

Power Supply

  • ESP32: 5V USB / 3.7V LiPo Battery
  • Sensors: 3.3V-5V (ESP32 regulated)
  • Servo: 5V External (500mA peak)
  • Relay: 5V (70mA coil current)
  • Total Current: ~1.5A (with all components)
  • Recommended PSU: 5V 2A DC Adapter

Circuit Protection

  • Voltage regulators for sensitive sensors
  • Flyback diodes on relay coil
  • Current limiting resistors for LEDs
  • Separate power rail for servo motor
  • Decoupling capacitors (100nF, 10ยตF)
  • Reverse polarity protection