With the improvement of people's quality of life, family plant factories are receiving more and more attention. To this end, an artificial light-type closed family plant factory that simulates sunlight with an LED light source is designed. In order to enable the home plant factory to provide suitable growth environment for crops and remote intelligent monitoring, an intelligent monitoring system based on Android platform was designed and implemented.
introduction
In recent years, due to the development of LED technology and plant factories, the application of LED light sources in plant factories has received more and more attention. As the internationally recognized stage of the most advanced development of facility agriculture, plant factories are characterized by small, non-polluting, high degree of automation, multi-level three-dimensional cultivation, which can save a lot of land and controllable crop growth cycle, and represent the future agriculture. The direction of development. Among them, the fully artificial light type closed plant factory can provide a more suitable, more controllable and cleaner growth environment for crops through moderate control of environmental factors, and is an important mode for the development of plant factories. LED light source has the advantages of small size, long life, direct current, low heat generation and adjustable light quality. It is considered to be an ideal light source for all artificial light plant factories, and has been studied in many plant factories at home and abroad. Applied.
At present, plant factories are mainly developed in the direction of large plant factories suitable for factory production and miniature plant factories suitable for families. Developed countries such as Japan, the Netherlands, and the United States have basically achieved industrialization in these two directions; domestic research on plant-related technologies started late, but in recent years, some remarkable results have also been achieved.
As people's quality of life continues to improve, green, healthy and intelligent home plant factories will have a large market space. Combining the Internet, mobile terminals and intelligent control is a trend in the development of home plant factories. Based on the judgment of this trend, this paper designs a full artificial light type closed family plant factory using LED light source, and develops an intelligent monitoring system based on Android platform for the home plant factory.
1 system overall design
LED Family Plant Factory
The two-dimensional dimensions of the LED home plant are shown in Figure 1. It is divided into 4 layers: the bottom layer is used to place the nutrient solution tank, the nutrient solution circulating pump, etc.; the top layer is used to place the power module, the display module and the drive circuit module; the middle two layers (hereinafter referred to as planting space) are used for planting crops. The top of each layer is equipped with LED light panels, and the bottom is placed with a culture tank for holding nutrient solution. The LED lamp is directly driven by the DC drive module, and the brightness of the LED lamp can be adjusted by an external PWM control signal. In order to ensure that the environment of the planting space is not affected by the external environment, during the normal planting of the plant, the middle two doors are closed, that is, two independent planting spaces are isolated from the outside.
Monitoring system function design
Plant growth mainly depends on photosynthesis, and the environmental factors affecting photosynthesis are temperature, humidity, carbon dioxide concentration and light intensity. In order to enable the above-mentioned home plant factory to provide a more suitable growth environment for the crop, it is necessary to monitor and control the temperature, humidity, carbon dioxide concentration and brightness of the LED lamp in the planting space to properly circulate the nutrient solution at the root of the crop. At the same time, in order to make the system have better human-computer interaction, the environmental parameters of the planting space need to be displayed in real time, and the historical data can be queried and exported. In order to enable the status information of the planting space to be accessed and set remotely, the system needs to have a network connection function. In summary, the functional framework of the monitoring system is shown in Figure 2.
Figure 1 2D dimensional drawing of the LED family plant factory
Figure 2 Functional framework of the monitoring system
Since the application of the Android operating system on the embedded device is more and more mature, the application based on the Android platform has a very good human-computer interaction experience, so the monitoring system selects the application development based on the Android platform. The Android application is responsible for periodically collecting the environmental parameters of the planting space and displaying it in real time. Based on the set parameter thresholds and related algorithms, the corresponding actuators are driven to effectively control the environmental parameters. At the same time, the application provides historical data query and export functions, and can pass The network communicates with remote application servers, enabling users to remotely access and set the status of the local monitoring system.
2 hardware platform construction
In order to realize the above functions of the monitoring system, it is first necessary to build a more complete hardware platform based on the existing hardware of the LED home plant factory, including selecting the system core development board and selecting appropriate environmental parameters (mainly temperature, humidity, Carbon dioxide concentration) Sensors, design and implementation of plant space cooling and air circulation systems, carbon dioxide supply systems designed and implemented for planting space and the selection of appropriate network access modules. The hardware platform framework of the built monitoring system is shown in Figure 3.
Figure 3 Hardware platform framework of the monitoring system
Considering the requirements of the system hardware interface, the Android operating system and the convenience of human-computer interaction, the TINY210 development kit is selected as the core control hardware of the system. The Tiny210 development kit consists of a development backplane, core board and a 7" LCD capacitive touch display. It is a high performance Cortext - A8 core board. Its onboard 512M DDR2 memory and 1G Flash storage, using S5PV210 as the main processor, running at up to 1GHz, can run advanced operating systems such as Android, Linux and WinCE6 smoothly.
Due to the small planting space of the plant, the sensor volume for monitoring temperature, humidity and carbon dioxide concentration should not be too large. For the comprehensive measurement range and measurement accuracy, the temperature sensor is DS18B20, the humidity sensor is HIH-4000-001, and the carbon dioxide concentration sensor is used. Use WSH - 300 - ND. In order to fully understand the distribution of environmental parameters in the planting space, four temperature sensors, two humidity sensors and one carbon dioxide concentration sensor are placed in each planting space. In order to realize the network connection of the system, considering the USB interface provided by the TINY210 development board and the universality of the WIFI connection in the home environment, the USB-WIFI module of the model EP-N8508 is selected as the network access module of the system.
Since the heat generated by the LED light source will gradually accumulate in the confined space, in order to control the temperature of the planting space and simultaneously circulate the air in the planting space, on the basis of the artificial light type LED dish cabinet, the cooling and the air are increased. The circulatory system is shown in Figure 3. It consists of a small cooling system consisting of a compressor, a condenser, a capillary tube and an evaporator. The air is circulated between the planting space, the air duct and the evaporator under the push-pull action of the left and right fans in the air duct to achieve the air temperature. Effective adjustment. In order to ensure that the air in the planting space is fully flowed and the temperature distribution is as uniform as possible, the position of the air inlet in the planting space is slightly higher than the position of the air outlet. At the same time, in order to achieve the sealing of the planting space, a layer of insulating material is added to the inner wall of the planting space.
In order to effectively supplement the carbon dioxide concentration in the planting space, the carbon dioxide supply system is increased. The carbon dioxide supply system consists of a carbon dioxide cylinder, a pressure reducing valve, a flow meter, a solenoid valve, and a gas supply line. The CO2 gas is pumped into the air supply duct of the air circulation system through a pressure reducing valve, a flow meter, and a solenoid valve, and finally the gas is sent to the closed planting space by the blower.
Figure 4 Schematic diagram of cooling and air circulation system
3 software design and implementation
Development plan design
The software development of the monitoring system adopts the mode of porting the Android operating system on the S5PV210 microprocessor and then developing the application on the Android operating system. The Android operating system is built on the Linux kernel, and its applications run in user space, and device drivers that operate directly on the hardware run in kernel space. For Android applications to operate on hardware, you must first develop the appropriate device driver in the Linux kernel, and then the application accesses the driver code indirectly through predefined system calls. Since the monitoring system involves the operation of various environmental parameter sensors and hardware actuators, the software development of the system is mainly divided into two parts: First, the driver of various environmental parameter sensors and hardware actuators is developed in the Linux kernel, and the configuration conforms to The application requires the Android operating system; then the application development based on the Android operating system.
Linux kernel driver module development
The hardware operations involved in this system include reading the temperature sensor (DS18B20), humidity sensor (HIH - 4000 - 001) and carbon dioxide concentration sensor (WSH - 300 - ND) monitoring values; adjusting the duty cycle of the PWM signal output to control the LED The brightness of the lamp; the relay is actuated to control the working state of the nutrient pump, the air duct fan, the air conditioner compressor and the solenoid valve of the carbon dioxide supply system; the network is connected by the USB-WIFI module (EP-N8508).
Among them, DS18B20 is a single-bus digital thermometer. Each layer of planting space only needs one GPIO port to connect a bus, and all the temperature sensors of this layer can be connected. The DS18B20 driver is very mature, just port it to the Linux kernel and adjust it to the specific data structure of the Linux device driver. The HIH-4000-001 is an output analog humidity sensor. Each humidity sensor is connected to one channel of the Tiny210 development board AD conversion module, and then the AD conversion module driver is based on the HIH-4000-001 humidity sensor AD. The conversion formula can be adjusted. WSH-300-ND is a carbon dioxide concentration sensor for TTL level serial output. The output data can be directly received by the UART interface of the Tiny210 development board. The serial port driver provided in the system library file can be directly called. The Tiny210 development board has 4 PWM outputs, and two of the PWM outputs are selected as the LED light control signals for the upper and lower planting spaces. The driver of the PWM output is mainly to write a sub-function that controls its duty cycle and frequency. The driving of the relay is only to directly output high and low level signals through the GPIO port to drive the corresponding driving circuit. Therefore, the corresponding driver is just the simplest GPIO port device driver. The Linux kernel that comes with the Tiny210 development board already contains a number of USB wireless network card drivers (the EP-N8508 driver module is also included), but the third-party wireless network card driver module is used in the actual file system, so the Linux kernel needs to be changed. The configuration file related to the Android source code can be called to drive the EP-N8508 driver module for network connection.
For the development of the above device driver, the dynamic loading method is first used for debugging. After all the driver modules are debugged, the kernel is uniformly compiled into the kernel by static loading. In order for the newly developed device driver module to be called by the application, an int in the Android root filesystem is required. The management of the newly developed device driver module permissions is added to the rc file, so that the application has read and write permissions to the corresponding module. Once this is done, the generated Linux kernel image file and the Android root file system image file can be burned to the development board along with the associated configuration file and booted by the bootloader. In this way, the Android operating system that meets the application development needs is constructed, and then Android application development is possible.
Android application development
Android application development is done in the Eclipse integrated development environment. Since the application needs to operate on the underlying hardware, when building the application compilation environment, you need to configure an additional compiler for the project properties, configure the JAVA NDK and Cygwin as the project's build environment, so that the project can work with C. The file is compiled and a library file that can be called by Java code is generated. After the Android project is built normally, create a new JNI folder in the project directory, and create a new C source file and an Android under the folder. Mk file. Among them, the C source program uses the Linux system call to call the corresponding function of the hardware driver module, and provides a local interface for the Java code; Android. The mk file specifies the name and type of the library file generated after the C source program is compiled. In the subsequent Android application Java development, when the hardware needs to be operated, just call the corresponding local method in the library file.
The Android application mainly has three modules: real-time monitoring, system settings and historical data. The program uses the SQLite database as a data storage tool. SQLite is an open source, lightweight embedded relational database with very small footprint, efficient and reliable operation, good portability, and zero-configuration mode, so it is more suitable for embedded systems than traditional databases. The framework of the application is shown in Figure 5.
Figure 5 application framework diagram
Real-time monitoring module
The real-time monitoring module periodically reads the monitoring values ​​of the temperature sensor, the humidity sensor and the carbon dioxide concentration sensor, stores the read data in the SQLite database and displays it in the monitoring interface in real time; meanwhile, compares the actual value read with the set reference threshold. , decide whether to open (or close) the corresponding actuator. Temperature control for each layer of planting space: When the average value of the temperature read from the four temperature sensors of the layer is greater than or equal to the set upper temperature limit, the system turns on the air conditioner compressor to allow the air in the planting space to flow through the evaporator When the temperature average is less than or equal to the set lower temperature limit, the system turns off the air conditioner compressor, or when the air conditioner compressor continuously works for more than 30 minutes, the system also turns off the air conditioner compressor. This is done on the one hand to protect the compressor, and on the other hand because the compressor works too long, the evaporator will freeze, and the actual cooling effect will decrease. For the carbon dioxide concentration control of each planting space, there is a certain delay between the carbon dioxide gas entering the ventilation pipe and the carbon dioxide concentration actually affecting the planting space. Therefore, when the carbon dioxide concentration monitoring value is lower than the set upper limit and lower limit. At half the sum of the values, the system begins to replenish carbon dioxide and continue to recharge for 2 s to maintain the actual CO2 concentration in the planting space between the upper and lower limits set.
The real-time monitoring module is mainly composed of a real-time monitoring interface and a background service. The monitoring interface is responsible for real-time display of the temperature, humidity, carbon dioxide concentration of the two-layer planting space, the setting range of the environmental parameters (temperature, carbon dioxide concentration, and LED brightness) corresponding to the current period, the working state of the nutrient solution circulating pump, and the working state of the refrigeration system; The background service is responsible for opening the device file corresponding to the driver module such as the sensor, loading the system setting parameters saved when the application was last closed from the database, and initializing the actuator state according to these system setting parameters and displaying it to the real-time monitoring interface. Finally, a real-time monitoring thread is opened to monitor the environmental parameters of the planting space at equal intervals. The real-time monitoring thread is the core of the real-time monitoring module, and its specific running process is shown in Figure 6.
Figure 6 real-time monitoring thread flow chart
System setup module
The system setting module is responsible for independently setting the temperature range of the two-layer planting space, the carbon dioxide concentration range and the brightness of the LED lamp. The environmental parameters can be subdivided into a plurality of different time intervals according to the actual time in the 24h interval. Range (or value). After the setting of each environment parameter is determined, the system will open a separate Timer (Timer) thread, which is responsible for updating the scope (or value) of the environment parameter at a specified time, and displaying the updated value in real-time monitoring. interface. For temperature and carbon dioxide concentration, the updated range is provided to the real-time monitoring thread as a reference for parameter control; for LED brightness, the updated value is passed directly to the PWM output through the drive module to adjust the brightness of the LED. For system debugging and maintenance considerations, the system setup module provides both automatic and manual modes of operation. The system defaults to the automatic mode of operation. In the automatic working mode, the program automatically controls the temperature, carbon dioxide concentration and brightness of the LED light in the planting space according to the set time period and range value. The cooling system or carbon dioxide input cannot be manually turned on; in the manual working mode, Manually adjust the brightness of the LEDs and turn on the cooling system and CO2 input, but not the temperature range and CO2 concentration range, because automatic control is not possible even if it is set. The system setting module can set the state of the nutrient liquid circulation pump and the state of the air duct fan. The time interval of the real-time monitoring module to monitor the environmental parameters can be set, and the default setting parameters of the system can be loaded from the database when needed, so that the system is restored to the original state. Set the status.
Historical data module
The historical data module can query the specific historical data stored in the SQLite database according to the selected date, the query object (temperature, humidity or carbon dioxide concentration) and the position information (upper or lower); use the AChartEngine tool library to draw the historical data in a line chart. The form is displayed in the historical data interface, or the obtained historical data is directly exported to the USB external storage device as a file.
AChartEngine is a library of drawing tools designed for Android application development. It can be used to draw various charts, such as line charts, dot charts and area charts.
Remote monitoring implementation
Network connection functions are embedded in the real-time monitoring module and system setting module of the application. When the real-time monitoring thread collects new environmental state parameters, or the system setting module resets the system parameters, the updated data is uploaded to the central application server by using the HttpClient interface method, and the server-side application saves the received data. Make a confirmation response in the database and to the http request. When the server-side application resets the plant factory's system parameters, it pushes the data to the plant's Android monitoring system via a real-time push service provided by a third-party (Aurora Push). The central application server is a dedicated monitoring server for the project team at the LED plant factory. The server-side application provides remote monitoring services using the Java Web architecture and provides a monitoring interface for the LED home plant factory, as long as it can connect to the network, on the PC side or on the mobile The client can view the real-time monitoring status of the LED home plant factory through the WEB browser; after obtaining specific permissions, it can also remotely adjust the setting parameters of the LED home plant factory. The implementation of remote monitoring is shown in Figure 7.
Figure 7 Implementation of remote monitoring
4 system operation
The cultivated lettuce seedlings are transplanted into the planting space, and the intelligent monitoring system simulates the natural environment to provide the crop with the air temperature, carbon dioxide concentration, light intensity and nutrient solution conditions required for different growth stages. After 25 days of cultivation, lettuce That is, the picking requirements are met. This shows that the intelligent monitoring system designed in this paper can provide the crops with the required growth environment under the full artificial environment of simulating sunlight with LED light source, and the planting period can be greatly shortened by reasonable setting of environmental parameters. A screenshot of some of the software interfaces during system operation is shown in Figure 8.
Figure 8 screenshot of part of the software interface when the system is running
5 Conclusion
A fully artificial light-type closed family plant factory using LED light source was designed, and an intelligent monitoring system based on Android platform was designed and implemented for the home plant factory. The monitoring system not only provides the crop with a growing environment that meets the requirements, but also shortens the cropping cycle of the crop by rationally setting environmental parameters. At the same time, through the network connection, the system combines local monitoring with remote monitoring to achieve remote mobile control of the home plant factory. The successful development of this monitoring system laid the foundation for the rapid entry of the LED family plant factory into the market.
About PEW Enameled Copper Wire. |
According to design of motor, transformer and high-speed winding machine, PEW product has the advantages of good paint film continuity, good flexibility and adhesion. high surface strength. breakdown voltage is increased by 60% compared with national standard. Suitable for manual and automatic winding machine .
Oxygen free copper covered polyester painting, Inner packing PT25/60/90/200 Plastic Spool.Outer packing: Carton box + Mooden box.
Insulated Copper Wire,Pew Enameled Copper Wire,Polyester Enameled Copper Wires,Enameled Copper Magnetic Wire
HENAN HUAYANG ELECTRICAL TECHNOLOGY GROUP CO.,LTD , https://www.huaonwire.com