Design of the real-time detection system based on LabVIEW for no-till seeder working performance

In order to ensure the working performance of the seeder, reduce the labor intensity of manual testing, and improve the efficiency and accuracy of the detection, a real-time detection system for detecting the performance of no-till seeders was designed based on the LabVIEW software platform of virtual instrument technology and the MCC USB-231 data acquisition card. The detection system can be used to detect the seeding quality index and residue cover index. The detection of the seeding quality index included the middle detection between the metering device and the opener, the end detection between the opener and the furrow. The result of the field test showed that the detection accuracies of seed quantity, multiple index, and miss index were 94.51%, 92.83%, and 91.81%, respectively. The fault position can be accurately determined, and the measurement accuracy of residue cover index was 94.54%. The working performance of the no-tillage seeder can be monitored by the detection system to avoid the occurrence of reseeding and miss-seeding and improve production efficiency.

1 Introduction  Conservation tillage is known as "the industrial revolution of world agriculture", which has the benefits of reducing soil erosion, increasing microbial population, reducing operating procedures and costs [1][2][3] . Seeding is an important operation in agricultural production, and seeding quality is a key to crop yield. Faults of the seed tube, metering device, and opener will cause the multiple and miss of seed, which influence crop emergence rate. Because fields that remaining stubble and covering straw under conservation tillage, the operation of the no-tillage seeder interfered [4][5][6] . Therefore, it is particularly significant to detect the seeding quality of no-till seeders. Although it is accurate to detect the quality of no-till seeding by manual methods, its efficiency is quite low.
At present, a variety of technologies are used in the seeding quality detection system. Wang et al. [7] designed a sowing rate detection system of the precision rice hill-drop drilling machine in which a surface-type photoelectric sensor was installed. Que et al. [8] designed a detection system of small-grain seed electric seeder using the photoelectric sensor with surface detection characteristics and the visual sensor with image acquisition effect. Wang et al. [9] designed a detection system for rice hill-direct-seeding based on the piezoelectric impact method. Chen et al. [10] designed a capacitive detection system for wheat seeding quantity. Ding  al. [11] developed a sowing detection system of precision planter for rapeseed based on MSP430F149 single-chip system. Zhao et al. [12] designed a sowing detection system for wheat precision seeding machine based on variable distance photoelectric sensor. Karaye et al. [13] used a high-speed camera system to evaluate the seeding quantity. AEE Equipment Company [14] developed a detection system for pneumatic seeder based on the infrared sensor. Nagawa et al. [15] developed a seeding detection sensor for seeding quality. However, the above detection systems for seeding quantity were used to the middle detection between the metering device and the opener. These systems cannot be used to detect the residue cover index.
A real-time detection system based on LabVIEW for the working performance of the no-tillage seeder is designed. The detection system can be used to detect the seeding quality index and the residue cover index, and including the middle detection, the end detection between the opener and the furrow.
The non-contact detection method that located the seed position in soil is used to the end detection, so as to reduce the error in the middle detection.
process of detecting the seed from leaving the seeding tube to the opener. The end detection refers to the process of detecting the seed leaving the opener and entering the soil. In this study, the non-contact detection method was used to obtain the voltage signal in the seeding tube and the switch signal of the seed in the soil. The data was collected by the data acquisition card and transmitted to the computer and to get some indicators like multiple index, miss index and fault position.

Middle detection
The middle detection modular was designed with the photoelectric sensor. The photoelectric sensors were installed on both sides of the seeding tube. When the photoelectric sensor is activated, the receiving end receives the infrared signal emitted by the transmitting end. The seeds that fall from the seeding tube block the infrared light, thereby generating a pulse signal. The data acquisition card transmits the collected signal to the computer. When there is no seed falling for a period of time, no signal can be collected by the data acquisition card. It means there is something wrong with the metering device and then the alarm light will blink. The process of the middle detection is shown in Figure 1a.
a. Middle detection b. End detection Figure 1 Process of seeding quality detection

End detection
The end detection modular was designed based on the capacitive proximity switch sensor. The coating material contains metallic substances, which is helpful for the seeds to be detected. The capacitive proximity switch sensor is installed at the back of the opener. Seeds in the closed furrow were detected by the sensor, which generates a pulse signal. The actual grain distance between the two seeds was calculated by measuring the time interval between the pulse signals and forward velocity. Compare the actual grain distance (D) with the theoretical grain distance (d) input by the user. When D≥1.5d, it means that the seed has skipped, and the value of the miss index is increased by 1. When D<0.5d, it means that generated reseeding, the value of the multiple index increased by 1. The process of the end detection is shown in Figure 1b.

Hardware detection system of seeder performance
Sensors for different detection indexes were selected, the structure of detection system hardware as shown in Figure 2. The opposite-type infrared sensor is used for the middle detection. The maximum detectable and inductive distance of the opposite-type infrared sensor is 25 cm, and the voltage signal is output to the data acquisition device in the manner of 0V/5V. The type of capacitive proximity switch sensor is LJ140A4 of Kober, detection distance is 10-75 mm. The magnetic signal change caused by metal eddy current can be converted to the pulse signal by the capacitive proximity switch sensor. The hall sensor is CY12-02PK, and the working voltage is 6 VDC-30VDC. The data acquisition card of the system is the MCC USB-231, the image acquisition device is the Logitech C270 HD camera, and the host PC model is Dell System Vostro 3450 notebook computer.
The PCB schematic of the signal conditioning circuit is shown in Figure 3. The PCB schematic was designed according to the data of each component. The PCB is 90 mm in length, 70 mm in width is, and 1.5 mm in thickness. After confirming the position of each component on the circuit board, the PCB is routed by Altium Designer Winter software. After wiring, the PCB is printed, and the components are soldered manually.

Program design of detection system
The main system interface of detection system is shown in Figure 5.
Detection report of the no-till seeder working performance can be printed by the main system. The fault position, seeding amount, miss index, multiple index, and residue cover index were obtained by users.

Middle seeding quality
Program of middle seeding quality is shown in Figure 5. Sensor of middle detection is the opposite-type infrared sensor. The input value of middle detection is the voltage value. The connection mode of hardware interface is the single-ended inputs. Acquisition ways is the continuous acquisition mode, the sampling rate set to 100. The collected data is displayed and output in the form of waveform by the single-channel N sampling mode.

End seeding quality
The program of end detection is designed to process the incoming signals from the opposite-type infrared sensor by ULx Create Channel and ULx Read. Program of end seeding quality is shown in Figure 6. Digital input of data was determined by Get Digital Data Components. The time interval of the detected digital 1 was the time interval of seeding. Spacing in the rows was calculated by the time interval of seeding and the forward velocity. Figure 6 End seeding quality detection block diagram

Forward velocity
The input digital was converted to analog waveform by the DTbI Digital to Analog. Pulse signal was measured to obtain the signal period and the signal frequency. The forward velocity is calculated according to Equations (1)-(3). The detection program is shown in Figure 7.
where, n is the number of magnet patches installed at the same angle on the land wheel, n =5; T is the period of the pulse signal output by the speed sensor, s; f is the frequency of the pulse signal output by the speed sensor, Hz; N is the rotation speed of the land wheel, r/min; ω is Angular speed of the land wheel rotation, rad/s; R is the diameter of the land wheel, m; v is forward velocity of seeding machine, m/s.

Middle fault
The program of the middle fault detection is designed based on the opposite-type infrared sensor. The program is shown in Figure 8. The data waveform of the sensor was measured by the basic level trigger detection VI to find the nearest voltage rising edge. If a rising edge trigger is detected, the time interval since the trigger is calculated. If the calculated time interval is greater than the normal seeding time interval, it means that the metering device breaks down. The alarm light will flash, and remind the staff to turn off the machine and eliminate the fault.

End fault
The program of the end fault detection is designed based on the capacitive proximity switch sensor. The program is shown in Figure 9. The time interval between the two rising edges of the digital signal input by the proximity switch was calculated. If the calculated time interval than the time interval between two normally seeded seeds, it means that the equipment is out of gear. Then it is necessary to determine if there is a middle fault by calling the local variable. If there not be a middle fault, it means that the opener breaks down.

Residue cover index
The process of residue cover index measurement is shown in Figure 10. The IMAQ Vision module of the VAS (Vision Acquisition Software) in the LabVIEW was used to image acquisition. The USB high-definition camera acquires images through NI IMAQdx modular. The image was saved in jpg format by the IMAQ Write File function.
Image grayscale processing mainly uses LabVIEW's Vision Development Module (VDM). An image space was created in the computer, then the color mode was converted from RGB to HSL by the VI of image conversion type. IMAQ Extract Single Color Plane VI extracts a single plane from a color image to obtain a grayscale image after grayscale processing. The two images are processed in grayscale and the IMAQ histograph function is used to obtain the grayscale histogram to obtain the respective threshold range of soil and straw. After the threshold is determined, the program uses the threshold processing function (IMAQ Threshold VI) to classify the gray values in the image according to the threshold. The gray image obtained above is converted to the binary image is obtained after the value classification processing. Figure 10 The process of residue cover index measurement The proportion of the image of straw was calculated by the Index Array and Array Size functions of LabVIEW, which is the residue cover index. The residue cover index was calculated according to Equation (4). The procedure of residue cover index calculation is shown in Figure 11. where, J 2 is residue cover index measured by detection system, %; N a is the number of elements with value 1; N b is the number of element. Figure 11 Residue cover index calculation block diagram

Test conditions and equipment
The test site is the conservation tillage test field of Kunming University of Science and Technology. The area of the test field is 70 m long and 8m wide. The first crop is corn, the planting row spacing is 600 mm, and the plant spacing is 200 mm. The soil moisture of the test field is 15%-17%, and the soil hardness is 1370-1830 kPa.
The corn seeds are Liyu 168, the 60% imidacloprid was selected as seed coating agent. The high-purity fine iron powder was selected with a diameter of less than 0.5 μm.
The seed coating agent should be diluted with water, and the seeds are evenly coated with the liquid. The corn seeds coated with seed coating agent were coated with high purity iron powder. Because the coating agent contains the film former, the iron powder can more firmly adhere to the seed surface. The seed treated by coating is shown in Figure 12. Figure 12 The seed treated by coating The test equipment selected for this system is a corn no-tillage seeder developed by the Conservation Tillage Laboratory of Kunming University of Science and Technology, with a supporting power of 6.5 kW, a working width of 400 mm or 600 mm, and a number of working lines of 2 [18] . The seeding depth of seeder is 30-50 mm. In this study, the installation positions of hardware as shown in Figure 13 and Figure 14.

Sowing quality test
The test items of the seeding quality included seeding amount, multiple index, and miss index. The experiment is divided into three groups according to the seed mass 450 kg/hm 2 , 525 kg/hm 2 , 600 kg/hm 2 . The bag is installed under the seeding tube to carry out the seeding test, record the seeding amount measured by the system and manually count the seeding amount in the bag. Experiments of multiple index and miss index were conducted with normal operation. The results are shown in Table 1.
For the seed mass 450, 525 and 600 kg/hm 2 , measurement accuracy of the seeding amount was 94.57%, 94.82% and 94.15%, measurement accuracy of the miss index was 93.37%, 93.92% and 91.21%, measurement accuracy of the multiple index was 92.28%, 91.91% and 91.21%, respectively. The measurement accuracy of detection system was 94.51%, 92.83% and 91.81% for seeding amount, miss index and multiple index, respectively.

Fault position judgment test
For the middle fault, the failure simulation of the metering device was achieved by cutting off the channel between the metering device and the opposite-type infrared sensor. The end fault of the opener blockage was simulated by keeping seeds out of the furrow. Three repeated tests were carried out, each time simulating the failure of the seed meter and opener 5 times. The test results are shown in Table 2. According to the test results, the detection system can accurately judge the fault position of the no-tillage seeder to 100%.

Residue cover index measurement
In this test, the seeding operation was carried out with a seeding mass of 450 kg/hm 2 . The residue cover index was measured by the detection system and manual measurement. The test field was divided into 5 plots, each 20 m long. Every 20 cm was a detection point, and the number of detection points with residue covering was counted. The residue cover index is calculated by manual measurement according to Equation (5). The detection accuracy of the residue cover index is calculated according to Equation (6).
The image obtained after the binarization process is shown in Figure 15 and the test results are listed in Table 3.
where, J 1 is residue cover index measured manually, %; j g is the number of detection points with residue covering; j q is the number of detection points.
where, M is detection accuracy of the residue cover index, %; J 1 is residue cover index measured by detection system, %.  The measurement accuracy of the residue cover index measurement module of the detection system is 94.54%, and the coefficient of variation is 7.45%, which can accurately reflect the difference between the surface straw residue and the soil. In the analysis of the results of each test, there is a certain difference between the measurement results of the detection system and the manual measurement. The reason is that some residues and leaves in the soil have high decay, and the color is slightly close to the color of the soil, it may be wrongly judged as soil. Similarly, soil may be wrongly judged as residues.

Conclusions
In this paper, a real-time detection system for the no-tillage seeder working performance was designed based on LabVIEW. The test items for working performance of the no-tillage seeder were selected and detected by the detection system.
The detection system can be used to detect the seeding quality index, and including the middle detection between the metering device and the opener, the end detection between the opener and the furrow. The seeding quality of the no-tillage seeder was detected, including seed quantity, multiple index, and miss index. The detection accuracy of them was 94.51%, 92.83%, and 91.81% respectively. The detection system can accurately judge the fault position of the no-tillage seeder t to 100%.
The residue cover index module of the detection system can acquire and save surface coverage images in real-time, and reduce the working intensity of manual measurement. The accuracy of the residue cover index module was 94.54%, and the coefficient of variation is 7.45%. The residue cover index module of the detection system can acquire and save surface coverage images in real-time, and reduce the working intensity of manual measurement.
The detection system can detect the no-tillage seeder working performance in real-time to avoid the occurrence of reseeding and miss-seeding, improve production efficiency, reduce the labor burden.