# Design of the Unmanned Area Fetching Trolley

Xuelun Hu, Licai Zhang, Yaoguang Wei, Yingyi Chen

► To cite this version:

Xuelun Hu, Licai Zhang, Yaoguang Wei, Yingyi Chen. Design of the Unmanned Area Fetching Trolley. 7th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Sep 2013, Beijing, China. pp.523-533, 10.1007/978-3-642-54341-8_55. hal-01220864

HAL Id: hal-01220864

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

Submitted on 27 Oct 2015

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
# Design of the Unmanned Area Fetching Trolley

Xuelun Hu<sup>1,a</sup>, Licai Zhang<sup>1,b</sup>, Yaoguang Wei<sup>*1,c</sup>, Yingyi Chen<sup>1,d</sup>

<sup>1</sup>College of Information and Electrical Engineering, China Agricultural University, Beijing
100083, China

<sup>a</sup>982537081@qq.com, <sup>b</sup>804306590@qq.com, <sup>c</sup>weiyaoguang@gmail.com,

<sup>d</sup>chyingyi@126.com

**Abstract.** This paper discusses the project which is one of the Beijing City College Students' Scientific Research and Entrepreneurial Action Plan Project named "unmanned area fetching trolley", The project used infrared sensor to measure the distance between the car and the obstacle, The MCU would analyze and process this signal, and generate two different PWM signals respectively to drive motors when the distance is less than a certain value, so as to realize avoiding obstacle automatically. After Hall sensor detected the PWM wave corresponding to the actual speed of the car, the PID module would compare the PWM wave of the actual speed and the PWM wave which is generated by MCU, so as to determine whether the output is desired and achieve closed-loop control, thus can make the control of speed is more precise. The mechanical arm is composed of five steering, the upper monitor control it through the wireless module, each instruction can make the rotation angle of each actuator accurate to 1 degree, so the mechanical arm is flexible and precise. The project ultimately achieved the desired effect that avoid obstacle automatically, upper monitor control accurately. After expansion and improving, it can be used for automatic weeding, automatic cleaning, automatic patrol, automatic sowing, automatic harvesting and so on.

**Key words:** avoid obstacle automatically; mechanical arm; fetching trolley

## 1 Introduction

Nowadays, automation has entered and played an important role in all trades and professions, such as industry, agriculture, transportation, national defense and other aspects. Automation also makes significant contribution in the development of the national economy. It is the degree of automation, which represents the level of the industry's development.

Agriculture is the foundation of national economy, agriculture machinery automation is the center of agricultural modernization. It embodies the latest achievements of modern science and technology, and has become the necessary condition of increasing production, improving labor productivity, and reducing the heavy manual labor. In general, realizing automation in agricultural production has the following significance: improving labor efficiency; shorten the production cycle; improving economic efficiency; reducing the labor intensity; and emboding a country's level of science and technology[1].
An trolley which can avoid obstacle automatically is able to apply to industry and agriculture, such as automatic weeding, automatic cleaning, automatic patrol, automatic sowing, automatic harvesting and so on. This paper discusses the unmanned area fetching trolley's implementation amply, and introduces the required modules and their functions, even analyses the application domain of this trolley.

This unmanned area fetching trolley can get into the place which is dangerous,
inconvenient or harmful for people, such as high temperature, radiant and so on. The
trolley's walking distance can coverage all-round of the region, so as to fetching the
objects. Nowadays, the self-navigation, Global Position System (GPS) and the
machine vision can achieve this function, they are high precision, applicable to a wide
range, easy to use relatively, but also have the limitation of expensive. This unmanned
area fetching trolley equiped with the infrared obstacle avoidance and the wireless
module to realize the low cost and wireless intelligent control.

2 The implementation of the project

2.1 Requirement analysis and the terms of settlement

The main idea of this project is to make a trolley which is capable of walking automatically, avoiding obstacle automatically, fetching objects by mechanical hand accurately.

The implementation of this unmanned area fetching trolley needs to solve two
major problems which are the automatic obstacle avoidance and the wireless remote
control. Through analysis and calculation, we select the infrared sensor which is low
cost and a wireless control module which is high precision finally[2].

## 2.2 Content and technique of the trolley

2.2.1 Content of the research

The car is equipped with infrared sensor, the signal which access from the
sensor is the input of the MCU(STC12C5A60S2). The MCU would analyze and
process this signal, and generate two different PWM signals respectively to drive
motors when the distance is less than a certain value, so as to realize avoiding
obstacle automatically. After Hall sensor detected the PWM wave corresponding to
the actual speed of the car, the PID module would compare the PWM wave of the
actual speed and the PWM wave which is generated by MCU, so as to determine
whether the output is desired and achieve closed-loop control, thus can make the
control of speed is more precise. Furthermore, this trolley can be used in multiple
aspects, such as automatic weeding machine, automatic vacuum cleaner, automatic
patrol car and so on. In this article, we equipped it with mechanical arm to achieve the
innovation[3].
### 2.2.2 Technique of the research

(1) The module diagram of the trolley as shown in figure 1, from the graph we can find out the relation between each module in this trolley.

<figure><img src="image_2.png" /><figcaption>Fig.1. The module diagram of the trolley</figcaption></figure>

(2) MCU(STC12C5A60S2)

STC12C5A60S2 is a MCU which has single clock / machine cycle(1T) produced by STC, it is a new generation of 8051 single chip microcomputer which has high speed, low power consumption and strong anti-interference. It integrates MAX810 special reset circuit, 2 channel of PWM, 8 channel of high speed 10 bit A/D converter, it mainly used for motor control and strong interference situation. The pin diagram of STC12C5A60S2 as shown in figure 2.

<figure><img src="image_3.png" /><figcaption>Fig.2. The pin diagram of STC12C5A60S2</figcaption></figure>

The MCU received the infrared sensor's input signal through P1.0 (ADC) and communicated with PID module by serial port P3.0 and P3.1, thus the MCU can
produce two different PWM waveforms to control two motor's speed, so as to make the trolley rotate to different directions[4]. Flow chart as shown in figure 3.

<figure><img src="image_4.png" /><figcaption>Fig.3. Flow chart</figcaption></figure>

(3) Infrared sensor (GP2Y0A21YK0F)

The light wave is the electromagnetic wave which wavelength between 10~106nm. The Infrared wavelength range is between 780~106nm[5]. The wavelength can be determined by the follow formula :

$$ \lambda_0 = \frac{hc}{A} = \frac{1.239}{A} \qquad (2-1) $$

Among the formula, C is the speed of light, H is the Planck constant.

GP2Y0A21YK0F is a distance measuring sensor unit, composed of an integrated combination of PSD(position sensitive detector), IRED (infrared emitting diode) and signal processing circuit[6]. The block diagram of GP2Y0A21YK0F as shown in figure 4.
<figure><img src="image_5.png" /><figcaption>Fig.4. Block diagram of GP2Y0A21YK0F</figcaption></figure>

The barrier of different distance can make infrared sensor produce different voltage output. The closer obstacle stay, the higher voltage export. Output is connected with the SCM's P1.0.Measurement range of the sensor is 3cm to 80cm, Example of distance measuring characteristics as shown in figure 5.

<figure><img src="image_6.png" /><figcaption>Fig.5. Example of distance measuring characteristics(output)</figcaption></figure>

(4) Speedometer

It is the Hall sensor that form the module of Speedometer. Each motor is equipped with two Hall sensors, the sensor is conducted when the magnet on the motor rotate over the Hall sensor, then the corresponding port output a low level. The sensor generate a pulse when each times the Magnet over the sensor. So the number of the output pulse represents the speed of the motor. As the magnet pass two Hall sensors successively, the waveform of the two sensor will have skewing. From the skewing we can know the direction of rotation of the motor.
(5) Motor driver (L298) and PID controller (SCM STC12C5410AD)

PID controller communicate with MCU. According to the Output of the MCU, the controller can generate different PWM waveform and deliver the PWM waveform which is amplifying by the motor drive to two motor. In addition, the PID controller is linked to the Speedometer, then delivering the actual speed of the motor to PID controller, furthermore, it would determine whether the output is desired or not. Thus we achieved the closed-loop control, so the speed control is more precise.

L298 is a monolithic motor driver, which has integrated high voltage, high current, and dual full bridge. It is designed to connect standard TTL logic level and driving inductive loads (such as relays, coils, DC and stepper motor)[7]-[8]. The external circuit of L298 as shown in figure 6.

<figure><img src="image_7.png" /><figcaption>Fig.6. The external circuit of L298</figcaption></figure>

In the PID control process, we use the proportional and integral control. The following is the action of proportional control, once the system appeared deviation, it can adjust control response immediately to reduce deviation, thus we can accelerate the adjustment and reduce error by using proportional action. The action of integral control is to make the system to eliminate the steady state error and improve indiscrimination degree. The integral control is in progress until the output is no error. In our project, the KP(proportional coefficient) is 1.8, KI(Integral time constant) is 0.67. The system structure diagram as shown in figure 7.

<figure><img src="image_8.png" /><figcaption>Fig.7. System structure diagram</figcaption></figure>
## 2.3 Content and technique of the mechanical arm

### 2.3.1 Research content

The trolley is equipped with the mechanical arm which is composed of five steering, the upper monitor control mechanical arm through the wireless module[9], each instruction can make the rotation angle of each actuator accurate to 1 degree, so the mechanical arm is flexible and precise.

### 2.3.2 Research technique

#### (1) Servo Controller(STC10F08XE)

Servo Controller is connected with upper monitor through the serial port and it can control 16 ways steering simultaneously by decoding the upper monitor's instructions so as to produce different PWM waveform to control the rotation of each steering engine[10]. So the circuit is simplified largely. Hereon, we use five of the ways to control five steering. The control flow chart as shown in figure 8.

<figure><img src="image_9.png" /><figcaption>Fig.8. The control flow chart</figcaption></figure>

#### (2) Wireless module (APC220-43)

APC220-43 is a wireless data transmission module which highly integrated half duplex micro power, it embedded MCU and high performance RF chip ADF7020-1. Its anti-interference ability and the sensitivity is very high. A part of the Wireless module is connected with the controller's serial port, while the other part is connected with the upper monitor, thus it can realize wireless communications. The control
range is up to 15 meters. Wiring diagram of APC220-43 and upper monitor as shown in figure 9, wiring diagram of APC220-43 and terminal equipment (servo controller) as shown in figure 10.

<figure><img src="image_10.png" /><figcaption>Fig.9. Wiring diagram of APC220-43 and upper monitor</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig.10. Wiring diagram of APC220-43 and terminal equipment (servo controller)</figcaption></figure>

The servo control can be precisely to the degree through the instruction, so as to achieve the precise control of the mechanical hand,thus we can make five servos of the manipulator act at the same time.These two reasons are the greatest advantage relative to the remote manual control[11]. The schematic diagram and number of mechanical arm as shown in figure 11.
<figure><img src="image_12.png" /><figcaption>Fig.11. The schematic diagram and number of mechanical arm</figcaption></figure>

Through experiment and calculation, we can figure out the rotation angle of each servo manipulator arm of stretch, fetch and reset[12]. Instruction format is as follows:

$$D<time> #<ch>A<degree>...#<ch>A<degree>T<step>! \quad (2-2)$$

<time> represents the waiting time to run this command, it's unit is ms.

<ch> represents the number of steering engine which is under control.

<degree> represents the angle of the steering engine, the range of it is from 0 to 180 degrees.

<step> represents the number of step of the steering engine to complete this action, the time of completing each step is 20ms, the number of steps multiply 20ms equal to the finish time.

"!" represents the command come to end.

Three action commands are as follows:

<table><thead><tr><td>Action</td><td>Instruction</td><td>The meaning after decoding</td></tr></thead><tbody><tr><td>stretch</td><td>D1500<br/>#08A10#14A90#03A160#<br/>12A60#11A60T50!</td><td>This instruction is executed after 1.5 seconds, the steering engine number of 8 turn to 10 degrees, the steering engine number of 14 turn to 90 degrees, the steering engine number of 03 turn to 160 degrees, the steering engine number of 12 turn to 60 degrees, the steering engine number of 11</td></tr></tbody></table>
D1500
#08A90#14A90#03A160#
12A60#11A60T50!

D1500
#08A90#14A90#03A90#1
2A90#11A90T50!

turn to 60 degrees, a second after the
execution of this instruction. The time of
complete this instruction is 1s.

This instruction is executed after 1.5
seconds, the steering engine number of 8
turn to 90 degrees, the steering engine
number of 14 turn to 90 degrees, the steering
engine number of 03 turn to 160 degrees, the
steering engine number of 12 turn to 60
degrees, the steering engine number of 11
turn to 60 degrees, a second after the
execution of this instruction. The time of
complete this instruction is 1s.

This instruction is executed after 1.5
seconds, the steering engine number of 8
turn to 90 degrees, the steering engine
number of 14 turn to 90 degrees, the steering
engine number of 03 turn to 90 degrees, the
steering engine number of 12 turn to 90
degrees, the steering engine number of 11
turn to 90 degrees, a second after the
execution of this instruction. The time of
complete this instruction is 1s.

# 3 Analysis of the Results

## 3.1 Innovation of the Project

(1)The domination of the trolley which can avoid obstacle automatically achieved the closed-loop,so the domination is more precise.

(2)Using upper monitor to send commands so as to make the control more precise and more accurate, the mechanical hand separate itself from the telecontroller.

(3)When the trolley which can avoid obstacle automatically encountered every obstacle, it can turn left 30 degrees and then move on,each encounter obstacles will make the trolley stay for a while,so as to fetching objects.

## 3.2 The expandable portion of the project

(1)The cameras extract the unmanned area actual situation to accomplish fetching things.

(2)Adjusting the steering when the trolley encountered obstacles let the trolley cover more place of the unmanned area.
## 3.3 Results of the project

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

## 4 Conclusion

The "unmanned area fetching trolley" is implemented by multiple modules, each module own the fixed work mode and implementation effect, so it is convenient for us to debugging. Available pins of the SCM can be used, and the compatibility of the program is good. In large and medium-sized machines, the trolley can work stable when you change the drive module and the drive motor to correct type. Avoiding obstacle automatically also can be applied to many aspects. After expansion and improving, it can be used for automatic weeding, automatic cleaning, automatic patrol, automatic sowing, automatic harvesting and so on[13]. So the project have certain degree of applicability and expansibility.

## Acknowledgements

This work was supported by the National Agricultural Science and technology achievement transformation project (2012GB2E000330), the Fundamental Research Funds for the Central Universities (2013QJ053).
References

1. Zhang Jie. characteristics and development of mechanical automation technology [J]. city construction theory research (Electronic Edition), 2012, (33).

2. Chen Jing. The design of control system of intelligent car based on STC12C5A08S2[J]. Yinshan academic journal(Natural Science Edition), 2011, 25(4):40-43.

3. Yu Fanxin, Liu Xiaoming, Hou Xianlun, etc. The production of Wireless remote control infrared obstacle avoidance car [J]. electronic engineering of Yantai Nanshan University, 2011, (36): 52-53.

4. Wang Xuejian, Chen Long. Design and implementation of intelligent obstacle avoidance car base on Single Chip Micyoco [J]. network and the technology, 2012 (1): 148-150.

5. Zheng Zhicong. Discussion on technology of infrared obstacle avoidance robot [J]. Chinese collective economy, 2008 (10): 168-169.

6. Hong Yongchao, Wei Wei, Du Sensen, etc. Infrared obstacle avoidance of mobile robot and monocular vision tracking of [J]. Mechanical & Electrical Engineering, 2006,23 (6): 60-62.

7. Tang Guodong, Gao Yunguo. Singlechip control of a stepping motor based on L297/L298 chip[J]. Micro computer information, 2006, 22(12-1):134-136.

8. Xie Guangqi, Yao Min, Wang Yinfeng, etc. MCU drive control of stepping motor [J], Journal of XiangNan University, 2011,32 (5): 37-41.

9. Xu Bo, Gao Shuangxi. Wireless remote visual control of robot[J]. Wireless Internet technology, 2012,(9):141.

10. Wang Yan, Yang Qinghua, Bao Guanjun, etc. Design and test of mechanical arm joint picking optimization [J]. Journal of agricultural machinery, 2011, 42 (7): 191-195.

11. Geng Hongxing, Zhang Lenian, Tan Jianhong, etc. Research on Motion Control of Manipulator Based on Microprocessor[J]. Mechanical Manufacturing and Automation, 2010,(5):150-152.

12. Chen Yong, Zheng Jiaqiang, Guo Weibin. Kinematics analysis and motion control for a weeding robotic arm [J]. Journal of agricultural machinery, 2007,38(8):105-108.

13. Zhao Qingbo. Study on avoidance techniques and avoidance control of fruit picking robot [D]. Jiangsu University, 2008