A wireless rainwater collecting, filtering, and storing system using a cell-phone

Because of the greenhouse effect, global climate considerably changes and will worsen the water supply situations in future. Also, as can be seen in traditional reservoir, the crisis of water lacking will exacerbate due to the reservoir sedimentation. In order to widen the storage of water resources, a design of portable rain-collecting system used for irritation and daily use for people is presented. To facilitate the monitoring and manipulating, a rainwater collecting and storing system with green energy/automation /monitoring/control function is established. Considering the electricity shortage in remote island/mountain regions, two kinds of green energy generators (wind electrical generator and solar-board electrical device) are built and linked with the system. Here, a rain detector installed onto the roof can actuate the rainwater collecting board to raise and to collect water when raining event occurs. For the purpose of water purity, water filter is also set at the entrance of the water tank. In order to efficiently store/use the rainwater, several water storage tanks in conjunction with ecological pool are preset and adjusted via the water level gauge sensors and the pipe’s solenoid valve. To meet the weather-proof ability, PLC is adopted as the controller. Moreover, a human-machineinterface is login on the internet and remotely communicated with the cell phone.Consequently, a prototype of the cell-phone base automatic rainwater collecting and storing system is established.


Introduction
Water is essential to the human life. The supply of potable water (from natural sources, desalination or importation) needs to provide at least 100 m 3 /year per person [1]. Previous studies from Rosegrant [2,3] indicated that the effects of climate change on hydrology and water resources are tremendous. It will lead to decreasing precipitation rates and increase drought events [4]. Thus, water management and infrastructure changes have been expected to improve the situation if current climate conditions continue into the future [5]. On a global view, 70 % of the freshwater resources are used for agricultural purposes, and only 19 % for industrial and 11 % for domestic purposes (including drinking, washing, food preparation and sanitation) [6]. According to Ostrom report [7], there is an almost threefold increase in the total area of irrigated agriculture during the past century. Perry's study [8] also indicated that 20 % of total cropland (irrigated agriculture) produces more than 40 % of the world's total agricultural output. Therefore, expansion of irrigated agricultural areas is essential in nation-building processes [9]. Attempts to reuse domestic wastewater for diverse purposes, such as for agricultural irrigation, have proven to be successful in many parts of the world already [10]. Under current recycling technology, each m 3 allocated for domestic use provides between 0.6 m 3 and 0.65 m 3 of treated (recycled) water [11].
In addition, desalinated water has been regarded as one of the main sources of domestic and industrial water [12,13,14]. Israel reacted to the water crisis with an enforced building of seawater desalination facilities and wastewater treatment plants for the reuse of water and with extensive structural and price reforms. The challenges and benefits of those reforms are discussed in Bismuth et al. [15]. However, because desalinated water has an impact on the quality of water system, how to reduce salts to very low levels becomes a crucial issue [16,17]. Beside, it has been seen that salt water intrusion to the coastal aquifers will considerably decrease the groundwater levels and cause the rising of salinity levels [18]. Also, a continuously lowered water level will lead to rapid salinity due to the penetration of saline water from underground sources into the aquifer [19].
Moreover, groundwater resources have been regarded as one of the essential water resources [20]. But, for a region that has a high evaporation rate and surface water runoff in mountains areas, only 10 to 14 % of the total precipitation percolates to recharge the shallow groundwater aquifers [21]. Furthermore, for aquaculture farmers on an island, the over-load pumping of underground water that is widely used in large outdoor pools [22] results in sinkholes which may ruin the aquaculture farm. For example, ten percent of Taiwan's level land is sinking, some seriously, particularly in Ilan, Changhua, Yunlin, Chiayi and Pingtung Counties. As water resources are decreasing, water may be priced according to its cost of supply in future [23]. Pricing water in this way may influence farmers' choices of crops and will encourage them to switch irrigation water away from expensive natural water into marginal (recycled and saline) water.
Nevertheless, in order to overcome this drawback, a portable rain-collecting system used in irritation and daily use for people is presented. Considering the electricity lack at remote mountain regions and island, two kinds of green energy supply using wind electrical generation and solar board electrical generation are planned and linked to the system. Here, the system's rain detector attached onto the roof can actuate the rainwater collecting board to raise and efficiently collect water. To assure the rainwater cleanness, a filtering device installed at the entrance of first water tank is applied. In addition, to efficiently collect rainwater, several water storage tanks in conjunction with an ecological pool will be set up in advance and flexibly adjusted via the signal of tanks' level gauge sensors and the pipe's solenoid valve. Because of weather-proof characteristic, PLC is adopted as the controller. Moreover, a human-machine-interface used to login the internet and to remotely communicate with the cell phone is established. Consequently, the system having automation function and remote controlling ability can provide manpower saving and promote the rainwater storage efficiency.

Automatic rainwater collecting and storing system
The structure of automatic rainwater collecting and storing system is depicted in Fig. 1. Also, the related wiring diagram of the PLC connection is illustrated in Fig. 2. In order to remotely manipulate the rainwater collecting and storing system via the human/machine interface (server), the auxiliary relays defined in Table 1 have been added into the PLC's ladder program shown in Fig. 3. Fig. 3 indicated that the auxiliary relays remarked in red can be in place of the button functions in PLC. Therefore, the human/machine interface (server) connected to the PLC can submit the command to actuate the related operation functions of the automatic rainwater collecting and storing system via the touching panel.   As indicated in Fig. 1 and Table 1, a PLC used as a controller will actuate the actuators including four motors (for collecting board#1~#4), two water storage pumps (for water storage tank #1~#2), and one solenoid valve (for inducing superfluous rainwater to the ecological pool). The related wiring diagram of motors is depicted in Fig.4. In order to overcome the electricity lack at remote island/mountain regions, two kinds of green energy (wind electrical generator and solar board) that can provide the necessary electrical power for people and system are applied and linked to the system. A rain detector attached onto the roof is also used for detecting the raining event. The collecting boards driven by their motors can be rotated clockwise/counter clockwise depending on the raining situation. In addition, in order to allocate the upper and lower bound for each raincollecting board during board-lifting process, one pair of limit switches (LS) is installed at both the top and bottom sides. To realize the water levels inside the storage tank's water, three level gauges (two for water storage and one for high position water tower) are equipped. With the signals emitted from the sensors, the rainwater can be efficiently stored. In order to remotely monitor/control the rainwater collecting and storing system, a human/machine interface shown in Fig.5 is login an internet. Also, an IPCAM used to capture the site vision is set up in the system. As indicated in Fig. 6, the internet of the human/machine interface is preset. And, a wireless communication between the human/machine interface (server) and the cell phone (client) via the internet protocol is also established. Here, the human/machine interface (server) shown in Fig. 7 is used to implement the system by sending a command to the PLC controller via a touching panel's buttons.  To facilitate communication between the PLC and the human/machine interface, a RS232/RS422 protocol is used. The picket format for the MISTISUE FX2n-PLC primary port's communication is illustrated in Table 2. And, the definition of the picket format is depicted in Table 3. Consequently, the command description of the MISTISUE FX2n-PLC extended port's communication protocol type 1 is shown in Table 4.   In previous studies, the TCP/IP communication between server (human/machine interface) and client (cell phone) has been established [24,25,26,27]. The communication process for server (human/machine interface) and client (cell phone) is also depicted in Fig.  8 and described as below.   Fig. 8. The communication process between client port (cell phone) and server port (human/machine interface).

The communication process (server viewport) [28, 29]
Four steps used in the server's communication process are (1) Listen: Because the server port will establish a connection platform for the client port, the condition of "Listen" for the server port is needed. The server port waits for the connection from the client port when "Listen" is ready. (2) Accept: The server port will receive an event ConnectionRequest from the client port when the client port submits a "Connect" for a further internet connection. The server port also accepts the client's connection request using "Accept" via another WINSOCK. (3) GetData: The server port receives an event "DataArrival" from the client port when the client port sends data back to the server port. At the present time, the server port will also receive data by using "GetData." (4) SendData: The server port sends data to the client port by using "SendData."

The communication process (client viewport) [28, 29]
Four steps used in the client's communication process are (1) Connect: The WINSOCK in the client port submits a connection request using "Connect." At this time, the WINSOCK will assign the server port's "Port Number" (at "Listen") to be the value of its "Remote Port." (2) SendData: The client port sends the data set to the server port using "SendData" when the internet connection between the server port and the client port is built.
(3) GetData: The client port will generate an event "DataArrival" when the server port sends a data set to the client port. For the moment, the client port can receive the data using "GetData." (4) Close: The end connection using "Close" is needed when the communication is finished.

Results and discussions 4.1 Results
As indicated in Fig. 1, a cell-phone base automatic rainwater collecting and storing system is established. The interface of the cell phone is shown in Fig. 9. The prototype of the automatic rainwater collecting and storing system is also depicted in Fig. 10. A PLC is used as a controller to control various actuators, including four panel-lifting motors, two water pumps, and a solenoid valve. One rain detector is equipped to detect the raining event. Four pairs of limit switches installed around four pieces of the rain-collecting boards are applied to detect/confine the board position. Three sets of level gauges installed inside the water tanks and high position water tank are used to online detect the water levels. According to the water levels, water pumping process and excessive rain discharging process (to the ecological pool) can be automatically initialized. A communication between the human/machine interface (server) and the rainwater collecting/storage system is made via the RS232/RS422 protocol to the PLC. The human/machine interface (server) can implement the system function by sending a command to actuate the PLC via triggering the auxiliary relays programmed in the ladder program. Moreover, to realize current rainwater collecting and storage status, a cell phone having remote distributing, monitoring, and controlling function is built and shown in Fig. 9.

Discussions
The main issues concerning a cell-phone base automatic rainwater collecting and storing system have (1) Water and green electricity supplement.
(4) Efficient rainwater collection and storage using level gauge sensors and solenoid valve. (5) Establishing a client-server control system between the human/machine interface and the cell phone. (6) Assuring the operation of rainwater collecting and storage using a visual monitoring system (IP CAM).

Conclusions
It has been seen that to overcome the electricity lack at remote island/mountain, two kinds of green energy generators (wind generator and solar board generator) have been built and linked to the water collecting/storage system. In order to facilitate the water collecting/storage operation and improve the rainwater collecting and storage efficiency, a remote distributing, controlling and monitoring network that analyzing the online status (such as the raining event, the upper/lower limit switches for the lifting boards, and the water levels) of system and triggering related actuators (motors for lifting board, motors for water pumps, and solenoid valve for pipe outlet) is established. Here, this network is also utilized using an inquiry between the human/machine interface (server) and the cell phone (client) via the TCP/IP network.
Consequently, an automatic rainwater collecting and storage system equipped with a visual monitoring device (IP CAM) and a remote cell-phone control is established.