fbpx
Student Engineering Project

Smart IoT Water Quality Evaluation System

A dual-microcontroller IoT water-quality monitoring system that measures temperature, turbidity, pH and total dissolved solids (TDS), displays the results locally on a 20×4 LCD, uploads measurements to ThingSpeak through an ESP8266-01 and sends SMS alerts when programmed water-quality evaluation thresholds indicate that the water is not safe.

▣PIC18F2620 + ATmega328PU — Dual-Microcontroller Architecture ⚙Embedded Systems ◆Student Project
Smart IoT water quality evaluation system with PIC18F2620 and ATmega328PU
Completed project — Smart IoT Water Quality Evaluation System Click to view

Project Overview

The Smart IoT Water Quality Evaluation System is a distributed embedded monitoring system designed to measure and evaluate multiple water-quality parameters while providing both local and remote monitoring. The system uses two microcontrollers, with each controller assigned a specific role. An ATmega328PU operates as the dedicated sensor-acquisition controller. It interfaces with the DS18B20 temperature sensor, turbidity sensor, pH sensor and TDS sensor, measures the connected sensor parameters and transfers the resulting data to the main controller through a software UART communication link. A PIC18F2620 serves as the main processing and communications controller. It receives and decodes the sensor data, formats the measurements for presentation on a 20×4 LCD, communicates with an ESP8266-01 for Wi-Fi connectivity and uploads the measured parameters to ThingSpeak. The PIC18F2620 also communicates with a SIM800L GSM module for SMS notification. The embedded evaluation logic compares selected measurements against programmed thresholds. The implemented firmware evaluates pH, turbidity and TDS. When a parameter falls outside its programmed acceptable range, the system displays "Water is not safe", activates the buzzer and sends an SMS notification. The firmware uses pH outside 5.5–8.5, turbidity above the programmed threshold and TDS outside 300–1000 as the implemented evaluation conditions. The system therefore combines sensor acquisition, embedded data processing, LCD visualization, Wi-Fi IoT connectivity and GSM alerting into a single water-quality evaluation platform.

How the System Works

  1. The ATmega328PU initializes the connected water-quality sensors.
  2. The ATmega328PU measures water temperature using the DS18B20 sensor.
  3. The ATmega328PU acquires the turbidity sensor measurement.
  4. The ATmega328PU acquires the pH sensor measurement.
  5. The ATmega328PU acquires the TDS sensor measurement.
  6. The measured sensor parameters are packaged into a structured data message.
  7. The ATmega328PU transfers the sensor data to the PIC18F2620 through a software UART communication link.
  8. The PIC18F2620 receives the sensor data and decodes the individual parameters.
  9. The PIC18F2620 converts the received sensor values into usable numerical measurements.
  10. The measured TDS, temperature, pH and turbidity values are displayed on the 20×4 LCD.
  11. The PIC18F2620 evaluates selected water-quality parameters against the programmed thresholds.
  12. If the pH is outside the programmed 5.5–8.5 range, the system indicates that the water is not safe.
  13. If the turbidity value exceeds the programmed threshold, the system indicates that the water is not safe.
  14. If the TDS value falls outside the programmed 300–1000 range, the system indicates that the water is not safe.
  15. When an unsafe condition is detected, the buzzer is activated.
  16. The PIC18F2620 sends an SMS notification through the SIM800L GSM module when an unsafe condition is detected.
  17. The ESP8266-01 provides Wi-Fi connectivity for remote data transmission.
  18. The PIC18F2620 uploads the measured water-quality parameters to ThingSpeak.
  19. The system continues acquiring and evaluating water-quality measurements in a repeating monitoring cycle.

System Architecture

◆DS18B20 → ATmega328PU → Temperature Measurement
→
◆Turbidity Sensor → ATmega328PU → Turbidity Measurement
→
◆pH Sensor → ATmega328PU → pH Measurement
→
◆TDS Sensor → ATmega328PU → TDS Measurement
→
◆ATmega328PU → Software UART → PIC18F2620
→
◆PIC18F2620 → Data Decoding → Sensor Parameter Processing
→
◆PIC18F2620 → 20×4 LCD → Local Water-Quality Display
→
◆PIC18F2620 → ESP8266-01 → Wi-Fi → ThingSpeak
→
◆PIC18F2620 → SIM800L → GSM → SMS Alert
→
◆pH / Turbidity / TDS → Threshold Evaluation → Water Safety Status
→
◆Unsafe Condition → PIC18F2620 → Buzzer + SMS Notification
HAVE AN ENGINEERING PROJECT IN MIND?

Let's develop it properly.

START A PROJECT