Awareness Raising and Capacity Building through a Scalable Automatic Water Harvest Monitoring System to Improve Water Resource Management in Monteverde Community, Costa Rica †

2021. Abstract: An outreach project is conducted for the protection of water resources in Monteverde, Costa Rica. An automatic monitoring system for rainwater harvesting (AMSWH) was implemented into a water-harvesting system in the Monteverde Institute (MVI). Through information and communications technology, the project aims to promote water-harvesting systems in Monteverde community by demonstrating the quantiﬁable beneﬁts in water use (e.g., capture rainwater for use in toilets, vegetable gardens and washing machines), thereby saving drinkable water. During 2021, implemented ﬂow meters and distance sensors in the AMSWH have indicated that 5000 L of potable water has been saved by the MVI.


Introduction
This project is conducted in the communities of Santa Elena and Monteverde, Monte Verde, Costa Rica. Straddling the continental divide, the Monteverde area contains varied abiotic conditions and rich biodiversity, including the unique cloud forest. The mountain system where Monte Verde is located is considered an aquifer recharge area, which is strategic for the country due to its geographical location, supplying water for energy production on the Caribbean slope and for human consumption as well as agricultural activities on the Pacific slope.
This being said, the Monte Verde area faces problems related to water resources. First, population growth and increased tourism through the years have created pressure on water resources. For example, during the high-tourism season (January-May), the demand is 76 m 3 /day of water, while during the low-tourism season (August-November) demand decreases by 20% [1]. The high season coincides with the months of lowest precipitation, which stresses water resources even more due to agriculture activities in the watershed's lowlands. Secondly, the produced graywater is not treated. A common practice is to discharge graywater to storm water systems, creeks or rivers, negatively impacting water bodies. It was estimated that 1400 houses discharge about 685 m 3 /day of wastewater. Finally, there is a lack of proper storm water infrastructure to manage runoff [1]. Therefore, during precipitation events, instead of infiltration and groundwater recharge occurring, water runoff provokes landslides, floods and pollution.
To promote social awareness and implementation of water resource management on house and building scales, the University of Costa Rica, Department of Biosystems Engineering (UCR-BE), and the Monteverde Institute (MVI) conducted the social project entitled Unitary Biosystems for the Protection of Water Resources in Monteverde, Costa Rica. Integration biosystems, such as water harvesting, water sowing and wastewater treatment, are offered to the community to generate awareness for saving drinkable water and aquifer water conservation. In particular, by using a scalable prototype with information and communications technology (ICT), the work reported in this paper aims to achieve a viable product: an automatic monitoring system, the AMSWH, to quantify the amount of rainwater that it is harvested, used and sown. The AMSWH demonstrates the rainwater mass balance through ICT using low-cost solutions. In this case, the MVI's AMSWH captures rainwater for use in toilets, vegetable gardens and washing machines, thereby reducing the consumption of potable water on campus; finally, the surplus water is carried into a water sowing system. The quantifiable benefits of these harvesting/sowing systems for measuring the conservation of water resources can thus be demonstrated to the community.

Materials and Methods
The rainwater-harvesting system at the MVI ( Figure 1) has four collection tanks, with a total capacity of over 2000 L. Rainwater is collected from a 108 m 2 roof. A screened gutter and first flush diverter help to keep leaves and other solids out. Tanks are equipped with auxiliary valves for cleaning and discharging the water. The collected water can be discharged for use in three toilets (0.007 m 3 capacity each), a vegetable garden (6 m 2 area) and two washing machines (0.070 m 3 capacity each). For each use, water flow sensors measure water consumption. Additionally, ultrasonic sensors monitor the water level in the collection tanks. Once the full capacity of the tanks is reached, the surplus water goes to the sowing system for groundwater recharge. Engineering (UCR-BE), and the Monteverde Institute (MVI) conducted the social project entitled Unitary Biosystems for the Protection of Water Resources in Monteverde, Costa Rica. Integration biosystems, such as water harvesting, water sowing and wastewater treatment, are offered to the community to generate awareness for saving drinkable water and aquifer water conservation. In particular, by using a scalable prototype with information and communications technology (ICT), the work reported in this paper aims to achieve a viable product: an automatic monitoring system, the AMSWH, to quantify the amount of rainwater that it is harvested, used and sown. The AMSWH demonstrates the rainwater mass balance through ICT using low-cost solutions. In this case, the MVI's AMSWH captures rainwater for use in toilets, vegetable gardens and washing machines, thereby reducing the consumption of potable water on campus; finally, the surplus water is carried into a water sowing system. The quantifiable benefits of these harvesting/sowing systems for measuring the conservation of water resources can thus be demonstrated to the community.

Materials and Methods
The rainwater-harvesting system at the MVI ( Figure 1) has four collection tanks, with a total capacity of over 2000 L. Rainwater is collected from a 108 m 2 roof. A screened gutter and first flush diverter help to keep leaves and other solids out. Tanks are equipped with auxiliary valves for cleaning and discharging the water. The collected water can be discharged for use in three toilets (0.007 m 3 capacity each), a vegetable garden (6 m 2 area) and two washing machines (0.070 m 3 capacity each). For each use, water flow sensors measure water consumption. Additionally, ultrasonic sensors monitor the water level in the collection tanks. Once the full capacity of the tanks is reached, the surplus water goes to the sowing system for groundwater recharge. The AMSWH has two main components: the electronic system based on the ESP32 Development Board and the Blynk platform [2]. The ESP32 gathers data from the sensors and sends it to the Blynk mobile app. The monitoring data is displayed in a dashboard created with Blynk.

Electronic System
The electronic system is integrated by the Sparkfun ESP32 Development Board "ESP32 Thing", the mechanical flow meter "YF-S201", the "AJ-SR04M" waterproof ultrasonic distance sensor (JSN-SR04T equivalent) and bi-directional logic level converters. The "AJ-SR04M" monitors the water level in the tanks. The "YF-S201" senses the water flowing from the tanks to the different uses (e.g., toilets, vegetable gardens and washing The AMSWH has two main components: the electronic system based on the ESP32 Development Board and the Blynk platform [2]. The ESP32 gathers data from the sensors and sends it to the Blynk mobile app. The monitoring data is displayed in a dashboard created with Blynk.

Electronic System
The electronic system is integrated by the Sparkfun ESP32 Development Board "ESP32 Thing", the mechanical flow meter "YF-S201", the "AJ-SR04M" waterproof ultrasonic distance sensor (JSN-SR04T equivalent) and bi-directional logic level converters. The "AJ-SR04M" monitors the water level in the tanks. The "YF-S201" senses the water flowing from the tanks to the different uses (e.g., toilets, vegetable gardens and washing machines). The bi-directional logic level converter is needed as the ESP32 uses 3.3 V logic. The firmware was written in PlatformIO, using the Arduino framework, following the Blynk documentation guidelines [3].

Blynk Platform
The Blynk mobile app is used for data visualization. Via Wi-Fi, the dashboard created with Blynk shows the data sent by the ESP32. Sensed data can be visualized with graphs. For example, users can visualize the volume and level of the water collected in the tanks. Additionally, the app shows the water consumed in the toilets, vegetable garden and washing machines (Figure 2). Finally, users can send data reports in CSV files to a predefined e-mail address for additional data management.
Eng. Proc. 2021, 9, 45 3 of 4 machines). The bi-directional logic level converter is needed as the ESP32 uses 3.3 V logic. The firmware was written in PlatformIO, using the Arduino framework, following the Blynk documentation guidelines [3].

Blynk Platform
The Blynk mobile app is used for data visualization. Via Wi-Fi, the dashboard created with Blynk shows the data sent by the ESP32. Sensed data can be visualized with graphs. For example, users can visualize the volume and level of the water collected in the tanks. Additionally, the app shows the water consumed in the toilets, vegetable garden and washing machines (Figure 2). Finally, users can send data reports in CSV files to a predefined e-mail address for additional data management.

Water Harvest Monitoring
The AMSWH monitors and generates data on water collection and consumption. Additionally, the AMSWH provides system status. Sensors used here represent a low-cost component, available locally. Since December 2020, the MVI has used an estimated 5000 L of rainwater in toilets, vegetable gardens and washing machines. The monitoring system shows live data feeds (Figure 2a) and historical behavior of the harvesting system (Figure 2b,c).

Discussion
In terms of the AMSWH construction, the firmware for this prototype is adaptable to other ESP32 Development Boards and platforms, such as Adafruit IO or ESP-Dash. Many ESP32 Development Boards expose strapping pins that have a specific behavior at booting, as shown in the ESP32 datasheet [4]. Using these pins can cause trouble when resetting the board or flashing new firmware.
In terms of the outreach project conducted by the UCR-BE and the MVI, a viable product of an automatic monitoring system, the AMSWH, to quantify the amount of rainwater being harvested, used and sown, was achieved. The use of ICT is beneficial for adopting this technology to the community because the AMSWH quantifies and showcases the benefits of implementing a water-harvesting system. The quantifiable benefits of these harvesting/sowing systems for measuring water resource conservation can thus be demonstrated to the community. For example, from January to June 2021, 5000 L of potable water has been saved by the MVI, as collected rainwater has been used in toilets, vegetable gardens and washing machines.
For adoption in remote locations, the ESP32 ULP co-processor allows the implementation of the AMSWH as long as Wi-Fi usage scheduling can be employed to im-

Water Harvest Monitoring
The AMSWH monitors and generates data on water collection and consumption. Additionally, the AMSWH provides system status. Sensors used here represent a lowcost component, available locally. Since December 2020, the MVI has used an estimated 5000 L of rainwater in toilets, vegetable gardens and washing machines. The monitoring system shows live data feeds ( Figure 2a) and historical behavior of the harvesting system (Figure 2b,c).

Discussion
In terms of the AMSWH construction, the firmware for this prototype is adaptable to other ESP32 Development Boards and platforms, such as Adafruit IO or ESP-Dash. Many ESP32 Development Boards expose strapping pins that have a specific behavior at booting, as shown in the ESP32 datasheet [4]. Using these pins can cause trouble when resetting the board or flashing new firmware.
In terms of the outreach project conducted by the UCR-BE and the MVI, a viable product of an automatic monitoring system, the AMSWH, to quantify the amount of rainwater being harvested, used and sown, was achieved. The use of ICT is beneficial for adopting this technology to the community because the AMSWH quantifies and showcases the benefits of implementing a water-harvesting system. The quantifiable benefits of these harvesting/sowing systems for measuring water resource conservation can thus be demonstrated to the community. For example, from January to June 2021, 5000 L of potable water has been saved by the MVI, as collected rainwater has been used in toilets, vegetable gardens and washing machines.
For adoption in remote locations, the ESP32 ULP co-processor allows the implementation of the AMSWH as long as Wi-Fi usage scheduling can be employed to improve battery life. For example, the signals from the mechanical water flow meters could be handled before they reach the ESP32 using an interface circuit. Although the signal's frequency is below 1KHz, it is better to avoid using many interrupt service routines in the firmware.