ARTICLE International Journal of Advanced Robotic Systems
Control System Design for a Surface Cleaning Robot Regular Paper
Zhai Yuyi1,*, Zhou Yu1, Luo Huanxin1, Liu Yunjia1 and Liu Liang1 1 School of Mechatronics and Automation, Shanghai University, Shanghai, China * Corresponding author E-mail:
[email protected]
Received 4 Sep 2012; Accepted 21 Feb 2013 DOI: 10.5772/56200 © 2013 Yuyi et al.; licensee InTech. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Abstract This paper aims to study a control system for a surface cleaning robot and the focus of the study is the surface cleaning robot controller design. The structural framework of the propulsion control system of the surface robot is designed based on the principle of PWM speed control. The function of each module in the control system is divided and described in detail. A kind of thinking based on an AVR microprocessor and its software and hardware design proposals are presented. Through RS485 and PC communication according to the agreed protocol, the control system achieves robot forward, backward, turn and work operations by the use of a DC motor or stepper motor, and it can therefore more successfully realize the work of a surface cleaning robot. Keywords Surface Cleaning Robot, AVR Mega8535, Control System, Modular Design
1. Introduction Surface cleaning robots are environmental protection equipment mainly used for collecting floating garbage in coastal waters or rivers and lakes. According to the requirements of the task they can also be used for monitoring the environment of ports, waterways, www.intechopen.com
waterfront, beaches etc., amassing hydrological information and carrying out dangerous operations such as surface search and rescue etc., with equipment, e.g., a depth sounder, a flow meter, GPS receivers and video cameras. They are also important tools in assessing offshore environmental pollution, providing marine disaster warnings and prevention, which provides enormous economic and social benefits and potential prospective applications [1, 2, 3, 4, 5]. Currently, people complete environmental monitoring, hydrology information collection and water rescue manually in the field of ports, waterways and beaches with relevant sensors and lack water cleaning robot systems with high intelligence, flexibility and mobility. Therefore, the development of a surface cleaning robot control system, which can integrate communication with a host computer and control system, has a theoretical significance and application value [5, 6, 7, 8, 9, 10]. 2. The overall scheme of the water surface cleaning robot control system Shown in Fig. 1, the entire system takes the surface cleaning robot pre‐developed in laboratory as the carrier, due to the high load capacity and stability requirements of the operations in water. The dual hull structure has been Int JYu, AdvLuo Robotic Sy, 2013, Vol. and 10, 220:2013 Zhai Yuyi, Zhou Huanxin, Liu Yunjia Liu Liang: Control System Design for a Surface Cleaning Robot
1
designed to be powered by battery and solar photovoltaic panels. The system consists of three working motors: the front stepper motor works for garbage collection and the left rear and the right rear DC motors are used for driving the ship. The control system receives the information sent by the host computer and executes the command related to controlling three motors in order to achieve the activities. Cleaning robots organize information received simultaneously, in accordance with a custom protocol sent to the monitoring centre in the host computer via an RS485 serial port. The host computer restores the packet data and shows the information of the cleaning robot in the control interface of the host computer.
Figure 1. Surface cleaning robot control system block diagram
3. Hardware circuit design According to the requirement analysis for control systems of surface cleaning robot, control system hardware circuit is mainly consisted of the motor control circuit, leakage detection circuit, external watchdog, simulation download module circuit, RS485 interface circuit and power supply control circuit. The motor control circuit is mainly used to control the DC motor and stepper motor. A leakage detection circuit is used to protect the robot operations. The overall structure of the control system is shown in Fig. 2 [11, 12].
short execution time in a single clock cycle, the data throughput of ATmega8535 is up to 1MIPS/MHz, which can reduce the contradiction between system power consumption and processing speed. 3.2 DC motor drive module In order to achieve forward, backward and turning movements of the surface cleaning robot, the motor needs to be controlled in the speed and direction of the rotation. The speed control of a permanent magnet DC motor has two main methods: motor armature series resistance and reducing the supply voltage. The motor armature series resistance has shortcomings, such as it is unstable at low speeds, the speed is not continuous, etc. In addition, the method of reducing the supply voltage does not change the mechanical characteristics of the motor and the speed control is smoother [13]. Since the armature voltage of both ends of the motor cycle experiences positive and negative changes twice in a PWM, the average voltage may be determined by the following formula [14]: t t1 T t1 U0 = 1 US = 2 1 U S = 2α 1 U S T T T Where in: α ‐ duty cycle, α = t1 / T. In the above equation, the duty cycle represents the ratio between the switchʹs conduction time and period T and the conversion range of α is 0 ≤ α ≤ 1. When bipolar reversible PWM drives, the average voltage of the armature received depends on the size of α. When α = 0 and U0 =‐US, the motor rotates in reverse and reaches a maximum speed; When α = 1 and U0 = US. the motor rotates forward and reaches a maximum speed; When α = ½ and U0 = 0, the motor stops.
Figure 2. Overall hardware construction diagram of the control system
3.1 Microprocessor The microprocessor is the core of the control system and determines the stability and reliability of the entire system. Considering the high‐speed, low‐power and real‐ time requirements of the system, ATMELʹs ATmega8535 microcontroller is selected. The chip is based on the AVR RISC structure of an enhanced low‐power CMOS 8‐bit microcontroller. Due to its advanced instruction set and 2
Int J Adv Robotic Sy, 2013, Vol. 10, 220:2013
Figure 3. LMD18200 chip schematic
To realize smooth speed control of the DC motor, the system uses an LMD18200 chip for driving. The www.intechopen.com
schematic of the DC motor driver, LMD18200, is shown in Fig. 3. As you can be seen from the figure, it is integrated with four DMOS tubes, composing a standard H‐type drive axle. It provides two switch tubes for the upper bridge arm grid control voltage through the charge pump circuit. The second charge pump circuit can be formed with the external capacitor in pins 1 and 11. Pins 2 and 10 connect to the DC motor armature and in forward rotation of the motor the current direction is from pin 2 to pin 10; and in reverse rotation the current direction is from pin 10 to pin 2 The output control signal pins include: steering control pin 3, enable control pin (active low) and PWM input pin 5. 3.3 Stepper motor driver module The stepper motor is an implementing agency that turns the electrical pulse into the angular displacement. On the one hand, it can be controlled by changing the number of pulses to control the angular displacement, so as to achieve accurate positioning purposes. On the other hand, it can also be controlled by changing the pulse frequency to control the motor rotation speed and the acceleration, so as to achieve the speed control purposes. Stepper motors usually use a rectangular wave current for driving, i.e., the breakdown of the stepper motor drive. The breakdown technique is an electronic damping technology, which can weaken or eliminate the low‐ frequency oscillation of the stepper motor. Breakdown drivers make the actual step angle smaller and can improve positioning accuracy, reduce operating noise and allow smooth operation [15].
MCU moduleʹs PB3 isPB1 and PB0 and the negative electrodes are connected to the ground, respectively. You can achieve the purpose of controlling the driver through the program and ultimately control the stepper motor. 4. System software overall structure Considering portability, future maintenance and expansion of the system, the software uses C language and a full modular design concept. 4.1 Overall scheme of the control system program According to the analysis of the functional requirements of the system and the results of the hardware modules design, surface cleaning robot control system software programs mainly consist of a master module program and other subprograms. The overall structure is shown in Fig. 5. It mainly consists of the following components: the main program, the internal initialization procedure, UART serial communication program, the DC motor control program and a leakage detection interrupt program. [16, 17, 18, 19, 20]
Figure 5. Overall structure of the system software
4.2 Main controller module software design The surface cleaning robot systemʹs main program is shown in Fig. 6.
Figure 4. Stepper motor drive interface unit
As shown in Fig. 4, the stepper drives have three signals ends, the pulse signal (PUL), the direction signal (DIR) and the enable signal (ENA), respectively. The positive electrodes of these three signal ends are connected to the www.intechopen.com
Figure 6. System main routine schematic
Zhai Yuyi, Zhou Yu, Luo Huanxin, Liu Yunjia and Liu Liang: Control System Design for a Surface Cleaning Robot
3
The master passes on the power and the system initializes the parameters, assigns the port addresses, reads two leakage detection signals and executes a motor drive module subprogram according to the host sent instruction to change the motor speed and direction. After this, the surface cleaning robot enters a work state. 4.3 Motor drive and control program design The movement of a surface cleaning robot can be accomplished by five motion control modules: ①forward‐MC, ②backward‐MC, ③left‐turn‐MC, ④right‐ turn‐MC and ⑤stop‐MC. These five motion modes can be achieved by controlling the left and right motors. The control of the monitoring centre of the surface cleaning robot motion control is actually under the control of the microcontroller. To achieve stable communication between the monitoring centre and the microcontroller, a communication protocol must be set. Meanwhile, based on this protocol, appropriate programming must be done in the monitoring centre and SCM, in order to eventually achieve communication between the host and the lower computer. In order to ensure the microcontroller correctly executes the instructions sent by the monitoring centre and avoids system malfunctions, the beginning and end sections should be set in the communication protocol. According to the communication requirements of the microcontroller, the data transmission format from the monitoring centre to the microcontroller is defined as s + n1n 2C1C 2C 3C 4 + p . The definitions are shown in Table 1.
the movement of the robot. When the monitoring centre does not send commands or sends the wrong instructions, the microcontroller will be in a state of waiting. The following is a part of the motion control system interface program. n2
A
B
C
D
Action
Forward
Backward
Turn left
Turn right
n2
E
F
G
H
Action
Movement stop
Operation
Operation stop
Reset
Table 2. n 2 characters corresponding action table
Character
Definition
n1
The starting parity bit, the lower‐computer only received ʹsʹ character before save data The operating mode of the operating system, ʺhʺ, the manual mode, ʺaʺ, the automatic mode
n2
Robot action mode
s
Reserved bits, can be used as motion parameters C1C 2 C 3C 4 definition End parity bit, the lower‐computer received p p character and to determine if a set of characters (control commands) had been received Table 1. Data transmission format characters definition
In the above table, the n 2 character defines the various actions of the robot, such as forward, backward and reset. The various operation modes of the robot correspond to the different microcontrollers’ commands, specifically definitions as shown in Table 2. The microcontroller waits for the control instruction to execute, i.e., only when the monitoring centre sends out the control instructions does microprocessor control program call the appropriate subroutine, which controls
4
Int J Adv Robotic Sy, 2013, Vol. 10, 220:2013
The above program segment, rx_data[] is the character array, which stores the control instructions received. 5. Conclusion and future work This paper analyses the design of a surface cleaning robot control system from hardware and software, respectively, and proposes an advance control scheme based on the combination of a host computer and a microcontroller, so that the entire surface cleaning robot control system has features such as fast response, low power consumption, real‐time strength, which improves the stability and reliability of the system. Surface cleaning robots can achieve surface cleaning operation activities under the control of the host computer and achieve good control www.intechopen.com
effects. In order to improve the work efficiency and flexibility of the surface cleaning robot, we will design a camera mechanism, a communication wireless module with a monitoring centre and will integrate a path planning algorithm in the future. 6. Acknowledgments This research was jointly sponsored by the Shanghai Municipal Education Commission and State Lead Academic Discipline Fund and Shanghai Leading Academic Discipline (project no.12ZL1410700 and BB67), which is greatly appreciated by the authors. 7. References [1] Muske, K.R., Ashrafiuon, H., Haas, G., McCloskey, R. Flynn, T. “Identification of a control oriented nonlinear dynamic USV model”. American Control Conference, 2008, 11‐13 June, Page(s): 562–567. [2] Fill Youb Lee, Bong Huan Jun, Pan Mook Lee, Kihun Kim. “Implementation and test of ISiMI100 AUV for a member of AUVs Fleet”. Proc. Oceans, 2008, 15‐18 Sept, Page(s): 1‐6. [3] Bellingham, J.G. New Oceanographic Uses of Autonomous Underwater Vehicles.Cambridge. MA.MTS Journal, 31(3). [4] Jianhua Wang, Wei Gu, Jianxin Zhu, Jubiao Zhang. “An Unmanned Surface Vehicle for Multi‐mission Applications”. Proc. 2009 International Conference on Electronic Computer Technology, 20‐22 Feb, Shanghai, P. R. China, Page(s): 358‐361. [5] Caccia, M., Bibuli M., Bono R., Bruzzone G. “Aluminum hull USV for coastal water and seafloor monitoring”. Proc. OCEANS 2009‐EUROPE, 11‐14 May, Bremen Germany, Page(s): 1‐5. [6] Jianhua Wang, Wei Gu, Jianxin Zhu, Jubiao Zhang. “An Unmanned Surface Vehicle for Multi‐mission Applications”. Proc. 2009 International Conference on Electronic Computer Technology, 20‐22 Feb, Shanghai, P. R. China, Page(s): 358‐361. [7] Manley, J. “Unmanned Surface Vehicles, 15 Years of Development”, Proc. Oceans 2008 MTS/IEEE Quebec Conference and Exhibition (Ocean’08), Sept. 2008. [8] Caccia, M., Bono, R. Bruzzone, G.,Veruggio, G. “Unmanned underwater vehicles for scientific applications and robotics research: the ROMEO project”. Marine Technology Society Journal, 200, 24(2), Page(s): 3–17.
[9] Manley, J. “Unmanned Surface Vehicles, 15 Years of Development”, Proc. Oceans 2008 MTS/IEEE Quebec Conference and Exhibition (Ocean’08), Sept. 2008. [10] Almeida, C. et al.“ Radar based collision detection developments on USV ROAZ II”. Proc. OCEANS 2009‐EUROPE, 11‐14 May, Bremen Germany, Page(s): 1‐6. [11] Zhai Yu‐yi, Ma Jin‐ming, Yao Zhi‐liang, Gong Zhen‐ bang. “Design for the up‐and‐down system of sub‐ mini adlittoral robot”, Optics and Precision Engineering. 2004, 12(3), Page(s): 299‐302. [12] Zhai Yuyi, Tang Haibin, Ma Jinming, Chen Weihua. “A structure improvement design for Sub‐small underwater vehicles”. Electromechanical integration, 2006,12(2):22-24. [13] Lee, Wonseok, Bang, Young‐Bong, Lee, Kyung‐ Min,Shin, Bu‐Hyun, Paik, Jamie Kyujin,Kim, In‐Su. “Motion teaching method for complex robot links using motor current”. International Journal of Control, Automation and Systems, 2010, 8(5), Page(s): Table 4. Description of the vehicle motion for Scenario 2 [14] ATmega8535(L) User’s Guide[Z]. Rev.2502B‐09/02. [15] Li Lin, Wu Jian Xin. “Designing of High Precision Angle Position Tracking System for Stepper Motor. Electric Drive, 2003, 4:25‐27. [16] Zhang, Lixiao, Luo, Delin, Su, Longjiang, Cao, Da, Luo, Zhifeng. “Design of a DC motor soft start based on AVR microcontroller”. Applied Mechanics and Materials, 2011, 55‐57, Page(s): 382‐387, [17] Wu Gongxing, Sun Hanbin, Zou Jin, Wan Lei. “The basic motion control strategy for the water‐jet‐ propelled USV”. Proc. ICMA 2009 International Conference on Mechatronics and Automation, 9‐12 Aug, Changchun, China, Page(s): 611‐616. [18] Singh, P.et al. “Fuzzy logic modeling of unmanned surface vehicle (USV) hybrid power system”. Proc. the 13th International Conference on Intelligent Systems Application to Power Systems, 2005, Page(s):1‐7. [19] Blank, J., Bishop, B.E. “In‐Situ Modeling of a High‐ Speed Autonomous Surface Vessel”, Proc. 40th Southeastern Symposium on System Theory (SSST 2008), Mar. 2008. [20] Qiao Wei Yuan, Qiang Chen, Sawaya, K. “MUSIC based DOA finding and polarization estimation using USV with polarization sensitive array antenna”. Radio and Wireless Symposium, 2006 IEEE.17‐19 Jan. 2006, Page(s):339–342.
www.intechopen.com
Zhai Yuyi, Zhou Yu, Luo Huanxin, Liu Yunjia and Liu Liang: Control System Design for a Surface Cleaning Robot
5