Temperature, Humidity and Irrigation Control System for the Production of Orellana Edible Mushroom in a Greenhouse

Objectives: To improve the quality of the product, an automatic control of temperature, humidity and irrigation was designed for a greenhouse. Methods/Analysis: This paper describes the sensors, actuators, controllers, control algorithms and software that make it possible to know and maintain within an optimal range environmental variables of temperature and humidity inside the room fruiting; as well as substrate moisture feeding the fungus. Findings: As a result, a simulation of the designed system was obtained by a software supervisory control and data acquisition. Improvements: It was concluded that the proposed system is the ability to monitor and control environmental variables, described it above, in the greenhouse of eatable mushroom Orellana; and to adjust variables to a window it was verified that is sufficient control “on/ off”.


Introduction
The production of Orellana (Figure 1), fungus similar to mushroom but in the form of an oyster, which contains all the essential amino acids, carbohydrates, phosphorus, potassium, zinc, copper, magnesium, vitamins A, B, B12, C, D and niacin, it also has antitumor, antiviral and cholesterol control effects 1 , it is attractive since the substrate, food of the fungus, is mainly made of cheap and easy to obtain residues such as wood, husks and cereal straws 2 ; in addition, Orellana is a fungus of great colonization capacity, which requires less energy to eliminate probable contaminants. The growth of the Orellana is fast and its sale price is higher than must of others mushroom; even the substrate already used is not discarded since it can be sold as animal feed or organic fertilizer 3 .
All these benefits made the cultivation of edible mushrooms has become a growing agricultural industry, going from a global production of 2.412.070 tons in 1992 to 7.960.499 tons per year in 2012; China is the main producer followed by Italy, United States and the Netherlands 4 .
In the city of Bogotá there is a microenterprise dedicated to the production of Orellanas; however, the  15 .
productivity of the crop has been very low since with 25 gallons of substrate (100 Kg approximately) and 2 Kg of mycelium an average of 5 Kg of Orellana per week should be harvested for a month 5 , but the maximum that has been obtained are 2.5 Kg per week. The substrate, as already mentioned, is the source of food for the growth of Orellana, also made from organic waste such as sugar cane chaff, rice flour, banana leaf remains or coffee biomass 6 and the mycelium is the "Seed" of the fungus. On the other hand, the product obtained is not constant in its quality, a considerable percentage of Orellanas leave too wet and soft, another part produced generates very small Orellanas and even many of those are dried before being harvested. The low quality of the product has caused problems with the buyer since it pays less per kilo of Orellanas. This problem is generated by the great variability of the environmental and irrigation conditions of the crop room, mainly due to the fact that the temperature and humidity are not automatically controlled and the irrigation of the substrate is done manually according to the operator's judgment; for example, an excess of moisture limits the supply of oxygen to the fungus and therefore decreases its growth. Given that the industrial cultivation of the Orellana mushroom becomes an excellent alternative to meet the growing demand for food, not only because of its high protein content 7 , but also because of the use of agricultural residues for its production; it is necessary to obtain a good productivity from the substrate and for this specific conditions of humidity, temperature, lighting, ventilation and irrigation that favor their growth are required; it is here where industrial automation, with a correct instrumentation to measure and control environmental variables, appears as a tool to achieve greater efficiency in production that will be reflected in a product of better quality. This paper describes in detail the system for the control of the environmental variables of temperature, humidity and irrigation of the substrate in a fructification greenhouse of the edible Orellana fungus produced in the city of Bogotá, where the first three levels were covered in the automation pyramid, that is, field devices (sensors and actuators), control (Programmable Logic Controller (PLC)) and supervision (SCADA system).

Orellana Mushroom Production Process
The production of Orellana is basically the growth and fruiting of the mycelium within the substrate that serves as food; it is carried out in the stages shown in the flow diagram of ( Figure 2).

Raw Material Chop
The raw material, shown in Figure 3, which serves as food for the fungus is called substrate and is made of vegetables, part of them rich in lignin's, such as cereal straws, wood, sawdust, product of agro-industry such as leaves or waste of corn. Softwoods such as poplar and willow should be used; the use of species such as pines or eucalyptus could generate a product with a strong or unpleasant taste. In this stage the straws are chopped into pieces of 5 to 10cm in length, in order to increase the contact surface and facilitate colonization; shorter straws can cause a compaction of the substrate generating little aeration that impairs the growth of the fungus 8 . Carbon is one of the most important components, within the substrate, because it is the direct source of energy for the metabolism of the fungus; likewise, it is necessary for the formation of the different parts of Orellana and cellular their structures 9 .

Pasteurization
The straws of raw material are pasteurized to eliminate any agent that competes with the Orellana fungus in the colonization of the substrate. Several methods can be used for pasteurization, the most common being the use of hot water, as illustrated in (Figure 4), or steam at 90°C for a time of 30 to 45 minutes 10 .

Seed
The seeds are beans of cereals ( Figure 5a) colonized by the spores of the Orellana fungus ( Figure 5b); oats or rye are usually used for fungicide-free crops, since any residues can inhibit the development of the fungus. These beans are initially washed and sterilized in an autoclave at 121°C for one hour; Sterilization at low temperatures will not completely eliminate populations of bacterial microorganisms that can rapidly colonize the grains and affect the Orellana fungus. Subsequently a parent strain of the Orellana fungus is sown in the sterile cereal grains and incubated for 15 days at 24°C in total darkness. The seed that is not sown immediately must be refrigerated between 0 and 2°C. To use the refrigerated seed should be removed from the refrigerator 72 hours before planting, this because the cooled seed must recover its normal metabolism.

Planting
Seeding consists in inoculating the substrate with the seed, as soon as it has been pasteurized. A correct sowing is characterized by a good distribution of the seed, by the  aggregation of ordered layers of seed and substrate inside the container that is generally a plastic bag as shown in Figure 6. The size of the bag can be variable; however the transparent polyethylene sleeves that allow 50 cm diameters are optimal 3 . It should not be sown on a substrate more than 24 hours after it has been pasteurized. If it is necessary, the pasteurization process should be done again and if it passes more than 3 days, this substrate should be discarded.
It is important to take care that the temperature of the substrate has dropped to 30°C to avoid damage to the seed. The seed dose is 2% of the wet weight of the substrate.  Calcium carbonate is also added in a dose of 20 GRS per kilo of substrate and calcium sulphate in a dose of 10 GRS equally per kilo of substrate 11 . The humidity of the substrate at the time of planting should be 70%, humidity levels higher than those indicated are not recommended since the fungus needs certain porous spaces to allow the exchange of gases such as oxygen and CO 2 .

Colonization
The objective of this stage is to provide conditions to the fungus to invade the substrate as quickly as possible. This stage usually lasts about 2 weeks, depending on the incubation temperature. The plastic bag should be perforated on the second or third day after sowing to allow some aeration; it is also recommended to move the bags during the first week of colonization to facilitate the drainage of the internal water. The bags, such as those shown in Figure 7, are inspected daily to verify contamination-free mycelial development.
In this stage the humidity is not of great importance since the plastic bags maintain the adequate humidity for the development of the mycelium. The optimum development is achieved with a substrate temperature of 24°C. Lower temperatures cause a delay in the growth and colonization of the fungus, while higher temperatures can kill the mycelium 3 . At this time the fungus does not need light, which means that the room must be conditioned in total darkness, which prevents the entry of insects and in parallel allows energy savings. Also the aeration is minimal because the fungus supports high concentrations of CO 2 , up to 20,000 ppm; then it is sufficient to make repeated perforations in the bag.

Induction and Fructification
It is at this stage that hats are induced, also known as carpophores or basidiocarps; Primordia are initially formed, like those in (Figure 8), which are the first formations of the fruitful body. To this end, stimuli are delivered to the fungus with abrupt changes of light, temperature and aeration that trigger an irreversible process of induction of buttons that will later be transformed into hats.
The relative humidity at this stage is of utmost importance since the hats are exposed to the medium and are very easy to dehydrate. The humidity of the room should  be between 85% to 95% which can be achieved by keeping the floor wet and the use of nebulizers. It is important not to use chlorinated water when spraying substrates. Temperature is one of the stimuli that Orellana needs to produce basidiocarps. In this phase, the fungus is stimulated by lowering the temperature to a range of 13 to 17°C. As soon as the room is aerated, it must be well ventilated so that the CO 2 content is always below 1000 ppm. Large perforations in the bags must be made in this phase to aerate the substrate and favor fruiting. Substrates or rooms with poor aeration will produce smaller hats with a longer, thicker foot.
The luminosity has a direct effect on the coloring of the hats. An excess of light (greater than 2,000 lux/hour) causes a decrease in the buttons until they disappear altogether. The optimum of the luminosity is in 400 lux in 12 hours/day cycles without direct sunlight.

Harvest
A well-managed production system can reach productions that correspond to 20% of the weight of the wet substrate. A good size for harvest are hats with a diameter of 7 to 10 cm; however smaller hats are ideal for cocktails.
In any case, the hat must be harvested before its edge is fully extended, otherwise, the fungus may be too mature, diminishing its quality and releasing large quantities of spores that affect the health of the growers. Under normal growing conditions, the harvest period extends only 30 days after the first cut.
Hats can be presented individually or in bouquets like those in (Figure 9), so the harvest can be done by individually cutting each hat once the desired diameter is reached, or cutting the entire bouquet once the maximum of the hats reach the optimal size. The cut should be as clean as possible, using sharp knives to avoid contamination and favor the next emergence of carpophores.

Packaging
The packaging of the hats should be with the lamellas facing upwards, in this way it prevents spores from falling and staining the hats that are further down in the packaging container. Different types of packaging can be used, but the most advisable for fresh mushrooms is the use of PVC plastic film and with selective permeability to the water value of 150 g/m/24h, to the O 2 of 13,000 cm 3 /m 2 / 24h and to CO 2 of 8,000 cm 3 /m 2 / 24h.

Storage of the Orellanas
Once packaged, the mushrooms should be stored in a clean, refrigerated place with the following conditions: • High humidity (85%), • Temperature between 0 -5°C, • Ventilated, • CO 2 content between 0 -15%, and • Storage time of 1 to 2 weeks.
The previous stages correspond to the normal sequence of production, which can be varied depending on the facilities that the producer possesses. At the end of the harvest and when the substrate is exhausted and does not produce more carpophores, these are discarded, avoiding accumulation near the produced Orellanas, since they can be a source of contaminants by insects and other fungi, which can eventually enter on production rooms.

Environment Requirements for the Cultivation of Orellanas
For a correct growth of the fruiting body of the Orellana fungus, it is essential to guarantee environmental requirements in the different stages of production; these values should not be left out of the established ranges as it could even kill the fungus. These factors are temperature, relative humidity, aeration and lighting. Three different secondary sources were consulted where a tendency was observed, of the values of these environmental variables, on the part of the three authors; with some small differences. Next, each of them is exposed.
According to a biologist of the Distrital Francisco José de Caldas University in Bogotá (Colombia), Arquimedes Bello; these values must be within ranges, which are specified in (Table 1). This author highlights the temperature range between 22°C and 24°C for the stage of colonization and induction.
On the other hand, the author Jairo Cuervo of the Agricultural Sciences Faculty of the National University of Colombia indicates optimal ranges for environmental variables, which are shown in Table 2.
The author Yolanda Bonilla and her collaborators give temperature and relative humidity values of the fructification room air; which are clearly specified in Table 3.
These three consulted sources show that the edible fungus develops in temperatures lower than 25°C and higher than 13°C; but during the colonization phase the temperature must be above 22°C. The relative humidity of the substrate during the colonization and induction phase should be between 60% and 65%, between 70% and 80% in the fruiting phase when the primordia are formed; and between 80% and 95% in the formation period of the hats. The relative humidity of the air is 60% in the colonization phase, between 70% and 75% for the induction phase and 90% during the fructification. The aeration must be permanent during the formation of hats to avoid high concentrations of CO 2 ; minimum in the induction phase and is not important in the colonization phase. The colonization phase develops in total darkness, the induction of 150 lux at 600 lux, and the formation of hats from 1200 lux to 1300 lux.

Description of the Plant
The plant is a fructification greenhouse of edible fungus Orellana consisting of a quarter of 3.5 meters long by 3 meters wide and a height of 2.5 meters; the greenhouse has cement floor and drainage channels, as well as a semitransparent plastic roof called "Poly-Grap", mounted on a tubular structure in the shape of an arch.
The greenhouse is isolated to prevent the entry of any insect that may contaminate the culture; likewise, the personnel that enter to manipulate the production must be free of impurities. It has an air extractor and a grate to allow ventilation, an electric heater to increase the interior temperature when necessary and a vaporizer to increase humidity. For irrigation, a pipe system with micro sprinklers is used on each of the bags; the water is driven by an electric pump. In this room, 10 bags with the substrate inoculated with the seed of the fungus are housed on a shelf as shown in Figure 7. Each of the bags has an approximate weight of 10Kg and dimensions of 30 cm in diameter by 40 cm in height with perforations that allow the entry of water. The process to be carried out in this greenhouse is the colonization, growth and fruiting of the Orellana edible mushroom.

Range of Variables to Control
The proposed system was designed to monitor and control three environmental variables, in the fructification room, during the post-sowing and pre-harvest stages; these stages are, according to Figure 2, colonization, induction and fructification. The environmental variables are the temperature, the relative humidity of the air and the relative humidity of the substrate.
According to the values of the environmental variables consulted in Tables 1-3, the process was divided into three phases: colonization, formation of primordia and hat formation; Each of these three stages has its respective strict ranges, for the environmental variables to be monitored and controlled, which are shown in detail in (Table 4).

Instrumentation
The proposed system included three sensor types: temperature sensor, relative humidity sensor and relative humidity sensor of the substrate. Five actuator classes were used: air extractor, electric heater, vaporizer, electrovalves and electric water pump. The control and acquisition of data was carried out with a Siemens™ PLC.
Temperature Sensor: The temperature is measured using the LM35 precision integrated circuit from Texas Instruments™; this sensor delivers a linear output voltage of 10mV per degree Celsius, it manages a temperature range of -55°C to 150°C. The conditioning stage was carried out with an LM324 operational amplifier, as shown in Figure  10, in order to amplify the signal 10 times and reduce noise in the transmission of the analog signal from the temperature to the PLC. A 0 VDC signal is then delivered  to the PLC for 0°C and a 5 VDC voltage for 50°C. Inside the greenhouse the maximum temperature is 40°C and the minimum temperature is 10°C. Relative Air Humidity Sensor: This measurement was made using the humidity sensor HIH-4000-002, from the manufacturer Honeywell™. With a load resistance of 100KΩ, as shown in Figure 11, a linear voltage output proportional to the relative humidity value is generated. With a relative humidity of 0% the voltage output is 0.826 VDC and with a relative humidity of 100% the output is 3.976 VDC.

Relative Substrate Humidity Sensor:
The relative humidity of the substrate is measured independently in each of the 10 bags, ie, one sensor is used for each substrate bag. The sensor used is the same that was proposed to measure the relative humidity of the air.
Air Extractor: The objective of the air extractor is to reduce both the temperature and the humidity inside the fructification room. It uses an aluminum propeller extractor with self-ventilated electric motor of 250W of power and 110Vac of feeding.  Electric heater: Its function is to raise the temperature of the fructification room when the control system so indicates. For this a heater of 1000W of power and 110Vac of feeding is used.
Vaporizer: Increases the relative humidity of the air in the fructification room by evaporating the water content in your storage tank.
Solenoid valves: Irritrol™ 2400 MT slow-closing solenoid valves are used for irrigation to prevent water hammer.
Water Pump: The pump drives water for irrigation, the design raised the use of a 1/2 horsepower pump (370W) and 110Vac power.
PLC: The Siemens™ S7-314C 2DP PLC is used, which is configured with 96KB working memory; execution of 0.1ms/1000 instructions; 24 digital inputs and 16 digital outputs; 5 analog inputs and 2 integrated analog outputs; 4 pulse outputs (2.5kHz); 4 counting and measuring channels with incremental encoders 24V (60kHz); integrated positioning function; Multi Point Interface (MPI) + DP interface (DP master or DP slave); configuration in several rows up to 31 modules.

Architecture
The architecture of the proposed system is shown in Figure 12; it is observed that the first three levels of the automation pyramid are covered. In the first level are the sensors and actuators that allow knowing and modifying  the process variables. In the second level is the PLC as a processing and control device. On the third level is the PC station with the Human Machine Interface (HMI) (user interface) developed on the trial version of the SCADA WinCC™ software from Siemens™. Communication between the PLC and the SCADA system is carried out using the PROFIBUS communication standard; that allows up to 500KBaudios and reach of up to 500 meters. For the design presented in this document, the distance from the PLC to the SCADA computer is 20m. Figure 13 shows the process and instrumentation diagram (P&ID) according to the standards of The International Society Automation [12][13][14] . Four main processes are carried out: increase the temperature (control loop 101), increase the relative humidity of the air (control loop 201), and increase the relative humidity in each substrate bag (control loops from 301 to 310) and lower the temperature -humidity. The temperature is increased when the automatic control system turns on the heater 1. The humidity of the fructification room is increased by igniting the vaporizer 1. The relative humidity of the substrate in each bag is increased by activating the respective solenoid valve and pump 1. To decrease the temperature or the relative humidity of the air activates the air extractor 1.
The list of instruments in the P&ID diagram is explained in detail below: FC: It refers to the PLC as an intelligent device to control the irrigation of the substrate; receives information from the sensors (ME) and executes control actions on the actuators (FCV and M), mounted on board accessible to the operator.
TC: PLC as intelligent temperature control device; receives information from the sensor (TE) and executes control actions on the actuators (Heater, Extractor and Vaporizer), mounted on board accessible to the operator.
MC: It is PLC as an intelligent device to control the humidity of the air; receives information from the sensor (ME) and executes control actions on the actuators (Extractor and Vaporizer), mounted on board accessible to the operator.
FCV: It refers to each of the solenoid valves that control the irrigation of each of the substrate bags. Instrument installed in the field. ME: It is the primary element (sensor) of measurement of the humidity variable of the air and humidity of the substrate. Mounted in the field TE: It is the primary element of measurement of the temperature variable. Mounted in the field M: Electric motor of the water pump. Lines: The dotted line refers to electrical signals and the line with a letter "L" is the water pipe.

PLC´s Programming
The objective of the control program implemented in the PLC is to maintain the environmental variables to be controlled (temperature, air humidity and substrate humidity) within the ranges defined in Table 4. The Figure 14 shows the flowchart of the algorithm of temperature control, Figure 15 shows the flow diagram of the air humidity control algorithm.
To control the humidity of the substrate for each of the 10 bags, the program starts by taking the reading of the relative humidity sensor of the substrate, then compares it and if it is lower than the lower threshold (very low humidity) then it lights the respective one solenoid valve and water pump; it continues this way until the relative humidity of the substrate exceeds the ideal value (setpoint). In this case, because the substrate is bagged there is no actuator that allows lowering the relative humidity, so the procedure to be performed is to generate an alarm so that the operator takes the respective action.

Graphic Interface
The SCADA system for the cultivation of the fungus Orellana was implemented and simulated with the SIMATIC STEP 7 software TIA Portal V12 Trial from Siemens™ that is integrated into WinCC ™. The Graphical User Interface, technically known as HMI or human machine interface is shown in Figure 16.
In the main screen called "Process", a scheme is observed of what happens in the fructification room where the Orellanas are planted in each of the ten bags of substrate; These bags has holes on it to allow the entry of water from the irrigation system consisting of the electric pump, the electrovalves and the micro-sprinklers. In addition, the icons for monitoring and controlling the ignition of the vaporizer, the electric heater and the exhaust fan are shown. In the process screen the graphical indicators for the value of the relative humidity of the air and the temperature of the fructification room are also shown, each one are represented by a bar that is filled as the value increases; Also, its numerical value is indicated in real time just above each bar. Below each bag you can see the value of the relative humidity of the substrate contained in it.
The process screen has buttons for turning the control on and off; the control is turned off but the value of all the environmental variables continues to be monitored: temperature, relative humidity of the air and relative humidity of the substrate in each of the ten bags. The automatic operating mode can be switched to manual; in automatic mode the control is carried out by the PLC's internal program. In manual mode, the operator can be turn on and off at will each of the actuators: air extractor, electric heater, vaporizer and each of the ten solenoid valves independently, by clicking on the respective icon. The electric pump turns on automatically when at least one solenoid valve is active.
A segment of the process screen in the "colonization" stage is shown in Figure 17, it is shown, in the temperature bar, a white triangle pointed to 25°C to show the optimum temperature of the fructification room in this stage; in this way it should be 65%. On this screen the icons of the substrate bags have no visible hat, like it is in the real process.
When switching to the "primordial formation" stage the process screen changes as shows as in Figure 18; visually in the bags of the substrate appear the first formations of the fungus called "Primordios". In this stage the instructions shows that the ideal temperature should be 15°C, the relative humidity of the air should now be maintained around 70% and the substrate should has an ideal relative humidity for the primordia of 75%.
The last stage is the "formation of hats" where the screen is like Figure 16, the bags are now well formed hats and the user can see the triangles white and now at 18°C as optimal temperature and 90 % as ideal relative humidity of the air; and in text it is described that the relative humidity of the substrate in this stage must be 95%. As the change in the slogans is visible to the operator, it is also visible to the control system, in each stage the PLC control system automatically manipulates (in clear automatic mode) the actuators (air extractor, electric heater, vaporizer and electro-valves) to adjust the environmental variables (temperature, humidity of the air and humidity of the substrate) to their ideal value for their respective stage.

Trend Graphs
After pressing the button "Trend Charts" a screen like the one shown in Figure 19 is displayed. In this screen you can visualize the graphs with the behaviors of the variables: temperature, humidity of the air and humidity of the substrate in each of the 10 bags. The window allows you to zoom in, move or pause. On the horizontal axis of the graph there is a time base with complete information that specifies both the date (day/month/year) and the time (hours/minutes/seconds).

Control Chart
In this screen you can see the tables with the values of the variables: temperature, humidity of the air and humidity of the substrate in each of the 10 bags. The window allows you to scroll vertically and pause. The column on the left shows the time base with date (day / month / year) and time (hours / minutes / seconds); and the column on the right specifies the value that the variable takes at that Wilmer Chaparro Pineda, Julián R. Camargo L and César A. Perdomo Ch moment. The lower right area, like the control window, shows the current time next to an icon that informs the user when the system is "online", i.e. linked to the PLC.

Alarms
An alarm record is kept and can be viewed by pressing the "Alarms" button. The alarm table is divided into 4 columns; the first for the date (day/month/year), the second indication of the time (hours/minutes/seconds/hundreds) in which the alarm was generated, the third column is the identification number of the alarm and the fourth is the text explaining the cause of the alarm, it has a total of 72 alarms to indicate when the temperature, the humidity of the air or the humidity of the substrate are very high or very low; 24 alarms for each of the production stages, two for each of the 12 variables to be measured. This window allows vertical displacements through the table. The lower right area, like the control window, shows the current time next to an icon that informs the user when the system is "Online", that is, linked to the PLC.

Conclusions
With the simulation it was proved that the designed system is in full capacity to monitor and control the temperature, relative humidity of the air and relative humidity of the substrate. It was possible to maintain each of the controlled environmental variables within the optimum range by means of an "on-off " control.
It was observed that the optimal ranges of the controlled environmental variables are not the same for the whole fruiting process of the fungus Orellana, for this reason this process was divided into three stages (colonization, formation of primordia and hat formation) each one with its own respective ranges. It was identified that the fungus Orellana fructifies in an environment with a lot of humidity, especially in the stage of hat formation (HR 90%), and at temperatures between 15°C and 25°C.
The automation system designed has a big importance for the greenhouse of the edible mushroom Orellana, compared to greenhouses for other agricultural products, due to the substantial decrease in personnel income to the crop and therefore also decreases the probability of contamination with external agents as insects, bacteria or other fungi.
The main advantage of the use of the system of SCADA was evidenced in the registry of both the monitored variables and the alarms, because it generates valuable databases for the management of the production system.