Monitoring and Controlling Tap Water Flow at Homes Using Android Mobile Application

: House owners with tight schedule or have a busy lifestyle tend to forget to monitor their houses effectively. For example, they or their elderlies or their children might forget to close a water tap after using it so much. To visually check every water taps in the house consumes time, tedious, and requires a family member to be at the house. Currently, this could not be done remotely. This paper presents the development of an online mobile application (app) that monitors and controls the water flow through taps whenever there is an unusual reading of the water usage at home. The primary goal of this system is to enable a user in monitoring and controlling the water flow at home via an online mobile application’s (app) graphical user interface (GUI). This would make the monitoring process more efficient and convenient for house owners.


Introduction
Managing water consumption is vital for life preservation. Knowing water consumption at homes can have a great impact water saving. Even families could change habits of consumption [1]. Reports have warned of an impending global water crisis due to surging population growth, climate change, reckless consumption, and chronic waste [2]. Giving a grim assessment of the state of the planet's freshwater, especially in developing countries, the report describes the outlook for coming generations as worrisome [2]. However, to visually check every water taps in the house consumes time, tedious, and requires a family member to be at the house.
To remotely do so, we propose a system that monitors and controls the water flow through taps whenever there is an unusual reading of the water usage at home. The Water Flow Monitoring and Controlling System is an interactive androidbased mobile application. It is equipped with external hardware to sense a tap's water flow rate and control (on/off) the water supply line when necessary. Registered users can login and view their respective house's current water flowage from the screen's dashboard interface. The external hardware updates the water flow rate (L/Hour) every 1 second to a database via the Internet connection. If the users decide to turn on or off the water supply taps at their homes, it can be done via the on/off button provided in the screen's dashboard interface. A user's on/off instruction is set within the database; the hardware synchronizes this instruction and performs the desired action. Set Timer and Set Schedule are two additional functions provided to users. The Set Timer function enables the users to set a timer to turn on/off a water supply tap via a desired countdown (for short duration control). The Set Schedule function enables the users to set a timer to turn on/off a water supply tap on a desired date (for long duration control).

Related Work
A smart water meter monitor as shown in Figure 1, can be attached to any residential water pipe, where it captures data on how much water a household uses, along with information on water temperature and pressure. A Wi-Fi module built in to the device sends all of its data to your smartphone, breaking water habits down into digestible graphs of total water consumption and progress towards water-saving goals. The whole thing is powered by water pressure. [1] Kuganesan Kumar and Moamin A. Mahmoud: Monitoring and Controlling Tap Water Flow at Homes Using Android Mobile Application The Aquamonitor Meter Probe as shown in Figure 2 is a stand-alone unit for water consumption recording and monitoring without need for SIM cards, internet or network connections or ongoing monthly costs. The MeterProbe is a compact weatherproof unit that can be pipe or surface mounted on or near the water meter and is powered from a single long life battery. [3]  The main limitation of these applications is they only monitor the water flow, if any abnormal reading captured by the application, a homeowner need to manually close the tap. In other words, these applications do not provide a controlling function to close the tap remotely when it is necessary. Thus, in this paper we present our work to overcome the controlling problem.

Development Tools (Hardware)
The Arduino Uno is a microcontroller board that can be programmed using Arduino IDE (Figure 3) [4]. This board capable of accept input data and process it then output the data. It has 14 digital input/output pins, 6 analog inputs, 16 MHz clock speed, a USB connection port, a power jack, an ICSP header and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to operate it. It operates under 5V DC power [5].
This project will be using this board to control the solenoid valve and also to get readings (data) from water flow sensor. Then the Arduino board process the input data and forward it to the Wi-Fi module. This data will be inserted into a database via internet by the Arduino board. Below is the figure of an Arduino UNO board: A solenoid valve, as shown in Figure 4, is an electromechanically operated valve. The valve is controlled by an electric current through a solenoid. Solenoid valves are the most frequently used control elements in fluidics. Their tasks are to shut off, release, dose, distribute or mix fluids. They are found in many application areas. Solenoids offer fast and safe switching, high reliability, long service life, good medium compatibility of the materials used, low control power and compact design. [7] This project will be using solenoid valve to turn on and off the main pipe of the house when the user send instruction from his/her mobile phone via internet. The instruction is then received by Arduino board through Wi-Fi module; this instruction is processed and a signal is send to the solenoid valve from the Arduino board to perform the action user instructed. A water flow sensor is a device for sensing the rate of fluid flow through a pipe line which it is fixed. The water flow sensor is fixed between a pipe lines then this sensor will detect the rate of the water flowing through it. A continuous reading will be outputted while the speed of water flow through it is constant; if the speed is high the reading outputted will be high too. In case there is no water flow through it there will be no reading, the sensor will output 0 rate of flow. [6] This project will be using the water flow sensor to continuously detect the water flow rate through the main pipe. The readings outputted by the sensor will be send to the Arduino board, this readings will be processed and forwarded to the Wi-Fi module. Finally this readings will be inserted into the database via internet. Below is the figure of water flow sensor: The ESP8266 Wi-Fi Module is a self-contained system on chip (SOC) with integrated TCP/IP protocol stack that can give any microcontroller access to Wi-Fi network as shown in Figure 6. The ESP8266 is capable of either hosting an application or offloading all Wi-Fi networking functions from another application processor. The ESP8266 module is an extremely cost effective board with a huge, and ever growing, community. With this Wi-Fi module the Arduino board is able to send and receive data from the internet [8].
This project will be using ESP8266 Wi-Fi board to add Wi-Fi functionality for the Arduino board. Any data is processed by the Arduino board is send and received through the ESP8266 Wi-Fi module to insert or fetch to/from the database via internet.

Monitoring and Controlling Tap Water Flow
The use case diagram shown in Figure 7 depicts two users who interact with the system, end user and administrator. It elaborates how each one of them will interact with the system: A sequence diagram shows an interaction, which represents the sequence of messages between instances of classes, components, subsystems, or actors. Time flows down the diagram, and it shows the flow of control from one participant to another. Use sequence diagrams to visualize instances and events, instead of classes and methods. More than one instance of the same type can appear on the diagram. More than one occurrence of the same message can also appear.
In developing any system, the design phase is the phase that prototypes the real system. Therefore it is very important to design the phase as it will reflect the real system. Another important part of this phase is the database design. The entity, attributes, their relationship, the data dictionary and the database diagrams are defined in this phase. This will be very useful during the development of the database for the system. With this we can design and develop the database correctly. Besides that, this phase also includes interface design, which will explain roughly how the real system's interface will look.

Development and Testing
The Water Flow Monitoring and Controlling System is an interactive android-based mobile application. It is equipped with external hardware to sense a tap's water flow rate and control (on/off) the water supply line when necessary. Registered users can login and view their respective house's current water flowage from the screen's dashboard interface. The external hardware updates the water flow rate (L/Hour) every 1 second to a database via the Internet connection. If the users decide to turn on or off the water supply taps at their homes, it can be done via the on/off button provided in the screen's dashboard interface. A user's on/off instruction is set within the database; the hardware synchronizes this instruction and performs the desired action. Set Timer and Set Schedule are two additional functions provided to users. The Set Timer function enables the users to set a timer to turn on/off a water supply tap via a desired countdown (for short duration control). The Set Schedule function enables the users to set a timer to turn on/off a water supply tap on a desired date (for long duration control). Table 1 summarizes the results. This paper achieves the first stage of the proposed plan to develop an agent-based approach to remotely monitoring and controlling tap water flow. Deploying intelligent software agents shall extend the capability of the system as software agents have been widely used in distributed artificial intelligence and due to their autonomous, self-interested, rational abilities [9,10,11,12], and social abilities [13,14,15,16], agents are well-suited for automated control systems. Press save button.

Conclusion
In this paper, we develop an online mobile app that monitors and controls the water flow through taps whenever there is an unusual reading of the water usage at home. The developed App enables a user in monitoring and controlling the water flow at home via an online mobile application's (app) graphical user interface (GUI). This makes the monitoring process more efficient and convenient for house owners.
In the future work, we shall develop an agent-based system that monitors the water flow and autonomously take measurements on behalf of homeowner whenever there is an unusual reading. The agent will be embedded in the external hardware.