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.
56
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
3.2. ACCESS PAGE
Access page made so client can sign in as indicated by given ID and login secret key and
login id and secret phrase spared in database. As shown in gure 6, All client should be
enrolled to utilize the application and his engine data all information would save money on
database and our application additionally gives the intelligent and simple interface so all
sort of client can undoubtedly deal with if any client overlooked secret key so it can reset by
getting email on enlisted email ID.
Figure 6. Mobile Application Interface
After login page, this page shows up where a client can see all capacities which incorporate
into UI and client can utilize capacities like on the o chance that they, at that point need
to see record or on the other hand, need to see history so a client can log in and can see the
history and furthermore engage with every single given capacity.
3.3. ALERTS
In this capacity cautions can be sent to utilize this alarm created by an application which
gets ready which stores in the database. For Ex: IF client set the engine condition 5 gallons
so when arrived at that level engine will naturally be shut and produces an alert in a client
mobile phone, however, there is a condition that client must sign in to utilize application
capacities.
57
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
3.4. WORKING
Here we can talk about the trial and dialogs which we have done and make mindful about
our research paper to other individuals. The water level information is Raspberry to the
microcontroller board through the WIFI (Ebere & Francisca, 1970). The degree of water
from both the tanks are gotten in a steady progression at the microcontroller. In the event
that the volume is expanding, at that point, the level of water increasing and when it is
going to arrive at the maximum limit of a sign is sent to the motor (Pudasaini et al., 2014).
When we are implementing our system rst, we measure the roof tank measurement in
terms of size, volume or capacity, volume could be calculated by multiplying all three
dimensions height, breadth, width. If the tank is cylindrical diameter height and pi would
be multiplied, further we are scaling the tank in percentage as shown in Figure 7.
Figure 7. Cylindrical Shape Tank & Rectangular Shape Tank
An average cylindrical and rectangular tank in residential areas are about ve feet in
height and have a capacity of 500 Liters of water. After measuring tanks its specication
will be sent to user cloud server and microcontroller so the system will show the following
attributes. The second phase of implementation or experiment user can control motors. In
this utilization case outline it is simple for the client to comprehend our prerequisites plainly
initially if client need to utilize our proposed framework so they should be login by making
account else they can’t get access of our application, when client makes get to so then one
screen shows up which is essentially the UI which can be constrained by the client can check
water level, water status, choice of water and furthermore they advise by our application
when water arrived at that level.
58
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
3.4.1. USES AND APPLICATIONS
The above administration proposed framework facilitate the procedure of water level
administration. We can settle numerous related issues which we face by individuals this
proposed framework works consequently as indicated by client necessity by diminishing the
labor and furthermore diminished aws.
If there should arise an occurrence of crisis if client neglect to close the engine p==3
physically this application closes when water came to at given level.
It can use in the dams for check of uid and water.
It can likewise help in water system where is wastage of water is more.
The proposed system is visualized and monitored by using the mobile application and some
hardware’s used two ultra-sonic sensors, one Raspberry pi, Micro SD card jumper wires,
a breadboard, node MCU 8286, Raspberry relay shield, power supply etc. Raspberry pi
is connected to the 5v Dc current through power supply. The voltage up and down are
controlling with Raspberry relay shield. All the programming is set to the pins of Raspberry
pi and get the result on user interface.
4. CONCLUSION
Human life’s and world development growth are fully dependent on water .As we can
see now a days water problem become common day by day so we proposed solution to
overcome from wastage of water problem so user can save water in daily manner so it can
help for user to avail this facility as much as they can . We made an app by which user can
control water system through application in application there are dierent functionalities
so user can entertain through dierent manner and save water as much as possible. Water
is crucial for all of us so we can make this type of more project to overcome this problem.
5. ACKNOWLEDMENTS
We are deeply obliged and thankful to Mr. Ehtisham Ul Haq who guide us about technical
hardware congurations and encouraged us in implementation phase. And we would also
59
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
like to express my gratitude towards Professors, Lab assistant and to our Computer Science
department, Sir Syed University of Engineering and Technology for providing us resources.
REFERENCES
Ahmadloo, E., Sobhanifar, N., & Hosseini, F. S. (2014). Computational Fluid Dynamics
Study on Water Flow in a Hollow Helical Pipe. Open Journal of Fluid Dynamics, 4(02),
133–139. https://doi.org/10.4236/ojfd.2014.42012
Dunca, A. M. (2018). Water pollution and water quality assessment of major
transboundary rivers from Banat (Romania). Journal of Chemistry, 2018. https://doi.
org/10.1155/2018/9073763
Durán-Sánchez, A., Álvarez-García, J., & del Río-Rama, M. de la C. (2018).
Sustainable water resources management: A bibliometric overview. Water (Switzerland),
10(9), 1–19. https://doi.org/10.3390/w10091191
Ebere, E. V., & Francisca, O. O. (1970). Microcontroller based Automatic Water level
Control System. International Journal of Innovative Research in Computer and Communication
Engineering, 2013, 1390–1396.
Rao, K., Srinija, S., Bindu, K. H., & Kumar, D. S. (2018). IOT based water level
and quality monitoring system in overhead tanks. International Journal of Engineering &
Technology, 7(2.7), 379. https://doi.org/10.14419/ijet.v7i2.7.10747
Levidow, L., Zaccaria, D., Maia, R., Vivas, E., Todorovic, M., & Scardigno, A.
(2014). Improving water-ecient irrigation: Prospects and diculties of innovative
practices. Agricultural Water Management, 146, 84–94. https://doi.org/10.1016/j.
agwat.2014.07.012
Narendran, S., Pradeep, P., & Ramesh, M. V. (2017). An Internet of Things (IoT)
based sustainable water management. GHTC 2017 - IEEE Global Humanitarian
Technology Conference, Proceedings, 2017-Janua (October), 1–6. https://doi.org/10.1109/
GHTC.2017.8239320
60
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
Patil, K. N., Tushar, K., Swaranjali, M. S., & Shreya, M. A. (2017). IOT Based
Water Level Monitoring System For Lake. International Research Journal of Engineering
and Technology(IRJET), 4(2), 1425–1427. https://irjet.net/archives/V4/i2/IRJET-
V4I2278.pdf
Patil, Y., & Singh, R. (2014). Smart Water Tank Management System for Residential
Colonies Using Atmega128A Microcontroller. International Journal of Scientic &
Engineering Research, 5(6), 355–357. https://www.ijser.org/researchpaper/Smart-
Water-Tank-Management-System-For-Residential-Colonies.pdf
Pudasaini, S., Pathak, A., Dhakal, S., & Paudel, M. (2014). Automatic Water
Level Controller with Short Messaging Service (SMS) Notication. International
Journal of Scientic & Technology Research 4(9), 1-2250. https://www.researchgate.
net/publication/299825981_Automatic_Water_Level_Controller_with_Short_
Messaging_Service_SMS_Notication
Shetty, T., Wagh, P., & Dudwadkar, A. (2018). Water level monitoring system. International
Research Journal of Engineering and Technology (IRJET), 05(08), 1712–1714. https://
www.irjet.net/archives/V5/i8/IRJET-V5I8295.pdf
Siddula, S. S., Babu, P., & Jain, P. C. (2018). Water Level Monitoring and Management
of Dams using IoT. Proceedings - 2018 3rd International Conference On Internet of Things:
Smart Innovation and Usages, IoT-SIU 2018, (February), 1–5. https://doi.org/10.1109/
IoT-SIU.2018.8519843
Varun, K. S., Kumar, K. A., Chowdary, V. R., & Raju, C. S. K. (2018). Water Level
Management Using Ultrasonic Sensor (Automation). International Journal of Computer
Sciences and Engineering, 6(6), 799–804. https://doi.org/10.26438/ijcse/v6i6.799804
61
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