Control System Consideration of IR Sensors based Tricycle Drive Wheeled Mobile Robot Aye Aye New, Aye Aye Zan, and Wai Phyo Aung Abstract Nowadays, Wheeled Mobile Robots (WMRs) are built and the control system that used to control them are made by Electronic Engineers. Depend on their desire design of WMR, Technicians made used of Microcontrollers as controlling machines and DC Motors for motion control. In this paper, the author would like to analyze how to consider the control system for the entire Wheeled Mobile Robot using both hardware and software, based on Electronic Control Techniques. Three authors are combined to make their PhD Research on Development of an Intelligent Wheeled Mobile Robot. Therefore, this paper is mainly focus on overall consideration of the entire Control System that will use to construct an Intelligent Wheeled Mobile Robot. There are three main portions of this control system; Obstacle Detection System, Navigated Control System and Motor Driving Control System. Obstacle Detection System used five IR sensors to detect the obstacle that means to avoid and a Peripheral Interface Controller (PIC) 16F877 Microcontroller to drive the input analog signals into active digital data of Navigated Control System. GP2D12 IR sensor is to be used in this paper. Navigation System then gets these detail data of Obstacles and control to avoid and drive the Robot as desire using Software in PIC. As the driving system of DC motor, a PIC based control system is designed including the assembly software technology and H-bridge control circuit. This Driving system is used to drive three Motors: a steering Stepper Motor and two DC gear motors which are used to control the motion of WMR. For the Motor Driving System, PIC16F84A is used and inputs of sensors detected data are derived by the Navigated Commands. The outputs of PIC are the commands to drive Motors. In this paper, Sensor Technology, Control techniques of PIC microcontroller and H-bridge circuit, Mechanism assignments of WMR are combined and considered to form the effective control system of an Intelligent WMR. Keywords Control System, DC Motors, H-bridge Control Circuit, Intelligent Wheeled Mobile Robot, Motor Driving Control System, Navigated Control System, Obstacle Detection System, Peripheral Interface Controller (PIC), Sensor Technology, Stepper Motor. I. INTRODUCTION ONTROL System Consideration of Robotic CTechnologies are widely suppress and very useful to be applied in real-time development. Some can be solved by hardware technology and by the advance used of software, control system are analyzed easily and detail. As an application of Wheeled Mobile Robot, Microcontroller based Control System are used to be considered. Sensors are used based on their application, for example, CCD cameras are used as landmark detected sensors, etc. Among the various type of Obstacle detected Sensors, IR sensors are also widely suppress as useful sensors. DC Motor can be used as wheel drive machines and by using a simple Microcontroller, the rotation of Motors or the Motion of Robot can be controlled easily. An Obstacle Avoidance System of Mobile Robot can be designed using a PIC and obstacles detected Sensors. The main Control System of this Robot can be completed as a Navigated Control System using a PIC with its fuzzy rules based C-programming methods. As a Wheeled Mobile Robot, depend on its drive techniques, their wheels are drive by Motors. For the Tricycle Drive of WMR, the two left/right wheels are driven with each DC gear motor and a steering wheel is driven by a Stepper Motor. The paper is mentioned on the basic research of Development of an Intelligent Wheeled Mobile Robot. This is a type of IR Sensors based Wheeled Mobile Robot and it mainly function as an Obstacle Avoidance Vehicle. All these processes are design in this research and it is mainly focus to consider the suitable activated WMR. For each three main portions, comparisons with other possible ways or devices are included and the choosing methods to optimize the desire Control System are also considered. Background theories and techniques of Electronic Control Technology are analyzed in this paper using both Hardware and Software Consideration. Manuscript received February 15, 2008. This work was supported in part by the Ministry of Science and Technology, Union of Myanmar. Authors are with the Mandalay Technological University, Mandalay, Myanmar (phone: 095-2-88704 (Electronic Engineering Department); fax: 095-2-88702 (Office,MTU); e-mail: ayeayezann@gmail.com, aungwp@gmail.com, coolnwe@gmail.com). II. OVERALL SYSTEM CONSIDERATION Based on background theories, the desire Wheeled Mobile robot system can be considered as shown in Fig. 1. The main inputs of the System is entered from the Obstacle Detection System and this first Module is used to determined which sensor is detected and these data are used as inputs of Navigation System. Navigation System is used to make the main control purposes of the entire system and Control 410
Considerations Techniques are to be performed in PIC. By using the determined control commands from this second Module, the third Module: Motor Driving Unit drives three wheels of WMR. III. SYSTEM CONSIDERATION FOR OBSTACLE DETECTION The block diagram that considered as the Obstacle Detection System is shown in Fig. 3. Fig. 1 Block Diagram of an Intelligent WMR A. Hardware Consideration of Overall Control System For the entire system, three PIC Microcontrollers are to be used each for the three main Module of the System. In this case, the power supply of battery package will be used for the real-time application. As 12V Motors are used for the motion control of WMR, the 12V battery package that can go free on the body of WMR must be constructed. For the supply of PIC microcontroller, DC 5V must be converted from 12V supply. The Power Supply Circuit that required for supply the PIC is built as shown in Fig. 2. This circuit is built to convert the required +5 V DC, the actual requirement is between +2.5 and +5 V DC. This 12 V is changed to the required +5 V by using 7805 IC with the help of two capacitors. For WMR design, the literature reviews on various types of Mechanism are to be studied and decided. For the desire purpose of to drive straight and safely of WMR, tricycle drive method is considered as the optimum system of this WMR. Fig. 3 Block Diagram of Obstacle Detection System A. Hardware Consideration of Obstacle Detection System The reason to choose IR sensors as Obstacle detected device is that to determine the range of object and by this data, to control the Obstacles avoiding process. In this research, by using its effective rating, GP2D12 analog IR sensor is used. Analog to Digital Converting (ADC) process is done in PIC by software and these data used to control the require outputs that will effect to the second Module, Navigated Control System. The basic circuit that makes these processes is shown in Fig. 4. Fig. 4 GP2D12 IR Sensor that apply to PIC Fig. 2 Circuit Diagram of 5V supply for PIC B. Software Consideration of Overall Control System As we consider for using PIC Microcontrollers, the software programs can be considered part by part as follows: Assembly software for Obstacle Detection Module that makes commands for Navigation system which give data to know front or side obstacle(s) is/are detected. Fuzzy rules based C program for Navigated Control System that control the desire navigation process to give commands to the next stage to drive Motors. Assembly software for Motor Driving Module that control three Motors for both steering and ODO-meter process of Motion control for WMR. B. Software Consideration of Obstacle Detection System The consideration data of GP2D12 IR Sensor that mentioned the graph comparing between its voltages depend on the distance of the detected object is shown in Fig. 5. For assembly software program consideration for PIC, the following step by step consideration should be made. Five inputs from five sensors are to be converted as digital data of PIC input. These data must be represented as input bits of control system that can determine which sensors are detected and which position of Robot is require rotating. Output of PIC must be made as data signal that mentioned each meaning of how in real states of Sensor, i.e. five bit outputs of this Module makes the Navigation Module as inputs of 32 state to be determine. 411
Fig. 5 Data Consideration Graph of GP2D12 IR Sensor IV. SYSTEM CONSIDERATION FOR NAVIGATED CONTROL SYSTEM The block diagram that considered as the Navigated Control System is shown in Fig. 6. Although the system is simple, the main program that will consider to do desire performance of require control system, it is complicated to solve. The hardware of this Module is very simple of by using the data from Obstacle Detected Module as inputs of PIC and then outputted desire commands to Motor Drive system. Fig. 6 Block Diagram of Navigated Control System A. Hardware Consideration of Navigated Control System In this Module, the process consideration can be made mainly in Software and for Hardware, only the input port and output port connection of PIC is included. Five pins of the first PIC are directly connected to the second PIC of this module. Therefore, the outputs from Obstacle Detection Module are used as signals or switches that inform the realtime conditions in this Navigation Module. B. Software Consideration of Navigated Control System The input and output consideration of this Module can be seen clearly as shown in Table I. TABLE I OUTPUTS FROM NAVIGATION SYSTEM DEPEND ON ITS INPUTS Input Detected Decision Output State No. data Sensors to WMR data 1 00000 None Forward 100 12 2 00001 1 Left 150º 101 4 3 00010 2 Left 120º 101 8 4 00011 1,2 Left 120º 101 8 5 00100 3 Left 120º 101 8 6 00101 3,1 Right 60º 110 8 7 00110 3,2 Right 30º 110 4 8 00111 3,2,1 Left 150º 101 4 9 01000 4 Right 60º 110 4 10 01001 4,1 Stop 111 12 11 01010 4,2 Stop 111 12 12 01011 4,2,1 Stop 111 12 13 01100 4,3 Right 30º 110 4 14 01101 4,3,1 Stop 111 12 15 01110 4,3,2 Stop 111 12 16 01111 4,3,2,1 Stop 111 12 17 10000 5 Right 30º 110 4 18 10001 5,1 Stop 111 12 19 10010 5,2 Stop 111 12 20 10011 5,2,1 Stop 111 12 21 10100 5,3 Right 30º 110 4 22 10101 5,3,1 Stop 111 12 23 10110 5,3,2 Stop 111 12 24 10111 5,3,2,1 Stop 111 12 25 11000 5,4 Right 30º 110 4 26 11001 5,4,1 Stop 111 12 27 11010 5,4,2 Stop 111 12 28 11011 5,4,2,1 Stop 111 12 29 11100 5,4,3 Right 30º 110 4 30 11101 5,4,3,1 Stop 111 12 31 11110 5,4,3,2 Stop 111 12 32 11111 All Stop 111 12 No. of Pulses C. Consideration of Rules for Obstacle Avoiding and Navigating 1. Path predetermining state The system must be pre-limited for going straight distance, turning left or right and returning back straight to the starting point for no obstacles condition. 2. Obstacle avoiding state (obstacle is detected at the front). The system must be stop for a while. It must turn to the left and check if there is any obstacle or not in this turning state. And then it will return to right and go straight at normal line. 3. Obstacle is detected at the left. Stop for a while whether one or both left sensors are detected. The system must turn to right and check if there is any obstacle or not in this turning state. It must return to left and go straight at normal line. 4. Obstacle is detected at the right. 412
The system must be stop for a while whether one or both right sensors are detected. It must turn to left and check if there is any obstacle or not in this turning state. And then it will return to right and go straight at normal line. V. SYSTEM CONSIDERATION FOR MOTOR DRIVE SYSTEM The block diagram that considered as Motor Drive System for the desire WMR is shown in Fig. 7. To make the consideration of this System, firstly it is required to choose the desire mechanism design. For these purposes, the type of Mobile Robot Model is chosen as Wheeled Mobile Robot and the drive types are as follows: 1. Differential drive 2. Tricycle Drive 3. Synchronous drive To ensure that the robot is traveling in a straight line, it may be necessary to adjust the motor RPM. It is also very important to have accurate information on wheel position. 2. Tricycle Drive Fig. 9 Tricycle Drive Layout Fig. 7 Block diagram of Considered Motor Drive System A. Hardware Consideration of Motor Drive System For the hardware consideration, the mechanism consideration of Motor Drive System can be done as follows; 1. Differential drive Motors: Two - One for each drive wheel. Process: Simplicity - The differential drive system is very simple, often the drive wheel is directly connected to the motor. Three wheels and odometers on the two rear wheels Steering and power are provided through the front wheel Control variables: - Steering direction a (t) - Angular velocity of steering wheel ws (t) 3. Synchronous drive All wheels are actuated synchronously by one motor; defines the speed of the vehicle. All wheels steered synchronously by a second motor; sets the heading of the vehicle. The orientation in space of the robot frame will always remain the same; it is therefore not possible to control the orientation of the robot frame. Fig. 8 Differential Drive Layout Control: It can be difficult to make a differential drive robot move in a straight line. Since the drive wheels are independent, if they are not turning at exactly the same rate the robot will veer to one side. Fig. 10 Synchronous Drive Layout For the purposes as mentioned in above, our WMR must be chosen the type; tricycle drive. The circuit diagram of the Motor drive that has been considered is shown in Fig. 11. Depend on the inputs state, the outputs conditions that 413
controlled the H-bridge circuit are provided by assembly software, at Port B: RB7-RB4. As for PIC microcontroller, this part is supplied with 5V DC. In this circuit, PIC is used with a simple clock condition with 4MHz crystal. The H-bridge circuit is supplied with 12V DC and the four bits outputs of PIC made this part to drive the desire conditions of DC Motor. Opto-coupler circuit is used to feed its output to the two transistors which will active one for each time. - If one or more input pins are high, detail checking state are to be considered. In Table II, the inputs bits from navigation system are mentioned as (bit2 bit1 bit0). The output bits of Stepper Motor are also mentioned as ( bit3 bit2 bit1 bit0) and for two DC motors outputs, bit number are mentioned as (bit1 bit0) of Motor1 and that followed by (bit1 bit0) of Motor2.Although outputs of stepper are the same pulses data, depend on given pulses number of input data, it rotate in different angle,e.g if the input is given as four pulses of 101, it make output of 150º while eight pulses of that make output of 120º. For two DC Motors output, it can be clearly mentioned by applying H-bridge circuit. Input state TABLE II MOTOR DRIVE SYSTEM INPUTS OUTPUTS CONSIDERATIONS Direction No. of Pulses Stepper O/P DC Motors O/P 100 12 Forward 0101,90º 1010 101 4 Left 0101,150º 0010 101 8 Left 0101,120º 0010 110 4 Right 0101,30º 1000 110 8 Right 0101,60º 1000 111 12 Stop 0101,90º 1111 Fig. 11 Circuit Diagram of Considered Motor Drive System There are two H-bridge circuits to drive to motors and one part depends on two bits of PIC16F877A. Both circuits can be derived the Motors to be rotate only in 10 or 01 of these two bits. 00 and 11 means stopping Motor. Four NPN transistors are used as switch to change or choose the direction of current flows to the Motor. B. Software Consideration of Motor Drive System For Software consideration, the inputs and outputs considerations of Motor Drive System should be made as shown in Table II. For the assembly software programming of the control circuit, the process is very simply and the procedure can be mentioned as the following steps. 1. Initialization 2. Ports Declaration: all Port B s pins are declared as inputs, four MSB Port C pins are declared as outputs for Stepper and four LSB Port D pins are declared as outputs for H-bridge circuit. 3. Start program: Check RB 2 high or low Check RB 1 high or low Check RB 0 high or low 4. Determined outputs: - If all inputs data are low outputs Port D pins, 1010 for freely going forward for DC motor and make sure stepper in 90 degree. VI. EXPERIMENTAL RESULTS For Obstacle detection part, the result of data confirming of GP2D12 is shown in Figure.The main consideration result of this Control System, Navigational Consideration is made as shown in Table I. The experimental results of the Modeling and Simulink procedures of Motor Drive System are shown in Fig. 12 and Fig. 13. This Figure shows the result of analyzing the DC Motor internal circuit that it is suitable to use or not using MATLAB. And the Experimental results of Control System testing circuit for this process are shown in Fig. 14. Fig. 4 DC Motor Model created in MATLAB SIMULINK 414
Fig. 11 Scope Output of all Ratings (a) (b) (c) Fig. 12 DC Motor Driving Circuit Testing Photos VII. CONCLUSION For the purposes of making intelligent for Autonomous guidance Systems, Robotic Control Techniques are made to change safe and simple. Microcontrollers are used in this consideration of WMR Control System for their properties of low cost and effective to be easy in approaching methods. The microcontroller is a complete microprocessor system built on a single integrated circuit. Microcontrollers were developed into low cost products. The microcontroller must include a full or nearly implementation of a standard microprocessor, ROM or EPROM, RAM parallel I/O ports, timers and a clock. Also, it is common to include serial port. PIC microcontroller series are RISC (Reduced Instruction Set Computer) processor. This controller is constructed using CMOS technology and they have the low levels of power consumption associated with CMOS logic devices. The PIC microcontroller architecture provides one of the broadest product offerings, ranging from 8-pin, 12 bits instruction word to 84 pin, 16 bits instruction word devices. The PIC microcontrollers are used Harvard architecture, which means that they have separate buses for data and instructions. The ROM holds instructions, and the RAM is used for data. PIC software is normally written by two languages: C-programming and assembly programming which are widely used. Our goal in this project is to design a guidance system for an automated Wheeled Mobile Robot model. This system can navigate within a building to a number of predetermined positions, such as the bathroom or front door. Also the system can be derived with the keypad. During the implementation of the system, the autonomous model is taught how to navigate the desired destinations. Once the system has been set up, the operation is simple, the desired destination, one of the predetermined destination, is selected the Mobile Robot model automatically and safely navigates to the selected destination. The main goal to construct the Motor Drive System is by using its controller of PIC to control for the purpose of moving the Model Robot by the Navigated commands. Practical used of software and motor driven hardware are approached in this paper. 415
Interfacing and combination of Obstacle Avoidance System, Navigation System and Motor Drive System will activate the Model Wheeled Mobile Robot as a Maneuvering System by this Control System Considerations. MATLAB/SIMULINK is used because of the short learning curve that most students require to start using it, its wide distribution, and its general-purpose nature. This will demonstrate the advantages of using MATLAB for analyzing power system steady state behavior and its capabilities for simulating transients in power systems and power electronics, including control system dynamic behavior. This Robot System is suitable for many applications. To avoid obstacles with vision, CCD cameras are used instead of IR sensors and depend on require assignments, Ultrasonic Sensors are used also instead of IR.To determine the range of object, IR sensors are used and to determine the size or color of object, CCD cameras can be used. For the application of another type of WMR that used CCD camera to detect object by their size and color, the speed control of Motor must be change again. ACKNOWLEDGMENT Firstly the authors would like to thank their parents for their best wishes to join the PhD research. His Excellency Minister U Thaung, Ministry of Science and Technology will also get the authors great thanks for his special guidance to pay chances for them. Special thanks are due to their Supervisors: Dr. Maung Maung Latt (Professor and Head of EEcR Dept) and Dr. Yin Mon Myint (Lecturer and Head of Electronic Engineering Dept) from Mandalay Technological University, Mandalay, Union of Myanmar for their kindness of guidelines for this paper. The authors greatly express their thanks to all persons whom will concern to support in preparing this paper. REFERENCES [1] MathWorks, 2001, What is SIMULINK, the MathWorks, Inc. [2] EE505 Electrical Engineering Lab, Spring 2007, project paper, Lab2. DC Motor Control using a Microcontroller. [3] Microchip Technology, Inc.2001, PIC16F84A Data Sheet, www.microchip.com [4] Microchip Technology, Inc.2001, PIC16F877A Data Sheet, www.microchip.com [5] Daniel James Loughnane, 2001, Design and Construction of An Autonomous Mobile Security Device, Thesis, University of Waikato. [6] Sathish K. Shanmugasundaram, 2000, Control System Design for an Autonomous Mobile Robot, Thesis, University of Cincinnati. [7] Circuit explanation of Stepper Motor Controller, by the website: www.interq.or.jp. [8] Chapter 6, Simulation and optimizing the parameters, Control System Design for Autonomous Mobile Robot, M.Sc thesis, 2000, S.K.shanmugasundaram, Mechanical Dept., University of Cincinati, India. 416