## 2 The Experimental Setup and Methodology  
An electronic system based on PIC microcontrollers was developed to monitor and control the environmental parameters and growth conditions of the mushroom growing room. The monitored and controlled growth environment parameters are humidity, CO2 level and ambient temperature. The mushroom growing premises consisted of 2 rooms in which 4 humidity and temperature measurement modules (sensors) and one CO2 level measurement module (sensor) are arranged.  
Air conditioner, recuperator and humidifier units are used to maintain the climate. The control of these units for maintaining environmental parameters is carried out with the help of a microcontroller, taking into account the information sent by the sensors in the room and the mushroom cultivation algorithm. The general concept of the system for maintaining the environmental conditions for mushroom cultivation is presented in Figure 1.  
The PLC controller system consists of two PCB boards: (1) MCU, control relays and control MOSFETs, input communication module board for signal transmission using optocouplers; (2) central communication board for remote humidity, CO2 and ambient temperature modules. The SHT41 module was used to record temperature and humidity. The SHT4x builds on a completely new and optimized CMOSens(r) chip that offers reduced power consumption and improved accuracy specifications. With the extended supply voltage range from 1.08 V to 3.6 V, it is the perfect fit for mobile and battery-driven applications.  
Figure 1: General conceptual diagram of the automatic control system of environmental parameters.  
The high-accuracy versions SHT41 and SHT45 feature typical and maximal accuracies that have been honed even further, down to \(\Delta\)RH = \(\pm\)1.5% RH and \(\Delta\)T = \(\pm\)0.1 \({}^{\circ}\)C. The electrical power of the temperature and humidity module is 0.05 W, the voltage is 5 V. The temperature and humidity measurement system consists of two PCB boards: (1) communication board with the main PLC controller; (2) mini board of temperature and humidity sensor SHT41. An AR257 meter was used for CO\({}_{2}\) measurement, the measurement limits of which are 0-10,000 ppm, the temperature measuring range 0-50 \({}^{\circ}\)C, power supply 2.5 W, voltage 24 V. The CO\({}_{2}\) measurement system consists of: (1) communication board with the main PLC controller; (2) industrial CO\({}_{2}\) meter (sensor) AR257. CO\({}_{2}\) levels during system testing both before and during mushroom cultivation were kept lower (about 270-275 ppm depending on test conditions) than fresh outside air (CO\({}_{2}\) levels in fresh air vary between 300-450 ppm depending on location). This process was ensured by the room's two-way ventilation system, which consisted of two ventilators with a diameter of 50 cm. One ventilator removed the room air with excess CO\({}_{2}\) gas, while the other ventilator blew in fresh air from the environment. Air blown in from the environment first entered the ZPure CO\({}_{2}\) filter, thus producing a lower CO\({}_{2}\) level indoors than in fresh air. The ZPure CO\({}_{2}\) filter removes carbon dioxide from inert gases, He, Ar, N\({}_{2}\), H\({}_{2}\), and clean dry air (CDA) to low ppb levels. The filter functions by consuming carbon dioxide in a reaction with highly dispersed NaOH on a silicate support.  
The environmental parameter control system for mushroom growing premises is developed using a PIC18F25K83 microcontroller. The PIC18(L)F25/26K83 microcontroller family with CANTM technology in 28-pins features a 12-bit ADC with computation (ADC2) automating capacitive voltage divider (CVD) techniques for advanced touch sensing, averaging, filtering, oversampling and threshold comparison. The C programming language was used for programming the microcontroller, while the control application was developed using the Delphi programming language.