Design of Hand-held Terminal for Orchard Management Based on RFID

. A hand-held terminal for orchard information collection is designed, which can identify and realize individual plant precision management based on RFID technology. The equipment adopt RS-485 serial bus and MODBUS communication protocol as the general interface for different sensors, to achieve data acquisition requirements including the fruit tree image, air temperature and humidity, soil moisture etc. Meanwhile, build the cloud database that use SIM900A wireless communication module for real-time upload of data, and it can generate nephogram and data analysis report through GPS positioning. Field test results showed that the terminal has high detection accuracy with worked stably and simple operation. Finally, it realized the sharing of sensor information and automatic data acquisition in orchard, with great application and promotion value.


Introduction
During the whole growth cycle of fruit trees, temperature and humidity of air and soil, light intensity, rainfall, PH value and CO 2 concentration are very important environmental parameters which can provide necessary basis for orchard management and affect the occurrence of fruit tree diseases and insect pests. At present, the data collection of most orchards still needs to be completed by manual, and plant protection mainly rely on human experience. This method consumes a lot of labor and time costs, and is not conducive to the improvement of orchard management level and fruit quality [1] . Therefore, it is of great significance to implement information management for orchard. This study designs a multiple sensor hand-held terminal and orchard data cloud platform.
In recent years, researches have been carried out in western developed countries where embedded system have been used in agriculture, such as Geo-Referenced Soil Sampling system developed by the American Agise laboratory and GPS global positioning system based on PDA that can obtain soil data developed by the precision agriculture research center of Ohio state university. Many farms used this system to upload data to the data information management center, so as to realize soil monitoring in specific areas [2][3] . In addition, electronic identification technology was forced to apply to animals, such as horse, sheep and beef tag in Europe. Japan has developed an action plan led by the government, which reads RFID tags when agricultural products were in circulation, and the information of production was transmitted to the central server through the network [4] .
Domestic research also begins to focus on accurate management of agriculture. Most of them have carried out remote monitoring to overall environment, and a few for management research based on individual fruit trees. For example, Gao Jun designed an orchard personalized fine management system [5] , Liu Xiaomin implemented a traceability system of agricultural products based on 2dimensional code and RFID individual technology [6] , Pu Jiaoyue concentrated in the conventional data detection by the traceable orchard production process management system based on RFID [7] . In addition, the logistics and distribution system of fresh vegetables based on RFID developed by Shanghai Tongji University and Shanghai Agricultural Information co., ltd [8] .
Although precision management research has been carried out based on individual, the main disadvantages of most researchers in China are the lack of sensor types, especially image acquisition and cloud database, which limits the application range of hand-held test equipment.

Design Principle and Proposed Model
Based on the requirements of orchard management, this terminal adopts embedded system scheme, uses advanced technology of RFID and wireless transmission to build a suitable for individual management system of fruit trees. Finally, it realizes intelligent and precision management of the orchard through the cooperation of software and hardware.The overall design is shown in Fig 1. The equipment should mainly have the following functions: (1) Compatible with various sensors, achieve acquisition, transmission, reception and recording of growth data for each fruit tree in different stages.
(2) Upload data information to the cloud database, realize filtering, grouping, association, aggregation and other operations.
(3) Generate work logs and intelligent analysis forms from the database.
(4) Provide early warning of abnormal situations from data collected.
(5) Manual operation is convenient and simple, realize the remote control for orchard managers.

Main Hardware Circuit Design
The whole hardware system is composed of two parts: one is process control and user interaction; the other is sensor acquisition, processing and upload. The appearance and internal hardware are shown in Fig 2. The basic hardware design should include power management, main control, RFID tag reader, GSM and wireless transmission module, etc. Considering LCD operation and user interaction need to occupy a large amount of MCU resources, this design adopts the dual MCU structure. Two types of MCU with ARM-Cortex M4 are selected, which are STM32F429IGT6 and MK60DN512VLL10 as interactive processing and sensor measurement respectively. STM32F429IGT6 has a high-speed RGB LCD driver with main frequency of 192MHZ, while MK60DN512VLL10 has an extremely wide operating temperature with a minimum operating temperature of -40℃, which can be used safely in most agricultural environments in China. This terminal use a 7-inch touch screen with 1024*600 resolution as the main way of humancomputer interaction; For the connection between the device and the Internet, this design adopts W5500 with hardware TCP/IP protocol stack as the wired network driver IC. GSM module SIM900A is adopted as 4G network access IC. In order to facilitate the connection with the existing Internet of things, the design also adds 2.4G wireless support, using nRF24L01+ as 2.4G communication IC, and adding RF2401C as 2.4G PA amplification chip. RC522 is used for reading and writing RFID tags.
In the design of radio frequency system, in order to ensure the minimum energy transmission loss, the internal resistance of the upper circuit should be equal to the input resistance of the lower circuit, and the maximum transmission power will be obtained when the matching is achieved. In addition, the main board design, SIM900A, nRF24L01 and antenna all use of the characteristic impedance of 50Ω. Therefore, the characteristics of the micro-strip line impedance should be designed to 50Ω. The characteristic impedance is calculated as follows: In Formula (1), W is the line width, T is the copper thickness of the wire, h is the thickness of the medium between the printed wire and the base plane. r The dielectric constant of PCB provided by manufacturers is 4.2mm, W is 1.5mm, T is 0.035mm, and h is 0.79375mm. The micro-strip line parameters are obtained by formula(1), which meet RF IC and antenna requirements for 50Ω.

Software Design
The management software is to complete sensor configuration and data transmission, which used C# programming language and VS2017 development environment, including the main interface, collection panel and data page. The software operation flow chart is shown in Fig 3.

(1) Main Interface
The navigation bar contains USB status, the number of satellites connected GPS, GSM signal strength (0-31) and CPU utilization. Manager can click refresh button to obtain sensor list displayed in the interface. In addition, enabling multi-buffered thread, detecting USB state, saving sensor data to local and other functions are included.
(2) Collection Panel When the RFID tag is recognized, the device reads the data of the sensor in accordance with the collection order. After the current fruit tree data collection is completed, the next tag will be identified. The collected data are stored in the list record.
(3) Data Page It can display sensor data in real time, and draw polyline graph to understand the state of the environment. Cloud data page can show historical data can be obtained before by identifying RFID tags corresponding to individual fruit tree.

Server and Database Design
The server mainly includes two parts: hand-held terminal and server, server and user. The standard C/S (Client/Server) structure and HTTP protocol are used for communication between hand-held terminal and server. When the device obtains sensor data, it transmits and saves the data to the server through the network. The specific process is shown in  The communication between Server and user adopted the B/S (Browser/Server) structure, which can use the browser for data viewing, export and analysis. The server side is written in PHP, and the communication data is in JSON data format. MySQL is adopted in the database. The whole database contains 5 tables, which are respectively used to store sensor, sensor data, sensor acquisition order, all available accounts and RFID tags. Data structures are assigned as shown in Table 1 and  Table 2. Management software mainly integrates sensor sequence setting, data analysis and export functions, and can realize contour map generation and map coordinate display functions. In the main interface, you can view the location information of all tags, as well as the collected values of sensors, and support export in JSON and XLS format. Select sensor from the top menu bar will generate a selected sensor contour map for later data analysis. The geographical location of labels can be viewed through the map window on the right. Click the mark point to view the sensor data collected last time.

Test
This terminal has conducted field test in ShengChuan orchard (Shandong province fruit standardized planting base), as shown in Fig 5. Manager controls the distance between RFID reader and electronic tags on the branches of apple trees between 0-10cm, opens the device launch port and test the network connection, then sets sensor parameters and collects data according to the sequence of image collection, air temperature, air humidity and CO 2 concentration as shown in  The test results showed that the equipment can send and receive data normally through GPRS module and PC server in the fruit tree planting demonstration park. In the case of partial covered by branches and leaves of fruit trees, RFID reader can still stably recognize electronic tags within a range of 10cm. After the collection of air temperature, the data cloud diagram is generated as shown in Fig 7. The temperature value of each measuring point and the temperature distribution of the whole area are intuitively displayed, which is consistent with the measurement results of the field thermometer.

Conclusion
(1) This paper proposes a design scheme suitable for the system combined with the actual production. Based on RFID technology, the embedded hardware circuit of multi-sensor acquisition are developed and debugged independently. The reliability and stability of the hardware system are relatively high.
(2) The system uses GPRS mode to complete the data communication between the hand-held terminal and the server. Managers identify and record the agricultural data of each fruit tree, finally complete the data uploading, issuing, covering and updating, so as to complete the information management.
(3)According to the functional requirement analysis of data, the sensors record the growth information of fruit trees (including temperature and humidity, plant diseases and insect pests, growth characteristics, etc.), and the system can form the farm data cloud, provide managers with great digital support.
Field test results showed that the system took 2-3 minutes to detect each tree on average, can complete the collection and management of orchard information. The identification accuracy of a single fruit tree is 100%, simultaneously, the measurement error is about 15% after reference data comparison. The successful research and development of this equipment is of great significance to achieve accurate orchard management and promote the reform of orchard management mode.