International Journal of Interactive Mobile Technologies (iJIM) – eISSN: 1865-7923 – Vol. 15, No. 07, 2021 Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant https://doi.org/10.3991/ijim.v15i07.18425 Nurhening Yuniarti (), Didik Hariyanto, Sigit Yatmono, and Muchlis Abdillah Yogyakarta State University, Yogyakarta, Indonesia nurhening@uny.ac.id Abstract—A Pico hydro power plant is one good solution to support energy independence for rural areas in Indonesia. The problem that normally emerged is the uncertainty of water debit. This may cause the damage of the Pico hydro power plant equipment. The main objective of this study is to design a water flow monitoring (WAFLOW-MT) device based on the Internet of Things (IoT). This device may help the technicians at the Pico hydro power plant in monitor- ing the speed of water flow at the river so that the water debit is recorded all the time. The design and development process of the WAFLOW-MT device was done through 4 stages: 1) need analysis; 2) system design; 3) system develop- ment, and 4) system testing. The data was collected from the water flow sensor and sent via IoT to the webserver thingspeak.com by 6 days duration of testing. According to the testing result, it can be concluded that the WAFLOW-MT de- vice successfully monitored the water flow of the river. Keywords—River flow, IoT, pico hydro power plant, rural electrification 1 Introduction Indonesia is archipelagos with various characteristics of watersheds starting from the shallow one to the deep which are exist across the country. Watershed refers to an area of land that includes rivers and other streams that can be used to hold, save, and drain the rainfall off to the lakes, bays, or ocean naturally [1]. Regarding watersheds, the upstream area has a strategic function, namely as a catchment area, conservation area, and buffer for areas below such as small rivers [2]. A river is a long and big water stream that flows continuously from upstream (source) to downstream (estu- ary). In general, there are two types of rivers. The first type is a naturally formed river due to soil erosion by a water flow originating from rain. Another natural river can be formed from a path flow of larvae of a volcanic eruption. The second type is an artifi- cial river formed by a human intervention which is usually used for irrigation in rice fields or fish ponds. The river physically has different forms in terms of the velocity of the water flow, the ratio of width and depth of the river, the rocks on the riverbed, and the river's length. The management of rivers in Indonesia is regulated in Government Regulation No. 38/2011. This regulation includes river conservation, river development, and river- iJIM ‒ Vol. 15, No. 07, 2021 69 mailto:nurhening@uny.ac.id Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant related disaster management. Rivers in Indonesia, which have a variety of characteris- tics, have made special attention to be used as a potential source of energy. In the context of renewable energy, the river flow has the potential energy to generate the electrical power that can be used to supply the houses, particularly in remote areas. To that end, one of the important things is the adequacy of the river flow speed. In order to measure the water flow speed, it needs a measurement device to monitor and eval- uate the water balance of an area through the available surface water resource poten- tial approach [3]. One of the advanced technologies today is IoT. Basically, IoT technology has been found since the 1990s. The first device used IoT technology for turning on and off remotely over the Internet was a cake toaster. In 2000, the giant company of LG made a smart refrigerator that has its capability to determine whether or not to replenish the food items stored [4]. Those make the IoT gaining significant interest from research- ers due to its potential for information processing and data exchange in various as- pects of our everyday life. Now, in around 20 years since Kevin Ashton introduced the IoT in a United Na- tions ITU report [5], the IoT became capable of intelligently monitoring, managing, tracking, or positioning some particular system. IoT technology is a concept in which the device can transfer data over an internet network without requiring human-and- computer interaction. In other words, the user (human) does not need to control or monitor an object or device directly by their hand. The control and monitoring process can be done remotely via a smartphone, PC, or laptop. Recently, IoT has been widely used in many topics; some of them are in smart shopping system [6], for saving electrical energy [7], for school attendance system [8], etc. IoT has been also considerably used in the field of small-scale electric power such as the Pico hydro power plant. Pico hydro is one of the alternative energy sources with relatively small potential energy that can be used to provide electrical energy in remote areas. As conducted by [9], the authors deal with the IoT in order to measure the level as well as the flow of water in the pico hydro power generation system. The system made by those authors successfully monitored how much water has moved through the water flow sensor and sent the information and data via IoT for monitoring purposes. Another development has been proposed by Moreno et al. [10], which focused on a web-based data acquisition platform integrated with IoT techniques to retrieve data of river water levels through cellular networks. Kafli & Isa [11] have also been devel- oped a water surface IoT-based monitoring system. Their platform was capable to monitor the air quality and water quality of a river as well as the water level of the river. As exemplified by some of the researchers mentioned above, the use of IoT in monitoring the behavior of river water was considerably needed in order to transfer the data of the sensor attached remotely. The technician does not need in the same site as the physical system and may get the monitoring data easily and in a real-time man- ner. Concerning the development of the Pico hydro power plant, the problem that commonly encountered is the inconstant water flow because it is very dependent on rainfall, which often results in equipment damage. 70 http://www.i-jim.org Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant As with the shift of the turbine shaft, over-speed, and changes in frequency, each failure has a major impact on the economy because of lost productive hours as well as working hours. As mentioned in [12] and [13], the Pico hydro power plant requires a governing system to limit the variation of water turbine speed due to the weather change and variation of consumer load. Accordingly, it needs a system that capable to monitor the river flow speed remotely based on IoT. This system, hereinafter called as a WAFLOW-MT (water flow monitoring device), aims to monitor the river flow speed remotely via IoT technology. From those data and its graphical output, the op- erator may monitor and analyze in a real-time manner the minimum, the maximum, and the average speed of the water flow. 2 Research Method The main focus of this study is the design and development of the water flow monitoring system based on the IoT. To that end, one commonly used method to deal with is the sequential model of 1) need analysis; 2) system design; 3) system devel- opment, and 4) system testing [14]. This model has been successfully implemented by many researchers [15], [16]. The following are the detailed explanation for each stage of this study. 2.1 Needs analysis This step deals with the first process from the whole process of the design and de- velopment of the system to identify and collect as much information as possible in order to build a comprehensive understanding of how the system should works. Basi- cally, the water flow measuring system is a technology-based innovation to measure and monitor the flow of the river. The monitoring process is done over the internet network by applying the IoT concept. The water flow sensor attached in the system is used as the main input data that will be transferred to the particular website. Subse- quently, the data collected can be used by the user or technician at the Pico hydro power plant to decide whether or not the water flow is stable. After analyzing the needs related to the electronic circuit used, it can be identified the principal compo- nents required for the development of the WAFLOW-MT system. The main compo- nents of the system are microcontroller Arduino UNO R3, ESP8266 IoT module, YF- S201 water flow sensor, and power supply. 2.2 System design This section discusses the design process of the water flow monitoring system in detail. In general, the system design comprises two parts: first, the design that relates to the hardware system and the second, the design that focuses on the software of the system. iJIM ‒ Vol. 15, No. 07, 2021 71 Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant 1. Design of Hardware Based on the result of the need analysis, it can be noted that there are four main components: microcontroller Arduino UNO R3, ESP8266 IoT module, YF-S201 water flow sensor, and power supply. Those components connect each other as shown in Figure 1 below. Water Flow Sensor YF-S201 Microcontroller Arduino UNO R3 IoT module ESP8266 Power Supply Fig. 1. Diagram block of the proposed system The microcontroller acts as the main brain of the system. Arduino UNO R3 was se- lected as the main processor due to its easiness, flexibility, small and light, low-cost, and robust. In order to collect the data of the water flow, the system in this study used the YF-S201 water flow sensor. This sensor works by measuring how much liquid has moved through its pinwheel. The sensor then generates pulses which are converted into digital data [17]. The digital data collected is then sent to the microcontroller. The microcontroller calculates the data and then sends it to the ESP8266 IoT module. The ESP8266 module is a self-contained SoC (system on chip) with an integrated TCP/IP protocol that has the capability to connect to the internet network. This module will continuously send the data over the internet to the webserver. All the electronic com- ponents in the system are powered by the independent power supply that has a battery and portable solar cell for self-charging. Meanwhile, Figure 2 shows a wiring diagram of all components used in the water flow monitoring system of this study. 72 http://www.i-jim.org Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant Fig. 2. The wiring diagram of the proposed system 2. Design of Software In order to ensure the system works as designed, it needs a program code installed at the microcontroller Arduino UNO R3. The development of program code can be conducted by using the Arduino Software IDE (Integrated Development Environ- ment). As seen in Figure 3, the software starts by initializing process. This process sets all variables used in the program related to the microcontroller pin addressing and some initial predetermined value. The program continues by getting the data from the water flow module. The main controller processes the collected data and sends it to the network through the IoT module. This process will never be stopped unless the main switch of the system is switched off. The data is then received by ThingSpeak webserver. ThingSpeak is an open IoT platform that allows the user to collect, visual- ize, and analyze live data streams in the cloud. iJIM ‒ Vol. 15, No. 07, 2021 73 Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant Start Set variables Get data from Water flow sensor Send data over network Main switch OFF? No Yes End Fig. 3. The flowchart of the system algorithm 2.3 System development The work continues by developing the prototype based on the results from the need analysis and system design stages. This process starts by preparing all components needed and then wiring the components according to the wiring diagram that has been previously designed. After that, the process of downloading the program code that is already established is conducted through Arduino IDE to the microcontroller. Looking into detail at the principal work of YF-S201 water flow sensor, as seen in Figure 4, the wheel at the water flow sensor rotates when getting a pressure boost from a river current. This rotation results in a repeated friction between the magnet and the Hall Effect sensor. As a consequent, it becomes a Hall Effect field. The Hall Effect is a deflection of electricity (electrons) in a conductor plate due to the influence of a magnetic field. This principle is the basis of the Lorenz Force [18]. The process described above takes place continuously so as to generate pulses. The pulses will be processed and converted into digital data by the microcontroller Arduino UNO R3 and then to be displayed through the IoT module on the ThingSpeak webserver. The stronger a river flow, the more pulses are generated and vice versa. 74 http://www.i-jim.org Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant Fig. 4. Water flow sensor mechanism The next step turns into the development of the mechanical structure of the WAFLOW-MT device. As seen in Figure 5, the box is made from acrylic which is attached to the floating styrofoam. Acrylic and floating styrofoam are chosen because of their strong and lightweight materials that allowed the prototype to float according- ly. There are ballasts attached at the bottom of the mechanical structure which is made from concrete. These ballasts keep the prototype steady from the river current. Fig. 5. The mockup of the proposed system iJIM ‒ Vol. 15, No. 07, 2021 75 Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant 2.4 System testing This section will discuss the testing stage that should be conducted in order to en- sure the water flow monitoring device may function as designed. In the development of software code, there is actually a debugging process. This debugging process is conducted to detect firstly and then subsequently remove the potential errors found in software code. The process is normally done by eliminating the language error or syntax error, the run-time error, and the logical error [19]. After the software is rela- tively free from the errors, the testing continues by applying the functional-based test. This test, is commonly known as a Black Box Testing [20], is one of the software test approaches that examines only the functionality of the system without seeing into detail the internal structure of the program code. The trial test has been conducted in one of the rivers located in Condongcatur, Depok District, Sleman Regency of the Special Region of Yogyakarta, Indonesia. This trial test was a hardware testing ap- proach to real environmental conditions. This test included a ballast resistance from river currents, disturbances from tree branches or leaves, and resistance from rain or sun heat. This test was conducted to see whether or not the device can be stable when taking data samples on the real environmental conditions of the river. 3 Research Results and Discussion As it is already mentioned in the sub-section system testing, our proposed system has been tested on the basis of functionality testing. The test has been conducted by setting the WAFLOW-MT device on the river up for 6 days at specific time periods. In those periods, the WAFLOW-MT device is successfully sent the data to the Thing- Speak webserver. Table 1 shows the summary data collected from the ThingSpeak webserver. It can be seen that the data collected in 6 days comprises three different time range. These time ranges represent the morning time, the afternoon time, and the night time. It is also important to highlight that there is a simple statistical analysis used in showing the data of river flow speed, i.e., calculating the maximum, the min- imum, and the average speed of water flow in m/s. Table 1. The summary data collected from the ThingSpeak webserver Testing Day- Time (GMT+7) Max. Speed (m/s) Min. Speed (m/s) Average Speed (m/s) Validation 1 08.45 - 09.15 0.006284 0.004190 0.004517 Data are successfully read 12.45 - 13. 15 0.0062832 0.0041888 0.004515 Data are successfully read 20.30 - 21.30 0.0041888 0.0041888 0.004189 Data are successfully read 2 08.01 – 09.05 0.004190 0.004189 0.004189 Data are successfully read 12.00 - 13.00 0.010472 0.0020944 0.004518 Data are successfully read 20.00 - 21.00 0.0062832 0.0041900 0.004515 Data are successfully read 3 09.00 - 10.00 0.0041888 0.0020944 0.003829 Data are successfully read 12.00 - 13.00 0.0062832 0.0041888 0.004515 Data are successfully read 20.15 - 21.45 0.0083780 0.0041888 0.005864 Data are successfully read 4 09.00 – 10.00 0.0062832 0.0041888 0.004202 Data are successfully read 76 http://www.i-jim.org Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant 12.00 - 13.00 0.0041891 0.0020944 0.003829 Data are successfully read 16.20 - 17.30 0.0041888 0.0041888 0.004189 Data are successfully read 5 08.49 - 09.21 0.0062832 0.0020944 0.005957 Data are successfully read 12.40 - 13.10 0.0041888 0.0041888 0.004189 Data are successfully read 20.00 - 21.00 0.0062832 0.00419 0.004515 Data are successfully read 6 08.00 - 09.00 0.0167552 0.0020944 0.002352 Data are successfully read 12.00 -13.00 0.0042000 0.0041891 0.004190 Data are successfully read 19.30 - 20.30 0.0041888 0.0041888 0.004189 Data are successfully read One of the important benefits offering by ThinkSpeak is the capability to visualize the data online. Figure 6 shows the graph of the water flow speed (in rpm) from the ThinkSpeak website. It can be seen from the graph that the river flow speed is rela- tively stable. The data collected and visualized by the ThinkSpeak website can be used by the user or technician to decide whether or not the water flow speed of the river is safe for the Pico hydro power plant. This approach may reduce the potential damage that often occurs to the shaft of the Pico hydro power plant due to the unmon- itored water flow speed. The monitoring system built in this study equips with one water flow sensor only that may reduce the complexity of the construction of the hardware system as faced in [10] and [11]. The use of one sensor in this study also suppresses the cost of development and gives faster data sending without ignoring the main objective of the system in monitoring the water flow speed. The simple algo- rithm without any intelligence approach has also implemented in the system in order to get the fast computation process in sending and calculating the data. Fig. 6. The graph of the water flow speed 4 Conclusion Based on the testing results and discussion it can be concluded that the proposed system could monitor the river flow speed real-time and easily access via a gadget, laptop, or PC. In addition, the collected data can be downloaded so it can be then iJIM ‒ Vol. 15, No. 07, 2021 77 Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant easily used to analyze the potential problems related to the unstable water flow speed that may risk the Pico hydro power plant. The WAFLOW-MT device has also a rela- tively small dimension so it has more flexibility to set in the river up. However, there are still weaknesses found on this device. In the context of internal disturbances, this device still uses naturally conventional cooling by relying on air entering through the circulation holes in the device box. However, based on the trial test, it can be found that the working temperature of this device was relatively low. In terms of the exter- nal disturbance, this device is not equipped with a filter to block the garbage that is normally found on the Indonesian river which may interfere the monitoring process. These drawbacks might be taken into consideration for the next design and develop- ment. Concerning the data transfer, the one important point in dealing with wireless data communication is a stable connection. Since this study used a cellular internet connection in order to transfer the data collected which is sometimes losing the pro- vider signal, thus it needs some specific mechanism or strategy to tackle such a prob- lem. This problem could be considered for future improvement that has not been ad- dressed in this study. 5 References [1] Putra, I. S. (2016). Studi Pengukuran Kecepatan Aliran pada Sungai Pasang Surut. Infoteknik, 16(1), 33-46. [2] Supangat, A. B., Indrawati, D. R., Wahyuningrum, N., Purwanto, P., & Donie, S. (2020). Membangun Proses Perencanaan Pengelolaan Daerah Aliran Sungai Mikro Secara Partisipatif: Sebuah Pembelajaran (Developing a participatory planning process of micro- watershed management: a lesson learned). Jurnal Penelitian Pengelolaan Daerah Aliran Sungai (Journal of Watershed Management Research), 4(1), 17-36. https://doi.org/10.20886/jppdas.2020.4.1.17-36 [3] Barid. B Dan Yakob. M. (2007). Perubahan Kecepatan Aliran Sungai. (Jurnal) Ilmiah Semesta Teknika. Vol. 10, No. 1: 14-20. [4] Suresh, P., Daniel, J. V., Parthasarathy, V., & Aswathy, R. H. (2014, November). A state of the art review on the Internet of Things (IoT) history, technology and fields of deployment. In 2014 International conference on science engineering and management research (ICSEMR) (pp. 1-8). IEEE. https://doi.org/10.1109/icsemr.2014.7043637 [5] Chin, J., Callaghan, V., & Allouch, S. B. (2019). The Internet-of-Things: Reflections on the past, present and future from a user-centered and smart environment perspective. Journal of Ambient Intelligence and Smart Environments, 11(1), 45-69. https://doi.org/10. 3233/ais-180506 [6] Hussien, N., Ajlan, I., Firdhous, M. M., & Alrikabi, H. (2020). Smart Shopping System with RFID Technology Based on Internet of Things. International Journal of Interactive Mobile Technologies (iJIM), 14(04), 17-29. https://doi.org/10.3991/ijim.v14i04.13511 [7] Alrikabi, H., Alaidi, A. H., & Nasser, K. (2020). The Application of Wireless Communication in IOT for Saving Electrical Energy. International Journal of Interactive Mobile Technologies (iJIM), 14(01), 152-160. https://doi.org/10.3991/ijim.v14i01.11538 [8] Mrabet, H., Moussa, A. A. (2020). IoT-School Attendance System Using RFID Technology. International Journal of Interactive Mobile Technologies (iJIM), 14(14), 95- 108. https://doi.org/10.3991/ijim.v14i14.14625 78 http://www.i-jim.org https://doi.org/10.20886/jppdas.2020.4.1.17-36 https://doi.org/10.1109/icsemr.2014.7043637 https://doi.org/10.3233/ais-180506 https://doi.org/10.3233/ais-180506 https://doi.org/10.3991/ijim.v14i04.13511 https://doi.org/10.3991/ijim.v14i01.11538 https://doi.org/10.3991/ijim.v14i14.14625 Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant [9] Fortaleza, B. N., Juan, R. O. S., & Tolentino, L. K. S. (2018). IoT-based pico-hydro power generation system using Pelton turbine. Journal of Telecommunication, Electronic and Computer Engineering (JTEC), 10(1-4), 189-192. [10] Moreno, C., Aquino, R., Ibarreche, J., Pérez, I., Castellanos, E., Álvarez, E., ... & Edwards, R. M. (2019). RiverCore: IoT device for river water level monitoring over cellular communications. Sensors, 19(1), 127. https://doi.org/10.3390/s19010127 [11] Kafli, N., & Isa, K. (2017, December). Internet of Things (IoT) for measuring and monitoring sensors data of water surface platform. In 2017 IEEE 7th International Conference on Underwater System Technology: theory and applications (USYS) (pp. 1-6). IEEE. https://doi.org/10.1109/usys.2017.8309441 [12] Mhlambi, B. A., Kusakana, K., & Raath, J. (2018, October). Voltage and frequency control of isolated pico-hydro system. In 2018 Open Innovations Conference (OI) (pp. 246-250). IEEE. https://doi.org/10.1109/oi.2018.8535603 [13] Badoniya, R., Premi, R., & Patel, P. (2014). System Failure Analysis in Hydro Power Plant. International Journal on Emerging Technologies, 5(1), 54. [14] Pressman, R. S. (2005). Software engineering: a practitioner's approach. Palgrave macmillan. [15] Hariyanto, D., Nugraha, A. C., & Asmara, A. (2018). Design and Development of an Asynchronous Serial Communication Learning Media to Visualize the Bit Data. In Journal of Physics: Conference Series (p. 12010). https://doi.org/10.1088/1742-6596/1140/1/0120 10 [16] Yuniarti, N., Setiawan, A. L., & Hariyanto, D. (2020). The Development and Comprehensive Evaluation of Control System Training Kit as a Modular-Based Learning Media. TEM Journal, 9(3), 1234-1242. https://doi.org/10.18421/tem93-52 [17] Suharjono, A., Rahayu, L. N., & Afwah, R. (2016). Aplikasi Sensor Flow Water Untuk Mengukur Penggunaan Air Pelanggan Secara Digital Serta Pengiriman Data Secara Otomatis Pada PDAM Kota Semarang. TELE, 13(1). [18] Triady, R., & Dedi Triyanto, I. (2015). Prototipe Sistem Keran Air Otomatis Berbasis Sensor Flowmeter pada Gedung Bertingkat. Coding Jurnal Komputer dan Aplikasi, 3(3). https://doi.org/10.30829/algoritma.v3i1.4438 [19] Jogiyanto, H. M. (2017). Analisis dan Desain (Sistem Informasi Pendekatan Terstruktur Teori dan Praktek Aplikasi Bisnis). Penerbit Andi. [20] Luo, L. (2001). Software testing techniques. Institute for software research international Carnegie mellon university Pittsburgh, PA, 15232(1-19), 19. 6 Authors Nurhening Yuniarti is an engineering educator and researcher focusing on elec- trical engineering at Yogyakarta State University, Indonesia. She finished his Doctor- al degree (Joint Degree Program) at the Yogyakarta State University, Indonesia and TU Dresden, Germany. Her research interests include electrical power engineering, technology-enhanced learning, and education in the context of electrical engineering. She can be conveniently reached by email at nurhening@uny.ac.id Didik Hariyanto is officially a lecturer and also a researcher at the Department of Electrical Engineering Education, Faculty of Engineering, Yogyakarta State Universi- ty, Indonesia. He finished his Doctoral degree at the Institute of Vocational Education and Vocational Didactics, TU Dresden, Germany. His research interests include adap- iJIM ‒ Vol. 15, No. 07, 2021 79 https://doi.org/10.3390/s19010127 https://doi.org/10.1109/usys.2017.8309441 https://doi.org/10.1109/oi.2018.8535603 https://doi.org/10.1088/1742-6596/1140/1/012010 https://doi.org/10.1088/1742-6596/1140/1/012010 https://doi.org/10.18421/tem93-52 https://doi.org/10.30829/algoritma.v3i1.4438 file:///D:/I%20A%20O%20E%202021/E%20ting/iJIM/iJIM%2007/nurhening@uny.ac.id Paper—Design and Development of IoT Based Water Flow Monitoring for Pico Hydro Power Plant tive e-learning, technology-enhanced learning, and education in the context of electri- cal engineering. He can be conveniently reached by email at didik_hr@uny.ac.id Sigit Yatmono is officially a lecturer and also a researcher at the Department of Electrical Engineering Education, Faculty of Engineering, Yogyakarta State Universi- ty, Indonesia. He finished his Master degree at the Bandung Institute of Technology, Indonesia. His research interests include control system engineering and mechatronics engineering. He can be conveniently reached by email at s_yatmono@uny.ac.id Muchlis Abdillah is a student in the Electrical Engineering Study Program, Facul- ty of Engineering, Yogyakarta State University, Indonesia. Article submitted 2020-09-10. Resubmitted 2020-12-13. Final acceptance 2020-12-13. Final version published as submitted by the authors. 80 http://www.i-jim.org mailto:didik_hr@uny.ac.id file:///D:/I%20A%20O%20E%202021/E%20ting/iJIM/iJIM%2007/s_yatmono@uny.ac.id