Water quality monitoring system based on internet of thing for oyster mushroom

Rosliana Eso1*†, Arman2 and Laode Safiuddin3

*Correspondence:
Rosliana Eso,
rosliana.eso@uho.ac.id

ORCID:
Rosliana Eso
0000-0002-0936-9328

Received: 18 March 2025; Accepted: 13 September 2025; Published: 19 December 2025.

License: CC BY 4.0

Copyright Statement: Copyright © 2025; The Author(s).

The growth of mycelium and mushroom pinheads is significantly influenced by humidity and temperature. The purpose of this research is to develop a tool that will be able to monitor and control the irrigation system for oyster mushroom plants using the Internet of Things (IoT) technology. The devices operate on an ESP8266 microcontroller that interprets resistance values of mushrooms from an analog waterproof capacitive moisture sensor. The study stresses the importance of oyster mushroom moisture monitoring, while, on the other hand, minimizing the labor and time required for farmers to irrigate their fields. According to the experiment carried out, the soil moisture sensor was quite successful in measuring moisture level and simultaneously sending real-time data to Blynk, which is an IoT-based monitoring platform. Blynk allows users to keep track of and water the mushroom farm from their mobile phones. In addition, the device can work offline and do automatic watering if there is no internet connection. Among the features are a moisture level indicator and an on/off switch, which promote the development of smart agriculture.

Keywords: oyster mushroom farming, soil moisture sensor, ESP8266 microcontroller, internet of things, Blynk platform

Introduction

The Internet of things (IoT) controls the things that are connected to it and transfers the data over the network. This technology enables the collection of real-time data from the farm field using sensors and various electronic components, thereby making IoT a vital part of our daily lives (1). In the field of agriculture, IoT-based technologies can not only keep track of soil moisture, temperature, and fertility but also execute timely actions needed for crops like mushrooms. The method used for soil moisture and water intensity measurement is the Analog Waterproof Capacitive Soil Moisture Sensor, which does so by identifying electrical permittivity (2). The ESP8266 is a microprocessor that fetches values from the sensor and uploads the information to the cloud through a WiFi module, while at the same time, it regulates a relay to turn on/off the water pump, which waters the soil according to its needs (3, 4). “With the expansion of the Wi-Fi network, the device can help control specific limits for soil moisture, thus preventing the soil from either getting too wet or too dry, which is necessary for a plant that keeps at the right conditions, like a mushroom (5). IoT does this by automating the entire process, which removes the human factor completely. The users are in charge of monitoring and control the system, while the internet serves as the medium through which the devices communicate with each other. Increased productivity, quicker workflow, and user-friendliness are among the many advantages that IoT brings along with it. Essentially, IoT makes it possible for communication among things through the Internet network (6, 7).

“The automatic irrigation system has been developed for the purpose of soil moisture monitoring. It uses real-time data readings to determine when and how much to water the plants (8). With the irrigation process being automated, farmers are able not only to eliminate water waste but also to keep the soil in its best condition. Apart from this, farmers need no longer to be present at the farm, as they can control the irrigating process from a distance, thus saving time for their other activities. Moreover, there are several extra gadgets that have been developed to work even when the Wi-Fi connection is not very stable, thus enabling the system to have continuous operation and to perform effectively in a variety of circumstances (9, 10). To address the issue of unstable network conditions in agricultural areas, the automatic plant watering system is also equipped with an offline version, allowing the system to operate properly even without human intervention.”

This study aimed to develop an automatic watering device for mushroom cultivation based on the Internet of Things (IoT). This tool seeks to enhance efficiency and effectiveness in agricultural practices, supporting technological advancements and enhancing resource management for farmers. Through the assistance of the iOS and Android software Blynk, users may operate microcontrollers online. Blynk is an application available on smartphones that allows users to monitor and manage devices remotely. Designed specifically for the Internet of Things (IoT), Blynk capable of steering hardware, displaying sensor data, archiving the information that is presented, and many more functions (1113). The system is designed not being suited for small-scale farming monitoring but also to integrate with and operate a larger farming watering machine that can cover more ground. The tool is equipped with additional switches so it can be connected to a larger water or plant watering machine to control the watering of larger agricultural land.

Methodology

The NodeMCU8266 is a widely used WiFi module admired by hardware developers for its affordability and versatility. As a system on chip, it can be programmed directly, avoiding the need for an extra microcontroller. One of its main benefits is the capacity to serve as both an access point and a client simultaneously, enhancing connectivity options. For soil moisture measurement, an analog sensor composed of rust-resistant material is used (Figure 1). This sensor is inserted into the soil to measure the moisture content of cultivated land. The higher sensor result indicated the higher moisture levels. This reliable measurement system helps ensure optimal soil conditions for plant growth (14). Mushrooms have varying growth requirements, with oyster mushrooms particularly thriving in tropical climates. They need high relative humidity of 80% to 85% and temperatures between 30 and 38 °C. The optimal pH for their growing medium falls between 5.0 and 8.0, with most fungi being more tolerant of acidic rather than alkaline conditions (15).

FIGURE 1
www.bohrpub.com

Figure 1. Analog waterproof capacitive soil.

The system block diagram provides the main components, including the input block, process control block, and output block, functioning both online and offline. More details are presented in Figures 2 and 3.

FIGURE 2
www.bohrpub.com

Figure 2. The block diagram for the online system.

FIGURE 3
www.bohrpub.com

Figure 3. The block diagram for the offline system.

The hardware and software system is designed with a number of essential components in order to allow both online and offline operation of the soil moisture monitoring system. A comprehensive schematic of the network layout is presented in Figure 4.

FIGURE 4
www.bohrpub.com

Figure 4. Automatic watering circuit schematic.

The automatic mushroom watering system has been successfully designed by combining several components, including the ESP8266 microcontroller, soil moisture sensor, LCD display, relays, and power supply. This configuration enables effective controlling and monitoring of the watering process in response to current soil moisture levels. When sensors, relays, and power sources are properly connected, the system switches on the water pump as needed, thereby ensuring the proper moisture levels for growing mushrooms. The tools are integrated with relay modules and an AC-DC converter to provide smooth communication between low-power control signals and high-power electrical components. In addition, this system is supposed to minimize manual labor and guarantee continuous irrigation based on environmental conditions. The programming language procedure in the software follows the flowchart as shown in Figure 5.

FIGURE 5
www.bohrpub.com

Figure 5. Automatic plant watering flowchart.

Results or finding

The hardware and software components of the system include the following: the ESP8266 NodeMCU, which serves as a microcontroller for data processing and wireless connectivity; an analog waterproof capacitive soil moisture sensor that measures soil moisture levels; a water pump and relays that automatically control irrigation based on soil moisture levels; an LCD display that offers real-time data visualization; a power supply and AC-DC converter that ensure efficient power distribution; and the Blynk platform, which displays real-time data and enables remote monitoring. The mushroom watering development is illustrated in Figure 6.

FIGURE 6
www.bohrpub.com

Figure 6. The automatic IoT-based watering for mushroom plants.

The ESP8266 microcontroller, soil moisture sensor, LCD display, relay modules, and power supply are among the parts that are connected to create hardware circuit. Firstly, a soil moisture sensor measures moisture levels of soil. The ESP8266 receives the data from the soil moisture sensor and uses it to control the relays that turn on the water pump when needed based on real-time soil conditions. This system is equipped with 4 relays and 4 stop contacts for an external water pump and 1 relay for an internal pump that operates using a 12V DC power supply to regulate irrigation in a relatively small mushroom farm.

The software design employs an algorithm to set up the device’s system. The program is then uploaded to the hardware system immediately following the algorithm that was successfully written in the Arduino IDE programming language. Figure 5 shows a flowchart or working principal display of automated watering for IoT-based mushroom seeds. Comprehensive hardware and software testing was used to evaluate the implementation and performance. It is anticipated that the information gathered will be precise and trustworthy, guaranteeing that the system functions as planned. The collected data is expected to be accurate and reliable, ensuring that the system operates as intended.

Testing revealed that the IoT-based automatic plant watering tool, which employs an analog waterproof capacitive soil moisture sensor, functions effectively. Results from tests conducted on a mushroom poly bag demonstrated that the soil moisture sensor could accurately detect moisture levels in both online and offline modes. The tests carried out the validation of program functionality, assessment of soil moisture sensor accuracy, analysis of data transmission via Blynk, offline system performance testing, and data visualization on the server, which included user notifications. The following are the findings from the research on the development of an IoT-based automatic watering tool for oyster mushroom cultivation using the Blynk application, as demonstrated when the tool is online, as shown in Figure 7.

FIGURE 7
www.bohrpub.com

Figure 7. Blynk IoT platform dashboard view on user’s smartphone.

Discussion

After successfully installing the software on the hardware device, the IoT protocol was integrated into the automatic oyster mushroom watering device. The next progression is evaluating the device’s performance in measuring soil moisture. The soil dielectric permittivity, which gets more prominent with the moisture rise, is monitored by the capacitive analog soil moisture sensor. This sensor produces an analog voltage output representing the soil moisture level. The ESP8266 microcontroller performs signal processing through its analog-to-digital converter (ADC), which gives numbers from 0 to 1023. The calibration process leading to the determining of ideal moisture for oyster mushroom cultivation was between 220 and 640. Hence, this value is integrated into an IoT-based control system, allowing the device to regulate watering automatically by switching the pump on or off according to real-time calibration data. If the moisture is low, the LCD or smartphone will indicate a high value; conversely, it will show a low value. This is due to the operation of the sensor being based on the dielectric permittivity value of the soil.

The automatic irrigation system is designed with three output ports or external pump connections (External Pump 1, External Pump 2, and External Pump 3) which can be linked to external equipment. The system is able to function either in fully automatic offline mode or in areas with unreliable internet, thus making it ideal for locations with weak network coverage. Furthermore, it also possesses the capability for large-scale irrigation, thus being able to manage watering over a larger area for oyster mushroom production. The Blynk dashboard features four control buttons: one for the internal pump integrated into the system and three for external pumps that can be connected to additional machinery.

Data collection at the mushroom cultivation site in Konda District utilized only the internal pump, as the relatively small cultivation area was sufficiently served by a single unit. Analog waterproof capacitive soil moisture sensors are positioned on a baglog of oyster mushroom plants. The hardware is then activated, and every 5 minutes, data is transmitted via the Blynk application. Three days of testing in both online modes were used to record different soil conditions. The results were monitored and analyzed through the Blynk IoT platform. The results of the development of the automatic watering tool for oyster mushrooms based on IoT are as shown in Table 1.

TABLE 1
www.bohrpub.com

Table 1. Observation data from tool testing.

Results

The system testing was conducted at Lestari mushroom farm in Konda district, Southeast Sulawesi, Indonesia, which served as the study site. The IoT-based automatic watering system was specifically designed for oyster mushroom cultivation, consisting of approximately 1,000 polybags. A purposive sampling technique was employed, selecting 40 baglogs irrigated using the automatic system and another 40 baglogs watered manually as a control group. All samples were maintained in a humid environment and protected from direct sunlight to ensure uniform growth conditions.

An analog waterproof capacitive soil moisture sensor was installed in one of the automatically watered baglogs to continuously monitor moisture levels. The system regulated irrigation automatically based on real-time sensor data, while the other, watered manually, remained separate from the IoT-controlled setup. The experiment used 2-week-old mushroom spawn. Results showed that mushrooms receiving automated irrigation reached maturity within 2–3 weeks, whereas those irrigated manually required 3–4 weeks to develop, as presented in Figure 8. Although temporal sensor data were recorded (as presented in Table 1), no statistical analyses, such as average number of stalks or weight of mushrooms produced, standard deviation, or an inferential comparison between the observed variable (automatic watering) and the control variable (manual watering), were conducted. Consequently, the conclusions of this study are based on direct observational comparisons rather than statistical validation. This automatic watering device is integrated with the Blynk platform installed on the user’s smartphone, functioning to display real-time soil moisture readings along with buttons to turn the watering system on or off. This system reports soil moisture data in real-time, as shown in the graph in Figure 9. The y-axis represents the soil moisture levels of the oyster mushroom substrate recorded from 11 to 13 November 2024. The axis is inverted, as lower sensor readings correspond to higher moisture levels, providing a more understandable visualization where increasing soil moisture is represented by decreasing values.

FIGURE 8
www.bohrpub.com

Figure 8. Appearance of oyster mushrooms in the 3rd week: manually watering (left) and automatic watering (right).

FIGURE 9
www.bohrpub.com

Figure 9. Soil moisture level of oyster mushroom.

The system functioned effectively, as shown by successful remote control and monitoring through the Blynk platform in the smartphone application, demonstrating that both the sensor and the soil moisture monitoring system operated reliably during the testing period. This device provides convenience for users, especially in the agricultural industry.

Additionally, Blynk offers control features that let users use an Android smartphone to operate the device. It is not limited to a specific microcontroller but requires compatible hardware support. Online operation within the Internet of Things environment is made possible by the NodeMCU’s Wi-Fi and ESP8266 module connections to the internet. Blynk, as a backend service, manages communication between the smartphone application and the hardware. In this case, data from the microcontroller are sent through the internet and received by the Blynk application on the smartphone. This tool is intended to be a market-ready product. This automatic mushroom watering tool is equipped with an offline mode, which is suitable for local farmers with erratic internet connections. The tool is designed to continue working even when there is no internet connection or in situations where users or farmers are not familiar with Blynk or other internet protocols. This automatic mushroom watering tool simply needs to be connected to a power source. The tool is also equipped with three additional switches and outlets so it can be connected to a watering machine or a larger plant watering system. The device can also regulate the watering of larger plants, like gardens or farmland, once it is connected.

Conclusion

The IoT-based automatic watering system effectively monitors and maintains soil moisture for the growing of mushrooms. The integration of ESP8266 and the Analog Waterproof Capacitive Soil Moisture Sensor in an automatic irrigation device can help oyster mushroom farmers increase their production, reduce manual labor, and monitor the growth conditions of their mushrooms optimally. The system shows consistent performance regardless of being online or offline, so it is a very suitable option for smart farming applications.

Author contributions

All authors contributed to this research. The first author contributed to the design, research, and writing of the article. The co-authors took part in all activities concerning the research, in particular, data collection and analysis. The manuscript has been read and approved by all authors.

Funding

This research received funding from the BIMA Batch 3 Community Service Program of the Ministry of Research and Technology, Indonesia.

Acknowledgments

The author sincerely expresses gratitude to the Lestari Mushroom Group of Konda District, South Konawe Regency, and the Indonesian Ministry of Research and Technology for their priceless support and collaboration in carrying out this research.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

1. Artiyasa M, Himawan Kusumah I, Suryana A, Edwinanto, Muhammad Sidik ADW, Pradiftha Junfithrana A. Comparative study of internet of things (IoT) platform for smart home lighting control using NodeMCU with Thingspeak and Blynk web applications. FIDELITY Jurnal Teknik Elektro. (2020) 2(1):1–6. doi: 10.52005/fidelity.v2i1.103

CrossRef Full Text | Google Scholar

2. Atzori L, Iera A, Morabito G. The internet of things: a survey. Comput Net. (2010) 54(15):2787–805. doi: 10.1016/j.comnet.2010.05.010

CrossRef Full Text | Google Scholar

3. Azzedin F, Alhazmi T. Secure data distribution architecture in IoT using MQTT. Appl Sci (Switz.). (2023) 13(4):1–13. doi: 10.3390/app13042515

CrossRef Full Text | Google Scholar

4. Bucci G, Ciancetta F, Fiorucci E, Fioravanti A, Prudenzi A. An internet-of-things system based on powerline technology for pulse oximetry measurements. Acta Imeko. (2020) 9(4):114–20.

Google Scholar

5. Errichiello L, Marasco A. Open service innovation in smart cities: a framework for exploring innovation networks in the development of new city services. Adv Eng Forum. (2014) 11:115–24. doi: 10.4028/www.scientific.net/aef.11.115

CrossRef Full Text | Google Scholar

6. Falentina Lumban, Toruan MG. Internet of things- based automatic feeder and monitoring of water temperature, ph, and salinity for litopenaeus vannamei shrimp. Jurnal ELTIKOM. (2023) 7(1):9–20.

Google Scholar

7. Mazalan N. Application of wireless internet in networking using NodeMCU and Blynk app. Seminar LIS 2019, Politeknik Mersing, Johor, Malaysia. (2019).

Google Scholar

8. Nayyar A, Puri V. Smart farming: Iot based smart sensors agriculture stick for live temperature and moisture monitoring using arduino, cloud computing & solar technology. Communication and Computing Systems - Proceedings of the International Conference on Communication and Computing Systems, ICCCS 2016. (2017). p. 673–680. doi: 10.1201/9781315364094-121

CrossRef Full Text | Google Scholar

9. Pasika S, Gandla ST. Smart water quality monitoring system with cost-effective using IoT. Heliyon. (2020) 6(7):e04096. doi: 10.1016/j.heliyon.2020.e04096

CrossRef Full Text | Google Scholar

10. Qazi S, Member S, Khawaja BA, Farooq QU. IoT-equipped and AI-enabled next generation smart agriculture: a critical review, current challenges and future trends. IEEE Access. (2022) 10:21219–35. doi: 10.1109/ACCESS.2022.3152544

CrossRef Full Text | Google Scholar

11. Saleem Y, Member S, Crespi N, Member S, Rehmani MH. Internet of things-aided smart grid: technologies, architectures, applications, prototypes, and future research directions. IEEE Access. (2019) 7:62962–3003. doi: 10.1109/ACCESS.2019.2913984

CrossRef Full Text | Google Scholar

12. Tran-dang H, Krommenacker N, Charpentier P, Kim D. Towards the internet of things for physical internet: perspectives and challenges. IEEE Int Things J. (2020) 7(6):4711–36. doi: 10.1109/JIOT.2020.2971736

CrossRef Full Text | Google Scholar

13. Zanella A, Member S, Bui N, Castellani A, Vangelista L, Member S , et al. Internet of things for smart cities. IEEE Int Things J. (2014) 1(1):22–32. doi: 10.1109/JIOT.2014.2306328

CrossRef Full Text | Google Scholar

14. Zulkifli CZ, Garfan S, Talal M, Alamoodi AH, Alamleh A, Ahmaro IYY , et al. IoT-based water monitoring systems: a systematic review. Water (Switzerland). (2022) 14(22):3621. doi: 10.3390/w14223621

CrossRef Full Text | Google Scholar

15. Deepesh PC, Bijay S, Iswor B. A low-cost centralized IoT ecosystem for enhancing oyster mushroom cultivation. J Agric Food Res. (2024) 15:100952. doi: 10.1016/j.jafr.2023.100952

CrossRef Full Text | Google Scholar


© The Author(s). 2025 Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.