# Integration and Development of On-Site Grain Yield Monitoring System Based on IPC

Xiang Guo, Lihua Zheng, Xiaofei An, Jia Wu, Minzan Li

► To cite this version:

Xiang Guo, Lihua Zheng, Xiaofei An, Jia Wu, Minzan Li. Integration and Development of On-Site Grain Yield Monitoring System Based on IPC. 6th Computer and Computing Technologies in Agriculture (CCTA), Oct 2012, Zhangjiajie, China. pp.408-417, 10.1007/978-3-642-36124-1_49. hal-01348125

HAL Id: hal-01348125

https://inria.hal.science/hal-01348125

Submitted on 22 Jul 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Integration and Development of On-site Grain Yield
Monitoring System Based on IPC

Xiang Guo, Lihua Zheng*, Xiaofei An, Jia Wu, Minzan Li

Key Laboratory of Modern Precision Agriculture System Integration Research, Ministry of
Education, China Agriculture University, Beijing 100083,China.

*Email: zhenglh@cau.edu.cn

**Abstract.** Variable Rate Technology (VRT) is the goal of precision agriculture. In order to realize VRT, it is necessary to measure yield accurately and build yield map in real time. A grain yield monitoring system based on IPC (Industrial Personal Computer) was integrated and developed to fit for China actual conditions and combines. The system consisted of a hardware part and a software part. The hardware part included IPC, CAN-bus module, GPS receiver, GPRS transmission module, and yield monitoring sensors. The CAN-bus module, GPS receiver and GPRS transmission module were integrated with IPC. The yield monitoring sensors included a dual-plate differential flow transducer, a grain temperature sensor, a grain humidity sensor, a ground speed transducer, a grain elevator speed sensor and a header height sensor, which were connected to the CAN-bus module. The software part included five main modules, device settings module, data receiving module, data delivering module, data processing module, and data analyzing module. Firstly, the system used CAN-bus technology to construct a sensors network so that the signals of the grain flow, grain temperature and humidity, ground speed, elevator speed and the header height could be sent to the CAN-bus via CAN converting module. Then, the IPC collected data packets on the CAN-bus and recorded and displayed the yield data after analyzing and calculating through yield models. At the same time, IPC collected geographic information from GPS receiver and stored it with the yield data from CAN-bus on this location together as one record. Finally, the system uploaded the collected data to the host server in real-time or packaged it via GPRS. The experiments showed satisfactory results.

**Keywords:** IPC, grain yield monitoring system, CAN-bus, GPS, GPRS
# 1 Introduction

With the rapid growth of world population, the demand for food increases day by day. Precision agriculture technology has been showing powerful superiority[1]. It is necessary to develop the precision agriculture mechanized equipment supporting for the implementation of precision agriculture. The harvester with the grain yield monitoring system can collect geographic information via GPS receiver, provides real-time production data intuitively and accurately by using yield map. It provides the necessary information supporting for decision-making of irrigation, fertilization, planting and pesticides spraying according to spatio-temporal variety, hence farming inputs will be much saved, the environment pollution will be reduced, the costs will be reduced and the land yields will be increased[2,3].

Precision agriculture has already made a considerable development since the late 1980s. In recent years, thousands of professional academic researches on Precision Agriculture have been carried out. Leading by the United States, Britain, Canada, Australia, Japan and other developed countries, the developing countries such as Brazil, Malaysia, and China have launched many research projects on precision agriculture technology, such as development of PA equipment and demonstration projects. On the other hand, up to now no commercial grain yield monitoring system was used to monitor grain on-site harvest in China [4].

The combine with GPS positioning system and yield sensors has been produced by a couple of large international agricultural machinery manufacturing enterprises, and the information processing system has also been developed[5]. These systems were generally compatible with the GPS receiver and memory card to enable real-time yield monitor and generate yield map automatically[6]. However, importing overseas system is higher cost, and meanwhile the yield monitoring software is just appropriate to the corresponding foreign harvesters so that it is difficult to match with the Chinese domestic harvester models. And it is so difficult for ordinary Chinese users to operate the yield monitoring system because the overseas system interface is all operating in English. There is an urgent need to develop a lower-cost, on-site monitoring system fitting for the conditions of domestic combine and needs of local farmers in China.
## 2 Integration and development of the grain yield monitoring system

### 2.1 Hardware structure

The hardware based on IPC integrated three modules, CAN-bus module, GPS module and GPRS module. The CAN-bus module connected with all sensors needed by the yield monitoring system, GPS module received position information in real time, and GPRS module communicated with the host server[7,8]. The system structure is shown in Fig.1.

<figure><img src="image_2.png" /><figcaption>Fig.1 System Structure</figcaption></figure>

### 1.2 Hardware integration and development

The grain yield monitoring system was composed of the IPC, USB-CAN interface card, analog signal-CAN converter module, digital signal-CAN converter module, conditioning circuit, power conversion module, GPS receiver, GPRS module and yield monitoring sensors[9]. The hardware integration scheme is shown in Fig.2.

Fig.3 shows the modules need to be integrated together, including IPC mainboard, GPS receiver, GPRS module and CAN-bus module. Fig.4 shows the yield monitoring sensor group including the dual-plate differential flow transducer, the grain temperature sensor, grain humidity sensor, ground speed transducer, grain elevator speed sensor and header height sensor[10]. The system integration schematic is shown in Fig.5.
<figure><img src="image_3.png" /><figcaption>Fig.2 Hardware integration scheme</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Fig.3 The grain yield monitoring system integration modules</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Fig.4 Yield monitoring sensor group</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig.5 System integration schematic[11]</figcaption></figure>

<caption>Fig.6 On-site winter wheat harvesting[12]</caption>

Firstly, via CAN-bus the system got the signal from the header height sensor to determine whether the system started to work. Secondly, yield relevant parameters were collected through CAN-bus including the grain flow coming from the dual-plate differential flow transducer, the grain temperature and humidity from temperature and
humidity sensor, harvester speed from the ground speed transducer and rotate speed of elevator from the elevator speed sensor. And then the grain yield was calculated using the data collected from those sensors. Finally, on-site grain yield map was drawn using the yield and the real-time geographic location data getting from GPS receiver. Fig.6 shows on-site winter wheat harvesting in Huantai County, Shandong Province in North China on 13th of June, 2012.

# 3 Software development and implementation

The software system was designed running on the IPC. It was embedded stand-alone structure. The data outflowing from the CAN-bus and GPS flowed into the on-site grain yield monitoring application to be processed, analyzed, stored and uploaded to the yield server through GPRS module. Yield data were designed to be sent to the server every 30s by default or at anytime by clicking the corresponding function button. They were packaged as a file to be sent after harvesting finished. The data flow diagram of the system is shown in Fig.7.

<figure><img src="image_7.png" /><figcaption>Fig.7 Data flow diagram of system software</figcaption></figure>

## 3.1 System design

The system included five main functions: device settings, data receiving, data processing, data delivering and data analyzing. The usecase diagram of the system is shown in Fig.8.
<figure><img src="image_8.png" /><figcaption>Fig.8 Use case diagram of the system</figcaption></figure>

Device settings function set three devices (CAN-bus module, GPS receiver, GPRS module) up; Data receiving function collected and analyzed data from two devices (CAN-bus module, GPS receiver); Data processing function calculated and saved yield data and drew yield GIS map; Data delivering function sent yield data to the yield server; Data analyzing function translated binary yield data to text data. Accordingly five modules were designed to fulfill four functions, as shown in Fig.9.

<figure><img src="image_9.png" /><figcaption>Fig.9 Software system modules</figcaption></figure>

## 3.2 CAN-bus data designing and analyzing

CAN-bus is a kind of bus with multi-master mode serial data communication. The short frame structure of CAN-bus does not occupy the bus for too long and the interference keeps lower. Thus it ensures real-time communication and fits for field work[13]. CAN-bus is easy to construct an underlying control network of open, digital, multi-point communications. Compared with traditional distributed control system, it has more advantages of all digital, distributed control, two-way transmission,
openness, etc.[14]. The data frame issued by CAN converter module is shown in the Tab.1.

<table><caption>Tab.1 Data frame resolving</caption><thead><tr><td>CAN Data</td><td>Analytical Content</td></tr></thead><tbody><tr><td>0010</td><td>Command Frame, “00” is a flag, “10” means 16B.</td></tr><tr><td>408096BF96B914A6</td><td>Response Frame, “40” is a flag, “8096” is data from channel 0. “BF96” is data from channel 1. “B914” is data from channel 2. “A6” is upper byte of channel 3.</td></tr><tr><td>819680A787A28000</td><td>Response Frame, “81” is a flag, “96” is lower byte of channel 3. “80A7” is data from channel 4. “87A2” is data from channel 5. “8000” is data from channel 6.</td></tr><tr><td>C1800D</td><td>Response Frame, “C1” is a flag, “800D” is data from channel 7.</td></tr></tbody></table>

Assuming that the actual voltage was $V_m$, the measured voltage was $A_{data}$ and $K_r$ was the coefficient in corresponding measurement range. The baseline value was set as 0x8000 according to the CAN module provider's specification[15]. When $A_{data}>0x8000$, the actual voltage was positive and calculated using formula (1). When $A_{data}<0x8000$, the actual voltage was negative and calculated using formula (2). The coefficient of $K_r$ was defined as shown in Tab.2.

$$V_m = \frac{(A_{data} - 0x8000)}{0x8000} \times K_r \quad (1)$$

$$V_m = (-1) \times \frac{(0x8000 - A_{data})}{0x8000} \times K_r \quad (2)$$

<table><caption>Tab.2 Coefficient of $K_r$</caption><thead><tr><td>Measuring Range</td><td>Coefficient of K<sub>r</sub></td><td>Measuring Range</td><td>Coefficient of K<sub>r</sub></td></tr></thead><tbody><tr><td>±150mV</td><td>0.15625</td><td>±2.5V</td><td>2.5</td></tr><tr><td>±500mV</td><td>0.625</td><td>±5.0V</td><td>5</td></tr><tr><td>±1.0V</td><td>1.25</td><td>±10.0V</td><td>10</td></tr></tbody></table>

### 3.3 System development and implementation

The main flow chart of the system is shown in Fig.10. The main interface is shown in Fig.11.
<figure><img src="image_10.png" /><figcaption>Fig.10 Main flow chart of the system</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig.11 The main interface</figcaption></figure>

### 3.3.1 Device settings module

The Device settings module was composed of CAN-bus device setting, GPS device setting and GPRS device setting. The interface of the device settings module is shown in Fig.12.

<figure><img src="image_12.png" /><figcaption>Fig.12 Interface of device settings</figcaption></figure>

#### (1) CAN-bus device Setting

Configuring the parameters of CAN-bus device made CAN-bus device ready to receive the data from each sensor. It was implemented by calling the corresponding API functions provided by the hardware device. The flow chart of CAN-bus configuration is shown in Fig.13(a).

#### (2) GPS device setting

A class (CserialPort) was developed to operate GPS device. The GPS device configuring made the GPS receiver ready to receive the GPS data. The flow chart is shown in Fig.13(b).
### (3) GPRS device setting

Configuring the GPRS device made the IPC connect with the server. DTUSet.dll, DTUSet.lib and dtucfgheader.h header files were added into the project and the API functions provided by them were used to make a serial port as the DTU configuration serial port in the IPC, and then the center of the domain name, server IP, server port, transmission Baud rate were set to configure the GPRS device. The flow chart of GPRS device configuration is shown in Fig.13(c).

<figure><img src="image_13.png" /><figcaption>(a) CAN-bus configuration (b) GPS device configuration (c) GPRS device configuration

Fig.13 Flow charts of device settings module</figcaption></figure>

### 3.3.2 Data receiving module

Firstly, the system used CAN-bus technology to compose a sensors network and the signals were sent to the CAN-bus via CAN converting module. Then the IPC collected data packets from the bus. The on-site yield monitoring system received data at the same frequency as CAN-bus's sampling. The flow chart of data receiving module is shown in Fig.14, and the interface is shown in Fig.15.

### 3.3.3 Data analyzing module

The received data were stored in .dat files in binary. The system translated the .dat file into a readable file and saved in .txt format so that it was convenient for farmers
to read the data. The flow chart of data analyzing module is shown in Fig.16.

### 3.3.4 Data delivering module

By default, a set of yield data was sent to the host computer per 30s via GPRS. It also could be sent by clicking button at any time, or sent in data package. The result on server side is shown in Fig.17.

### 3.3.5 Yield GIS map drawing

In the data receiving interface (Fig.15), the on-site yield GIS map was drawn in real time. In the map, GPS coordinates were transformed into the system interface coordinates and the depth of red color was used to represent the measured yield. The Flow chart of yield GIS map drawing is shown in Fig.18.

<figure><img src="image_14.png" /><figcaption>Fig.14 Flow chart of data receiving module
module</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>Fig.16 Data analyzing module</figcaption></figure>

<caption>Fig.17 Server side test result</caption>
<figure><img src="image_16.png" /><figcaption>Fig.18 Yield GIS map drawing</figcaption></figure>

## 4 Conclusions

According to the conditions and actual needs of the domestic harvesting machinery in China, an on-site grain yield monitoring system was developed based on the vehicle IPC. It could collect yield data from CAN-bus sensor network in real-time, acquire GPS data from GPS receiver and delivery the yielding data to the server via GPRS. The winter wheat yield model was embedded in the system. Moreover, it could provide on-site yield GIS map plotting on the IPC. The on-site grain yield monitoring system was running in the winter wheat field in north China. And the result showed that the system could meet on-site yield monitoring and yield visualization needs.

## ACKNOWLEDGEMENTS

This research was supported by National High-tech R&D Program of China (Contact Number: 2012AA101901), National Science and Technology Support Program (2012BAH29B04, 2011BAD21B01).

## References:

[1] Li Bao-Qian, Tian Hui, Fan Li-Hong and so on: Research advancement of precision agriculture. Journal of HeNan Agricultural University, 2004, Vol.4
NO.38,pp.1

[2] Wang Feng-Hua, Zhang Shu-Zhen. Research Progress of the Farming Informatiion Collections Key Technologies on Precision Agriculture. Transactions of the Chinese Society for Agricultural Machinery. 2008, Vol.39 NO.5,pp.1

[3] Ma Li-Jin. Research on an Intelligent Mointor System of Grain Combine Harvester. Beijing:China Agricultural University, 2006

[4] Zhao Wu-Yun, Yang Shu-Ming, Yang Qing, Yang Shu-Chuan. The Development and Thinking of the Precision Agriculture Technology. Journal of Agricultural Mechanization Research. 2007 NO.4,pp.3

[5] Jie Zhan, Liu Hong-Jun, Hou Feng-Yun. Research advances and prospects of combine on precision agriculture in China. Transactions of the CSAE. 2005, Vol.21 NO.2,pp.1--3

[6] Chen Shu-Ren. Research and Development of the Grain Combin Harvester yield Monitor System. The 14th National Combine Harvester Technology Development and Market Dynamics Seminar. 2007,pp.3,4

[7] Wang Qi. Research on an Intelligent Monitor for Yield Mapping System of Grain Combine Harvester.Beijing:China Agricultural University, 2005

[8] Zhang Zhi-Yuan, Yu Li-Ping, Li Li-Gang. GPRS Communication Technology. Digital Technology and Application. 2011 NO.6,pp.1

[9] Wang Mao-Hua. Precision Agriculture. China Agricultural University Press. 2011,pp.132--134

[10] Wu Guan. Development of Grain Yield Monitor System with CAN-bus. Beijing:China Agricultural University, 2011

[11] Wang Bo. Development of Advanced Sensing Technology of Grain Yield Monitor System. Beijing:China Agricultural University, 2009

[12] Zhuang Wei-Dong, Wang Xi. Studies on the GPS Data Processing and Absolute Positional Accuracy. Jounrnal of Heilongjiang August First Land Reclamation University. 2003, Vol.15 NO.2,pp.1,2

[13] Wang Jun-Bo, Xu Bu-Gong. Analysis and Online Evaluation of CAN Message Real-time Performance. Control and Decision. 2007, Vol.22 NO.4,pp.1--4

[14] Tuo Bing, Ju Hui. Design of General Data Acquisition Equipment Software System Based on Filed-bus. Journal of ChengDu University of Information Technology. 2006 NO.21,pp.1