Developing a Hydrologic Monitoring Network in Data‐Scarce Regions Using Open‐Source Arduino Dataloggers

An innovative low‐cost open‐source Arduino‐based datalogger was developed. The datalogger was deployed for hydrologic monitoring in tropical watersheds. Arduino datalogger performance was robust after overcoming initial challenges. The system has great potential for automated continuous environmental monitoring.

In this research letter, we present our advances in the development of a low-cost Arduino-based datalogger toward establishing a hydrologic monitoring network in a data-scarce region of the tropics, and share the challenges faced and successes obtained with this new technology over a monitoring period of nearly 2 yr.

Field Site
We implemented a hydrologic monitoring network in the Potrero (37 km 2 ) and Caimital (38 km 2 ) watersheds in the province of Guanacaste, Costa Rica (10° N, 85° W). The region is characterized by a wet-dry tropical climate (mean annual rainfall 2232 mm) with intensive rainfalls during the wet season from May to November and long annual dry seasons from December to April (Waylen et al., 1996). In the rural farming communities of the region, water is disputed between agriculture, household, and tourism uses during the dry season, with many communities experiencing scarcity (Kuzdas et al., 2014). In the region, available hydrologic data is limited and continuous high-frequency hydrologic data is virtually nonexistent, creating serious knowledge gaps for water resources managers.

Monitoring Network Setup
Monitoring stations were installed in headwater through third-order streams of the Potrero and Caimital Rivers (five stations in total for both watersheds). Monitoring began in March 2014 and is ongoing at present. Strong relationships to local stakeholders, established through a series of workshops related to the FuturAgua project (www.futuragua.ca), were essential to identifying key data gaps and for approaching local landowners with properties adjacent to streams.
At each monitoring station, a combined water depth, temperature, and conductivity sensor (model CTD, Decagon Devices) was deployed for measuring these parameters at 10-min intervals via an Arduino datalogger. The factory calibrations of the CTD sensors were tested in the laboratory prior to field installation and again in fall 2015 using standard procedures recommended by Decagon Devices. As the CTD sensors output a digital signal, there is no user calibration such as is typical with analog sensors. In addition, we made monthly physical measurements of water height and discrete measurements of electrical conductivity and water temperature using independent handheld sensors. These monthly measurements were used to assess data quality obtained from the datalogger-connected sensors.
The sensor was installed at the base of the main thalweg of streams and protected within a perforated polyvinyl chloride (PVC) tube. The tube and sensor were secured against roots and trees along the stream bank for stability during storm flows (Fig. 1). The system is powered by two solar panels (21.9 V/10 W) that connect to a solar charge controller, providing power to recharge 12 V/7 Ah gelcell batteries. Data is downloaded from the Secure Digital (SD) card once per month. The open-source Arduino-based data acquisition system Ecohydro Logger is connected to a Decagon Devices CTD sensor (electrical conductivity, temperature, water depth). The system is remotely located and powered by solar panels.

Arduino Development
The Arduino board is a small microcontroller with a processor, clock, USB connection, and digital and analog input ports. A range of different, separately available shields can be stacked on to the Arduino board to extend the capabilities and add extra features. Our first version of the Arduino-based data acquisition system was developed using an Arduino Mega 2560 board combined with a standard Arduino SD card shield. The Arduino was programmed in the open-source Arduino Software IDE (C/C++) via a USB cable to query readings from the CTD sensor every 10 min and record the data on an SD card. A key component of the program, the Serial Digital Interface (SDI) library, was developed by the Stroud Water Resources Center (https://github.com/ StroudCenter/Arduino-SDI-12/). These Arduino boards were deployed with the sensors during the first year of monitoring (March 2014-April 2015. Subsequently, we designed a custom Arduino-based data acquisition system installed in April 2015 ( Fig.  1). This Ecohydro Logger includes a customized shield combined with an Arduino Mega 2560 board. To reduce power consumption of the Arduino Mega board, the USB serial power was disabled with a shunt and all LEDs were removed. The customized shield includes a hard-mounted SD card reader, fuses for solar charge controller and battery, and screw terminals for more stable cable connections. We further implemented an external Real Time Clock (DS1306) with a wake function to permit a nearly complete power down of the system between measurements. The SDI-12, DS1306 (https://github.com/cjbearman/ds1306-arduino) and LowPower (https://github. com/rocketscream/Low-Power) Arduino libraries were used. Code for programming the Arduino Ecohydro Logger and for data processing (using R programming language) as well as hardware details including the electronic circuit design for the Ecohydro Logger are available on GitHub (https://github.com/UBCecohydro/Ecohydro. Arduino).
The costs for our Ecohydro Logger, including the Arduino Mega board and the Ecohydro shield, are approximately US$100, in contrast to Campbell Scientific's lowest-cost datalogger, the CR200X, currently priced from US$480. The Ecohydro Logger is highly compatible and can be connected to any SDI or analog sensor. In the current design, up to eight sensors can be connected at the same time. Given the open-source hardware approach, the datalogger is highly customizable to researchers' needs. For example, the platform could be extended to include automated data upload to the Internet by adding a GSM shield to the platform.

The Ecohydro Logger
A river stage time series obtained by continuous (10min), automated datalogging is presented in Fig. 2, shown here as raw data with gaps and issues to draw attention to the capabilities and challenges experienced with the Arduino setup during development of the data acquisition system. There were several reasons for discontinuities in this time series (Fig. 2), including those typical for installations in remote locations (sensor issues and an interrupted solar panel connection due to branch fall), and those related to the ongoing development of the Arduino-based data acquisition system (power problems particularly during the wet season with increased cloud coverage and growing vegetation, loose cable connections, and code errors related to change in date).
The new Ecohydro Logger was able to overcome the shortcomings experienced with the first version, and data loss has been minimized since installation of the new system. The reduced power consumption from 80 mA (average) to 16 mA (average, considering both "sleep" and "wake" cycles) and the addition of screw terminals significantly increased robustness of the platform when deployed in the field. Despite the extreme conditions of the wet-dry tropics (with high air temperature and moisture content in the wet season), the Ecohydro Logger performed well, even when located within the tropical rainforest, and the installation with a double-box system (Fig. 1) proved to be reliable.
The Ecohydro Logger was able to capture long periods of high-frequency stream data, recording the flashy nature of the stream flow response to rainfall previously unavailable in this region. The modified version of the system also allowed for development of stage-discharge rating curves using the salt gaging method (Moore, 2005), providing a proof-of-concept for the extensibility of the base platform described here.

Applications for Socio-Hydrology
Integration of monitoring efforts into local communities is critical for establishing or extending successful hydrologic monitoring networks (Kongo et al., 2010). This is consistent with an approach for the study of coupled human-water systems known as socio-hydrology (Sivapalan et al., 2012). Practical, inclusive approaches can help to ensure acceptance and security of the monitoring stations. Furthermore, a participatory approach that actively involves local stakeholders can enhance knowledge exchange with communities and incorporation of monitoring results into water management decisions (Kongo et al., 2010) in concert with traditional ecological knowledge. This may be in particular relevant when research is conducted in populated areas such as rural smallholder farming communities.
Integrating into the local community through workshops and cultivating relationships to landowners of monitoring sites are important components of the hydrologic monitoring program in the Potrero and Caimital watersheds. Many of these landowners developed stewardship strategies for monitoring stations, notifying researchers if there were issues at the site. The engagement and cooperation with the local communities allowed support and resources in terms of local knowledge. This represents a reciprocal relationship, as the hydrologic measurements results are shared with local agencies and will contribute to water management in the region. In future research, the Arduino-based data acquisition platform could be extended to include automated data upload to the Internet for near-time display and sharing preliminary data with local stakeholders to support decision making.

Conclusions
The use of open-source and inexpensive Arduinobased data acquisition system can provide a powerful means for extending hydrologic monitoring networks into regions where high-frequency monitoring is limited. In particular, the wet-dry tropics often experience water shortages that present significant challenges for communities. A growing hydrologic database and understanding may be able to contribute to water management and climate change adaptation strategies. The Ecohydro Logger developed in this research is, with total costs of US$100, significantly less expensive than conventional dataloggers. Furthermore, the accessible, extensible and open-source nature of the Arduino-based data acquisition systems shows great potential for integration into socio-hydrology that can empower local citizens to contribute to increasing knowledge on water resources in their communities.