Smart Control System Design and Implementation for Mushroom Greenhouses Based on IoT

Wan Dun, Li Ya, Zhang Yu, Li Zhan, Zhang Xu

(Henan Polytechnic University, Jiaozuo, Henan 454003)

Abstract: The mushroom greenhouse needs to provide a suitable growing environment for mushrooms, in response to the problems existing in the current traditional greenhouse production model, we designed an IoT-based mushroom greenhouse monitoring and control system, to improve yield, and reduce the consumption of human and material resources.This system utilizes the ZigBee network. Multiple environmental monitoring terminal nodes are placed at various locations within a single greenhouse, along with multiple device control terminal nodes and one gateway device; the gateway device collects environmental parameter data from the monitoring terminal nodes in real-time via the ZigBee network, and uploads the collected data to the cloud server in real-time using the MQTT protocol, after which control information from the server is sent to the device control terminal nodes.The system intelligently decides and adjusts the greenhouse environment based on the set optimal growth environmental parameters, and provides users with a designed APP and web interface, as well as abnormal information push and device control services, achieving visual automatic management of the greenhouse.

Keywords: Mushroom greenhouse cultivation ; Environmental factors ; MQTT ; Visualization ; Intelligent control ; ZigBee

Classification Number: TP399 Document Identifier Code: A

Article Number: 2095-1302(2022)08-0007-03

0 Introduction

The mushroom industry is a rural economic development project that integrates economic benefits, ecological benefits, and social benefits, developing the mushroom industry meets the needs of growing consumer demand and sustainable agricultural development, and is an effective way for farmers to become wealthy quickly. Although China has gradually become one of the important production areas for mushrooms, there is still a certain gap compared to the quality and yield of mushrooms abroad, mainly because the requirements for different environmental factors during the growth of mushrooms are very stringent. Therefore, researching the theories and methods for regulating the environmental factors in mushroom greenhouses that affect their growth, is a key research direction to improve the quality and yield of mushrooms.

In response to the development of mushrooms, this article utilizes IoT technology and data analysis technology, to design a smart mushroom greenhouse monitoring and control system, to achieve automatic control of the mushroom growth environment and equipment management, increase the yield of mushroom greenhouse cultivation, reduce the consumption of human and material resources, and increase production efficiency.

1 System Requirement Analysis and Structural Design
1.1 System Requirement Analysis

The environmental characteristics of the mushroom greenhouse are as follows:

(1) During specific growth stages, the environmental parameters are relatively stable;

(2) During specific growth periods, there is no light or only a small amount of light indoors;

(3) Equipped with devices that can ventilate, insulate, and maintain humidity, there are many environmental control devices (lights, fans, humidifiers, curtains, shading systems, etc.).

In response to the above characteristics, to realize the mushroom greenhouse monitoring and control system, the following conditions need to be met:

(1) There must be monitoring modules capable of measuring environmental parameters such as light intensity, temperature, humidity, CO2, etc.; and control modules capable of controlling devices such as lights, fans, humidifiers, curtains, shading systems, etc..

(2) The system must be able to send environmental data to a network server, process and store the data, and based on the data characteristics, make corresponding control of the greenhouse equipment, to achieve automatic adjustment of the mushroom greenhouse environment, maintaining the most suitable environment for mushroom growth.

(3) The system must be able to analyze environmental parameters from the greenhouse, and perform fuzzy data processing based on the growth habits and environmental characteristics of different types of mushrooms, to achieve stable control of the environment.

1.2 System Structure Design

Figure 1 shows the overall design block diagram of the system. To reduce wiring costs, and improve system reliability, the system design adopts ZigBee wireless communication technology and star network topology. From Figure 1, the functions of this system are mainly divided into five parts:

(1) Collection and uploading module for environmental parameter information;

(2) Greenhouse equipment control system;

(3) Information gateway module responsible for information interaction between the environmental parameter information collection system, the device control system, and the server;

(4) Cloud server for environmental parameter information;

(5) Mobile and PC terminal for visual display and remote control of greenhouse data.

The environmental information collection system can realize the collection of air temperature and humidity, light intensity, CO2 concentration, and other parameters, as well as wireless transmission of information.

The gateway module is responsible for gathering environmental parameter information sent by the environmental information collection system via the ZigBee network, packaging the information and sending it to the server, and receiving device control information from the server.

Smart Control System Design and Implementation for Mushroom Greenhouses Based on IoT
The device control system forwards control information from the server to the device control system via the gateway module, and makes corresponding control actions on devices (shading system, spraying system, curtain rolling device, etc.).
The software management system consists of two parts, namely the PC management system and the mobile APP, which mainly realizes the visualization of data and remote control of devices, and provides corresponding management guidance information based on environmental and climatic characteristics.
The data processing decision model can store the data uploaded to the server in a database, and by constructing the decision model, determine whether the current environment is suitable for mushroom growth based on real-time data, and perform real-time adjustment of the devices.
2 System Design and Implementation
2.1 Hardware System Design
The hardware of this system mainly consists of multiple wireless terminal nodes and a gateway node, both terminal nodes and the gateway module use the CC2530 chip as the core processor, and utilize the Z-Stack protocol stack developed by Ti to implement star ZigBee network topology for wireless communication.
When the Z-Stack is operational, the system initializes and starts OSAL, and enters the task polling process. The operational flow of the Z-Stack system is shown in Figure 2.
Smart Control System Design and Implementation for Mushroom Greenhouses Based on IoT
First, the terminal nodes collect environmental parameter factors affecting mushroom growth, and transmit the data to the gateway module via the ZigBee network, the gateway module uses the MQTT protocol to send the data to the server in real-time, the server processes, stores, and analyzes the information, and transmits the analyzed data to the database for matching, providing suitable control plans. After that, control command information is fed back to the gateway module, which in turn controls the device control system.
2.1.1 Environmental Information Collection System
The environmental information collection system consists of wireless sensing sensor nodes based on the ZigBee network, which is powered by a 3.7 V lithium battery, and uses CC2530 as the core controller, with external air temperature and humidity sensors (SHT30, working temperature range of 40 ~125, humidity range of 0%RH100%RH, high precision waterproof and dustproof, I2C communication bus connection), light intensity sensors (BH1750FVI, light range 065 535 Lux, I2C communication bus connection), infrared CO2 sensors (JXM-CO2, CO2 concentration range of 050 000ppm, UART communication bus connection), etc. The system monitors data in real-time, and forwards the data.
2.1.2 Device Control System
The device control system includes multiple wireless control terminal nodes, which control devices via external relays connected to microprocessors. In the process of mushroom greenhouse production, the environmental control devices (spraying devices, shading devices, temperature control devices, supplemental lighting devices, ventilation devices, curtain rolling devices, etc.) are integrated into the IoT system via the ZigBee wireless control terminal nodes, achieving wireless automated intelligent control.
2.1.3 Gateway Module
The gateway module gathers and uploads data collected by the environmental information collection system, and receives and forwards device control commands from the server. The gateway module consists of CC2530 and ME3616 modules.
ME3616 is a narrowband cellular IoT communication module that supports the NB-IoT communication standard, which has advantages such as low speed, low power consumption, and long distance, supporting multiple network protocols (CoAP, TCP/UDP, MQTT) and various low-power modes (PSM, eDRX). Under the NB-IoT standard, this module can provide a maximum upload rate of 66 Kb/s and a download rate of 34 Kb/s.
After powering up the gateway module, two processes are created, one process is responsible for receiving environmental information from the collection system, then packaging the data in JSON format, and sending the data to the server via the ME3613 module through serial connection using AT commands, as shown in Figure 3; the other process is responsible for receiving control commands from the server, when the server issues control commands, the ME3616 module sends the data to the CC2530 via serial connection, and the CC2530 forwards it to the device control system, making corresponding control actions on the devices, as shown in Figure 4.
Smart Control System Design and Implementation for Mushroom Greenhouses Based on IoT

Smart Control System Design and Implementation for Mushroom Greenhouses Based on IoT

2.2 Software Design Scheme

The server side saves data from the environment, and based on real-time data, calculates the optimal device control scheme through the decision model, and designs a visual software control system for the web and mobile APP.

2.2.1 Data Storage Decision Model

Based on the characteristics of mushrooms at different growth stages, the model matches the optimal environmental parameters required for mushroom growth from the database. It designs the upper and lower limits of environmental parameters allowed during the growth stages of mushrooms, utilizing the real-time environmental data uploaded from the greenhouse, to achieve intelligent environmental monitoring and device control, quickly correcting deviated environmental parameters, as shown in Figure 5..
Smart Control System Design and Implementation for Mushroom Greenhouses Based on IoT
2.2.2 Software Management System Design
The mushroom greenhouse monitoring and control software system is divided into the PC end and the Android APP end, the software system design includes modules for identity verification, real-time data, data statistics, device control, and information push, as shown in Figure 6.

Smart Control System Design and Implementation for Mushroom Greenhouses Based on IoT

The identity verification module is used to verify user identity, ensuring the legality of access to personal data and information.

The real-time data module displays the data collected by multi-node sensors within the mushroom greenhouse.

The data statistics module displays the collected environmental parameters (temperature, humidity, CO2 concentration, light intensity) in a visual curve format, making it easier for users to observe the environment within the mushroom greenhouse, and make corresponding improvements after analysis, to improve the efficiency of mushroom production.

The device control module displays the current status of environmental control devices within the mushroom greenhouse, allowing the selection of control modes for the devices (intelligent control or manual control). When using intelligent control mode, the system dynamically adjusts control based on the control scheme provided by the data fuzzy processing model, achieving automated control. In manual mode, users can issue corresponding control commands via the software based on their actual needs, and the device control system will execute the corresponding control operations on the greenhouse control devices.

Information push needs to be based on the environmental data of the greenhouse. Based on the analysis of the optimal cultivation conditions and suitable growth range for mushrooms, utilizing the environmental parameter information from the greenhouse along with daily weather and seasonal conditions, different planting guidance is pushed to the greenhouse, making it convenient for users to understand the greenhouse situation, and adjust the greenhouse according to their needs, achieving intelligent control of the optimal growth environment for mushrooms.

3 System Testing and Result Analysis

In the laboratory simulation of the mushroom greenhouse system, each mushroom greenhouse is equipped with, 5 to 6 sensor nodes, 1 gateway node, 1 PC computer, and a mobile phone that can install the APP.

After successful networking of the hardware nodes and gateway device in the system test, the environmental collection module can collect and send data such as air humidity and temperature, bag temperature and humidity, light intensity, and CO2 concentration to the gateway node, and the gateway node can connect to the network, upload data and issue commands. The network management platform and mobile APP display data in real-time, and through click control, commands can be quickly issued, controlling devices accurately, and making corresponding actions in real-time. Experiments show, that this system has low power consumption, good stability, and can meet the monitoring needs of mushroom growth.

4 Conclusion

This mushroom greenhouse monitoring and control system is tailored to the practical needs of mushroom production, based on the ZigBee network, developing IoT solutions, achieving data monitoring and device control, and visualizing the data, to regulate the most suitable environment, to meet the intelligent and modern needs of mushroom cultivation, improving the management level and production efficiency of agricultural greenhouses. This system has strong scalability, and is also applicable to other agricultural greenhouses, which has strong reference value.

References

[1] Yuan Jianfeng, Zheng Hao. Research on Key Technologies of Mushroom Growth Monitoring System Based on IoT [J]. Software, 2020, 41(8): 31-33.

[2] Dou Yifan, Zhong Yunjia, Wang Zhanbei. Design of a Mushroom Greenhouse Environmental Parameter Monitoring and Control System [J]. Electronic Production, 2019, 26(7): 23-26.

[3] Han Yixin. Design and Implementation of Smart Agriculture System for Mushrooms Based on IoT [D]. Shijiazhuang: Hebei University of Science and Technology, 2019.

[4] Zhao Xinhai, Zhang Yingliang, Li Ying, et al. Design of an Intelligent Monitoring and Control System for Mushroom Facility Cultivation Based on Android [J]. Journal of Tianjin Agricultural University, 2018, 25(3): 84-86.

[5] Zhang Rui. Design of a Human Health Monitoring System Based on ZigBee [D]. Qufu: Qufu Normal University, 2014.

[6] Song Weidong, Wang Mingyou, Xiao Hongru, et al. Intelligent Monitoring and Control System for Mushroom Production Based on IoT Technology [J]. China Agricultural Machinery, 2012, 56(4): 142-144.

[7] Long Zulian. Research and Design of Smart Agriculture Control System Based on ZigBee [J]. IoT Technology, 2021, 11(5): 106-108.

[8] Liu Feifei, Xu Longji, Ma Liran. Design of a Distributed Agricultural Environmental Monitoring System Based on ZigBee [J]. Sensors and Microsystems, 2021, 40(3): 90-92.

[9] Zhao Rongyang, Wang Bin, Jiang Chongran, et al. Design of Agricultural Greenhouse Production Environment Monitoring System Based on IoT [J]. Agricultural Machinery Research, 2021, 43(11): 131-137.

[10] Zhang Ping, Hu Yingkun. Intelligent Agricultural Temperature Control System Based on ZigBee and OneNET Cloud Platform [J]. IoT Technology, 2021, 11(1): 25-28.

Leave a Comment