## 3 The Results and Discussion
Figure 3.2 The diagram of data network communication between the sensor modules and the communication board of the main controller. Figure 3.3 Network configuration diagram. The printed boards were created for the realization of the prototype of the system of environmental parameters for mushroom cultivation. Figure 10 shows the main controller, which consists of the main microcontroller board and communication boards. Both of these PCBs are realized using double-sided printed circuit board manufacturing technology [1]. Figure 3.4 PCB view of the main electronic circuit of the controller. Figure 3.5 Values of parameters in the control application of mushroom cultivation conditions. Printed circuit board tracks are made of copper layer. In addition to the microcontroller, the printed circuit board was designed with spaces for active SMD elements such as capacitors, diodes, etc. In order to obtain a PCB with the smallest possible dimensions, PCB design optimization was carried out, allowing to reduce the number of tracks and make them as short as possible. A special dialectical layer is used to protect PCB active tracks from environmental effects, which is characterized by protection from both environmental factors and mechanical damage to the tracks. The general view of the main controller and the communication board can be seen in Figure 3.6 The standard DIN rails were used for PLC installation, which are often used in electrical module installation processes. As it can be seen, press-on terminals are used for communication cable contacts. A standard 100 W power supply (seen in the PLC photo) was used to power the PLC, which also has special brackets for mounting on the DIN rails. LEDs were used to display the information accordingly. Since the main PLC performs the function of powering, switching on/off circuits for environmental devices, galvanic decoupling using optocouplers has been used to protect certain parts of the PLC circuit from voltage surges (such as the microcontroller, etc.). After the installation of the system for maintaining the parameters of the mushroom growing rooms, the work of this system was monitored in a trial mode. Test results were monitored over a 24 h period (Figure 12). As can be seen, the room temperature changes over time within the limits of about 0.2 \({}^{\circ}\)C, while the humidity level managed to be controlled within the limits of 0.2%. After analyzing the readings of the CO\({}_{2}\) sensor, it became clear that the level of this gas in the room changes within the limits of about 2 ppm. The conditions of the environmental parameters of the mushroom growing room can be changed accordingly using the developed control application and taking into account the growing algorithm of a specific type of mushroom. A 24 h system test duration was chosen to make sure that all parts of the system worked properly (that the system was fully functional without errors and ready for the user), but the entire period of the mushroom growth cycle was not monitored, since the algorithm of the growth cycle of a specific mushroom species is entered in the control application by the final system user with the necessary education in the field of mushroom cultivation (e.g., an agronomist supervising the growth process, etc.). When testing the system's work, the monitoring of environmental parameters (temperature, humidity and CO\({}_{2}\)) over time was chosen, as this is the most relevant for the user of the system in order to ensure automatic control of the mushroom cultivation cycle. Figure 3.7 The general view of the main controller of the automatic control system. Temperature, humidity and CO\({}_{2}\) levels were monitored and controlled during mushroom cultivation. Figure 13 shows the results of temperature, humidity and CO\({}_{2}\) control during the whole growth cycle of Shititake mushrooms.