Design A Line Following Mobile Robot With Distance Measurement.

(1)

DESIGN A LINE FOLLOWING MOBILE ROBOT WITH DISTANCE MEASUREMENT

AMIRUL NUR RASHID BIN MOHAMAD AHYAT MAY 2008


(2)

AMIRUL NUR RASHID BIN MOHAMAD AHYAT

This Report is submitted in Partial Fulfillment of Requirements for the Bachelor Degree of Electrical Engineering

(Control, Instrumentation & Automation)

Fakulti Kejuruteraan Elektrik Universiti Teknikal Malaysia Melaka


(3)

“I hereby declared that I have read through this report and found that it has comply the partial fulfillment for awarding the degree of Bachelor of Electrical Engineering

(Control, Instrumentation & Automation)”

Signature : ……… Supervisor’s Name : ……….


(4)

“I hereby declared that this report is a result of my own work except for the works that have been cited clearly in the references.”

Signature : ……….. Student : AMIRUL NUR RASHID BIN MOHAMAD AHYAT Date : 5 May 2008


(5)

iii

Dedication to my beloved parent. Thank you so much for helping.


(6)

ACKNOWLEDGEMENT

ASSALAMUALAIKUM. . .

Firstly I have to thank Allah S.W.T. because the goodness that gives me strength in order to complete my PSM project. I have successfully finished my PSM project even though I have to gone through many difficulties during the process to complete the project. Very special thanks to my parent because of their support in term of financial and advice. Also very special thanks go to my project supervisor, Mr Ahmad Aizan Bin Zulkefle who is so supportive and has contributed a lot of ideas, and advice to me for realizes this project. He also was committed in helping pain to train me to be a versatile designer or engineer. His words of encouragement have kept me going and his kindness has made this project a valuable experience.

Last but not least, thanks to all my friend for giving me so much supports to obtain the output of this project and spending their time teaching me about the PIC microcontroller connection, which seems to be very difficult for me to understand before.

All the knowledge gained at Universiti Teknikal Malaysia Melaka (UTeM) present here in my PSM project report. I would like to beg my forgiveness for any problems, which occurred during realization this project.


(7)

v

ABSTRACT

The main purpose of doing this project is to apply micro technologies to the other operational technologies which it can work independently. Mobile robots are autonomous machines that are capable of movement in a given environment in which they can perform desired tasks in unstructured environments without continuous human guidance. Different robots can be autonomous in different ways. Mobile robots are also found in industry, military and security environments, and appear as consumer products. A line following robot is one of the mobile robot where the robot is moving base on the line tracking. The main parts of this mobile robot are sensor, motor and controller. This mobile robot is being program to follow the black line on the white base or floor. The sensor will detect the line on the floor and send signals to controller to be processed. After that, it sends signals to motor to rotate and the robot is moving base on the signal given. To program the mobile robot, Programmable Integrated Circuit (PIC) microcontroller is used to detect black line and moving on the track. The mobile robot is also capable of measuring the distance travelled which is displayed on the Liquid Crystal Display (LCD) in a real-time.


(8)

ABSTRAK

Tujuan utama perlaksanaan projek ini adalah untuk mengaplikasikan teknologi di dalam pengoperasian sesuatu teknologi yang boleh bergerak sendiri. Robot mobil merupakan sebuah mesin yang mampu bergerak mengikut arahan yang diberi tanpa memerlukan pengawasan manusia. Robot-robot ini mempunyai tugas yang berlainan bergantung pada arahan yang telah diaturkan. Robot-robot ini boleh dijumpai di industri, kawasan-kawasan sekuriti serat bertindak sebagai penghantar produk. Robot mengikut garisan merupakan suatu robot yang bergerak mengikut garisan yang telah diaturkankan programnya. Robot ini akan bergerak sama ada pada garisan hitam dengan permukaan putih atau pada garisan putih dengan permukaan hitam bergantung pada arahan yang telah diprogramkan. Bahagian-bahagian utama robot mengikut garisan ini adalah seperti motor, mikro-pangawal dan pengesan. Pengesan ini akan mengesan garisan di permukaan lantai dan seterusnya menghantar isyarat pada mikro-pengawal untuk diproses. Selepas itu isyarat tadi akan menggerakkan motor dan robot akan bergerak mengikut isyarat yang diberi. Untuk memprogram robot ini, mikro-pengawal PIC digunakan untuk mengasan garisan. Robot ini juga mampu mengukur jarak pada masa yang sama ketika robot ini bergerak mengikut garisan tersebut. Jarak ukuran tersebut akan dipaparkan pada Paparan Kristal.


(9)

vii

TABLE OF CONTENTS

CHAPTER CONTENTS PAGE

SUPERVISOR DECLARATION i

DECLARATION ii

DEDICATION iii

ACKNOWLEDGEMENT iv

ABSTRACT v

ABSTRAK vi

TABLE OF CONTENTS vii

LIST OF TABLES xi

LIST OF FIGURES xii

LIST OF ABBREVIATIONS xiv

LIST OF APPENDICES xv

1 INTRODUCTION 1

1.1 Introduction 1

1.2 Problem Statement 2

1.3 Objective of project 2

1.4 Scope of project 3

1.5 Project Schedule (Gantt Chart) 3

1.6 Summary 3

2 LITERATURE REVIEW 4

2.1 First Review: Robotics Follow System and Method 4 2.2 Second Review: Mobile Robot 4 2.3 Third Review: Obstacle Following Sensor Scheme for

a Mobile Robot


(10)

2.4 Fourth Review: Robot System and Autonomous Mobile Robot

5

2.5 Fifth Review: Mobile Robot Sensor System 6 2.6 Sixth Review: Mobile Robot for Monitoring a Subject 7 2.7 Seventh Review: Air Gap Magnetic Mobile Robot 8 2.8 Eight Review: Image Transmission System for a

Mobile Robot

8

2.9 Ninth Review: Automated Robotic Measuring System 9 2.10 Tenth Review: Robotic Vehicle 10 2.11 Eleventh Review: Distance Measuring Apparatus and

Distance Measuring Method

11

2.12 Summary 11

3 METHODOLOGY 12

3.1 Flowchart of the Project 12 3.2 Project Implementation 14 3.2.1 Information Gathering 14 3.2.2 Literature Review 14 3.2.3 Conceptual Design 14 3.2.4 Selection of the Electronics & Electrical

Components

15

3.2.5 Designing the Electronics Circuits for the Robot

15

3.2.6 Software Design 15 3.2.7 Material Selections and Manufacture the Robot

Base

16

3.2.8 Assembled the Electronics & Electrical parts to the Robot

16

3.2.9 Test the Functionality of the Robot & Troubleshooting


(11)

ix

3.3 Line Following mobile Robot Design Considerations 16

3.3.1 Concept 16

3.3.2 General Dimension and Robot Shape 17 3.3.3 Wheel Configuration and Wheel 17

3.3.4.1 Sensor 17

3.3.5.1 Supply Voltage 18

3.3.6.1 Actuator 18

3.3.7.1 Drives 18

3.3.8.1 Controller 18 3.3.8.1 PIC Microcontroller 19 3.3.8.2 PIC 16F877A Pin Diagram 20 3.3.8.3. Input / Output Pins 21 3.3.9.1 Programming Languages 22 3.4 Conceptual Design of the Line Following Mobile

Robot

22

3.5 Actuators Selection 24

3.6 Sensors Selection 25

3.7 Base Selection 25

3.8 Controllers Selection 26

3.9 Summary 26

4 RESULT 27

4.1 Conceptual Design 27

4.2 Robot Base 28

4.3.1. Assembled the Electronic & Electrical Parts of Robot 28 4.41.1 Positioning of Sensors for the Robot 31 4.4.1 Develop and Testing the Electronics Circuit for

the Robot

32

4.4.21 Flowchart of Circuits Testing 34


(12)

4.6 Writing a Robot Program 38 4.6.1 Example of the Programming 39 4.6.2.1Program the PIC Microcontroller 39 4.7.1.1Test the Robot Functionality 41 4.7.1.1Result from the Test Run 42 4.7.2.1Robot Maze 42

4.8 Summary 44

5 DISCUSSION 45

5.1 QRD1114 Sensors Detect Black or White Line Tape on Different Surfaces

46

5.2 Distance Range of QRD1114 Sensing from the Surface 47 5.3 Supply Voltage for the Line Following Mobile Robot

System

47

5.4 Summary 48

6 CONCLUSION AND RECOMMENDATION 49

6.1 Conclusion 49

6.2 Recommendations 50

REFERENCES 51


(13)

xi

LIST OF TABLES

NO TITLE PAGE

3.1 Microcontroller Specification 20

3.2 Pins in PIC16F877 21

3.3 Motor 24

3.4 Sensors 25

3.5 Base 25

3.6 Controllers 26

4.1 Motor Response to Sensors 32

4.2 LED Functionality on Surface After Get Signal from PIC 36

4.3 Movement of the Motors 38

5.1 The Instruction of the Programming 45


(14)

LIST OF FIGURES

NO TITLE PAGE

2.1 Configuration of the Autonomous Mobile Robot 6 2.2 Functional Block Diagram According to a First

Embodiment of a Mobile Robot

7

2.3 Overall Block Diagram of the System Embodying the Present Invention

9

2.4 Embodiment of an Automated Robotic Measuring System 10 2.5 Block Diagram Showing the Structure of Distance

Measuring Apparatus

11

3.1 Project Flowchart 13

3.2 Pin Diagram of PIC16F877 20

3.3 Design Concept 1 23

3.4 Design Concept 2 23

3.5 Design Concept 3 24

4.1 Design Concept 1 27

4.2 The Acrylic Robot Base 28

4.3 Placement of the Sensors 31

4.4 Sensors Schematic Diagram 32

4.5 Construct Sensor Circuit on the Proto-Board 33

4.6 Flowchart of Circuits Testing 34

4.7 Left Sensor Detects White Surface 35 4.8 Right Sensor Detects White Surface 35 4.9 Middle Sensor Detects White Surface 35 4.10 All Sensors Detect Black Line 36


(15)

xiii

4.11 All Sensors Detect White Surface 36 4.12 Drive Motor Schematic Diagram 37

4.13 The L4128 39

4.14 Programming Built 40

4.15 Programming Compiled 40

4.16 Flowchart of Line Following Mobile Robot 41 5.1 Line Following Mobile Robot Circuit Diagram 46 5.2 Distance Between Sensors and Surface 47


(16)

LIST OF ABBREVIATION

PIC - Programmable Integrated Circuit LCD - Liquid Crystal Display

RAM - Random Access Memory LED - Light Emitting Diode IR - Infra-red

PLC - Programmable Logic Controller PMMA - Polymethyl Methacrylate


(17)

xv

LIST OF APPENDIX

NO TITLE PAGE

A Gantt Chart 53

B Full Programming of Line Following Mobile Robot 54 C PIC Microcontroller Programmer Manual (L4128D series) 59

D L293D Datasheet 60

E QRD1113/1114 Reflective Object Sensor Datasheet 65


(18)

CHAPTER 1

INTRODUCTION

1.1 Introduction

The word robot originated from the Czech word ‘robota’, which means 'slave labour'. The term robotics was coined by Isaac Asimov in his short science fiction in 1940s, in which he defined robotics as a study of robots. A robot is a re-programmable multifunctional manipulator designed to move material, parts, tools, or specialized devices through variable programmed motions for performance of a variety of tasks (Snyder, 1985).

The word robot is used to refer to a wide range of machines, the common feature of which is that they are all capable of movement and can be used to perform physical tasks. Robots take on many different forms, ranging from humanoid, which mimic the human form and way of moving, to industrial, whose appearance is dictated by the function they are to perform. Robots can be grouped generally as mobile robots (autonomous robots), manipulator robots (industrial robots) and self reconfigurable robots, which can conform themselves to the task at hand. Robots may be controlled directly by a human, such as remotely-controlled bomb-disposal robots, robotic arms, or shuttles, or may act according to their own decision making ability, provided by artificial intelligence. However, the majority of robots fall in-between these extremes, being controlled by pre-programmed computers. Such robots may include feedback loops such that they can interact with their environment, but do not display actual intelligence.


(19)

2

Mobile robots are autonomous machines that are capable of movement in a given environment in which can perform desired tasks in unstructured environments without continuous human guidance. Many kinds of robots are autonomous to some degree. Different robots can be autonomous in different ways. The most common class of mobile robots is wheeled robots. A second class of mobile robots includes legged robots while a third smaller class includes aerial robots, usually referred to as unmanned aerial vehicles. Mobile robots are also found in industry, military and security environments, and appear as consumer products. A path finding robot is one of the mobile robot where the robot is moving base on the line tracking. The main parts of the robots are sensor, motor and controller. The line can be in white / black line tape on the floor. The sensor will detect the line on the floor and send signals to controller to be process. After that it send signals to motor to rotate and the robot is moving base on the signal given.

1.2 Problem Statement

In factories, the workers usually moved objects or material manually. It will waste a lot of man power and also will waste money to employ them to do the task. This mobile robot can avoid this problem and make easier. Line grids can be placed on the floor to indicate the path that the robot requires to go.

1.3 Objectives

The main objective of this project is to assist and expose beginners who wish to learn about robotic system such as micro-controller (PIC16F877A), programming, electrical parts, electronic circuits and also to enhance knowledge and build the creativity in robotic field. Besides that, this project also design a line following mobile robot and display the distance measurement in real-time on the Liquid Crystal Display (LCD).


(20)

1.4 Scope of Project

The scope of the project is to design and develop a path finding robot using a line tracking. It consists of designing the electronics part and develops a program. The function of the robot is to find a path base on a line tracking and display the measurement on the LCD on the real time. The robot will move base on the white line on the dark floor sense by an infra-red sensor.

1.5 Project Schedule (Gantt Chart)

Project schedule is very important to manage the project. It can make us to finish the project on the fix time. So, it is very important to avoid us from delay the project. (Refer Appendix A)

1.6 Summary

This chapter explained about the introduction of the project and the backgrounds of the robot. Besides that, here are also explained about the problem statement, objectives and scope of project. Base of this factor, this project was selected to minor the problem.


(21)

4

CHAPTER 2

LITERATURE REVIEW

2.1 First Review: Robotic Follow System and Method.

Robot platforms, methods, and computer media are disclosed. The robot platform includes preceptors, locomotors, and a system controller, which executes instructions for a robot to follow a target in its environment. The method includes receiving a target bearing and sensing whether the robot is blocked front. If the robot is blocked in front, then the robot's motion is adjusted to avoid the nearest obstacle in front. If the robot is not blocked in front, then the method senses whether the robot is blocked toward the target bearing and if so, sets the rotational direction opposite from the target bearing, and adjusts the rotational velocity and translational velocity. If the robot is not blocked toward the target bearing, then the rotational velocity is adjusted proportional to an angle of the target bearing and the translational velocity is adjusted proportional to a distance to the nearest obstacle in front.

2.2 Second Review: Mobile Robot.

A mobile robot which has a communication with a detection target by a motion of the mobile robot or by an utterance from the mobile robot, the mobile robot includes: a personal identification unit detecting an existence of the tag based on a signal transferred from the tag and obtaining the identification information stored on the tag; a position information acquisition unit obtaining


(22)

distance information indicating a distance from the mobile robot to the detection target; a locomotion speed detection unit detecting a locomotion speed of the mobile robot; a personal information acquisition unit acquiring personal information based on the identification information; a communication motion determination unit determining contents of a communication motion based on the personal information; and an operation determination unit adjusting a start timing of each content of the communication motion based on distance information and on the locomotion speed of the mobile robot.

2.3 Third Review: Obstacle Following Sensor Scheme for a Mobile Robot.

A robot obstacle detection system including a robot housing which navigates with respect to a surface and a sensor subsystem aimed at the surface for detecting the surface. The sensor subsystem includes an emitter which emits a signal having a field of emission and a photon detector having a field of view which intersects the field of emission at a region. The subsystem detects the presence of an object proximate the mobile robot and determines a value of a signal corresponding to the object. It compares the value to a predetermined value, moves the mobile robot in response to the comparison, and updates the predetermined value upon the occurrence of an event.

2.4 Fourth Review: Robot System and Autonomous Mobile Robot.

The present invention relates to a robot system which includes an autonomous mobile robot as well as to the autonomous mobile robot. In the system in which monitoring is performed using the autonomous mobile robot which travels along a predetermined path, the present invention can reduce the interval between the time when a user requests transmission of images or the like and the time when the user obtains the images. The autonomous mobile robot travels along a predetermined path at predetermined times, a camera takes


(23)

6

photographs at predetermined locations during the travel along the predetermined path, images taken by the camera are stored, and the stored images are sent to a requesting cell phone or the like in response to a transmission request from the cell phone or the like. (Refer Figure 2.1)

Figure 2.1: Configuration of the autonomous mobile robot

2.5 Fifth Review: Mobile Robot Sensor System.

An object of the present invention is to provide a sensor system which can effect local communications suitable for exchanging information to avoid collisions between mobile robots. The sensor system also prevents collisions between the mobile robots and obstacles. The system is well-suited for a multi-robot environment where multiple mobile multi-robots operate. The system includes infrared signal transmitters installed in each of the multiple mobile robots for sending transmission data via infrared signals. The system further includes infrared signal receivers installed in each of the multiple mobile robots for receiving the transmission data sent by the infrared signal transmitters. Each mobile robot includes a control unit.

The control unit prepares transmission information which includes mobile robot identification information unique to the mobile robot. The


(24)

transmission information is included in the transmission data sent from the infrared signal transmitter. The control unit also extracts transmission information which is received by the infrared signal receiver.

2.6 Sixth Review: Mobile Robot for Monitoring a Subject.

A mobile robot with a diagram indicating a moving path of a subject and a diagram showing a connection between locations, is capable of generating a path on which a subject is predicted to move from information of the subject detected by a detector, a detecting direction of the detector along the path, or tracking the subject by tracing the path, and predicting a location of a destination of the subject even when the subject has moved to another location. Further, the robot is capable of determining an abnormality based on detected location of the subject.

(Refer Figure 2.2)

Figure 2.2: Functional block diagram according to a first embodiment of a mobile robot


(1)

2 Mobile robots are autonomous machines that are capable of movement in a given environment in which can perform desired tasks in unstructured environments without continuous human guidance. Many kinds of robots are autonomous to some degree. Different robots can be autonomous in different ways. The most common class of mobile robots is wheeled robots. A second class of mobile robots includes legged robots while a third smaller class includes aerial robots, usually referred to as unmanned aerial vehicles. Mobile robots are also found in industry, military and security environments, and appear as consumer products. A path finding robot is one of the mobile robot where the robot is moving base on the line tracking. The main parts of the robots are sensor, motor and controller. The line can be in white / black line tape on the floor. The sensor will detect the line on the floor and send signals to controller to be process. After that it send signals to motor to rotate and the robot is moving base on the signal given.

1.2 Problem Statement

In factories, the workers usually moved objects or material manually. It will waste a lot of man power and also will waste money to employ them to do the task. This mobile robot can avoid this problem and make easier. Line grids can be placed on the floor to indicate the path that the robot requires to go.

1.3 Objectives

The main objective of this project is to assist and expose beginners who wish to learn about robotic system such as micro-controller (PIC16F877A), programming, electrical parts, electronic circuits and also to enhance knowledge and build the creativity in robotic field. Besides that, this project also design a line following mobile robot and display the distance measurement in real-time on the Liquid Crystal Display (LCD).


(2)

3

1.4 Scope of Project

The scope of the project is to design and develop a path finding robot using a line tracking. It consists of designing the electronics part and develops a program. The function of the robot is to find a path base on a line tracking and display the measurement on the LCD on the real time. The robot will move base on the white line on the dark floor sense by an infra-red sensor.

1.5 Project Schedule (Gantt Chart)

Project schedule is very important to manage the project. It can make us to finish the project on the fix time. So, it is very important to avoid us from delay the project. (Refer Appendix A)

1.6 Summary

This chapter explained about the introduction of the project and the backgrounds of the robot. Besides that, here are also explained about the problem statement, objectives and scope of project. Base of this factor, this project was selected to minor the problem.


(3)

4

CHAPTER 2

LITERATURE REVIEW

2.1 First Review: Robotic Follow System and Method.

Robot platforms, methods, and computer media are disclosed. The robot platform includes preceptors, locomotors, and a system controller, which executes instructions for a robot to follow a target in its environment. The method includes receiving a target bearing and sensing whether the robot is blocked front. If the robot is blocked in front, then the robot's motion is adjusted to avoid the nearest obstacle in front. If the robot is not blocked in front, then the method senses whether the robot is blocked toward the target bearing and if so, sets the rotational direction opposite from the target bearing, and adjusts the rotational velocity and translational velocity. If the robot is not blocked toward the target bearing, then the rotational velocity is adjusted proportional to an angle of the target bearing and the translational velocity is adjusted proportional to a distance to the nearest obstacle in front.

2.2 Second Review: Mobile Robot

.

A mobile robot which has a communication with a detection target by a motion of the mobile robot or by an utterance from the mobile robot, the mobile robot includes: a personal identification unit detecting an existence of the tag based on a signal transferred from the tag and obtaining the identification information stored on the tag; a position information acquisition unit obtaining


(4)

5 distance information indicating a distance from the mobile robot to the detection target; a locomotion speed detection unit detecting a locomotion speed of the mobile robot; a personal information acquisition unit acquiring personal information based on the identification information; a communication motion determination unit determining contents of a communication motion based on the personal information; and an operation determination unit adjusting a start timing of each content of the communication motion based on distance information and on the locomotion speed of the mobile robot.

2.3 Third Review: Obstacle Following Sensor Scheme for a Mobile Robot.

A robot obstacle detection system including a robot housing which navigates with respect to a surface and a sensor subsystem aimed at the surface for detecting the surface. The sensor subsystem includes an emitter which emits a signal having a field of emission and a photon detector having a field of view which intersects the field of emission at a region. The subsystem detects the presence of an object proximate the mobile robot and determines a value of a signal corresponding to the object. It compares the value to a predetermined value, moves the mobile robot in response to the comparison, and updates the predetermined value upon the occurrence of an event.

2.4 Fourth Review: Robot System and Autonomous Mobile Robot.

The present invention relates to a robot system which includes an autonomous mobile robot as well as to the autonomous mobile robot. In the system in which monitoring is performed using the autonomous mobile robot which travels along a predetermined path, the present invention can reduce the interval between the time when a user requests transmission of images or the like and the time when the user obtains the images. The autonomous mobile robot travels along a predetermined path at predetermined times, a camera takes


(5)

6 photographs at predetermined locations during the travel along the predetermined path, images taken by the camera are stored, and the stored images are sent to a requesting cell phone or the like in response to a transmission request from the cell phone or the like. (Refer Figure 2.1)

Figure 2.1: Configuration of the autonomous mobile robot

2.5 Fifth Review: Mobile Robot Sensor System.

An object of the present invention is to provide a sensor system which can effect local communications suitable for exchanging information to avoid collisions between mobile robots. The sensor system also prevents collisions between the mobile robots and obstacles. The system is well-suited for a multi-robot environment where multiple mobile multi-robots operate. The system includes infrared signal transmitters installed in each of the multiple mobile robots for sending transmission data via infrared signals. The system further includes infrared signal receivers installed in each of the multiple mobile robots for receiving the transmission data sent by the infrared signal transmitters. Each mobile robot includes a control unit.

The control unit prepares transmission information which includes mobile robot identification information unique to the mobile robot. The


(6)

7 transmission information is included in the transmission data sent from the infrared signal transmitter. The control unit also extracts transmission information which is received by the infrared signal receiver.

2.6 Sixth Review: Mobile Robot for Monitoring a Subject

.

A mobile robot with a diagram indicating a moving path of a subject and a diagram showing a connection between locations, is capable of generating a path on which a subject is predicted to move from information of the subject detected by a detector, a detecting direction of the detector along the path, or tracking the subject by tracing the path, and predicting a location of a destination of the subject even when the subject has moved to another location. Further, the robot is capable of determining an abnormality based on detected location of the subject.

(Refer Figure 2.2)

Figure 2.2: Functional block diagram according to a first embodiment of a mobile robot