47
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue Abril 2020
IOT BASED FLUID MANAGEMENT AUTOMATION SYSTEM
USING RASPBERRY PI AND ULTRASONIC SENSORS
Ayesha Urooj
Sir Syed University of Engineering and Technology. Karachi, (Pakistan).
E-mail: aurooj161@yahoo.com ORCID: https://orcid.org/0000-0002-6985-3269
Sallar Khan
Sir Syed University of Engineering and Technology. Karachi, (Pakistan).
E-mail: sallarkhan_92@yahoo.com ORCID: https://orcid.org/0000-0001-8988-3388
Sana Shaq
Sir Syed University of Engineering and Technology. Karachi, (Pakistan).
E-mail: sanashaq2001@gmail.com ORCID: https://orcid.org/0000-0003-1873-7425
Bilal Ahmed
Sir Syed University of Engineering and Technology. Karachi, (Pakistan).
E-mail: bilal-ahmed007@hotmail.com ORCID: https://orcid.org/0000-0002-4360-2103
Abdul Basit
Sir Syed University of Engineering and Technology. Karachi, (Pakistan).
E-mail: basit.rr123@gmail.com ORCID: https://orcid.org/0000-0003-4044-8590
Shaheer Mustafa Ansari
Sir Syed University of Engineering and Technology. Karachi, (Pakistan).
E-mail: shaheer1234@gmail.com ORCID: https://orcid.org/0000-0001-9470-9368
Recepción:
21/01/2020
Aceptación:
25/03/2020
Publicación:
30/04/2020
Citación sugerida Suggested citation
Urooj, A., Khan, S., Shaq, S., Ahmed, B., Basit, A., y Ansari, S. M. (2020). IoT based uid
management automation system using Raspberry Pi and ultrasonic sensors. 3C Tecnología. Glosas de
innovación aplicadas a la pyme. Edición Especial, Abril 2020, 47-61. http://doi.org/10.17993/3ctecno.2020.
specialissue5.47-61
48
http://doi.org/10.17993/3ctecno.2020.specialissue5.47-61
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue Abril 2020
ABSTRACT
Water crises is one of the most important problem of current era, as a huge amount of water
wasted every year especially in residential and industrial. Improper timings and extensive
electric consumption are one of the hectic issues faced by the society. We have successfully
created a Kivy application for the user in which they can control the uid wastage problem
with the integration of hardware that includes (Microcontrollers, Ultrasonic sensors, Relay
shield, node MCU 8266, and contactor). Through the help of our designed application, user
can control: Water level status, Motor accessibility (on/o), status of water consumption,
message alert facility of uid. In future work, we focus to enhance the water model and will
try to promote it to immense water plants as well as it can be adopted by agriculture sectors.
KEYWORDS
Crises Extensive, Kivy, Relay Shield, Consumption, Accessibilities, Immense.
49
http://doi.org/10.17993/3ctecno.2020.specialissue5.47-61
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue Abril 2020
1. INTRODUCTION AND RELATED WORK
The water level administration has been a noteworthy issue so new strategies must be
embraced to control the water level. Here are the expected framework works superior
to the current framework. The current framework works along these lines that we make
UI (User Interface) for the association of the client so the client can handle equipment
through application so it will construct enthusiasm of client and furthermore manufacture
cooperation as we probably are aware nowadays there is a great deal of wastage of water
issue so we can attempt to make equipment and programming thusly that they control
water from over streaming and it assumes a crucial job for client when they use Proposed
framework: Here we will display the fundamental thought of our proposition. This proposed
framework works beneath computerization and contains components like Raspberry pie,
ultrasonic sensor, engine pump, transfer, driven, buzzer and LCD in which each component
has its claim usefulness, but Arduino looks like the heart of the venture as all the components
are interfaces with Arduino. The ultrasonic sensor plays a major part in determining the
water level display within the tank. This sensor is tted for both tanks upper and lower
which is utilized for receiving ag and work concurring to the given condition and motor
close at that time when they receive ag conjointly it can do tight clamp versa it can be
on and works agreeing to client prerequisite. We have structured a code that at whatever
point the tank is getting low the engine naturally turns over and stops when the tank spans
to the client required level so the engine will consequently shut so here nobody required
for controlling to engine this is the principle bit of leeway of proposed framework. Since
no segment contacts the water, there is no possibility of harm to the parts while in the
current framework there are water verication ultrasonic sensors which can works quick
as contrast with without water conrmation sensors (Varun, Kumar, Chowdary, & Raju,
2018). Water is one of most precious and invaluable the natural resources on our planet
researches observed that the scarcity of water become constantly increasing this result will
be a globally shortage of water and there will not enough water to full our basic needs.
This major issue provokes us design a methodology to serve water wherever and whenever it
is needed our methodology not just saving water, we make it usage ecient and measurable.
We take two tanks one is basement tank and another is roof tank these are generally build in
any residential, industrial, and commercial sectors couple of distance sensors are xed into
50
http://doi.org/10.17993/3ctecno.2020.specialissue5.47-61
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue Abril 2020
the tanks that reads water levels and transfer signals to microcontroller that will trigger the
motor pump on or o when the tanks need to be lled or controlling overowing of water.
Through this perception we will tend to control and monitor water usage and consumption
water monitoring parameters helps in saving of water. If in case they are inappropriate
the model and its deployment area required audit or inspection by our team, our skilled
workers and developers diagnose the dierent parameters such as hardware software
and eld area. On the other hand, hardware models (motors) are automate by android
application through the cloud service that make this project smart and IoT based (Rao et
al., 2018). Inserted structure is presently a day’s assuming an important job in engineering
conguration process for productive examination process and successful activity. Because
of time unpredictability in electronic viewpoints installed structure have turned into a
noticeable piece of our everyday life. So hence, with the assistance of installed structure we
have monitored a venture which can quantify the water level of a capacity tank and show it
on the LCD (Shetty, Wagh, & Dudwadkar, 2018). Web of Things (IoT) can be characterized
as a system of gadgets which are interconnected. It involves a lot of sensors, correspondence
arrange just as programming empowered electronic gadgets that empowers end clients to
procure precise information occasionally, through the correspondence channel, what’s more,
considers information trade among clients and the associated gadgets. This framework can
be utilized to automatize the control of dams, industrial zones and so forth without human
obstruction. This can likewise be utilized to accumulate data on the degree of water all
through the nation. Internet of thing works faster build connection and focusses on making
the sensors works more and more eciently. Collecting the data regarding the failed sensors
and provide a more reliable way to optimize and provide reliability (Siddula, Babu, & Jain,
2018).
There have been many hydrological studies and theories have been proposed by the experts
around the globe which highlight our environment changes our ecosystems mainly for
the ecological role of water in our colonies, dams and powerhouses, furthermore many
other researches, and experiments have also been made in recent years related to safety
precautions for the usage of water and prevent it from wastage. Our study related to
water resource management depends on the consumption of water by the population
where water is essential to use and in what quantity? the rapid increase of population
51
http://doi.org/10.17993/3ctecno.2020.specialissue5.47-61
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue Abril 2020
and an unaccountable supply and usage would be the root cause of water crises. We use
ultrasonic sensors and microcontrollers on water supplies those are co-related with user
mobile interface as it is observed that in the local residencies their determining the locations
where schedule or unscheduled load shedding of electricity eectuate the human time and
cost that will cause to uncertain water wastage and shortage, major polluting sources that
contribute to water savage and its tributaries, an analysis has been made in order to evaluate
the two major water storage in every house should using the water this Fluid Management
Automation (F.M.A) methodology comes under the section, which is one of the most reliable
management systems of the water and other uids (Dunca, 2018).
Water may be a rare normal asset, fundamental for life and to carry out the endless larger
part of economic activities. It is crucial, non-expandable by the unimportant will of man,
unpredictable in its way of presenting itself in time and space, eectively defenseless and
helpless of progressive employments (Durán-Sánchez, Álvarez-García, & del Río-Rama,
2018). The uid water management system present in the application which is used by the
client and application stores previous records of water level information. We don’t allow
any user to get access on that, but admins have only the excess to check information of
clients, but client can reset the password and entertain with application. The real water level
present in the application shown on the application-based interface. Application-based
interface stores the records of the water level data (Patil et al., 2017).
An IoT framework is made for this framework to test the capacities notice in the venture
and it can likewise control the water stream and oer help as well, customer (Narendran,
Pradeep, & Ramesh, 2017). Systematically interest in new enhance has brought about higher
water prices, however, without picking up the maximum capacity benets through water
competence (Levidow et al., 2014). The framework will mechanize the method by putting a
single sensor unit within the tank that will occasionally take estimations of the water level
and will control the tool naturally. This framework disposes of the try of individuals for
everyday lling of the tank and checks for overow. The issue like ood of water within the
tank of intrigued, lter tank condition and tool overheating due to persistent utilization is
method (Ahmadloo, Sobhanifar, & Hosseini, 2014).
52
http://doi.org/10.17993/3ctecno.2020.specialissue5.47-61
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue Abril 2020
This paper planned for advertise our venture in installing a control structure into a
programmed water pump controller. One of the inspirations for this analysis was the need
to carry an answer for the issue of water lack in dierent spots wiping out the signicant
oender misuse of water. A lot of water is misused and wasted. It will help the conditions
and water cycle which thus guarantees that we spare water for our future (Patil & Singh,
2014).
2. RESEARCH METHODOLOGY
As we know that the water is one of the most important and most essential natural resources
for living beings, until it is used in an accountable manners this organized system Undertaking
dependent on both equipment and programming where as shown in Figure 2 we can
utilize distinctive equipment like distance sensors (Ultrasonic sensors HC-or JSN-SR04T)
Microcontrollers (Node MCU, Raspberry Pi, Relay shield, Contactors) and made equipment
as indicated by the prerequisites (Ahmadloo et al., 2014). Furthermore our proposed system of
Fluid water management automation that work on some uid and water level measurements
its consumption utilization and its wastage controlling these all functionalities could be
achieved by the use of programming and instructions to develop the user interactive interface
an mobile application so any client can interact with the interface and cause their need to
satisfy, some basic method and description of components are explained under.
2.1. MICROCONTROLLERS
Figure 1. Structure diagram
53
http://doi.org/10.17993/3ctecno.2020.specialissue5.47-61
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue Abril 2020
2.1.1. RASPBERRY PI
Raspberry pi as shown in Figure 2 is a credit card size board micro PC and the least
expensive chip utilized by understudies. The raspberry pi is programmed to perform
several operations according to our project purposes like controlling automation monitoring
sequencing and displaying. Due to its size and portability, we can x it to the desired location
here we are xing it near to motor-pump and switching board, thus our model saves time,
space and cost. Raspberry pi transfers the instructions to sensors and motor pumps when
the user wants, or it could automate the motors and sensors as per designed algorithm by
the programmer.
Figure 2. Raspberry Pi module 3B+.
2.1.2. NODE MCU ESP8266
ESP8266 is a WI-FI chip having all-inclusive TCP/IP stack and microcontroller capability
as shown in Figure 3, Moreover Node MCU is an open-source platform majorly used in
internet of things (IoT) based project and relevant purposes, basically ultrasonic sensors
which are used in this project are not able to connect to the internet on its own because
they don’t have their built-in setup we use Node MCU ESP8266 to do so, we programmed
with an Arduino Integrated Development Environment (IDE) and setting the connection
with sensors and raspberry pie in order to perform wireless communication to an extended
distance in this way both the sensors can send the readings to Raspberry Pie which performs
further actions accordingly.
54
http://doi.org/10.17993/3ctecno.2020.specialissue5.47-61
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue Abril 2020
Figure 3. Node MCU 8266.
2.2. ULTRASONIC SENSOR
As shown in Figure 4, Ultrasonic sensor detects the object and calculates the distance of
the object. The sensor head to generate an ultrasonic wave and receives the wave back after
hitting the object and make some readings (Shetty, Wagh, & Dudwadkar, 2018). Ultrasonic
sensors have four pins (GND, VCC, ECHO, and TRIGGER. We have already dened
levels of tanks in our system. User can check live status of water the levels of the tanks. We
utilize ultrasonic sensor for both upper and lower tank so water level can distinguish for the
two tanks and this work water level engine will naturally close everything should be possible
since raspberry pi oers sign to ultrasonic sensor and it will close when arrived at that level
(Varun et al., 2018).
Figure 4. Receiving Signal through Ultrasonic Sensors
55
http://doi.org/10.17993/3ctecno.2020.specialissue5.47-61
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue Abril 2020
2.3. CLOUD SERVER
Firebase included a task so we can make database eectively and store data most assuredly
and by guaranteeing that all data keep private and discharge so a client can undoubtedly be
enrolled with an email with no dread, Firebase would oer help and communicate client by
its highlights. Here some important code for rebase as follow, as shown in below Figure 5.
2.3.1. CODING
Figure 5. Firebase Coding
2.3.2. EXPLANATION
We can use rebase coding because it can provide support to client and also give security to
admin to make client data secrete and allow client to recover security if hacked.
3. EXPERIEMENTAL RESULTS AND DISCUSSIONS
3.1. USER INTERFACE (KIVY PLATFORM)
This application is created using the software Kivy which is a python cross platform of
android this all above screens are made by using the tool Spyder as we know people in
society not aware with Kivy software but Kivy also use to makes interactive applications
Kivy is a free and open-source Python library for creating versatile applications and another
multi touch application programming with a characteristic (UI) Kivy platform also support
all platform including IOS, Android and many others etc.