Solar-Powered Multi-Network Greenhouse: Automated Mushroom Monitoring and Management System Using Microcontrollers and IoT-Based Applications

This study utilized the Solar Powered Multi-Network Greenhouse through microcontrollers and IoT-based application to design an automated mushroom monitoring and management system. As mushrooms are more to suffer from increased temperature especially in tropical countries like the Philippines, this study develops an automated system where composition is controlled by a microcontroller and monitored by Arduino IDE. The greenhouse monitoring device used different highly-capable sensors, which provides accurate parameters used for monitoring systems and better control management for cultivation. The different possible solutions to control parameters and maintain stability value suitable for mushroom cultivation were addressed. Thus, the prototype went through series of trials and tests to ensure functionality and accuracy of the device. Likewise, performance testing was conducted for temperature, relative humidity, and light to control and monitor the needs of the mushroom. The results revealed that the device is accurate, functional and capable. The study suggests that the greenhouse could be improved by installing a CCTV for constant monitoring of the interior and exterior of the greenhouse. The greenhouse could also be considered to be situated in a more private place as well as improve some of the application features.


Introduction
Food shortage is one of the greatest difficulties encountering mankind in the 21st century. For instance, global warming and other weather element changes have claimed significant landmass sufficient to support mushroom cultivation. To address the problem, the greenhouse practice which has been in existence for years is now modernized, automated, and deployed in many parts of the world. This technology is yet to be embraced and incorporated by many developing countries (Okunola, 2013).
The mushroom culture is gaining attention in the Philippines. Mushroom is a delicacy and is indeed accepted as a vegetable. There is partial mushroom cultivation in the country today due to insufficiency of planting resources and the limited local familiarity about its culture. Mushroom cultivation entails little space and time and farmers can make use of their rice straws following the harvesting method. Mushrooms can be grown the whole year round as long as good storage of rice straw is arranged and provided. Thus, many alternative methods were presented on cultivating different varieties of mushrooms. Gaining its popularity, the greenhouse plantation plays a vital role in the mushroom production industry due to its low-cost industrial unit and the horizontal space it provides.
The Pleurotus species of mushroom require a short growth time, compared to other mushrooms. Its fruiting body is not often attacked by diseases and pests and can be grown simply and cheaply with high yield, wider substrate utilization, sporelessness, wide temperature, and chemical tolerance as well as environmental bioremediation. It is an edible mushroom and also has several biological effects as it contains important bioactive molecules (Yang et al., 2013). P. ostreatus is characterized by high water content and low calorific value (1510 kJ kg −1 edible parts), making it suitable for inclusion in calorie-controlled diets (Jaworska & Bernás, 2009). The pileus of P. ostreatus is low-cost Arduino-based valued not only for their taste but also for their nutritional qualities especially in vegetarian diets.
Modern greenhouse technology arrays automation in agriculture which is now commonplace due to the low costs of electronic components required for its implementation. The greenhouse is an indoor sheltered place where plants are grown and cultivated. In the agriculture field, the mushrooms in the greenhouse are extremely cultivated and productively maximized since it provides a microenvironment that is much easier to control. In the same framework, some significant parameters should be monitored at a greenhouse to achieve good results in terms of agricultural production. Two of these parameters are precisely the temperature and humidity that are commonly measured with physical and manual methods. Various efforts have been completed by many researchers to automate and modernize the traditional greenhouse system. An embedded scheme closely monitors the microclimatic parameters of a greenhouse round the clock and activates actuators when safe thresholds are surpassed to restore optimum conditions (Enokela et al., 2014). Their design employs a Liquid Crystal Display (LCD) which is interfaced directly to a microcontroller that ensures user is continuously alerted about the conditions inside the greenhouse system. An arrangement of this type can provide information to the user about the situations inside the greenhouse only when the user is at the physical location. On the other hand, a Wireless Sensor Network (WSN) with smart irrigation capability monitors the microclimatic parameters around each row of mushrooms and activates suitable pumps for irrigation when the moisture level drops below a safe threshold (Rahali et al., 2011). The WSN is defined as the collection of sensor nodes that perform a specific task and they are representing one of the technological solutions to automatize and improve the management of mushrooms (Jimenez et al., 2012). The drawback of this system lies in its incapability to control the │ 3 other microclimatic parameters such as temperature and humidity which play a major role in the development and yielding of mushrooms. In addition, the operator can only view the parameter and limit conditions of the greenhouse at the physical setting since it engages LCD which is based on the Global System for Mobile Communication (GSM) that permits a greenhouse user to monitor and control the microclimatic parameters via Short Message Service (SMS) (Rahali et al., 2011). However, its drawback is that the control action is not automatic; it is initiated by the user who may not constantly be attentive, which could disrupt the cultivation of mushrooms. Two separate webbased WSN applications were correspondingly developed and discussed by Qiang and Ming (2008) and Mancuso and Bustaffa (2006). These systems permit a greenhouse worker to monitor the conditions over the internet. Although the internet communication platform is almost always there and accessible, it requires that the accessing device such as a Universal Serial Bus (USB) MODEM should have enough download data competence which may not always be the case in developing countries.
With the current trend and changing demographics, the traditional forms of agriculture cannot satisfy people's needs thus need changes and enhancements. In this regard, the advancement and development of Internet technology have brought light to the growth and innovation of agricultural modernization. As such, the agricultural Internet of things has become the inevitable trend of agricultural informatization. Through the remote nursing and management of greenhouse, the greenhouse monitoring system realized the precise extent and real-time control. The greenhouse monitoring arrangement environments implement scientific monitoring and management methods, which improve crop disaster prevention ability and increase production (L. Dan, et. al., 2015). Hence, the Agro-alimentary sector is integrating new technologies due to the vast production demands and the diversity, quality, and market presentation necessities. A technological revamp of the sector is being required where control engineering plays a critical role. Automatic control and robotics procedures are incorporated in all the agricultural production stages: planting, production, harvest, post-harvest processes, and transportation. Modern agriculture is subjected to guidelines in terms of quality and environmental impact, and thus it is a field where the application of automatic control techniques has increased substantially over the last years. Many alternative ways are formed due to the high demand for food production and one of these is the enclosed cultivation of plants using a greenhouse (Andrzej Pawlowski et al., 2009).
The proponents of this study saw the need to develop a system for a family vegetable farm which keeps track of the farm yield on a day to day basis. By developing an automated greenhouse with sensors, it makes farming economical, easier, and cost-effective by incorporating agricultural engineering and technology. As such, this study aims to: 1. design and create an automated solar-powered multi-network greenhouse for mushroom monitoring and management system using microcontrollers with IoT-based applications; 2. develop a micro-environment system using electronic sensor networks, cloud computing, and computer networks that automate management and climate control processes in mushroom cultivation; 3. control and monitor mushroom cultivation and collect data utilizing microcontrollers and with IoT-based applications remotely; and 4. test the performance of the device in terms of functionality, accuracy, and capability through static and dynamic testing as to humidity, temperature, and luminosity parameters.

Mushroom Cultivation
Cultivation methods for edible mushrooms vary considerably around the world. Methods primarily depend on the type of mushroom considering its ideal type of environment and parameters need to be monitored from time to time. Depending on the location of production, many specialty mushrooms can be grown using either indoor or outdoor methods with different stages of cultivation.
P. ostreatus can be widely cultivated, which can adapt to different temperatures. It exists on every continent except Antarctica and grows throughout the year (Qu et al., 2016). According to Ahmed et al. (2013), the cultivation of P. high-king, P. ostreatus, and P. geesteranus requires a temperature of the culture house maintained between 22 and 25 °C. This optimal temperature result indicated that Pleurotus species were able to grow better during the summer and autumn in subtropical and tropical regions as a potential opportunity to develop oyster mushroom production in poor and developing countries (Oei & Nieuwenhuijzen, 2005;Kashangura, 2008). Some species thrive in the dark and others in partial light. It is likely that all mushrooms, which require light use a common regulatory pathway for basidioma development (Kurtzman & Martinez-Carrera, 2013).

Automated Greenhouse
Unlike the manual method of cultivation, plants in the greenhouse are grown in a controlled environment. The temperature differences can cause harm to plants. Sometimes the farmers cannot predict which action needs to be taken so to control the environment and may take wrong decisions thus causing more harm to the plants in the greenhouse. The automated system allows assisting farmers to create suitable decisions since it provides the status and conditions through the sensors with accurate information utilizing the IoT web server. Thus, this system helps the farmers to control greenhouse from remote locations (D. Shirsath, et al., 2017).
The greenhouse system may comprise an illumination, a sensor, and a controller. The illumination and controller are arranged to vary the intensity and the spectral distribution of the light emitted by the illumination. The emitted light may be pulsed-light, the pulse characteristics being variable by the controller in dependency of the output of the sensor. The controller is arranged to interpret the relevant variables measured by the sensor and to assess the actual and/or expected growth of the relevant plants, and control the intensity and/or the spectral distribution of the light emitted by the illumination. Some sensors may be provided for measuring the intensity and/or spectral distribution of the actual light in the greenhouse, other sensors for measuring plant dimensions of the relevant plants or plant groups. The illumination may comprise a heat collector which can be connected to the heating or air conditioning inside or outside the greenhouse (Lakhiar et al., 2018).

│ 5
The automated greenhouse control system is made up of two principal units: sensors/actuators station and remote monitoring station. These two units consist of sensors for light (Light-dependent resistor), temperature (LM35), humidity (HIH4030) [10], and moisture (VH400) (Enokela, 2014); fan, fogger, drippers, and artificial light. The intermediate node aggregates all data, and then sends the data to the PC through a serial port, at the same time, staff may view, analysis and store the data by the PC that provide real-time data for an agricultural greenhouse, fans, and other temperature control equipment, and achieve automatic temperature control (L. Dan, et al., 2016).

The Greenhouse Project
Greenhouses are controlled area environments to grow plants. To achieve maximum plant growth, the continuous monitoring and controlling of environmental parameters such as temperature, humidity, soil moisture, light intensity, soil pH, etc. are necessary for a greenhouse system. This study aims for a simple, low-cost, Arduino-based system to monitor the values of environmental parameters that are continuously updated and controlled to achieve optimum plant growth and yield. DHT11 sensor, Soil Moisture Sensor, LDR sensor, and pH sensor are the main sensors which give the exact value of temperature, humidity, water content, light intensity, and soil pH. All the environmental parameters are sent offline and online to android mobile phones. A GSM (Global System for Mobile communication) modem is used to send SMS (Short Message Service) which displays the present status of the environmental parameters. The SMS is sent to the user when the sensor value exceeds a defined level.
The farmers can control greenhouses through SMS from any place by knowing the status of the greenhouse parameters at any time so that actuators (cooling fan, exhaust fan, water pump, artificial light, and motor pump) adjust environmental parameters. Ethernet is also used to send the data parameters to the mobile phone which eliminates the SMS charges. All environmental parameters are sent to the server through Ethernet and stored in the database. The user can monitor and control parameters through the android mobile application (P. Vimal, et al., 2017). However, the temperature differences can cause harm to plants. Sometimes the farmers cannot predict actions to be taken to control the environment which may led to wrong decisions causing more harm to the plants in the greenhouse. The system allows farmers to take proper decisions by providing the status of the sensors with accurate information through the IoT web server. Thus, this system helps the farmer to control greenhouse from remote locations (D. Shirsath, et al., 2017).
This study constructed an Arduino-based system with IoT applications that assists in monitoring and cultivation of mushrooms in the micro-environment using electronic sensor networks, concepts of cloud computing, and computer networks that automate management and climate control processes in the greenhouse. This improves the quality and quantity of the by-product that generates higher revenues resulting to economic development in agriculture. This may assist farmers to extend their skills and knowledge in plant breeding and agricultural engineering and technology. In addition, the data generated by the system may be used in doing advanced research in agriculture. The development of a system that combines agriculture and technology can assist in accurate and efficient remote cultivation and monitoring not only mushrooms but also other plants by providing suitable environments and favorable conditions to maximize plant yield since climate change disrupts its growth, quantity, and quality.

Research Design
This study employed a developmental research design to create an automated solar-powered multi-network greenhouse for mushroom cultivation monitoring and management system using a microcontroller with IoT-based applications. Hence, it was defined as the systematic study of designing, developing, and evaluating instructional programs, processes, and products that must meet criteria of internal consistency and effectiveness (Richey, 1994). The approach used on the design is purely constructional depicting a step-by-step procedure for the planning and fabrication of the greenhouse prototype.

Figure 1
Blynk Application The figure shows the system design using Blynk application which provides real-time monitoring of parameters in the greenhouse. It is an open-access application that provides data information generated by different sensors. It can be a self-design feature where the user can input different parameters to monitor. Blynk application uses an account on Google where the data are being reported. It sends the daily report that can set time interval preferred. Monitored data reports are in excel format which has time versus parameter values for each sensor. It also contains a graph feature where it shows the real-time movement and timely variation of data produced by each sensor for better monitoring of parameters. Users can monitor low and high value occurrences. Lastly, this IoTbased application allows user to edit the program directly in setting up value upon the controller mechanism activation. It is an easy access program without editing the main program itself.

Figure 2
System Flow Chart Figure 2 shows the system flow chart in monitoring and controlling the greenhouse using an automated device with various sensors. After initializing the device, it reads the data sensor for different parameters such as humidity, temperature, and light. The temperature sensor displays the degree Celsius value of the temperature level in the LCD. Meanwhile, the humidity and light sensors provide a condition after displaying the values as part of controlling for cultivation. When the humidity is not on its standard value, it activates the sprinkler to meet the specific value of humidity. Similarly, if the intensity of light is not on the standard value, the LED will automatically activate and stay in one state until the LDR sensor is read and meet the standard value for the light parameter. All these parameter values are displayed on the LCD while data are sent online and monitored through Blynk.

Design Procedure
The design procedure of this device focused on the problem generated in different greenhouses. The self-constructed and tested design implements a wireless sensor network that monitors and controls the specific parameter in a greenhouse (Figure 1). The detailed procedure in constructing the research design follows: 1. identify the possible problem encountered in the greenhouse; 2. analyze the data produced and identify the different parameters to be monitored and controlled by the device; 3. choose the appropriate sensors for each parameter by analyzing the given data; 4. construct a design that generates the control mechanism and the monitoring management of the greenhouse; 5. construct the device; and 6. check and troubleshoot the functionality of the service.

Figure 4
Schematic Diagram of the Device Figure 4 shows the schematic diagram of the main controller of the device. It includes various sensors and modules that allow the system to carry out specific functions as follows:

LCD.
It is a flat-panel display or another electronically modulated optical device that uses the light-modulating properties of liquid crystals combined with polarizers.

12 V to 5V Converter.
A device for altering the nature of an electric current or signal, especially from AC to DC or vice versa.

NodeMCU.
It is an open-source firmware for which open-source prototyping board designs are available.

Arduino module.
It is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards can read inputs -light on a sensor, a finger on a button, or a Twitter message -and turn it into an output -activating a motor, turning on an LED, publishing something online.

Temperature Sensor.
It is an electronic device that measures the temperature of its environment and converts the input data into electronic data that is recorded and provides signal temperature changes for monitoring.

Humidity Sensor.
It is an electronic device that measures the humidity in its environment and converts its findings into a corresponding electrical signal.

Push Button.
It is a simple type of switch that controls the action in a machine or some type of process.

Light-Emitting Diode.
A semiconductor light source that emits light when current flows through it. 9. Float Switch. It is a type of level sensor, a device used to detect the level of liquid within a tank.

Rocker
Switch. An on/off switch that rocks (rather than trips) when pressed.

System Fan.
A powered machine is used to create flow within a fluid, typically a gas, such as air.

12V AC/DC Power Supply.
It is an electrical device that supplies electric power to an electrical load. The primary function of a power supply is to convert electric current from a source to the correct voltage, current, and frequency to power the load.

Performance Testing
The system was tested with all necessary components interfaced to examine the performance of the device in terms of functionality, accuracy, and capability. The inspection was through data monitored every hour for 30 days. The data were compared every day in terms of all the parameters to be measured. The following were the performance tests conducted: Static testing. Test cases are developed using various test techniques for achieving more effective results. Each tester considers the best method or technique for the developed system hence it is a method used while the code is not yet performed. Failures of the designed systems in a static test are often human error particularly mistake in a document specification. Errors are much cheaper to fix than defects or failures; testing should start as early as possible. Static testing involves techniques such as reviews, which can be effective in preventing defects (Hambling, et al., 2007). All of the parameter sensors went through static testing in terms of functionality, accuracy, and extent of capability. A check (✓) denotes the condition is met while cross (x) if it is not met. The result was successful as all of the parameter sensors work properly. The test was on a 30-day trial.

│ 11
Dynamic testing. This method involves working with tools where requests are given with inputs and results of responses are checked and compared with the expected values. Dynamic testing is the kind of testing that exercises the program under test with some data (Hambling, et al., 2007). It is performed on software that is compiled and executed with parameters such as memory usage. The overall device undergoes dynamic testing to assess if the given logical statements on the program work accordingly. The result was successful as the device sends daily basis data on the server.

Figure 4
Actual Greenhouse (Front View) As shown in figure 4, the actual greenhouse is located beside the engineering building which is suitable for the cultivation of mushrooms.

Figure 5
Actual View of Greenhouse Inside Figure 5 presents the inside view of the greenhouse where mushroom is located and placed in the two-layer racks. The water tank is placed above the ground so that there is a good water flow to the sprinkler.

Figure 6
Main Controller of Greenhouse Figure 6 shows the actual design of the device controller. It displays the connection of the component between the main controllers and switches.

Results and Discussion
Static and dynamic testing results were conducted to gather data and examine the device. These two testing methods examined the functionality, accuracy, and capability of the device to work correctly as white oyster mushrooms are sensitive to humidity, temperature, and luminosity.
Static Testing. Data were gathered in monitoring the parameters of the greenhouse through the IoT application (Blynk Application). As presented in Table 1, the summary of results of each trial denotes that the static test was successful because all the sensors were working perfectly. The device has 100% functionality and 100% accuracy in terms of temperature, humidity, and light sensors. Functionality testing was performed if the device's sensors were working, responding, and giving information to both the microcontroller and the Blynk Application. Accuracy testing was performed if the sensors gave the same values to both microcontrollers and the Blynk Application. Capability testing was performed by simply checking the maximum values that the sensors will give to the microcontroller and the Blynk Application.
Dynamic Testing. The data gathered from the Blynk Application include the test results of the humidity, temperature, and luminosity measured in the greenhouse. For 9 days, the sample data were collected every hour with a minute interval.
Oyster mushrooms can grow at moderate temperatures ranging from 18 to 30 °C (Mejía & Albertó, 2013). According to Hoa and Wang (2015), the optimal temperature for both P. ostreatus and P. cystidiosus is 28 °C. For most fungi, the wide humidity range is 20-70% (Pandey et al., 2001). According to Chang and Miles (2004) and Li et al. (2015) and Li et al. (2015), the appropriate humidity during the darkened spawn-running and mycelia stimulation should encompass a range between 60-75% and 85-97%, respectively, in the environment enabling a satisfactory growth of Pleurotus spp. Consequently, some mushrooms such as Pleurotus spp. or L. edodes require light for primordia formation (Nakano et al., 2010). A publication by Kaufert (1936) seems to be the first indication that Pleurotus species required light. In general, the photoperiod of mycelia stimulation to promote mushroom fruit bodies formation should be sufficient to read a sheet of paper 200-640 lux or 57-170 lumen 8-12 h a day at a temperature compatible with the mushroom (Ahmed et al., 2013;Mejía & Albertó, 2013). These serve as a standard parameter for temperature, humidity, and luminosity for the optimal growth of the mushrooms inside the greenhouse. These were used throughout the data gathering to prove that the device meets the standard parameters.  Table 4 shows the values produced by each sensor every hour in a day from day 1 to 4. The data gathered during day 1 have a constant relative humidity of 99% throughout the day while the temperature reached its peak value around 1:00 pm with a temperature of 38.86 degrees Celsius because the sun was directly above the greenhouse. The value of luminosity ranged from 4.15 -98.10 lumens. Similarly, day 2 has relative humidity ranging from 75.7-99% throughout the day, the temperature reaches its peak value around 11:00 with a temperature of 36.93 degrees Celsius and luminosity ranged from 4.15 -98.10 lumens. In day 3, relative humidity ranging from 73.03-99%, the temperature peak at 13:00 with 38.86 degrees Celsius and luminosity ranged from 4.15 -98.10 lumens. The day 4 showed a constant relative humidity of 99% throughout the day. The temperature peaked around 13:00 with the temp of 38.93 degrees Celsius while luminosity ranged from 4.15 -98.10 lumens.

Table 5
Dynamic testing results on day 5-9 Note: Standard Parameters: Temperature = 18 to 30 °C, Table 5 shows the values produced by each sensor for day 5 to day 9. Day 5 shows constant relative humidity of 99% throughout the day. Similar to the previous days, the temperature peaked at around 13:00 with 38.73 degrees Celsius while the value of luminosity ranged from 4.15 -98.10 lumens. On the following days, the relative humidity ranged from 72.9-99% (Day 6), 75-99% (Day 7), 94-99% (Day 8) and 90.44-99% (Day 9). The temperature still peaked at around 13:00 at varying degree Celsius of 35.37 (Day 6), 36.93 (Day 7), 35.79 (Day 8) and 35 (Day 9). The luminosity ranged from 4.15 -98.10 (Day 6), 4 -98.52 (Day 7), 4.15 -98.10 (Day 8) and 4 -97.60 (Day 9) lumens. Table 6 shows the data gathered on July 11, 2020 that reflect the changes in the values of the parameters per minute within an hour period. The data were recorded on the Blynk Application in an hourly manner. It encodes its readings of all the parameters on the device which translate to a data report. The result was successful as the device sends daily basis data on the server.  Based from the data gathered, the features in the Blynk Application were functional as it gives the data and reports consistently on the whole process of testing. The data consist of hourly reports of the current values in terms of humidity, temperature, and luminosity inside the greenhouse and was transferred to the mobile phone through the use of a WIFI connection. Based on each parameter gathered from day 1 to day 9, the result in terms of temperature and humidity was within the range of the standard values for optimal growth of the mushrooms inside the greenhouse. In terms of luminosity, although the luminosity of the LED strip was not enough, the natural sunlight gives enough light for the mushroom to grow. Although lacking an exact data on how many mushrooms were produced in each fruit bag, the white oyster mushrooms grew on almost all of the 100 pieces of fruit bags in the greenhouse.

Conclusion and Recommendation
Through hard work and dedication and assistance of the experts, the development of an automated solar-powered multi-network greenhouse in mushroom cultivation monitoring and management system on using microcontrollers with IoT-based applications was made possible. This study therefore conclude that the Solar Powered Multi-Network Monitoring and Management System on Greenhouse Cultivation could lessen the risk of greenhouses not being maintained or monitored at specific environmental conditions through an IoT-based monitoring system called Blynk Application. It helps manage and keep track of the environment inside the greenhouse remotely as long as there is a WiFi connection.
The static testing after three trials proved that the device was fully functional in terms of the temperature, humidity, and light sensors as it gives information thru the microcontroller and the Blynk Application. The device was also accurate as it gives same value in both the microcontroller and the Blynk application. The sensors were also capable to give values needed in terms of temperature, humidity, and luminosity enough for the range of the standard parameters for growing and cultivating a mushroom. Meanwhile, the dynamic testing also proved that the three parameters (temperature, humidity, and luminosity) measured for nine (9) consecutive days were in the range of the standards for growing a mushroom. Therefore, the micro-environment created from the greenhouse was suitable for the cultivation of white oyster mushrooms. Even though some hours of the day did not have enough luminosity for the mushrooms, the fruits bags in the greenhouse still produce the white oyster mushroom. This concludes that a few hours of exposure to light was enough to cultivate a white oyster mushroom. The moisture sensor, however, was not met due to its being an insignificant factor in cultivating mushrooms. As a final result, the device was 100% functional, accurate, and capable of monitoring the temperature, humidity, and luminosity inside the greenhouse for the production of white oyster mushrooms.
Based on the summary of findings and conclusions, the following recommendations were drawn for further research: improvement in the security of the device like installing a CCTV for constant monitoring of the interior and exterior of the greenhouse and additional sensors; better location of the greenhouse by placing the device in a more secure and private place and not publicly exposed to lessen the threat of damaging the device; utilize the greenhouse to cultivate other plants by using the specific parameters for varieties of plants; gather information on the increase or decrease in percentage yield on the production of the mushrooms, and conduct additional testing if constantly exposing the mushroom to 57-170 lumens for 24 hours could affect the production rate of the mushroom.