Iot Based Water Management Using Hc-12 and Django: March 2019

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/335499866

IoT Based Water Management Using HC-12 and Django

Conference Paper · March 2019


DOI: 10.1109/IconDSC.2019.8816917

CITATION READS
1 944

4 authors, including:

Dylan Philip Jose Daniel D.


Christ University, Bangalore Christ University, Bangalore
1 PUBLICATION   1 CITATION    9 PUBLICATIONS   11 CITATIONS   

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Dylan Philip Jose on 12 March 2020.

The user has requested enhancement of the downloaded file.


IoT Based Water Management using HC-12
and Django
Dylan Philip Jose Alton Lavin D’Souza
Department of Computer Science and Engineering Department of Computer Science and Engineering
CHRIST (Deemed to be University) CHRIST (Deemed to be University)
Bangalore, India Bangalore, India
[email protected] [email protected]

Athina Ann Thomas Daniel D


Department of Electronics and Communication Department of Computer Science and Engineering
CHRIST (Deemed to be University) CHRIST (Deemed to be University)
Bangalore, India Bangalore, India
[email protected] [email protected]

Abstract—Water is one of the important needs for a human


resources will dry up and how to prepare for an upcoming water
being. Life on Earth is possible due to the presence of water on crisis [2,3,8].
its surface. Even though 71% of Earth’s surface is covered with As science progresses we need to find innovative
water, the availability of water in certain areas is very less. So, substitutes for the problems existing in this world. Here we
the people in these areas must reserve water for ensuring a aim at presenting an IOT based solution to all the problems
steady availability. These problems can be rectified with the help
of Internet of Things (IOT). IOT is a global infrastructure with
mentioned above.
certain standards and communication protocols by which virtual IOT stands for ‘Internet of Things’. Another name for it is
and physical things can interact and exchange data by machine to machine communication. It aims at creating a
connecting to each other. In this paper, we propose a system for network for inanimate objects. In this network, machines will
monitoring the availability of water, based on the water level in be able to communicate with each other with minimum
the storage system. Water level is measured with the help of a
waterproof ultrasonic sensor and when the level reaches a
human intervention, they will be able to understand the needs
threshold value, a notification is sent to the user or to the vendor of humans and provide the necessary service by itself. The
to take the necessary action. The live feed data is sent to a prospect of IOT is not limited to the conventional items such
relational database for storing and analyzing the data to predict as electronic gadgets, IOT aims at connecting all items to the
when the water will run out, and to make sure that the water internet. These items will be able to exchange raw data. The
storage system gets refilled before that point of time. After
processing the raw data from the sensors, the system can inanimate objects by itself will process this raw data and
generate a fusion chart that can show or indicate the amount of generate the required information [1,4,6]. Once the
water inside each storage system. With this, the user can have an information is generated it will be put into action,
idea of how much water is left in each of the storage system. The WSN stands for ‘Wireless sensor network’. A wireless
main aim of the proposed system is to showcase the network consists of multiple devices. Each device is used to
functionalities and uses of different sensors and modules used in
an IOT based system with the application of Wireless Sensor monitor any area as per the requirement. The WSN is further
Network (WSN). In this present scenario, the world is filled with connected to a wired server. WSN applications include health
data both relevant and irrelevant, wherein the data for predicting care applications and remote monitoring. Health care
a water crisis is less. So, through the proposed system we are applications allow doctors to monitor their patients from afar.
generating a dataset for the prediction of a water crisis in an We aim at creating a remote monitoring application using
organization or a community.
WSN, a device which monitors the water levels [27,28,29].
Keywords—IoT, WSN, Relational Database
The proposed works on both the concepts mentioned above.
The idea of the proposed work is to have a sensor which will
I. INTRODUCTION generate raw data. This data will be processed to generate
In the world that we live in we are moving towards an era information which will be used to predict an upcoming water
where there will be no water left for consumption. Water crisis. This information will be passed through a ‘gateway’ to
resources throughout the world and especially in country like a server. The server will have access to multiple such
India, Pakistan and other Asian countries are very poorly gateways spread across the area supervised, as per the user’s
managed. Half of the country are the victim of nature’s fury. need. The user will have access to this server. With this the
The waters of floods refuse to recede, and the other half of the user will be warned in advance about an upcoming water crisis
same region is facing a severe drought. Unseasonal rainfall when the water recedes to the minimum requirement [12,14].
has left our country without any trace of consumable water.
The people of the country are unaware when the water
The proposed will empower common man to be prepared for this proposed work are based on the idea of putting an end
a crisis about to come. If implemented on a larger scale it has a to reckless water consumption. An IoT based device was
tremendous potential to prevent loss of life and resources. set up at every water source which would measure the
consumption of water of that particular source. The data
II. RELATED WORK was sent to cloud. The processed information could be
In view of the fact that preservation of water is exceedingly visualized through a mobile application built specially for
important in today’s world, several authors have been proposed this purpose [24,22].
a solution befitting the problems surrounding them. A few of ‘Water Quality Monitoring System Using IOT’ by
them are follows: Nageswara Rao Moparthi, Ch. Mukesh and P. Vidya Sagar
aimed at creating a device to measure the pH level of
‘Smart Well Monitoring System’, was a proposed system municipal water bodies and alarming the users if it crossed
which had an Arduino at the heart of it. Several sensors were a particular level. An arduino board was used to measure
interfaced to the Arduino [1]. These sensors generate raw data the water level and a GSM module was used to send the
regarding the oxygen level of water, pH level of water etc. The message [28].
Arduino processed the data and generated information which
was stored in the cloud. The proposed work also had an ‘app’
i.e. an android application built for the same purpose. The users III. PROPOSED SYSTEM
were required to have the app installed in their android mobile This paper outlines a WSN network for smart water
phones from which they could access the data stored in the monitoring. It makes use of the following peripherals: HC-
cloud[5,7]. The proposed work was used exclusively in 12, JSN- SR04 and Arduino Nano
villages to monitor the water of wells and hence the title.
‘Monitoring of Industrial Water Usage by using
Internet of Things’ [6]. The proposed work aims at monitoring Fig. 1. Block Diagram for IoT Water Management
the water usage in industries using an IOT based water
monitoring system. The proposed work used an STM32F103
C8T6 microcontroller as its main hardware. Water flow meter,
water level sensors and ultrasonic sensors were also used.
Water flow meters were used to measure the water level in the
overhead tank and to measure the total inlet of water. The water
level sensors were for measuring ground water and level of
overhead tank. The sensors and water flow meters were used to
collect data which was processed by the microcontroller
[9,30,13]. ADC and DAC were used as and when required. The
information was stored to the cloud which could be accessed
by a mobile application or a desktop application [10,15].
‘Smart Water Management in Housing Societies using IOT’
was an idea presented by Kaushik Gupta, Mandar Kulkarni,
Manas Magdum, Yash Baldawa and Prof. Shivprasad Patil. The
proposed work uses a raspberry pi, ultrasonic sensor and a
turbidity sensor as the main hardware devices [11]. The sensors
sent the data with the help of MQTT protocol to the raspberry
pi. The data was stored in cloud which could be accessed by a
mobile application [23,25].
K. Gopavanitha and S. Nagaraju has proposed, ‘A low cost
system for real time water quality monitoring and controlling
using IoT’ had created an IOT based proposed system using a
raspberry pi at its core. The system was interfaced with several A. HC-12
sensors which measured parameters like turbidity, temperature, It is a wireless serial port communication module. It has
pH, conductivity and flow [17]. All the measured data was sent a range of about one kilometer in open space. Given two of
to the cloud. The information could be accessed using the this device on can send telemetry data through a UART
techniques of cloud computing [18,22]. link. The module has a built in microcontroller, therefore,
Thinagaran Perumal, Md Nasir Sulaiman, and C. Y. Leong we can configure the module with the help of AT
have published their work titled ‘Internet of Things (IoT) commands. HC-12 module has four modes of operation,
enabled water monitoring system’. Their proposed system was FU1, FU2, FU3 and FU4.The previously mentioned modes
based on the idea that the level of water could be a very of operation can be invoked with the help of AT
important parameter during the occurrence of floods [21]. commands. It should be noted that given two of the HC-12
They created an IoT based system which measured the level of modules, both should operate in the same mode. It is
water and when the water reached a particular level a signal suggested that when operating with this module you have a
was sent to any real time social networking site, in this case to USB to serial converter.
‘Twitter’. The water level was visible on a dashboard [19,20].
‘Self-Powered IoT-Enabled Water Monitoring System’,
B. JSN-SR04 ’django.contrib.auth.hashers.BCryptPasswordHasher’,
This module is a waterproof ultrasonic range finder module. ’django.contrib.auth.hashers.SHA1PasswordHasher’,
Is usage is almost same as the HC-SR04. We are implementing ’django.contrib.auth.hashers.MD5PasswordHasher’,
this module since using the HC-SR04 wouldn’t be operational ’django.contrib.auth.hashers.UnsaltedSHA1PasswordHasher’,
in such an environment due to moisture which would hinder ’django.contrib.auth.hashers.UnsaltedMD5PasswordHasher’,
the operational capabilities of the HC-SR04. This module is ’django.contrib.auth.hashers.CryptPasswordHasher’,
available as an industrial-grade probe design which is much The corresponding algorithm names are:
stable than the normal module which does not provide an • pbkdf2_sha256
integrated design. This module has an accuracy of about +0.5 • pbkdf2_sha1
cm and -0.5cm and can measure distances up to 4.5m. • argon2
• bcrypt_sha256
C. Arduino Nano
• bcryptsha1
Arduino Nano is a compact board similar to the Arduino • md5
Uno based on the ATmega328P.It can powered via a Mini-B • unsalted_sha1
USB connection. Unlike the Arduino Uno it doesn’t have a • unsalted_md5
power jack. We can interface with the module in the same way • crypt
as the Arduino Uno via serial communication. Although the Django also allows you to write own hasher that suits the
board is small its operational capabilities are still on par with needs.
the Uno.
F. Data Flow
D. Cloud Storage and User Interface:
Telemetry data is generated from the JSN-SR04 which is
The proposed work is an IoT facilitating smart water
sent to the Arduino Nano through serial communication the
management and analysis of consumption of water. At the
Nano then communicates to the HC-12 which then sends
proposed work center is a server which is designed using
the same telemetry data to another HC-12 module
python’s web framework Django. Django is said to be perfect
which is connected to the another nano which acts as a
for perfectionist with deadlines, it allows the user to launch the
Gateway. A gateway is anything that connects a device
website in a shorter time frame. Moreover, it allows you to
to another device or communicating node. The gateway
create a secure system. Django being a back-end framework
communicates the telemetry data to the server which in
allows you to render basic login and authentication forms very
turn stores that in the database. The data base in this case is
easily and also provides a Django-bootstrap library. Django
SQLite3.
allows you to create SAAS platforms much easier, it has a
provision for creating RESTFUL services through its DRF also
called Django Rest Framework. The Django Rest Framework
allows the user to serialize the data which is essentially stored
in the database with much ease and with very less code. The
Django Rest Framework has a provision for a web browsable
API which is very useful for debugging [13,26].
The Django Framework is implemented to render an IoT
dashboard at the client side. This dashboard is very
interactive allows for a graphical representation of the
telemetry data. The aforementioned dashboard allows for easy
interpretation analysis of data. Moreover, it gives the ability to
export the graphically represented data in the following
formats: PNG, JPG, PDF, SVG, and XLS. These are able to do
with the help fusion charts which provides a wide range of
charts and gauges. The dashboard template is derived from
Fig. 2. Data Flow diagram for IoT Water Management
Bootstrap4 which allows you to make front-end suitable for all
devices. G. Addition for Extra Modules:
E. User Authentication: Suppose the system needs additional modules, these
Any system requires an authenticated user to access it, modules may need access to the data stored in the
Django provides for a built in authentication system, Django’s database, they can have authenticated access to the data
authentication system implements pbkdf2_sha256 as the through the API. For the proposed work itself we have
algorithm to hash passwords. The pbkdf2_sha256 uses a used basic authentication.
number iterations to slowdown intruders. Django provides a
number of hashers and also allows you to choose the number
of iterations for the security needs and available processing
power. The full list of hashers available.
’django.contrib.auth.hashers.PBKDF2PasswordHasher’,
’django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher’,
’django.contrib.auth.hashers.Argon2PasswordHasher’,
’django.contrib.auth.hashers.BCryptSHA256PasswordHasher’,
IV. RESULTS AND DISCUSSION
After having set up the server and designing the user
interface this is what we have obtained: The values are not
obtained from a real time scenario.
Figure 3 shows the dates for which the values have been
stored in the database the dates have been generated for
each object stored in the database.

Fig. 6. Water level in water storage system

Figure 7 shows how data is stored in Django’s built in sqlite3


database.

Fig. 3. Store Usage

Figure 4 shows how the users and database is managed


using Django’s administration page.

Fig. 7. SQLite Database

V. CONCLUSION AND FUTURE SCOPE


In our proposed system, we have successfully implemented
and proved that the HC-12 and Django are very reliable tools
for developing a real-time, efficient and low cost IoT system
for monitoring the level of water. Anyone can make their
Fig. 4. Django Administration Page own applications from these tools. The HC-12 for the range
of communication it provides, it is low cost and very good
for transmission of telemetry data. Moreover, Django proves
Figure 5 shows how the data is represented to the user using
to be a very good framework, it is very easy to work with
graphs which can be exported.
and proves to be perfect for perfectionists and can be used to
integrate various tools.
The proposed work can be used for large scale monitoring of
water in big organizations and communities. With the help of
the data generated by the sensors and by using data analyzing
tools, a modified system can be made which can predict and
take necessary actions by itself when a water crisis occurs. This
can be done by introducing machine learning techniques in the
system. This system will become highly efficient and more
reliable by introducing these features.

VI. REFERENCES
[1] K. Soni, D. Waghela, R. Shah and M. Mohan, "Smart Well
Fig. 5. Data Represented on Graph Monitoring System," 2018 International Conference on Smart
City and Emerging Technology (ICSCET), Mumbai, 2018, pp.1-
5.
Figure 6 shows how data is represented to indicate current
[2] Yang Xu; Fugui Liu, "Application of Wireless Sensor Network in
level of water in buildings tank or water reservoir.
Water Quality Monitoring", 2017 IEEE International Network for Real-Time Monitoring and Contamination
Conference on Computational Science and Engineering (CSE) Detec- tion in Drinking Water Distribution Systems" IEEE
and IEEE International Conference on Embedded and SENSORS JOURNAL vol. 14 no. 8 , AUGUST 2014.
Ubiquitous Computing (EUC), Year: 2017, Volume:2 [19] Hao Chen Xueqin Jia Heng Li "A Brief Introduction t o IOT
[3] Brinda Das; P. C. Jain, "Real-time water quality monitoring Gateway” Proceedings of ICCTA Network Technology
system using Internet of Things, 2017 International Conference Research Center China Unicom research Institute,2016.
on Computer, Communications and Electronics (Comptelix), [20] Yasser Gadallah Mostafael Tager Ehab Elalamy "Framework
Year:2017 for Cooperative Intranet of Things Wireless Sensor Network
[4] YunzeLi; Ying Wang; Min Cong; Haoxiang Lang,"Design and Applications" Eight International Workshop on Selected
development of a water quality monitoring network and Topics in Mobile and Wireless Computing The American
system", 2017 IEEE International Conference on Industrial University in Cairo, pp.147-154, 2012.
Technology (ICIT), Year:2017 [21] T. Perumal, M. N. Sulaiman and C. Y. Leong, "Internet of
[5] Vinod Raut; SushamaShelke, "Wireless acquisition system for Things (IoT) enabled water monitoring system," 2015 IEEE
water quality monitoring", 2016 Conference on Advances in 4th Global Conference on Consumer Electronics (GCCE),
Signal Processing (CASP),Year: 2016 Osaka, 2015, pp.86-87.
[6] S.Jadhav, S.V.Patil, T.C.Thanuja, S.MP and G. Shankar, [22] Yin Jie Ji Yong Pei Li Jun Guo Yun Xu Wei "Smart Home
"Monitoring of Industrial Water Usage by using Internet of System Based on IOT Technologies" Computational and
Things," 2018 International Conference on Information, Information Sciences (ICCIS) 2013 Fifth International
Communication, Engineering and Technology (ICICET), Pune, Conference, pp.1789-179121–23June2013.
2018, pp.1-4. [23] T. Perumal M.N. Sulaiman N. Mustapha A. Shahi R. Thinaharan,
[7] JanuszWojdalski,BogdanDróżdż,JanuszPiechocki, Marek “Proactive architecture for Internet of Things (IoTs) management
Gaworski, Zygmunt Zander, Jan Marjanowski, “Deter- minants in smart homes”,Consumer Electronics (GCCE) 2014 3rd Global
of water consumption in the dairy industry”, Polish Journal of Conference, pp. 16-17 7–10, Oct. 2014.
Chemical Technology, Vol. 15,2013. [24] N. Mhaisen, O. Abazeed, Y. A. Hariri, A. Alsalemi and O.
[8] Jing Wang, YajunZhang, “The Analysis of Water Use and Water Halabi, ”Self-Powered IoT-Enabled Water Monitoring System”,
Conservation in Paper Making Industry”, Inter- national 2018 International Conference on Computer and Applications
Conference on Computer Distributed and Intelligent (ICCA), Beirut, 2018, pp. 41-45.
Environment Monitoring,2011. [25] Daniel D, P Raviraj and G Pradeep, “Multimedia User Request
[9] Tomás Robles, Ramón Alcarria, Diego Martín, Augusto Scheduling using Single Kernel – SVM and Fast Lyapunov in H-
Morales, Mariano Navarro, Rodrigo Calero, Sofía Iglesias, Cloud”, International Conference on Electrical, Electronics,
Manuel López, “An Internet of Things-based model for smart Communication, Computer Technologies & Optimization
water management”, 28th International Conference on Ad- Techniques, 2017.
vanced Information Networking and Applications Workshops, [26] A. Jamaluddin D. Harjunowibowo D. T. Rahardjo E. Adhitama S.
2014. Hadi, ”Wireless water flow monitoring based on Android
smartphone”, 2016 2nd International Conference of Industrial
[10] Chanda Rajurkar, S R S Prabaharan, S.Muthulakshmi, “IoT
Mechanical Electrical and Chemical Engineering (ICIMECE),
Based Water Management”, International Conference on
pp. 243-247 2016.
Nextgen ElectronicTechnologies, 2017.
[27] G.Surya,Daniel D,A Wims M M, “Enhanced Resource Allocation
[11] K. Gupta, M. Kulkarni, M. Magdum, Y.Baldawaand S. Patil,
in wireless Networks Using Virtualization”, International
"Smart Water Management in Housing Societies Journal of Pure and Applied Mathematics, Vol 119, Issue no 12,
usingIoT,"2018SecondInternationalConferenceonInventive 1459-1470 2018.
Communication and Computational Technologies (ICICCT), [28] D Daniel, P Raviraj,” Effective and Optimal utilization of
Coimbatore, 2018, pp.1609-1613. Resource for Data Processing using Firefly and MDP in Cloud",
[12] P.Verma, A.Kumar , N.Rathod ,P.Jain, S.Mallikarjun International Conference on Science, Technology, Engineering
,R.Subramanian, B.Amrutur and R.Sundaresan.“Towards an IoT and Management , 2017
based Water Management System for a Campus”, IEEE First [29] D Daniel, P Raviraj, ”Distributed hybrid cloud for profit driven
International Smart Cities Conference (ISC2), 2015. content provisioning using user requirements and content
[13] T. Perumal, M. N. Sulaiman and C. Y. Leong, "Internet of popularity”, Cluster Computing – The Journal of Networks
Things (IoT) enabled water monitoring system," 2015 IEEE Software Tools and Applications, Vol no 20, Issue no 1,525-538,
4th Global Conference on Consumer Electronics (GCCE), 2017.
Osaka, 2015, pp.86-87. [30] Nageswara Rao, Moparthi N. Geethanjali, ”Design and
[14] C.Rajurkar, S R S Prabaharan, S.Muthulakshmi. “IoT Based implementation of hybrid phase based ensemble technique for
Water Management”, Nextgen Electronic Technologies: defect discovery using SDLC software metrics”, An International
Silicon to Software (ICNETS2), International Conference, Conference by IEEE AEEICB16, pp. 269-276, 2016.
2017.
[15] G.Menon , M.Ramesh , DivyaP, “Low Cost Wireless Sensor
Network for Water Quality Monitoring in Natural Water
Bodies”, Global Humanitarian Technology Conference
(GHTC), IEEE,2017.
[16] P.Shah, A.Patil , S.Ingleshwar, “IoT based SmartWater Tank
with Android application”, International conference on
ISMAC(IoT in Social ,Mobile, Analytics and Cloud),2017.
[17] K. Gopavanitha and S. Nagaraju, "A low cost system for
real time water quality monitoring and controlling using
IoT," 2017 International Conference on Energy,
Communica- tion, Data Analytics and Soft Computing
(ICECDS), Chennai, 2017, pp.3227-3229.
[18] Theofanis P. Lambrou Christos C. Anastasiou Christos
G. Panayiotou M. Polycarpou Marios "A Low-Cost Sensor
View publication stats

You might also like