0% found this document useful (0 votes)
11 views46 pages

Final Report.... - Removed

The document certifies the project report titled 'Water Quality Monitoring System Using IoT' completed by students of B.E. (Electronics and Telecommunication Engineering) at Hon. Shri. Babanrao Pachpute Vichardhara Trust's Group of Institutions. It outlines the project's aim to develop a cost-effective IoT-based system for real-time monitoring of water quality parameters to prevent pollution and ensure safe drinking water. The report includes acknowledgments, an abstract, and a detailed methodology for implementing the proposed system.

Uploaded by

komalpawar20003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views46 pages

Final Report.... - Removed

The document certifies the project report titled 'Water Quality Monitoring System Using IoT' completed by students of B.E. (Electronics and Telecommunication Engineering) at Hon. Shri. Babanrao Pachpute Vichardhara Trust's Group of Institutions. It outlines the project's aim to develop a cost-effective IoT-based system for real-time monitoring of water quality parameters to prevent pollution and ensure safe drinking water. The report includes acknowledgments, an abstract, and a detailed methodology for implementing the proposed system.

Uploaded by

komalpawar20003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 46

HON. SHRI.

BABANRAO PACHPUTE VICHARDHARA


TRUST’s, GROUP OF INSTITUTIONS
FACULTY OF ENGINEERING
(Affiliated to Savitribai Phule Pune University)
Approved by AICTE, New Delhi & DTE,
Maharashtra
Kashti, Tal: Shrigonda, Dist: Ahilyanagar

CERTIFICATE
This is to certify that the project report entitled “WATER QUALITY MONIRORING
SYSTEM USING IOT” is a bonafide work completed and submitted by

Ms. Pawar Komal Bhagchand (Exam Seat No.: B400770161)

Ms. Phadke Priyanka Dipak (Exam Seat No.:

B4007701563) Ms. Tanpure Pratiksha Manoj

(Exam Seat No.: B400770182)

of B.E. (Electronics and Telecommunication Engineering) during the academic year 2024-
25 , in partial fulfillment of the requirements for the award of the degree of Bachelor of
Engineering under Savitribai Phule Pune University.

The contents of this report represent the original work carried out by the students under the
guidance of the undersigned. The report has been checked and approved as per university
norms.

Project Guide:
Prof. S.V. Salunkhe
Assistant Professor
E&TC Department

Head of Department: Principal:


Dr. S.N. Divekar Dr. V. N. Patil
HOD, E&TC Department Principal, HSBPVT's GOI Faculty of Engineering

External Examiner
Name & Signature:

Date:
Place: Kashti
Acknowledgement

I take this opportunity to express my sincere gratitude to all those who have supported and
guided me throughout the successful completion of this project.

First and foremost, I would like to express my heartfelt thanks to my project guide, Prof. S.V.
Salunkhe for their continuous support, valuable guidance, and encouragement throughout the
project. Their expertise and insights were instrumental in shaping the direction of my work.

I am also deeply thankful to Dr. S.N. Divekar, Head of the Department of Electronics and
Telecommunication Engineering, for providing the necessary facilities, academic support,
and encouragement during the course of this project.

I would also like to extend my sincere thanks to Dr. V.N. Patil, Principal of HSBPVT’s
Group of Institutions, Faculty of Engineering, for providing the opportunity and
infrastructure to carry out this project.

Furthermore, I am grateful to all faculty members and staff of the Department of Electronics
and Telecommunication Engineering for their support and assistance. I also appreciate my
classmates and friends for their moral support and constructive feedback.

Last but not least, I thank my family for their unconditional support and motivation
throughout this journey.

Student Name

Ms. Pawar Komal


Bhagchand Ms. Phadke
Priyanka Dipak Ms. Tanpure
Pratiksha Manoj

ii
ABSTRACT

Pollution of water is one of the main threats in recent times as drinking water is getting
contaminated and polluted. The polluted water can cause various diseases to humans and
animals, which in turn affects the life cycle of the ecosystem. If water pollution is detected
in an early stage, suitable measures can be taken and critical situations can be avoided. To
make certain the supply of pure water, the quality of the water should be examined in real-
time. Smart solutions for monitoring of water pollution are getting more and more
significant these days with innovation in sensors, communication, and Internet of Things
(IoT) technology. In this paper, a detailed review of the latest works that were implemented
in the arena of smart water pollution monitoring systems is presented. The paper proposes a
cost effective and efficient IoT based smart water quality monitoring system which
monitors the quality parameters uninterruptedly. The developed model is tested with three
water samples and the parameters are transmitted to the cloud server for further action.

iii
TABLE OF CONTENTS
Chapter No. Description Page
No.
CERTIFICATE i
ACKNOWLEDGEMENT ii
ABSTRACT iii
TABLE OF CONTENTS iv
LIST OF FIGURES v
LIST OF TABLES vi
LIST OFABBREVIATIONS vii
1 INTRODUCTION 1
1.1 Motivation 2
1.2 Problem Statements 2
2 LITERATURE SURVEY 3
2.1 Literature Summary 3
3 AIM & OBJECTIVES 5
3.1 Aim 5
3.2 Objectives 5
3.3 Methodology 6
3,4 Specifications of the system 7
4 HARWARE DIAGRAM/ METHOD/ 8
CIRCUIT DIAGRAM/ WORKING
4.1 Circuit Diagram 8
5 HARDWARE DESIGN 9
6 SOFTWARE DESIGN 14
7 TEST & RESULT 19
8 CONCLUSION 22
REFERENCES 24
LIST OF PUBLICATIONS 25
APPENDICES A-1

iv
LIST OF FIGURES
Sr.No Figure Pg.no
1 TDS Sensor 13
2 WiFi Module 14
3 LCD Display 16/2 14
4 Interfacing Gravity Analog TDS Sensor 15
5 Turbidity Sensor 15
6 Temperature Sensor 16
7 Breadboard 16
8 Jumper Wire 17

v
LIST OF TABLES

Sr.No Table Pg.no


1 Parameters Tested Range 25
2 Sample Test Results 26

vi
LIST OF ABBREVIATIONS

Abbreviation Full Form

IOT Internet of Things

LCD Liquid Crystal Diode

TDS Total Dissolved Solid

ADC Analog To Digital Converter

IOE Internet of Everything

IOP Institute of Physics


IOS Institute of Science

vii
CHAPTER 1
INTRODUCTION

viii
CHAPTER 1

INTRODUCTION

Introduction

Water quality plays a crucial role in ensuring public health, ecological balance, and
sustainable development. Access to clean and safe water is a fundamental necessity for human
consumption, agriculture, and industrial processes. However, increasing pollution levels due
to urbanization, industrial discharge, and climate change have led to severe degradation of
water sources. Contaminants such as heavy metals, chemicals, pathogens, and microplastics
pose significant threats to both human health and aquatic ecosystems. Hence, continuous and
accurate monitoring of water quality is essential for early detection of pollutants and effective
water resource management.

Traditional water quality monitoring methods rely on manual sampling and laboratory
analysis, which are time-consuming, labor-intensive, and often incapable of providing real-
time insights. The lack of continuous monitoring can result in delayed responses to
contamination events, leading to serious environmental and health hazards. To address these
challenges, modern technologies such as the Internet of Things (IoT) have emerged as
powerful tools for automating and enhancing water quality monitoring systems.

IoT-based water quality monitoring systems leverage a network of sensors, communication


technologies, and cloud computing to collect, transmit, and analyze water quality data in real
time. By integrating various sensors to measure key parameters such as , turbidity,
temperature, TDS Sensor, and electrical conductivity, these systems provide continuous and
automated monitoring without the need for constant human intervention. The collected data is
transmitted to a cloud platform such as ThingSpeak, where it is analyzed and visualized for
better decision- making. This approach not only enhances the efficiency of monitoring but also
facilitates proactive measures to mitigate contamination risks.

This paper proposes a smart IoT-based water quality monitoring system that aims to automate
the process, improve the accuracy of measurements, and enhance water management
efficiency. The proposed system ensures real-time data collection, early warning detection,
and remote accessibility, making it an ideal solution for municipal corporations, industries,
and environmental agencies. By utilizing cost-effective and scalable IoT technology, this

1
system can be implemented in various water sources, including rivers, lakes, reservoirs, and
water distribution networks. Water quality monitoring is vital for various applications,
including municipal water supply systems, industrial wastewater management, aquaculture,
and agricultural irrigation. Contaminated water can lead to the spread of waterborne diseases,
disrupt industrial processes, and affect crop yields. In urban areas, ensuring safe drinking
water is a fundamental responsibility of municipalities, requiring continuous surveillance to
detect contamination sources promptly. Industrial facilities that discharge wastewater must
adhere to stringent environmental regulations, making real-time monitoring essential to
prevent pollution. In agriculture, irrigation water quality influences soil health and crop
productivity, necessitating efficient monitoring techniques to optimize resource utilization.

1.1 Motivation

Due to increasing water pollution, ensuring safe and clean water has become a major concern.
Traditional water testing methods are time-consuming, costly, and lack real-time monitoring.
With the advancement of IoT, we are motivated to develop a smart, affordable, and automated
system to monitor water quality remotely. This project aims to help in early detection of
contamination and promote better public health and environmental safety.

1.2 Problem Statements

Traditional water quality testing methods are manual, time-consuming, and do not provide
real- time data. There is a need for a smart, automated system that can continuously monitor
water quality and alert users to contamination risks using IoT technology.

2
CHAPTER 2
LITERATURE SURVEY

3
CHAPTER 2
LITERATURE SURVEY

1. Nikhil Kedia (2019) – Water Quality Monitoring for Rural Area:


This study focuses on water quality monitoring specifically in rural regions. It explains the
complete process, including the use of sensors, embedded design, and the importance of
proper information sharing between the government and villagers. The key tools used are
IoT-based sensors and embedded systems. While the paper outlines the system effectively,
it highlights that automatic water purification or improvement isn't currently feasible.
Instead, it stresses that economical technology usage and increasing awareness among
people can significantly contribute to water quality improvement.

2. Jayti Bhatt & Jignesh Patoliya (2020) – Real-Time Water Quality Monitoring
System: This paper introduces an IoT-based real-time monitoring system to ensure safe
drinking water. The system uses sensors to measure key water quality parameters
such as pH, turbidity, dissolved oxygen, and temperature. These values are
processed by a microcontroller and transmitted to a Raspberry Pi using Zigbee protocol.
Tools used include sensors and Raspberry Pi integrated with Zigbee communication.
The research gap
identified is the system’s limited functionality in terms of response or action—while it
transmits data effectively, it does not automatically respond to poor water quality
conditions.

3. Michal Lom, Ondrej Pribyl, Miroslav Svitek (2022) – Industry 4.0 as a Part of Smart
Cities:
This paper explores how Industry 4.0 technologies are integrated into smart cities. It
highlights the role of interconnected systems such as the Internet of Services (IoS),
Internet of Energy (IoE), and Internet of People (IoP). The study presents how these
concepts support the development of smarter urban infrastructure. Although the paper
contributes conceptually to digital city planning, it does not focus on specific water
quality monitoring applications, which presents a gap for further targeted
implementations.

4. Zhanwei Sun et al. (2023) – QOI-Aware Energy Management in IoT Sensory

4
Environments:
This research presents a framework for dynamic energy management in IoT environments
with a focus on Quality of Information (QOI). It proposes real-time decision-making
models

5
that help optimize energy usage while maintaining service performance. Tools and
technologies discussed include Internet of Services and general IoT frameworks. The main
research gap lies in the generalization of the model—it is not specifically applied to
domains like water quality monitoring, which leaves room for domain-specific
adaptations.

5. Singh and Gautam (2020) designed a solar-powered IoT water monitoring system,
making it suitable for deployment in off-grid areas. They focused on sustainability and
energy efficiency along with accurate data logging.

6. Rao et al. (2021) highlighted the integration of machine learning algorithms to predict
water contamination levels based on sensor data trends. This predictive approach can be
beneficial in preventing waterborne diseases by early detection of anomalies.

7. Bhardwaj et al. (2017) proposed an IoT-based water quality monitoring system that
uses sensors to measure parameters such as pH, temperature, turbidity, and electrical
conductivity. The collected data is transmitted via Wi-Fi to a cloud server, where it can be
accessed remotely. This work demonstrated the feasibility of remote monitoring for
preventing water pollution.

8. Patil and Patil (2018) developed a prototype that utilizes Arduino and various sensors
to monitor water quality. The data is sent to a mobile application using a GSM module,
providing alerts when parameters exceed safe limits. This system is suitable for
deployment in rural and remote areas.

9. Kumar et al. (2019) implemented a low-cost water quality monitoring system using
NodeMCU and ThingSpeak platform. The system continuously monitors water quality and
displays real-time values on a web interface. Their findings emphasized the importance of
user-friendly dashboards for data visualization.

6
CHAPTER 3
AIM & OBJECTIVES

7
CHAPTER 3
AIM &
OBJECTIVES
3.1 AIM

To design and develop an IoT-based water quality monitoring system that can continuously
measure and report water parameters in real-time to ensure safe and clean water for various
applications such as drinking, agriculture, and industrial use.

3.2 OBJECTIVES

The objective for IoT-based Water Quality Monitoring System project:

1. To identify key water quality parameters such as turbidity, temperature, TDS


(Total Dissolved Solids), and conductivity.

2. To interface appropriate sensors with a microcontroller (e.g., NodeMCU) for


real- time data collection.

3. To implement wireless communication (e.g., Wi-Fi or GSM) for transmitting


sensor data to a cloud server or mobile app/dashboard.

4. To store and visualize collected data using cloud platforms (e.g., ThingSpeak)
for remote monitoring and analysis.

5. To create a user-friendly interface (dashboard or mobile app) for visualizing


water quality data.

6. To develop a low-cost, energy-efficient, and portable system suitable for rural


and urban water monitoring.

8
3.3 METHODOLOGY

1. Problem Identification & Requirement Analysis


 Identify the need for real-time water quality monitoring.
 List essential water quality parameters: temperature, turbidity, TDS, etc.
 Determine system requirements: hardware, software, communication modules.

2. Sensor Selection & Calibration


Select appropriate sensors:
 Turbidity Sensor – for water clarity.
 TDS Sensor – for measuring dissolved solids.
 Temperature Sensor – for water temperature

Calibrate each sensor to ensure accurate

readings.

3. Microcontroller Integration
 Use a microcontroller (e.g., NodeMCU) to interface with sensors.
 Program the microcontroller to read sensor data periodically.

4. IoT Communication Setup


 Use Wi-Fi or GSM module (e.g., ESP8266) for sending data wirelessly.
 Connect the device to the cloud platform (e.g., ThingSpeak).

5. Cloud Platform & Data Visualization


 Send data to the cloud for real-time monitoring.
 Use charts and graphs to visualize sensor data.

6. Prototype Development & Testing


 Assemble all components on a breadboard.
 Test the system with different water samples.
 Validate sensor accuracy by comparing results with standard water testing
methods.

7. Result Analysis & Optimization

9
 Analyze collected data for trends and quality insights.

10
 Optimize system for accuracy, power efficiency, and network reliability.

8. Final Implementation
 Deploy the system in a real environment (e.g., water tank, river, or borewell).

3.4 SPECIFICATION OF SYSTEM

A. Hardware Requirements

The key hardware components include:

 Microcontroller: NodeMCU ESP8266 (with built-in Wi-Fi) / Arduino Uno + ESP01


 Turbidity Sensor: Range: 0–1000 NTU, Output: Analog.
 Temperature Sensor: DS18B20, Range: -55°C to +125°C, Accuracy: ±0.5°C.
 TDS Sensor: Range: 0–1000 ppm, Output: Analog.
 Wi-Fi Module: In-built ESP8266.
 Power Supply: 5V DC from USB or 9V Battery with Voltage Regulator.
 LCD Display: 16x2 LCD for local display of sensor values.
 Connecting Wires: Male-to-female, Female-to-Female, Male-to-Male jumper wires.
 Breadboard / PCB: For circuit assembly

B. Software Requirements
The key Software components include:

 Language: Embedded C / Arduino C.


 Arduino IDE: Used for coding and uploading firmware to NodeMCU.
 Library: ESP8266WiFi.h: Enables Wi-Fi connectivity on NodeMCU.
 Library: WiFiClient.h: Handles HTTP/IoT client requests/responses.
 Library: LiquidCrystal_I2C.h: Controls the 16x2 LCD using I2C for status display.
 Library: OneWire.h: Required to communicate with DS18B20 temperature sensor.
 Library: DallasTemperature.h: Simplifies temperature readout from DS18B20
sensor.
 ThingSpeak.h: Library used to send sensor data to the ThingSpeak cloud using Wi-Fi.
 Cloud Platforms: ThingSpeak, Blynk, Firebase (optional, used for storing/viewing
data)

11
CHAPTER 4
HARDWARE DIAGRAM / METHOD /
CIRCUIT DIAGRAM / WORKING

12
CHAPTER 4
HARDWARE DIAGRAM / METHOD /
CIRCUIT DIAGRAM / WORKING

Circuit Diagram :

Fig.4.1. Circuit Diagram of Water Quality Monitoring System Using IOT

Working of the System :

The system works by continuously monitoring key water quality parameters such as turbidity,
temperature, and total dissolved solids (TDS) using appropriate sensors. These sensors are
interfaced with the NodeMCU ESP8266, a microcontroller with built-in Wi-Fi.

1. Turbidity Sensor detects the clarity of the water by measuring the amount of light
scattered due to suspended particles.
2. TDS Sensor measures the concentration of dissolved solids in the water, indicating
purity levels.
3. Temperature Sensor (DS18B20) measures the real-time temperature of the water,
which can influence other water quality factors.

The ESP8266 microcontroller collects data from these sensors and processes the readings.
Using the ESP8266WiFi.h and ThingSpeak.h libraries, the processed data is then uploaded to
a cloud platform (like ThingSpeak) over Wi-Fi.

Users can access the data remotely through a web dashboard or mobile app, where they can
view real-time graphs and receive alerts if any parameter exceeds safe levels. This setup
ensures quick and remote monitoring of water quality in an efficient and cost-effective
manner.
13
CHAPTER 5
HARDWARE DESIGN

14
CHAPTER 5

HARDWARE

DESIGN

5.1 BLOCK DIAGRAM

TDS Sensor
Power Supply

g
g
Jumper Wire
Humidity Sensor WIFI Module
(ESP8266)

Temperature Sensor 16*2 LCD Display

Fig.5.1. Block Diagram Of IoT Based Water Quality Monitoring System


Using ESP8266

1) TDS Sensor :

Fig.5.2. TDS Sensor


TDS stands for “Total Dissolved Solids.” It is a measure of the combined content of all
inorganic and organic substances present in a liquid in molecular, ionized, or micro-
granular suspended form. TDS is commonly used to assess the quality of water,
particularly in contexts such as drinking water, wastewater treatment, aquarium

15
maintenance, and industrial processes.

16
2) Wi-Fi Module :

Fig.5.3. Wi-Fi Module


The ESP8266 WiFi Module is a self contained SOC with integrated TCP/IP protocol
stack that can give any microcontroller access to your WiFi network. The ESP8266 is
capable of either hosting an application or offloading all WiFi networking function
from another application processor. Each ESP826 module comes pre-programmed with
an AT command set firmware. The ESP8266 module is an extremely coat effective
board with a huge & ever growing community.

3) LCD Display (16*2) :

Fig.5.4. LCD Display

17
16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of
combinations available like, 8×1, 8×2, 10×2, 16×1, etc. But the most used one is the 16*2
LCD, hence we are using it here. All the above mentioned LCD display will have 16 Pins and
the programming approach is also the same and hence the choice is left to you.

4) Gravity Analog TDS Sensor:

Fig.5.5. Gravity Analog TDS Sensor

Gravity Analog TDS Sensor is an Arduino-compatible TDS sensor/Meter Kit for


measuring TDS value of the water. It can be applied to domestic water, hydroponic and
other fields of water quality testing. This product supports 3.3 ~ 5.5V wide voltage input,
and 0 ~ 2.3V analog voltage output, which makes it compatible with 5V or 3.3V control
systems or boards.

5) Turbidity Sensor :

Fig.5.6. Turbidity Sensor

18
The turbidity sensor is used to measure the clarity of water by detecting suspended
particles. It works on the principle of light scattering, where an infrared LED and a
photodetector measure the intensity of scattered light in the water. Higher turbidity
indicates more impurities or contaminants. The sensor provides analog output proportional
to the turbidity level (in NTU). It is connected to the microcontroller for real-time
monitoring. This sensor is essential for detecting pollution in drinking or natural water
sources.

6) Temperature Sensor :

Fig.5.7. Temperature Sensor

The temperature sensor used in this project is the DS18B20, a digital sensor that measures
temperature with high accuracy. It communicates with the microcontroller using the
OneWire protocol, requiring only one data pin. The sensor can measure temperatures
ranging from -55°C to +125°C with an accuracy of ±0.5°C. It is waterproof and suitable
for use in water quality monitoring applications. In this project, it was used to monitor the
real- time temperature of water and send data to the cloud via NodeMCU.

7) Breadboard :

Fig.5.8. Breadboard

19
A breadboard is a tool used for building and testing electronic circuits without soldering. It
has a grid of interconnected holes where electronic components and jumper wires can be
easily inserted. The board allows quick modifications and troubleshooting during circuit
development. In this project, the breadboard was used to connect the microcontroller,
sensors, and power supply in a temporary setup. It played a key role in prototyping the
water quality monitoring system. Once tested, the circuit can be transferred to a PCB for
permanent use.

8) Jumper wires :

Fig.5.9. Jumper Wires

Jumper wires are electrical wires with connector pins at each end, used to establish
connections between components on a breadboard or with microcontrollers. They come in
three types: male-to-male, male-to-female, and female-to-female. In this project, jumper wires
were used to connect the NodeMCU, sensors, and the LCD display on the breadboard. They
are reusable and ideal for prototyping without soldering. Jumper wires ensure reliable signal
transmission and easy circuit debugging.

20
CHAPTER 6
SOFTWARE DESIGN

21
CHAPTER 6

SOFTWARE

DEISGN

Source Code

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include
<LiquidCrystal_I2C.h>
#include <OneWire.h>
#include
<DallasTemperature.h>
#include "ThingSpeak.h"

char ssid[] = "Sp";


char pass[] = "shubham1607";
const char* server = "api.thingspeak.com";
unsigned long channelID = 2819107;
const char* writeAPIKey = "OLM1XXU0OAVGTVQC"; Write API Key
WiFiClient client;
namespace pin {
const byte tds_sensor = A0;
const byte temp_sensor =
D5;
}
namespace device {
float aref = 3; // Reference voltage for 3.3v boards
}
namespace sensor
{ float tds = 0;

22
float temperature = 0;
float ecCalibration = 1;
}
LiquidCrystal_I2C lcd(0x27, 16, 2);
OneWire
oneWire(pin::temp_sensor);

23
DallasTemperature tempSensor(&oneWire);
void setup() {
lcd.init();
Serial.begin(115200); //
Debugging WiFi.begin(ssid, pass);
lcd.backlight();
lcd.setCursor(0, 1);
lcd.print("Connecting...");
while (WiFi.status() != WL_CONNECTED)
{ delay(500);
Serial.print(".");
}
Serial.println("WiFi connected");
lcd.clear();
lcd.print("WiFi connected");
tempSensor.begin();
ThingSpeak.begin(client);
Serial.println("Setup complete");
lcd.clear();
}
void loop() {
readTdsQuick();
readTemperature();
updateLCD();
sendToThingSpeak();
delay(1000);
}
void readTdsQuick() {
float rawEc = analogRead(pin::tds_sensor) * device::aref /
1024.0; Serial.print(F("Raw Analog Value: "));
Serial.println(rawEc);

24
float offset = 0.14;
float ec = (rawEc * sensor::ecCalibration) -
offset; if (ec < 0) ec = 0;
sensor::tds = (133.42 * pow(ec, 3) - 255.86 * ec * ec + 857.39 * ec) * 0.5;
Serial.print(F("TDS: "));
Serial.println(sensor::tds);
}
void readTemperature() {
tempSensor.requestTemperatures();
sensor::temperature =
tempSensor.getTempCByIndex(0);
Serial.print(F("Temperature: "));
Serial.println(sensor::temperature);
}
void updateLCD()
{ lcd.setCursor(0, 0);
lcd.print("TDS: ");
lcd.print(sensor::tds);
lcd.print(" ppm");
lcd.setCursor(0, 1);
lcd.print("Temp: ");
lcd.print(sensor::temperature);
lcd.print(" C ");
}
void sendToThingSpeak()
{ ThingSpeak.setField(1, sensor::tds);
ThingSpeak.setField(2, sensor::temperature);
int httpCode = ThingSpeak.writeFields(channelID,
writeAPIKey); if (httpCode == 200) {
Serial.println("Data sent to ThingSpeak successfully");
} else {
Serial.print("Error sending data:
25
"); Serial.println(httpCode);

26
}
}

Code 2
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include
<LiquidCrystal_I2C.h>
#include "ThingSpeak.h"

const char ssid[] = "Sp";


const char pass[] = "shubham1607";
const unsigned long channelID = 2978227;
const char* writeAPIKey =
"KOT6MCUJWNJJW1I4"; WiFiClient client;
const byte turbidityPin = A0;
const float analogRefVoltage = 3.3;
LiquidCrystal_I2C lcd(0x27, 16,
2); void setup() {
Serial.begin(115200);
lcd.init();
lcd.backlight();
lcd.print("Connecting WiFi");
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED)
{ delay(500);
Serial.print(".");
}
Serial.println("\nWiFi connected");
lcd.clear();
lcd.print("WiFi connected");
ThingSpeak.begin(client);
27
delay(2000);

28
lcd.clear();
}
void loop() {
int rawValue = analogRead(turbidityPin);
float voltage = (rawValue / 1023.0) *
analogRefVoltage; float turbidityNTU =
map(rawValue, 0, 1023, 3000, 0); Serial.print("Raw
ADC: ");
Serial.print(rawValue);
Serial.print(" | Voltage: ");
Serial.print(voltage, 2);
Serial.print(" V | Turbidity:
"); Serial.print(turbidityNTU);
Serial.println(" NTU");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Turbidity:");
lcd.setCursor(0, 1);
lcd.print(turbidityNTU, 0);
lcd.print(" NTU");
ThingSpeak.setField(1, turbidityNTU);
int responseCode = ThingSpeak.writeFields(channelID, writeAPIKey);

if (responseCode == 200) {
Serial.println("Data sent to ThingSpeak successfully");
} else {
Serial.print("ThingSpeak error:
"); Serial.println(responseCode);
}

delay(15000);
}
29
CHAPTER 7
TEST AND RESULT

30
CHAPTER 7

TEST AND

RESULT

Testing Environment

To verify the accuracy and reliability of the system, it was tested in controlled
laboratory conditions as well as with actual water samples collected from different
sources such as tap water, borewell water, and river water. The test setup included the
NodeMCU microcontroller, pH sensor, TDS sensor, turbidity sensor, and temperature
sensor connected to a water container.

Parameters Tested

Parameter Sensor Used Measured Unit


Range
Turbidity Sensor 0 – 1000 NTU
Turbidity

DS18B20 -55 to °C
Temperature
+125
TDS 0 – 1000 ppm
TDS
Sensor

Table.7.1. Parameters Tested Range

31
Test Results

Sample Reading TDS(ppm) Turbidity Temperature


Type No. (NTU) (°C)
1 550 650 27.2
Muddy
2 560 645 27.4
Water
3 540 660 27.3
4 570 655 27.5
5 555 648 27.2
1 920 40 28.1
Salty
2 910 38 28.2
Water
3 925 39 28.0
4 915 41 28.1
5 930 42 28.2
1 55 5 25.5
Filtered
2 50 4.5 25.4
Water
3 48 4.2 25.6
4 52 5.1 25.3
5 51 4.9 25.5
1 300 20 26.0
Sugar
2 310 22 26.1
Water
3 295 21 26.2
4 305 20 26.0
5 298 19 26.1

Table.7.2. Sample Test Results

32
RESULT IMAGES-

Fig.7.1. Hardware

Fig.7.2. Output

33
CHAPTER 8
CONCLUSION

34
CHAPTER 8

CONCLUSION

The development of a Water Quality Monitoring System based on IoT successfully


demonstrates the integration of modern technologies to address environmental challenges.
This system enables real-time monitoring of crucial water parameters such as pH,
temperature, turbidity, and dissolved oxygen using various sensors. The collected data is
transmitted to a cloud platform, allowing remote access, continuous observation, and timely
alerts in case of water contamination.

By leveraging IoT technology, this system provides a cost-effective, scalable, and efficient
solution for ensuring water quality in both urban and rural areas. It can be implemented in
various water bodies such as rivers, lakes, reservoirs, and even water distribution systems to
support better decision-making by authorities and improve public health outcomes.

In conclusion, this project highlights the potential of IoT in environmental monitoring and
lays the foundation for future enhancements such as machine learning-based predictions,
integration with mobile apps, and solar-powered deployments for sustainability.

35
FUTURE SCOPE

 In future we use IOT concept in this project.


 Detecting the more parameters for most secure purpose
 Increase the parameters by addition of multiple sensors
 By interfacing relay we controls the supply of water

36
REFERENCES

1) S. N. .Divekar and M. K. Nigam, “Machine Learning Based Dynamic Band


Selection for Splitting Auditory Signals to Reduce Inner Ear Hearing Losses”,
IJRITCC, vol. 11, no. 6, pp. 71–78, Jul.
2) Divekar S, Nigam MK. (2022). Minimize Frequency Overlapping of Auditory
Signals using Complementary Comb Filters. SAMRIDDHI : A Journal of
Physical Sciences, Engineering and Technology, 14(3), 333-336.
3) Prof. Sudhir N. Divekar, Ankita. A. Shinde, Rohini. R. Mulay, Pooja. V.
Jaybhaye, "Real Time Bridge Monitoring System", International Journal of
Scientific Research in Science, Engineering and Technology (IJSRSET), Online
ISSN : 2394- 4099, Print ISSN : 2395-1990, Volume 7 Issue 3, pp. 406-411, May-
June 2020. Journal URL : http://ijsrset.com/IJSRSET2073100.
4) T. Green, "Blockchain Applications in Environmental Monitoring," Smart
Contracts and IoT Journal, vol. 11, pp. 30-50, 2023.
5) L. Zhang et al., "Cloud Computing for Water Monitoring Systems," IoT and
Water Management Review, vol. 9, pp. 45-60, 2022.
6) M. Brown and K. Lee, "IoT Sensor Networks for Smart Cities," Urban
Technology Journal, vol. 8, no. 3, pp. 145-160, 2021.
7) First Author and Second Author. 2002. International Journal of Scientific
Research in Science, Engineering and Technology. (Nov 2002), ISSN
NO:XXXX-XXXX DOI:10.251XXXXX.
8) D. Smith, "Smart Water Management Systems," IEEE Transactions on
Environmental Engineering, vol. 10, no. 4, pp. 234-245, 2021.
9) P. Gupta, "Public Participation in Smart Water Monitoring," Citizen Scie] nce
Journal, vol. 4, pp. 22-38, 2021.
10) R. Kumar and S. Patel, "Machine Learning in IoT-based Water Quality
Monitoring," International Journal of Smart Systems, vol. 7, no. 2, pp. 87-102,
2020.
11) S. Roberts, "AI and Predictive Analytics in Water Management," Artificial
Intelligence & Environment Journal, vol. 6, no. 2, pp. 80-95, 2019.
12) Third Author et al., "IoT-Based Water Monitoring," Journal of Environmental
Science, 2019.
13) J. Williams, "Big Data Analytics in Water Management," Environmental Data
Journal, vol. 15, pp. 90-110, 2018.

37
LIST OF PUBLICATIONS

38

You might also like