# Study of Automatic Test System of Surface Flatness in No-Till Field Based on the PLC Technology

Yanbo Su, Hongwen Li, Yarong Mi, Jin He, Qingjie Wang, Hui Li, Rabi G.

Rasaily

► To cite this version:

Yanbo Su, Hongwen Li, Yarong Mi, Jin He, Qingjie Wang, et al. Study of Automatic Test System of Surface Flatness in No-Till Field Based on the PLC Technology. 5th Computer and Computing Technologies in Agriculture (CCTA), Oct 2011, Beijing, China. pp.545-554, 10.1007/978-3-642-27281-3_62. hal-01351862

HAL Id: hal-01351862

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

Submitted on 4 Aug 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
Study of Automatic Test System of Surface Flatness in
No-Till Field Based on the PLC Technology#

Yanbo Su¹, Hongwen Li ¹*, Yarong Mi², Jin He¹, Qingjie Wang¹, Hui Li¹,
Rabi G. Rasaily¹

¹ Beijing Key Laboratory of Optimized Design for Modern Agricultural Equipment, College of Engineering, China Agricultural University, Beijing 100083, China. ²College of Mechanical and Electric Engineering, Northwest Agriculture and Forestry University, Yangling 712100, China

*Corresponding author's Email: lhwen@cau.edu.cn

**Abstract:** In this paper, automatic test system of surface flatness was designed according to the characteristics of the no-till field by combining the PLC (Programmable Logic Controller), laser sensor and stepping motor automatic control technologies. Monitor and Control Generated System (MCGS) configuration software was used to form the interaction interface. Real-time data report and the trend line could be created by accessing PC machine to this system, and then the surface roughness detection was realized automatically. Compared with the traditional test methods, results of the automatic test system showed that the measured value is accordance with the artificial measured value, and the correlation coefficient between them was above 0.95; and the detection efficiency had been improved by 2.3 times. These results proved the effectiveness of the automatic test system in detecting the surface flatness of the no-till field.

**Keywords:** No-till, automatic test system, surface flatness, PLC, MCGS

# This work was encouraged by National Natural Science Foundation of China (Grant No. 51175499), the Australian Centre for International Agricultural Research (ACIAR), Beijing Natural Science Foundation (Grant No. 6112015) and the Special Fund for Agro-scientific Research in the Public Interest (Grant No. 200903009).
# 1 Introduction

Conservation tillage is an advanced agricultural tillage technology, which advocates no tillage or reduced tillage, covering surface with straw, in order to reduce the wind erosion, water erosion and improve drought resistance[1,2]. Surface flatness is one of the significant indexes evaluating the quality of no tillage operations. Currently, the main method to measure the surface flatness is by manually pulling the rope from its ends on the soil surface. Its results are precise, but its efficiency is low and labor intensity is high. Therefore, It is necessary to carry out the research on rapid measurement of the surface flatness to improve the detect efficiency. At present, certain progress has been made in detecting the surface flatness rapidly through automatic detection by domestic and foreign researchers. For example, J. Lee, et al. studied the measurement method of surface height using infrared sensor and ultrasonic sensor[3]. A. M. Mouazen, et al. analyzed the difference of detection performance between the ultrasonic sensor and the linear variable displacement transducer under the field covered with corn straw[4]. Cai Guohua made the comparative study by ultrasonic sensor, infrared sensor and linear variable displacement transducer under the three conditions of wheat broken stalks, residue, both broken stalks and residue respectively[5]. However, infrared sensor and ultrasonic sensor used by these methods can be influenced easily by the moisture content and temperature of soil, and the sensitivity of linear variable displacement transducer to surface deformation is affected. In addition, this method exits a certain delay[5]. In short, the precision and efficiency of surface flatness detection need to be improved. In this paper, the rapid automatic detection under no tillage surface is realized by the principle of laser ranging, combining the PLC and MCGS configuration software. Laser sensor has high precision and less external influence[6], can meet the requirements of precision and speed in detecting the surface flatness.
## 2 Main structure and working principle

<figure><img src="image_2.png" /><figcaption>Fig.1 Automatic test system of surface flatness in no-till field</figcaption></figure>

1. Stepping motor of X-axis

2. Limit switch of X-axis

3. Guidway of X-axis

4. laser sensor

5. Limit switch of Y-axis

6. Guidway of Y-axis

7. Bench

8. Wheel

9. PC

10. Control box 11. outrigger

No-till surface flatness inspection system mainly composed by control part, the operative part, and the testing part as shown in figure 1. Control part mainly composed by the control box and some of the major PC. The operative part is composed of the test bench, X-axis guidway, Y-axis guidway and the stepping motor. The testing part is composed of LRFS-0040-1 laser sensors and matching circuit. Before testing, first test plots on the grid has to be divided, using laser sensor driven by stepping motor to scan detection line listed by the grid intersection.

While in operations, adjust the height of outrigger, and ensure that the detection system must be in reliable level and in stable state. The surface roughness automatic test system through own structure form the initial space coordinates, and through the manual reset and system in the software of reset control function, ensure the initial operating point for the X-axis, Y-axis intersection.
At the same time, according to detection accuracy and time requirements, set the laser scanning area, X-axis, Y-axis stepper motor stepping distance and speed. After start, the X-axis stepping motor move step by step. When the Y-axis reaches the setting position, PLC receives signal, and then control the stepping motor of X-axis from moving, and drive the Y-axis rail screw rotation through initiating the Y-axis direction movement of stepping motor, thereby stimulating laser sensor stepping a grid distance. After this movement, the alternate detection of flatness scanning is completed. After the scan is complete, through the system reset function can realize reset; adjust the position of the laser sensor. When the Y-axis touches travel switch on the X-axis, PLC control X-axis stepping motor stop the movement. At the same time when laser sensor touches the limit switch of the Y-axis, PLC controls the motor to stop from Y-axis stepping movement, which completes laser sensor reset.

# 3 The design of Automatic detection system

## 3.1 The design of hardware part

The hardware part of automatic detection system is mainly made by the control system, the data acquisition system and the test bench. Figure 2 shows the hardware structure of system, noting the wring mean of PLC's each pin that the system used.

<figure><img src="image_3.png" /><figcaption>Figure 2 Hardware structure of the system</figcaption></figure>

**The control system.** The control system consists of PC, slave computer and control devices. PC uses the software of the automatic detection system for surface flatness
that developed by MCGS for on-site monitoring. The control of slave computer puts to use Mitsubishi programmable logic. The control system uses PLC as host machine, gathering six electrical signal of reset, start, stop, X-axis limit switch, Y-axis limit switch and laser sensors, and output four electrical signals of stop-start and move for X-axis, Y-axis, to complete position control and detection of surface height in the X-axis and Y axis using the laser sensor.

**The data acquisition system.** Data acquisition system uses laser sensors, transmitters, A / D converter through the RS-422 interface to send data to the principal computer, using the software of the automatic detection system for surface flatness monitoring test real-time results.

The system uses LRFS-0040-1-type laser sensors, its main technical parameters shown in Table 1.

<table><caption>Table 1 Technical parameters of the laser sensor</caption><thead><tr><td>Variable</td><td>Parameters</td><td>Variable</td><td>Parameters</td></tr></thead><tbody><tr><td>Measurement Range</td><td>0.2-50m</td><td>Measurement Accuracy</td><td>±3mm</td></tr><tr><td>Output Range</td><td>4-20mA</td><td>Testing Rate</td><td>5Hz</td></tr><tr><td>Resolution</td><td>0.1mm</td><td>Radial Dispersion</td><td>0.6mrad</td></tr><tr><td>Supply Voltage</td><td>10-30VDC</td><td>Wavelength</td><td>650nm</td></tr></tbody></table>

Surface flatness testing for No-till generally be carried out in the field, the solar radiation has a certain influence on detection of the laser[7]. In order to eliminate the deviation caused by sunlight, the paper was calibrated laser range sensor, the methods are as follow:

(1) Install the automatic detection system for surface flatness in the no-till land, and adjust the laser sensor to the level of the state, making the ray of the laser parallel to the X-axis;

(2) Fixed a baffle opposite the laser sensor at 200mm, so that the ray of the laser after reflection by the baffle can be received by the sensor;

(3) Record the initial distance of the sensor to the baffle and the output current of the sensor;

(4) Set stepping distance of X-axis to 10mm, the moving range is 1000mm in MCGS;

(5) Start the system, record the sensor current value when it moves backward 1mm, so you can get 100 groups of distances and corresponding values.
(6) Have a regression analysis for these 100 sets of data, obtain the relation curves between distance and the current, shown in Figure 3.

According to the relation curves between distance and current, we can know the regression equation of the laser sensor:

$$y = 3E-05x + 3.9931$$

Where x is distance (mm), y is current (mA)

The variance Analysis results show that when the

<caption>Figure 3 Relation curves between distance and current</caption>

equation of the regression coefficient R> 0.95, linear detection system shows good linearity and a high level of detection accuracy.

**The test bench and hardware.** The test bench mainly includes X-axis guidway, Y-axis guidway, stands leg and land wheel. The distance of X-axis guidway is 2680mm, width is 240mm and thickness is 85mm. The way of transmission is the ball screw. Because only one end of the Y-axis guidway fixed to the X-axis guidway, in order to ensure Y-axis to maintain the level in the detection process, so determined Y-axis's length is 1000mm, the way of transmission is the lead screw. Test bench leg height adjustable stand, easy to detect in a test station before transfer to the state level. The distance of stands leg on the test bench can adjust, in order to facilitate the test bench to level before the test. Meanwhile, there has a land wheel on each stand leg which is conducive to the movement.

According to the features of no-till surface flatness testing, combined with the need of the detection system, the system employs FX1S-10MT-type PLC made by the Japanese Mitsubishi, which output type is transistor output [8], used 6 inputs and 4 outputs, among them Y0 and Y1 port can simultaneously output 100 KHz pulse. Select linear motion unit type WG206 in X-axis direction, stepper motor drives uses SH-2H042MB which is two-phase hybrid stepping motor driver; select 17HS111 type stepper motor in Y-axis, the type of stepper motor drives is 3ND883.

## 3.2 The design of software system

The software of this system mainly includes measurement system, data-collection

<figure><img src="image_4.png" /></figure>
system and configuration monitoring system. The software system development
contains, building system project, driving hardware system equipment and connecting
with the software, and then user interface edition, variable definition, function set-up
and operation strategy development after communication-test normal. The process of
the configuration software development is shown in the figure 4.

<figure><img src="image_5.png" /><figcaption>Figure 4 Development process of the configuration software</figcaption></figure>

**Slave computer.** Slave computer (including intelligent module and PLC) needs to be driven when a configuration project of surface flatness measurement system is built. This system sets up the parameters such as serial port number, signal baud rate, data bits, stop bits, data check mode and data acquisition mode by driving software.

**PC.** When driving slave computer communication test is normal, the PC configuration is developed in the MCGS configuration software environment[9], such as building monitoring system project, and producing user application system which made up of main control windows, device windows, user windows, real-time databank windows and operation strategy. The main control windows sets up collection range, step distance, step speed of the surface flatness automatic test system X-axis and Y-axis and menu command et al. Device windows, the key of normal equipment operation, is the connection media of the surface flatness automatic test system based on MCGS configuration software and PLC[10-12]. The real-time surface flatness data collected by slave computer sends to the database by building data connection, and the data is output by Excel and reserved permanently in the user windows. The monitoring system could operate real-time database in according to the
setting order and condition, control the open and close of user windows, and detect
the working state of the device by the definition of operation strategy, so that it will
accurately control X-axis, Y-axis and laser sensor working process.

# 4 Experiment results and discussion

## 4.1 Experiment design

The experiment was conducted at the National precision agricultural research station of Xiao Tangshan, Beijing in Sep. 2011. The experimental steps are as follow:

<figure><img src="image_6.png" /><figcaption>Fig.5 Field experiment</figcaption></figure>

(1) Divide the field into 50 mm x 100 mm grids and install the automatic detection systems on the no-till field. Ensure that the starting point is the junction of the X-axis and Y-axis, and the X, Y axis is adjusted for level.

(2) The stepping distance and measuring range in the X axis direction was set as 50 mm and 1000 mm in the MCGS software, respectively; while in the Y axis direction, the stepping distance and measuring range was set as 100 mm and 300 mm in the MCGS software, respectively. Each value of the marked junctions projected on the field will be measured.

(3) Fix two piles on the field when detecting each junction on the line, and a piece of string should be tied on the two piles and adjusted for lever.

(4) Measure the distance from the marked projecting junctions on the surface of the field to the string.
(5) Conducted 3 groups of the experiment, and record the data of the surface roughness and detecting time measured by the system and manpower, respectively.

## 4.2 Results and discussion

As shown in table 2, the linear regression between the results detected by the surface flatness automatic test system and manpower was obtained for the 3 groups of results, respectively. The relationship between the two measured values was also shown in Figs. 6(a), 6(c) and 6(e). It was shown obviously in the Figs. that a positive correlation was existed between the surface flatness automatic test system and the artificial measured value in the 3 groups, respectively. Furthermore, the related correlation value for the 3 groups was 0.983, 0.976 and 0.988, respectively, which indicated that the differences between the values detected by the surface flatness automatic test system and manpower were negative.

<table><caption>Tab. 2 Result of linear regression</caption><thead><tr><th rowspan="2"></th><th colspan="2">Regression Equation</th><th rowspan="2">R<sup>2</sup></th><th rowspan="2">F</th></tr><tr><th>k</th><th>b</th></tr></thead><tbody><tr><td>First</td><td>1.0247</td><td>567.69</td><td>0.983</td><td>2.24E-35</td></tr><tr><td>Second</td><td>0.9699</td><td>604.14</td><td>0.976</td><td>1.92E-31</td></tr><tr><td>Third</td><td>0.8032</td><td>654.77</td><td>0.988</td><td>4.56E-38</td></tr></tbody></table>

After the regression equation was obtained, we put the artificial measured value into the equation, than the trend of the real flatness of the field was acquired. Figs 6 (b), 6 (d) and 6 (f) showed the curves of the trends of the surface flatness in the same line detected by the automatic test system and manpower. The value differences (less than 2mm) between the two measured methods for these 3 groups of experiment were 80%, 80% and 95% respectively of the total measuring point. The differences, especially those more than 2mm, were caused by the existed gap between the straw/blocks with the field surface, such as the differences appeared in the points of 5th, 8th, 12th, 13th in Figs 6 (b), 3rd, 8th, 12th, 20th in Figs 6 (d) and 16th in Figs 6(f).
<figure><img src="image_7.png" /><figcaption>(a) The first Regression Curve</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>(b) The first Correlation Curve</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>(c) The second Regression Curve</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>(d) The second Correlation Curve</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>(e) The third Regression Curve</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>(f) The third Correlation Curve</figcaption></figure>

<caption>Fig.6 Result of linear regression between system measurements and manual measurements</caption>

The average time of detecting the surface flatness in the same line was 18min and 43min, respectively by using the corresponding surface flatness automatically detecting system and manpower. Therefore, the efficiency of the surface flatness automatically detecting system has been improved by 2.3 times compared with the manual measuring method.
# 5 Conclusions

(1) This test system realized the detection of surface flatness based on laser ranging principle by using common PLC technology as the platform and MCGS as a means.

(2) The result of the analysis of the tests showed that the tow lines fit linear correlation and all of their correlation coefficients were over 0.95, which means the regression line fit well with the data points. Using the regression model to predict values, means comparing the predictive value and the measured values of the system, and the points where the error is less than 2mm meet 80% and less than 3mm meet 95%, then we can say that the measured values of the system and the predictive value fit better.

(3) Comparing with traditional manual measurements, this system can improve the test rate more than 2.3 times. So this system can be the better alternative to test Surface Flatness instead of traditional manual measurements in No-Till Field precisely.

# References

1. Zong Jinyao, Liu Xian, Liu Hengxin, et al: Conservation tillage in China. China Agriculture Press. (2008) (in Chinese)

2. Chen Zhi, Ma Shuoshi, Zhao Yonglai, et al. Characteristics of drifting sand flux over conservation tillage filed. J. Transactions of the CSAE. 26(1), 118--121(2010). (in Chinese)

3. Lee J, Yamazaki M, Oida A, et al: Non contact sensors for distance from ground surface. J. Journal of Terramechanics. 33,155--165(1996)

4. Mouazen A.M, Anthonis J, Saeys W, et al: An automatic depth control system for online measurement of spatial variation in soil compaction, Part 1: Sensor design for measurement of frame height variation from soil surface. Biosystems Engineering. 89(2):139-150(2004)

5. Cai Guahua: Study on automatic opener depth control system for no-till seeder. J. China Agricultural University. (2011) (in Chinese)

6. Tian Yuanyuan, Tan Qingchang: Parameter optimization of laser triangulation sensor based on PSD. J. Control & Automation. 24(5):3--7(2008). (in Chinese)

7. Xie Xingfu, Liu Gang, Lang Xiaozhe, et al: Laser receiver used for laser-controlled land leveling system. J. Transactions of the Chinese Society for Agricultural Machinery. 40(Supp.):77--81(2009). (in Chinese)
8 Wei Junxu, Sun Jinsheng: Design and implementation of portable testing instrument for PLC. J. Industrial Control Computer. 23(10):90—92(2010).(in Chinese)

9 Liang Weidong, Guo Hao: The development and application of configurable software MCGS. J. Guangdong Automation & Information Engineering. (1):33--35(2005).(in Chinese)

10 Yang Yang, Zhang Diru: High-voltage motor test system based on PLC and MCGS configuration software. J. Electric Power Automation Equipment. 28(8):90--92(2008).(in Chinese)

11 Shao Limin, Wang Xiu, Niu Xiaoying, et al: Design and experiment on PLC control system of variable rate fertilizer. J. Transactions of the Chinese Society for Agricultural Machinery. 28(8):90--92(2008).(in Chinese)

12 Xie Shouyong, Li Xiwen, Yang Shuzi, et al: Design and implementation of fuzzy control for irrigation system with PLC. J. Transactions of the CSAE. 23(6):208-210(2007).(in Chinese)