Agricultural Environmental Information Collection Device Based on Raspberry Pi

. Integrated agricultural environmental information real-time collection, transmission and management is extremely critical for precision agriculture (PA). This paper describes the basic knowledge and primary principles used in an agricultural environmental information collection device. The device is based on Raspberry Pi, combining with GPS module, some digital sensors and analog sensors to measure environmental temperature and humidity, barometric pressure, light intensity, soil moisture and other environmental information accurate collection. All collected data was real-time transmitted to a remote server specified database for management. In the experiment process, the device has been proved to have the ability to catch the distributed information and also can get different centralized data management. The results show the integration of operational information collection, transmission and management, as well as the use of open source software to make it easy to collect multiple types of data parallelism, which provides an important solution for the rapid transformation of agricultural production.


Introduction
Efficient collection and scientific management of farmland environmental information farmland for information technology has great significance [1].Efficient collection of environmental information is beneficial to have timely access to agricultural information, to meet the diverse needs of farm data information, and more comprehensive and accurate grasp of environmental development.And scientific management is essential for post-processing of information.Through scientific management of information, and we can normalize all kinds of scattered and mixed messages, which is conducive to statistics and data classification.Comprehensive use of agricultural information technology will become an important means of twentyfirst century rational use of agricultural resources, improve crop yields, reduce production costs and improve competitiveness in international markets of agricultural products.However, our positioning on the use of GPS technology to collect field information technology than in other countries started late, most information acquisition devices' detection and management technology are decentralized, while the collection of data immutable, which restricts the acquisition of real-time equipment, effectiveness and flexibility.Meanwhile, most parts of China are still using manual collection of agricultural information.This method has many limitations that cannot meet the sophisticated needs and the development of agriculture, such as the poor timeliness, information collection and intelligent digital low, poor visualization, and low level of shared management of the effects of data.
For agriculture, farm environmental information collected intelligence requires integrated information collection, transmission and management in order to achieve real-time and efficient gathering information and science, improve the management of data [2].There have been some international research institutions and researchers with experience of successful experiments.Ricardo Godoi Vieira et al., on the Amazon River Basin for environmental information, the development of a monitoring node, and completed by WSN transmission of environmental information [3].J. Yang et al. studied the measurement and transmission test for soil moisture [4].Xin, Z., et al. studied on monitoring network for crop growing environment [5].Throughout the study of these scholars we find that their research focused on a microcontroller as the core function of simple farmland information collection device, such as GPS positioning technology combined with measurement of soil moisture, soil nutrients, planting density and other parameters.They finished just one-sided information collection work, such as a single with a measurement and use manual records or indirect transfer remote storage after collection.Most of the study only focused on access to information unilaterally, and the integration of information collection, transmission and management did not materialize.This type of data acquisition equipment is characterized by the development of a low cost, single function and the need for complex post-processing data.
Currently, with the development of open source hardware equipment and electronic technology, Raspberry Pi increasingly showing its superiority.The Raspberry Pi's appearance and behavior provides a new stage for the research platform of environment monitoring and management.Raspberry Pi with its simple operation, high processing speed and a variety of interface get a lot of attention to research staff.Slawomir introduced the Raspberry Pi as a measure to control the use of cell [6], Sheikh studied the environmental monitoring system based on the Raspberry Pi and Arduino [7], Vladimir and other researchers used the Raspberry Pi to achieve a smart home network node design [8].However, on the use of agricultural information collection Raspberry Pi research are rare.
This paper proposes a farm environment information collection device, and designs an agricultural information collection device based on Raspberry Pi.Raspberry Pi equipped with a variety of sensors for many types of parallel acquisition and transmission of information, data acquired by the built-in memory card Raspberry Pi for online storage or sent via GPRS module.In practice, offline maps can be saved in the Raspberry Pi, so users can watch the current environmental information in real time, improving flexibility.The multi-class data collection procedures was controlled by python that open source software.The device can store information or online transmission, according to the needs of users, for database management information, namely, the achievement of the integrated operation of information collection, transmission and management.These features improve the timeliness, reliability, convenience and flexibility of the device, so that it can solve most of the current information collection problems encountered in the process of agricultural production.

Experiments and Methods
For the agricultural information collection device, which through digital sensors for measuring air temperature and humidity, barometric pressure, soil moisture and light intensity and other environmental information accurate collection.The information collected after treatment Raspberry Pi, the user can select the data storage as needed or sent online.Data is stored in the processor's built-in selectable storage memory or external memory card, online delivery is to the C / S model will be sent to the remote server that stores data via GPRS module.Meanwhile, the device can achieve humancomputer interaction, user-friendly command displays the input and farmland environmental information.The entire device use Raspberry Pi achieve environmental information farmland acquisition, processing, storage and delivery of integrated operations, as well as store location map.The main hardware components of the device are Raspberry Pi, information collection module, a wireless network communication module and the auxiliary module.Wherein the auxiliary module is touch input and display modules, scalable data storage module and power supply module.The device collects air temperature and humidity information through the AM2301 digital temperature and humidity sensor.Its transmission distance is up to 20 meters or more.The device collects pneumatic pressure through the GY-65 digital pressure sensor, and is connected via I2C interface to communicate with the Raspberry Pi.GY-65 sensor is a high-precision, low-power digital pressure sensor.It built-in chip is BMP085, and its measurement range of 300 ~ 1100hPa.It does not require an external clock circuit, and it built-in temperature compensation, it is possible to reduce the influence of environmental factors.In this study, we collected light intensity by GY-30 sensor, which is connected via I2C interface to communicate with the Raspberry Pi.GY-30 light intensity detection sensor uses BH1750FVI chip, and the illumination range is 0 ~ 65535 Lx.The sensor does not distinguish between ambient light, which has close to the visual sensitivity of the spectral characteristic.Soil moisture information collected using YL-69 sensors that standard single-bus interface.Soil moisture data detection module uses a D/A dual output mode.Its sensitivity is adjustable, and its comparators work stable LM393 chip.Agricultural Environmental Information collected for processing information in a central Raspberry Pi of the device, and the information in real time by GPRS module is sent to the user.

Fig. 1. Hardware framework
Auxiliary module of the agricultural information collection device mainly includes a touch input display module, scalable data storage module and power module.Touch input display module as a 7-inch LCD touch screen, and to support their daily work by 5V supply.Help users operate and collect information collection terminal display.Scalable data storage module for Raspberry Pi can add removable storage devices, and users can capture information stored in the internal memory or a Raspberry Pi terminals need to select the external memory.5V voltage power supply module provides rechargeable battery or mobile power, providing power to support the normal operation of the device.The farmland hardware environment information collection device overall block diagram shown in Fig. 1.

Wireless Network Communication.
For the wireless network communication module, GPRS module can be used.GPRS is the abbreviation of General Packet Radio Service .It is a global mobile phone system (GSM) based data transmission technology.GPRS support and directly connected to the IP network, it is possible to provide SMS, MMS and other services.GPRS network short access time, transmission efficiency is higher than the GSM, theoretical bandwidth can reach 171.2 Kbit/s.GPRS network supports standard data communication protocol applications that can interconnect with IP networks , X.25 networks , point to point and point to multipoint service support.Users can freely move their distribution and network points, for IP communication desired location.This device is mainly applied to Internet-enabled GPRS module.In this device, we use SIM900A module to achieve the requirements of the Internet by APN.

Application System Developing
The central processor of the present study is the type B Raspberry Pi, built a Linux system to support python, Java, C and other programming languages.This study is based on Python programming.Python is an interactive, object-oriented, dynamic semantics and syntax beautiful scripting language.Python is an efficient development tool that supports multiple operating systems, with a free open-source, high-level language, portability, object-oriented, embeddable scalability characteristics.In this study, the device uses the python programming language, to achieve a sensor of farmland environmental information collection, collection terminals to communicate with a remote server socket based C / S mode, the operation of the database.
Information Collection Sensor System.In recent years, Dallas Semiconductor has introduced a unique single-bus technology.Single bus widely used for single-host system, which can control one or more slave devices, data exchange between them only through a signal line.For sensor collection of farmland environmental information, AM2301 temperature and humidity sensors and YL-69 soil moisture sensor to air temperature, humidity and barometric pressure information via a single bus and Raspberry Pi communication with the control easy, expansion of convenience advantages.GY-65 GY-30 pressure sensors and light intensity sensor used to collect air pressure and light intensity information.For parameters characteristic of the collection, the device uses an I2C interface to communicate with the Raspberry Pi.This bus developed by the PHILIPS two-wire serial bus is widely used in the microelectronics field communication control a bus standard.It is used to connect the microcontroller and its peripherals for the 2-wire synchronous serial communication with the interface cable less, simple control mode, a smaller device package, higher communication speed and so on.For Ubox NEO-6M GPS module, it is sent via UART communication interfaces and raspberries.A serial interface allows data to order a transfer, which is characterized by simple communication lines, and as long as the pair of transmission lines can be two-way communication, thereby reducing the cost of the equipment.Information collected scheme is shown in Fig. 2. In the application the client / server model, the client generally based embedded computer processor core units; the server is generally user-created data center.In this mode, the data center server as a user, you need to have a fixed IP address or domain name address using the fixed conversion dynamic DNS, so the client can easily obtain the IP address of the server in order to establish a TCP connection.The system to collect terminal for the client to the remote server to server-side, to achieve collection terminals communicate with a remote server using python programming socket.The type B Raspberry Pi and sim900A wiring shown in Fig. 3.

Results and Discussion
Experimental testing of the system is carried out in a wheat field, located in the neighborhood of college of Mechanical and Electronic Engineering, Northwest A & F University, Yangling District of Shaanxi Province (34°17'33.22''N,108°04'11.8''E).Before the experiment make Yangling district maps stored into the Raspberry Pi.Using collection terminal operator in the field of environmental information collected and sent via GPRS module.The operator chose a more open testing ground for the trial subjects, and placed the sensor in the fields.After starting the collection terminal, initialize the system, manual collection touch button, select the collection of information stored or transmitted.Remote server data store as shown in Fig. 5.

Fig. 4. Data storage on remote server
Results show that agricultural environmental information collection device in this paper can effectively collect real-time environmental information farmland and the ability to select the storage or sent to the database server's designated according to user needs.The device has collected information accuracy and short cycle advantages.Each of which will perform data collection, transfer and management, to achieve the integration of agricultural information collection operation.

Conclusions
This paper designed a farm environment information collection device.The Raspberry Pi system as the core, combined with multi-sensor and GPS module for real-time acquisition of farmland environmental information.It does this by using GPRS module socket communication mechanisms to achieve the wireless transmission and storage of information.It gives Python operation of each sensor, GPRS module and PostgreSQL database program implementation.The device realizes the accuracy of the information collection, scientific management and dynamic distribution requirements.The device uses the connection Raspberry Pi and information collection, transmission and transmit modules to achieve the integration of information collection, transmission and management.It meets the accuracy of the information collection, scientific management, dynamic distribution requirements, and have real-time high, convenient and reliable, low power consumption advantages.

Farmland
Environmental Information Collection.What the collection point of object farm setting information collection module collected mainly include latitude and longitude, altitude, barometric pressure, air temperature and humidity, soil moisture, light intensity collection points and other factors.The latitude and longitude, altitude information collection point by Ubox NEO-6M GPS module connected via UART interface; The GPS location information module serial NMEA-0183 output format uses standard communication format.The output data is in ASCII code, contains the latitude, longitude, altitude, speed, date and other information.

Fig. 3 .
Fig. 3.The type B Raspberry Pi connection with sim900A 60°C, testing method: load the sample into the three-quarters of sample bottle, and then place the sample bottle into the sample cell.Stabilized in constant temperature for 5min, the bottle is taken out to check if there exist bubbles.It starts to collect spectrogram if there is no bubble, and each sample averages out three times.Use NIRS random RIMP software and MATLAB7.8 to collect spectra and convert data format, use chemo metrics software Unscrambler X 10.1 to pretreatment the spectral data and analyze principal component, and use SVM pattern recognition and regression software package designed by a prof.Lin from National Taiwan University to build SVM models in MATLAB7.8 and parameters optimization.
[10]ware Design Raspberry Pi. "Raspberry Pi Foundation" developed the Raspberry Pi and which is a registered charity in the United Kingdom.Raspberry Pi is a card-type computer, and its size is only 85.6 x 53.98 x 17mm[9].As of April 2015, Raspberry Pi Foundation has released a total of four Raspberry Pi, respectively, Raspberry Pi Model A, Model B, Model B + and 2 Model B. The type B Raspberry Pi is the choice of this study, the core module of this system is produced Broadcom's BCM2835, and its memory is 512MB.SD card can be used as the storage medium.It integrated GPIO, I2C, UART and SPI interfaces, and it can connect a variety of sensors to collect environmental information farmland[10].The type B Raspberry Pi can run on many Adopt SupNIR-5700 NIRS (Focused Photonics (Hangzhou), Inc.) to collect NIR spectra of all samples.Spectral measurement of samples uses random RIMP software and its testing method is: transmission, measurement range: 1000~1800nm, scanning speed:10 times/sec, spectral resolution: 6nm, temperature of sample cell: