Smart Sprinkler System on Smart Campus

based


Introduction
To solve problems related to wealth inequality, climate change, and gender discrimination, the United Nations announced the Sustainable Development Goals (SDGs) in 2015.The SDGs consist of 17 critical goals on which governments and businesses collaborate to realize sustainable development initiatives.The sixth SDG is "Clean Water and Sanitation" to ensure the availability and sustainable management of water and sanitation resources.Specifically, Goal 6.4 is to enhance water efficiency across all industries by 2030.This includes ensuring a sustainable freshwater supply and recycling to solve water shortage problems and reduce the number of people experiencing water shortages. (1)sia University, Taiwan, is famous for its picturesque campus with various seasonal plants.The management of the plants and landscape of the campus requires considerable labor, especially for sprinkling.Therefore, it was necessary to develop a smart sprinkler system for more efficient and effective management at the operators' convenience and from the perspective of a smart campus.The new sprinkler system was expected to help manage the labor flexibly and efficiently.
To develop the system, we used IoTtalk.IoTtalk is a versatile platform for Internet of Things (IoT) device interaction to develop various IoT applications such as home automation.In IoTtalk, IoT devices are integrated with their input device features (IDFs) and output device features (ODFs).IDFs are for sensors or measuring devices such as the microphone, Gyro sensor, and GPS, while ODFs are for displays, speakers, and controllers.IoT devices are connected to the IoTtalk server via wired or wireless technologies.The network application with interaction between IoT devices is developed for and executed on the IoTtalk server.Depending on the data of the devices with IDFs, those with ODFs operate appropriately.−4) The purpose of the automated sprinkler system is to maintain the plantation and lawn fields on the campus using sensors and controllers.−8) Intelligent irrigation is an effective method to save water with an improved watering efficiency of 80−90% compared with 40−45% by humans. (9,10)Blomquist et al. showed that the intelligent irrigation system also reduced the amount of water used by 16%. (11)he developed smart sprinkler system consisted of modules and sensors.The price of wireless sensors, actuators, controllers, and switches was between USD 30 and 100.As these devices were added to the existing system, the total cost for constructing the system was approximately USD 500 for a total area of 5000 m 2 .In such an economic way, the smart sprinkler system was built on a smart campus of a university in Taiwan to comply with Goal 6.4 of SDGs and to manage the campus more effectively and efficiently.
The paper (12) from our previous research is relevant to this study as it provides information about the development of a smart irrigation system using sensors and controllers for maintaining the plantation and lawn fields on the campus.It supports the discussion on the reduction in human labor, cost saving, and the improvement of efficiency achieved through the implementation of the smart sprinkler system.Additionally, it mentions the cost of the system and its application in a smart campus in Taiwan, in alignment with the overall goal of managing the campus more effectively and efficiently.

Smart sprinkler system
In this study, we improved the existing sprinkler system by adding the required sensors, controllers, and network devices to convert the old system to a smart sprinkler system.The process of developing the system is shown in Fig. 1.

Structure of system
The developed system comprises water valve controllers, sensors, and IP cameras integrated into a unified IoT platform called AUtalk.AUtalk also manages the data related to weather (rainfall and weather forecasts), soil property (humidity and temperature), and captured images.The system architecture is shown in Fig. 2.
The operating system of AUtalk was developed using IoTtalk.AUtalk includes the devices described in Table 1.

Micro-weather station
Weather information is important for the appropriate sprinkling of the area considered.We built a micro-weather station using an ESP8266 module that controls the micro-weather station as a whole.The diagram of the circuit of the ESP8266 module is shown in Fig. 3.The ESP8266 module was equipped with three input/output ports to receive and transfer sensed data.To reduce the size and weight, sensors and other components were integrated into the station (Fig. 4).In the micro-weather station, a rainfall detector, a water level sensor, a soil humidity sensor, and a soil temperature sensor were connected to the module.

Rainfall detector and water level sensor
An LM319 comparator was used as the rainfall detector of the micro-weather station.It detected raindrops larger than 2.5 mm.The amount of precipitation was measured using a water level sensor equipped with a magnetic sensor (Figs. 5 and 6).

Soil temperature sensor
The soil temperature sensor was connected to the DHT11 module that transmitted the data to the IoT server (Fig. 7).The sensor was put in the soil to monitor the soil temperature.

Soil humidity sensor
A soil humidity sensor was used to monitor the wetness of the soil after sprinkling.The circuit of the soil humidity sensor is shown in Fig. 8, and the soil humidity sensor module is shown in Fig. 9.

Actuator module
The ESP8266 module in the micro-weather station was connected to the water valve controller (an actuator).The module was also connected to the campus wireless network.On the campus network, the actuator was controlled to open or close water valves using mobile devices.Automatic or manual operation was possible using smart switches (Fig. 10).The circuit of the smart switch panel is presented in Fig. 11.

IP cameras
IP cameras were installed on buildings near the area that needed to be sprinkled.The cameras were installed at an appropriate height to monitor the sprinkling area and capture images.The captured images were processed by the IoT server for the image recognition of people in the area.The cameras were used to view the operation of sprinklers and how well the area was sprinkled.They were also used to detect people around the sprinklers before operating the system.IP cameras were operated under the real-time streaming protocol (RTSP) (Fig. 12).

Weather forecast data collection
The rainfall forecast was obtained from the Central Weather Bureau (CWB) of Taiwan to decide on the operation of the smart sprinkler system.If the probability of rainfall was higher than 70% for the next hour, the sprinkler operation was canceled or the amount of water was reduced.Soil temperature and humidity were also considered along with the rainfall forecast to operate the system efficiently and save energy and water.

Operation of previous system
The previous control system was programmed to operate at designated times every week at night to ensure that there was no one on the campus.A single automatic controller was used to control six sets of water valves (Fig. 13).Operations were carried out until sufficient sprinkling was observed by operators.If the operation was set to begin during the day, an operator needed to be sure that there was no one in the sprinkling area.The previous system could not stop the scheduled operation even when it rained until the operator halted the operation.Manual operation was the most effective way to run the previous sprinkler control system.

Operation of smart sprinkler system
In the smart sprinkler system, sensors measured parameters and transmitted the data, and IP cameras monitored the area for sprinkling and captured images if required.With the developed system, the test operation was carried out at 05:00 and 18:00 every day automatically.The operation process was as follows (Fig. 14).
• Before the operation began, the current soil humidity and rainfall were measured to decide on the operation of water valves and nozzles.• If it was raining at the operation time, the operation was put on hold and the measurement was conducted again in 30 min.• If it did not rain and the probability of rainfall was higher than 70% for the next hour, the decision on the operation was postponed for 30 min.• If a person was detected in the area for sprinkling, the operation was postponed for 5 min.
The detection of people in the areas was performed every 5 min.Whenever a person was detected, the operation was stopped immediately.• If the soil humidity was higher than 60%, the operation was not executed, and the decision on the operation was postponed to the next scheduled time for operation.• If the operation was postponed repeatedly, the operation was carried out at the next scheduled time for operation.The time for postponement could be set by an operator.

e-Fence: Detection of people in sprinkling areas
There are many visitors to the campus as many activities are offered throughout the whole week.Therefore, before the automatic operation, the activities of people in the sprinkling area must be monitored to ensure safety.We combined YOLOv4 image recognition technology with a model pretrained using the COCO dataset (13) to detect people in the sprinkling areas using IP cameras.The virtual fence (e-fence) was established for any person detected in the sprinkling area.Figure 15 shows the image of the sprinkling area and the e-fence marked people in a rectangle.Water nozzles around the e-fence did not operate so as to not spray water on a person.In the image, the blue area around the purple area was a warning area where there might be a chance that someone passed the area.When there were people near the e-fence, the operation was inactivated.The information around the e-fence was also considered for the operation at the scheduled time along with soil humidity and the probability of rain.

Conclusions
We developed a smart sprinkler system on the campus of Asia University using the sensors and controllers connected through a micro-weather station on the university network.The system operated effective sprinkling in accordance with weather conditions, soil property, and the detection of people in sprinkling area.A micro-weather station was built to integrate modules to control sensors and transmit the data to the server that processed the data to decide on the operation of the system.The system operation could be scheduled at any time.Before carrying out the scheduled operation, the system collected and processed data on weather, soil, and people in the area using an AI algorithm.If the conditions for the operation were not met, the operation was put on hold.If the operation was put on hold repeatedly, the scheduled operation was canceled until the next operation.More services could be added to the system as necessary.The operation of the system was carried out successfully, and this system replaced the previous manual control system.The smart sprinkler system contributes to the University's achievement of SDGs and the efficient management of human resources using AI technology.A similar system can be developed for irrigation systems for various purposes on the basis of the system developed in this study.

Fig. 1 .
Fig. 1. (Color online) Development of smart sprinkler system on smart campus.

Fig. 4 .
Fig. 4. (Color online) Appearance of micro-weather station.(a) Whole appearance.(b) Close-up of micro-weather station when it is turned on.(c) Overflow hole and natural pressure drainage hole of micro weather station.

Fig. 10 .
Fig. 10.(Color online) Smart switch panel to operate actuator of water valve controller.

Fig. 12 .
Fig. 12. (Color online) Images of sprinkling areas captured by IP cameras.(a) Sprinkling area monitored by IP camera: zones 1 and 2 were areas for sprinkling.(b) Other sprinkling area.

Fig. 14
Fig. 14. (Color online) Flow chart of operation of smart sprinkler system.

Fig. 15 .
Fig. 15.(Color online) Operation of e-fence in sprinkling area.(a) Image showing blue warning area and purple sprinkling area.(b) Person detected in purple sprinkling area.(c) Person detected in blue warning area.

Table 1
Devices included in AUtalk.and temperature and send the data to the AUtalk server Clock module Records and sends the data of date and time in monitoring and operation Timer module Sets timers for starting and stopping operations Actuator module Controls the sprinkler valve remotely with a switch-O module on the wireless network Databank module Accesses the database via a DBAgent-O module Camera module Collects and sends images captured by IP cameras via the Camera-O module AUverse graphic user interface (GUI) Data processing logic of no-code or low-code on the AUtalk server AUverse engine Processes the input data, controls sprinklers, and manages data Sensor module Controls sensors for moisture, temperature (in air), rainfall, soil temperature, and soil humidity