Water is an essential element for survival of human beings. Its variety of uses makes it constantly in demand. As such, it is an excellent practice to monitor its various parameters continuously to ensure it is safe for human consumption. Water quality monitoring has previously been carried out in traditional labs, which is time-consuming and prone to inaccuracies. Therefore, we need to redesign methods of monitoring quality of water. In this paper, I leverage Internet of Things (IoT) concept to design a water quality monitoring system. Water quality parameters considered are pH, Turbidity, Total Dissolved Solids (TDS), and temperature. These parameters are sensed using a Microcontroller, and sensor data is sent to the cloud with the help of a WIFI module. Android application is further developed to view stored data from the cloud. Water quality parameters are compared against WHO standards, and an alarm is issued in case of deviations.
Introduction
I. INTRODUCTION
The global demand for clean water is escalating, driven by rapid urbanization, industrialization and population growth. However, monitoring the quality of water being consumed has remained a challenge. Previously, the method for assessing water quality has been collecting samples of water and taking the samples for testing in laboratories. This method suffers from several drawbacks, such as the long time taken to manually collect samples, and collecting a few samples from certain areas may not reflect the real-time quality of water. To overcome these shortcomings, this paper presents an IoT-based water quality monitoring system that utilizes different sensors to measure parameters such as pH, Turbidity, TDS, and temperature in real time. The sensor data is sent to the cloud using a WIFI module for monitoring, and an Android mobile application is designed for accessing parameters remotely.
II. LITERATURE REVIEW
In [1], Vatsala Sharma and Kamal Nayanam proposed the design of a smart water management system based on Arduino Uno as the IOT application. In the proposed method, once the water has been collected in tanks, an ultrasonic sensor would sense the water level, and perceived information can be sent through a mobile application where the user can visualize the water level. When the water level is near a high ground water level, a tank motor is turned on through the Blynk application and will transfer the water to the main tank. When the main tank is about to be filled up, the motor will be turned off automatically.
In[2], Geetha and S Gotham developed a system divided into three subsystems. Data management subsystem is used to reach the data storage cloud and display the data to the end user.The transmission subsystem consists of wireless communication devices that transmit data from the controller to the data cloud server.Data collection subsystem consisted of multiple sensors to gather data and send it to a controller.
In [3], Theofanas P.Lambrou proposed the development of a low-cost, real-time, in-pipe monitoring system on the fly. The primary sensor nodes consist of electrochemical and optical sensors that send information to the central node, giving notification through Email or SMS.
In [4], Mithila Barabde and Shurti Danve proposed the design of a powered, mobility, and continuous water quality monitoring system. The design is divided into three parts:
Data monitoring Nodes: The data sensed by monitoring nodes will be passed through a signal conditioner so that it reaches the required levels, and then the signal will be sent to a base station with the help of an RF module
Base Station: The base station consists of an ARM processor which collects data from all nodes using time multiplexing and displays the data on LCD. The data collected is forwarded to a remote station using a Zigbee module.
Remote Monitoring Center: The remote monitoring station consists of a Zigbee module, which collects data from the base station. This data is fed to a server PC comprised of a Graphical User Interface via Serial communication. The data that is obtained is represented graphically with the help of Matlab. If the received data does not match the standard value of water parameters, then an SMS is sent to an authorized person who will take preventive measures.
In [5], Nikhil Kediap presents a paper that focuses on improving water quality and increasing awareness through the sensor Cloud Model. The project also highlights embedded system design, information dissipation, technical challenges, and the role of Mobile Network Operator and the Government.
In [6], Poonam J proposed a system where water analysis is done manually by taking samples from water sources and taking them to the lab for testing. ARM 7 and ZIGBEE Module are placed in each water source to automate the process of water quality monitoring sensors. The various sensors gather data from water sources.ARM 7 forwards the data through the ZigBee module to the lab for analysis.
In [7], Kulkarni Amruta and Turkana Satish created a water quality framework utilizing various powered remote sensors. The framework consisted of a base station and a hub. The hub is connected to the base station through Zigbee and powered by solar power. This framework is easy, but if the solar-powered board is not in sun orientation, the framework will cease working. From the above method, we note that each framework consists of unique impediments, but it can't meet minimal effort required in continuous water monitoring.
III. PROPOSED SYSTEM
This section explains the hardware setup, algorithms for reading water parameters from sensors and sending data to the ThingSpeak database, and finally, the functionality of an Android application designed for real-time water quality monitoring.
A. Block Diagram
The system consists of four main sensors: Turbidity sensor (SEN0189), pH sensor (DSC0018), Total Dissolved Solids (TDS) sensor, and Temperature Sensor (DS18B20). These sensors are interfaced to an Arduino Mega microcontroller, which reads analog signals from the sensors and converts them to digital signals for processing. Figure 1 shows the block diagram of the proposed system.
The sensor values are sent to ThingSpeak database using the ESP8266 WIFI Module, which is the transmission module.
A mobile application then retrieves values sent after every 5 seconds. The designed mobile application compares the sensor data to the standard values set by the World Health Organization (WHO). If there are discrepancies, text background colour changes, and an alert message is sent to the user. The application has also included an analysis feature which allows the user to view historical data for each parameter.
B. Reading Water Quality Parameters from sensors
Programming of the microcontroller is done with the help of Arduino IDE. The procedure for reading water quality parameter from the sensors is as follows:
Declare water parameter variable as an integer or float to store value read from sensor
Define pins to which the sensor is connected and perform initialization
Define a “get function” to get the value of water parameter being tested
Send the Water Parameter value to ThingSpeak Database
C.Sending of Water Quality Parameters to ThingSpeak Database
The ESP8266 WIFI Module enables the transfer of sensed water quality data from the Microcontroller to the ThingSpeak database and smartphone application. In order to access WIFI and Cytron shield functions Wifi.h, WifiClient.h, WifiServer.h, WifiUdp.h, CytronWi-fiClient.h, CytronWi-fiShield.h libraries are included. To access ThingSpeak channel, ThingSpeak website address, channel ID and WriteAPI key variables are defined. WifiConnect function is defined which does the following when it is called in setup() function
First ESP8266 WIFI shield is initialized; if pins for transmitting(D2) and receiving(R2) are not connected, ‘Error connecting to shield' is displayed.
After initialization, the WIFI shield looks for available networks using the SSID and password and if no network is found, an 'error connecting to WIFI’ message is displayed on the serial monitor.
The steps used to code ESP8266 WIFI Module for transmitting sensor data to ThingSpeak database are as follows:
Include ThingSpeak, WIFI, Cytron shield header files to access the relevant stored functions.
Define WIFI Username and password, ThingSpeak IP address, ThingSpeak channel ID, and WriteAPIKey.
Define a variable 'Wifiworking' in order to print the status of connection on a monitor
Define a function 'WifiConnect()' which checks whether the login details are correct and if the serial port transmitter and receiver are connected
Use 'ThingSpeak.setField(field number, parameter value)' function to define each parameter to its respective value
Send the different values to ThingSpeak database using 'ThingSpeak.writeFields (channel ID, API key)'
D. Android Application
Mobile application has been developed using MIT App Inventor. MIT App Inventor is a block-based programming tool that allows one to create fully functional apps for Android devices. The smart phone application developed is used to
Display the current values of water quality parameters.
Perform the analysis and display the parameters graphically.
Check if the water quality parameters are within acceptable limits and if not, a warning is displayed.
Turn on/off sensors from the Application.
V. FUTURE WORKS
Since most rural areas don't have WIFI access points, it would be better to use cellular networks, i.e., a 3G/4G Module for data transmission instead of a WIFI Module.
The parameters are displayed on the mobile app, but it would be better to use an OLED screen to indicate when a WiFi connection is unavailable.
More money needs to be put into the turbidity sensor to have a high-quality probe that is completely waterproof.
A PCB board needs to be designed to make the circuit less in size
Conclusion
A well-designed and neatly constructed real-time water quality monitoring system has been achieved as the outcome of this project. The system comprises four sensors, an online database, and a user-friendly mobile application. A fully functional mobile application which monitors various water quality parameters in real-time has been developed and tested successfully.
Water quality parameters considered are Turbidity, Total Dissolved Solids, pH, and temperature . Sensors have been used to monitor the parameters with an Integrated circuit that periodically provides updates. A WiFi module, mobile app, and an online database provide continuous remote access to parameters as long as an Internet connection exists. The online database can also be accessed using Matlab for further manipulations, which provides an outstanding way of monitoring data on a large scale.
References
[1] M Kulkarni Amruta and M Turkane Satish. Solar powered water quality monitoring system using wireless sensor network. In 2013 International Mutli-Conference on Automation, Computing, Communication, Control and Compressed Sensing (iMac4s), pages 281–285. IEEE, 2013.
[2] Mithila Barabde and Shruti Danve. Real time water quality monitoring system. International Journal of Innovative Research in Computer and Communication Engineering, 3(6):5064–5069, 2015.
[3] S Geetha and SJSW Gouthami. Internet of things enabled real time water quality monitoring system. Smart Water m, 2(1):1–19, 2016
[4] Ali Javaid, Afia Zafar, Zaheer Ahemed, et al. A review on techniques for water quality monitoring using IoT devices. Big Data In Water Resources Engineering (BDWRE), 1(2):49–51, 2020.
[5] Nikhil Kedia. Water quality monitoring for rural areas-a sensor cloud based economical project. In 2015 1st International Conference on Next Generation Com- puting Technologies (NGCT), pages 50–54. IEEE, 2015.
[6] Theofanis P Lambrou, Christos C Anastasiou, Christos G Panayiotou, and Marios M Polycarpou. A low-cost sensor network for real-time monitoring and contam- ination detection in drinking water distribution systems. IEEE sensors journal, 14(8):2765–2772, 2014
[7] M Pradeepkumar, J Monisha, R Pravenisha, V Praiselin, and K Suganya Devi. The real time monitoring of water quality in IoT environment. International Journal of Innovative Research in Science, Engineering and Technology, 5(3), 2016.