| In view of the shortcomings of the existing IoT-Greenhouse,such as low level of automatic control,backward management mode,complex communication structure and high cost of network construction,in this paper,apply the emerging Internet of Things technology as the core,integrating computer technology,sensor technology,microcontroller technology and network communication and other modern technological means,design greenhouse control and management system based on STM32.Acquisition,regulation and management of main environmental factors in greenhouse have been completed,and the intelligent level of greenhouse has been improved.Firstly,the overall plan of the system should be formulated.Based on the research results,the environmental factors affecting crop growth were comprehensively analyzed,air temperature and humidity,illumination intensity,CO2 concentration and soil moisture were selected as control objects.Finally,in the framework of the agricultural Internet of Things,we should follow the design principles of the system.Then,in the framework of the agricultural Internet of Things,follow the design principles of the system,the design scheme of the three-storey structure of the whole system has been worked out.Namely:environmental factor perception layer,control transport layer,and application management layer.Secondly,the hardware design of the system is completed.Drawing the schematic diagram of the core circuit of STM32 controller,complete the selection of each hardware module,design module interface circuit and power supply system.The PCB board of the controller is made according to the core circuit diagram of the controller,The data format of communication between the controller and the monitor is specified and the flow of data transmission is explained.Then the software of greenhouse control and management system is designed.Program design including controller and development of monitoring software,the program design of STM32 controller is completed in the environment of MDK embedded software programming,then based on MySQL database,the database E-R model and database relational table of greenhouse control management system are designed.Finally,under the development environment of Qt Creator,the control and management software suitable for this system is developed by using Qt framework.Finally,a greenhouse simulation test device was built to verify the function of the system.The experimental results show that the controller in greenhouse can adjust the environmental factors that need to be regulated according to the set upper and lower limits of control equipment,the control and management software of remote monitoring terminal can display the values of environmental factors in real time,the expected results are achieved.The whole system runs stably and reliably,and meets the design requirements. |