Intellegent Master Slave Robot.
INTELLIGENT MASTER SLAVE ROBOT
NIK HAKIMI B NIK ABD HALIM
This Report Is Submitted In Partial Fulfillment Of Requirements For The Degree
of Bachelor In Mechatronic Engineering
FACULTY OF ELECTRICAL ENGINEERING
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
APRIL 2009
“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 Mechatronic Engineering”
Signature
: ……………………………….
Supervisor’s Name
: EN MOHD SHAHRIEEL BIN MOHD ARAS
Date
: 27 April 2009
“I hereby declared that this report is a result of my own work except for the
excepts that have been cited clearly in the references.”
Signature
: ………………………………
Name
: NIK HAKIMI B NIK ABD HALIM
Date
: 27 April 2009
Specially dedicated to my dearest mom, Che Azma Binti Che Ishak and dad,
Nik Abd Halim Bin Nik Yussof, my sister Nik Farhanim , my brother Nik Hafizzi and all
my fellow friends,
who have encouraged, guided and inspired me throughout my journey of education.
i
ACKNOWLEGMENT
First and foremost, I would like to thanks ALLAH s.w.t. because of HIM I’m
here standing and able to complete my project. I also take this opportunity to express my
deepest gratitude towards my project supervisor, En Mohd Shahrieel Bin Aras who has
persistently and determinedly assisted me this project. It would have been very arduous
to complete this project without the passionate supports and guidance encouragement
and advices given by him. My outmost thanks also go to my family who has given me
support throughout my academic years. Without them, I might not be able to become
who I am today. I am grateful to have love affection and care from all of my family
members as well. My fellow friends should also be recognized for their continual
support and encouragement. My sincere appreciation also extends to my entire course
mate and others who have provided assistance at various occasions. Their views and tips
are useful indeed Last but not least, thanks to individuals that has contributed either
directly or indirectly to make this thesis project. Without all these people helps,
encouragement, support, advices, this thesis project might not be successfully carried
out. Of course, as is usual, all errors and oversights are entirely my own. Thanks you
once again.
ii
ABSTRACT
The development of mobile robots has become popular among inventor
nowadays. In many applications multi robot systems are desirable for much reason. In
the case of planetary explorers, deploying more robots will enable coverage of large area
in a shorter time. Like ants and other insects, many cheap robots working together could
replace a single expensive robot, making a multi robot system more cost effective. Multi
robot systems can accomplish task that no single robot can accomplish, since ultimately
a single robot, no matter how capable, is spatially limited. In this project, i-MS will be
developed with two unit mobile robots as multi agent robot system that can perform
team movement in interacted with the environments. Multi agent mobile robots as
master-slave is able to move automatically on flat surfaces which it has ability of
obstacle avoidance where it will try to avoid collision for object that come in its way.
The robots will be controlled by PIC16F877A microcontroller. As for the software part,
there are two main of software development tools being used in building the multi agent
robot intelligence. There are the MPLAB Integrated Development Environment (IDE)
and PICC LITE. Two units of RC Servo Motor (C36R) are used as actuator for each
robot. KC Wirefree Bluetooth Module KC21 is used as communication method among
the robots which will allow master-slave behaviors. One of the robots will act as master
whiles another one as slave. The slave will follow the movement of master. The robots
have interchanging masterslave function based on environment.
iii
ABSTRAK
Semenjak akhir-akhir ini, penciptaan mobile robot menjadi semakin popular di
kalangan pencipta robot. Dalam banyak aplikasi, multi robot sistem sangat diperlukan
untuk beberapa perkara yang tertentu. Dalam kes penjelajahan planet, dengan
meletakkan beberapa robot akan membolehkan kawasan yang luas di litupi dalam masa
yang singkat. Seperti semut dan juga serangga yang lain, dengan meletakkan beberapa
robot murah yang boleh bekerjasama antara satu lain bagi menggantikan robot yang
mahal, ini menghasilkan sistem multi robot yang effektif. Multi robot boleh melakukan
kerja yang tidak boleh dilakukan oleh single robot kerana walaupun single robot
berkeupayaan tinggi tetapi rekabentuknya adalah terhad. I-MS, boleh dibangunkan
dengan dua robot dimana agen multi robot boleh melakukan pergerakan mengikut
persekitaran secara berkumpulan. Multi agent robot yang bertindak sebagai master boleh
bergerak secara automatic di atas permukaan rata dan berkeupayaan untuk mengesan
halangan di mana ia akan cuba untuk mengelak daripada berlakunya kemalangan. Robot
ini dikawal dengan menggunakan PIC 16F877A mikropengawal. Pada bahagian
software, terdapat 2 bahagian utama dalam membagunkan multi robot yang pintar ini.
Software yang digunakan adalah MPLAB Integrated Development Environment (IDE)
dan PICC LITE, dua unit RC Servo Motor (C36R) digunakan sebagai actuator untuk
setiap robot. KC Wirefree Bluetooth Module KC21 digunakan sebagai peranti
perhubungan di antara robot di mana ia akan mengikut perlakuan master-slave. Satu
robot akan bertindak sebagai master dan satu robot akan bertindak sebagai slave. Robot
slave akan mengikuti pergerakan robot master. Fungsi master-slave bagi robot akan
bertukar bergantung kepada persekitaran.
iv
TABLE OF CONTENTS
Chapter
Description
Pages
ACKNOWLEDGEMENTS
I
ABSTRACT
II
TABLE OF CONTENT
IV
LIST OF FIGURE
VII
LIST OF TABLE
X
1.0
INTRODUCTION
1
1.1
Objectives
1
1.2
Scope Of Work
2
1.3
Problem Statement
3
1.4
Research Methodology
4
2.0
3.0
LITERATURE REVIEW
6
2.1
Research Project
6
2.1.1
i-Mars
6
2.1.2
Insect Behavior Robot
8
2.1.3
EDUBOT
9
ROBOT DESIGN
10
3.0
Introduction Robot Design
10
3.1
I-MS Robot Mechanical Structure
12
3.1.1
Robot Frame Material
13
3.1.2
Wheel
14
3.1.3
Actuator
15
3.1.4
Bluetooth Module
16
3.1.5
Infrared
19
v
3.1.6
3.2
3.3
4.0
21
Software and Circuitry System
22
3.2.1
Circuitry System
22
3.2.2
Microchip PIC16F877A Microcontroller
24
3.2.3
PIC Startup Kit - SK40A
26
3.2.4
Bluetooth Communication Circuit
29
3.2.5
Power Supply Unit Circuit
29
3.2.6
Motor Driver Circuit
30
3.2.7
Infra-Red Sensor Circuit
31
Software Development
33
3.1.1
33
Programming for the robot
PROJECT DEVELOPMENT
4.0
Introduction
39
4.1
Mechanical Part
39
4.1.1
Robot Frame
39
4.1.2
Wheel
40
4.1.3
Jointing Wheel & The Base
40
4.1.4
Screw & Nut
41
4.1.5
Complete Base Of Mechanical Structure
42
4.2
4.3
5.0
Battery
Electrical Part
42
4.2.1
Sensors
42
4.2.2
Batteries
44
4.2.3
Polystyrene
45
4.2.4
Strip Board
45
4.2.5
Complete Of The Electrical Part
46
Wiring
47
RESULT AND DISCUSSION
5.0
Introduction
48
5.1
The Movement Of The Robot
48
vi
6.0
5.2
Robot Abilities
50
5.3
Project Evaluation
50
5.4
Summary
52
CONCLUSION AND FUTURE SUGGESTION
53
Reference
54
APPENDIX A
55
APPENDIX B
57
APPENDIX C
66
vii
LIST OF FIGURE
No
Title
Pages
1.1
Scope Of Project
3
1.2
Diagram illustrate the methodology
5
2.1
Three Robots Systems
7
2.2
Two Robots Systems
7
2.3
I-MARS Three-Layered Reactive
8
2.4
Insect Behavior
9
2.5
EDUBOT
9
3.1
Ideas Of The Design
10
3.2
Isometric View of i – MS Robot
12
3.3
Top View
12
3.4
Side View
12
3.5
Front View
12
3.6
Acrylic Base
13
3.7
Wheel
14
3.8
RC Servo Motor
15
3.9
RC Servo Motor Component
15
3.10
KC Wirefree Bluetooth Module KC 21
17
3.11
Infrared Emitter And Receiver
19
3.12
IR Signal Transceiver
20
3.13
Reflected IR Sensor
21
3.14
Type of Battery That Using for Robot Power Source
21
3.15
Type of Battery That Using for Motor Driver Circuit
22
3.16
Overview of Electrical System Block Diagram
23
3.17
PIC16F877A
24
3.18
Pin Diagram for PIC16F877A Microcontroller
25
3.19
PIC Startup Kit - SK40B
26
3.20
Schematic Diagram for Microcontroller with Boot Loader
28
viii
3.21
Bluetooth Module Circuit Board
29
3.22
Schematic Circuit for Power Supply Circuit
30
3.23
Schematic Diagram for Driver Motor
31
3.24
Infra-red Sensor Circuit
32
3.25
Infra-red pair sensors setup
32
3.26
Flow of the programming process
34
3.27
Make a new project in MPLAB
34
3.28
Select the language tool suite
35
3.29
Set the language tool location
36
3.30
Setting the build option for the project
36
3.31
MPLAB programming
37
3.32
Flow chat for i-ms multi agent mobile robot
38
4.1
Base Robot
39
4.2
Top layer of the robot
40
4.3
Wheel
40
4.4
Special press nut
41
4.5
Combination wheel, servo motor and base
41
4.6
Screw 2.7 inch
41
4.7
Castor wheel
41
4.8
Complete mechanical structure
42
4.9
Castor wheel height adjusted
42
4.10
Sensors
43
4.11
Voltage regulator
43
4.12
Sensor are placed
43
4.13
Target board battery
44
4.14
Motor Driver Battery
44
4.15
Polystyrene
45
4.16
Microcontroller Is soldered
45
4.17
Soldered Bluetooth
46
4.18
Soldered motor driver base
46
4.19
Complete Electrical Part
46
4.20
Schematic Circuit
47
ix
4.21
Complete Of i-MS multi agent mobile robot
47
5.1
Movement of the Multi Agent Mobile Robot
49
5.2
i-MS multi agent mobile robot
51
x
LIST OF TABLE
No
Title
Pages
3.1
Specifications for RC Servo Motor (C36R)
16
3.2
PIC16F877A Device Features
25
56
APPENDIX A
SCHEMATIC CIRCUIT OF ROBOT AND PSM PROJECT GANTT CHART
57
58
APPENDIX B
PIC16F877A DATA SHEET
59
60
61
62
63
64
65
NIK HAKIMI B NIK ABD HALIM
This Report Is Submitted In Partial Fulfillment Of Requirements For The Degree
of Bachelor In Mechatronic Engineering
FACULTY OF ELECTRICAL ENGINEERING
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
APRIL 2009
“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 Mechatronic Engineering”
Signature
: ……………………………….
Supervisor’s Name
: EN MOHD SHAHRIEEL BIN MOHD ARAS
Date
: 27 April 2009
“I hereby declared that this report is a result of my own work except for the
excepts that have been cited clearly in the references.”
Signature
: ………………………………
Name
: NIK HAKIMI B NIK ABD HALIM
Date
: 27 April 2009
Specially dedicated to my dearest mom, Che Azma Binti Che Ishak and dad,
Nik Abd Halim Bin Nik Yussof, my sister Nik Farhanim , my brother Nik Hafizzi and all
my fellow friends,
who have encouraged, guided and inspired me throughout my journey of education.
i
ACKNOWLEGMENT
First and foremost, I would like to thanks ALLAH s.w.t. because of HIM I’m
here standing and able to complete my project. I also take this opportunity to express my
deepest gratitude towards my project supervisor, En Mohd Shahrieel Bin Aras who has
persistently and determinedly assisted me this project. It would have been very arduous
to complete this project without the passionate supports and guidance encouragement
and advices given by him. My outmost thanks also go to my family who has given me
support throughout my academic years. Without them, I might not be able to become
who I am today. I am grateful to have love affection and care from all of my family
members as well. My fellow friends should also be recognized for their continual
support and encouragement. My sincere appreciation also extends to my entire course
mate and others who have provided assistance at various occasions. Their views and tips
are useful indeed Last but not least, thanks to individuals that has contributed either
directly or indirectly to make this thesis project. Without all these people helps,
encouragement, support, advices, this thesis project might not be successfully carried
out. Of course, as is usual, all errors and oversights are entirely my own. Thanks you
once again.
ii
ABSTRACT
The development of mobile robots has become popular among inventor
nowadays. In many applications multi robot systems are desirable for much reason. In
the case of planetary explorers, deploying more robots will enable coverage of large area
in a shorter time. Like ants and other insects, many cheap robots working together could
replace a single expensive robot, making a multi robot system more cost effective. Multi
robot systems can accomplish task that no single robot can accomplish, since ultimately
a single robot, no matter how capable, is spatially limited. In this project, i-MS will be
developed with two unit mobile robots as multi agent robot system that can perform
team movement in interacted with the environments. Multi agent mobile robots as
master-slave is able to move automatically on flat surfaces which it has ability of
obstacle avoidance where it will try to avoid collision for object that come in its way.
The robots will be controlled by PIC16F877A microcontroller. As for the software part,
there are two main of software development tools being used in building the multi agent
robot intelligence. There are the MPLAB Integrated Development Environment (IDE)
and PICC LITE. Two units of RC Servo Motor (C36R) are used as actuator for each
robot. KC Wirefree Bluetooth Module KC21 is used as communication method among
the robots which will allow master-slave behaviors. One of the robots will act as master
whiles another one as slave. The slave will follow the movement of master. The robots
have interchanging masterslave function based on environment.
iii
ABSTRAK
Semenjak akhir-akhir ini, penciptaan mobile robot menjadi semakin popular di
kalangan pencipta robot. Dalam banyak aplikasi, multi robot sistem sangat diperlukan
untuk beberapa perkara yang tertentu. Dalam kes penjelajahan planet, dengan
meletakkan beberapa robot akan membolehkan kawasan yang luas di litupi dalam masa
yang singkat. Seperti semut dan juga serangga yang lain, dengan meletakkan beberapa
robot murah yang boleh bekerjasama antara satu lain bagi menggantikan robot yang
mahal, ini menghasilkan sistem multi robot yang effektif. Multi robot boleh melakukan
kerja yang tidak boleh dilakukan oleh single robot kerana walaupun single robot
berkeupayaan tinggi tetapi rekabentuknya adalah terhad. I-MS, boleh dibangunkan
dengan dua robot dimana agen multi robot boleh melakukan pergerakan mengikut
persekitaran secara berkumpulan. Multi agent robot yang bertindak sebagai master boleh
bergerak secara automatic di atas permukaan rata dan berkeupayaan untuk mengesan
halangan di mana ia akan cuba untuk mengelak daripada berlakunya kemalangan. Robot
ini dikawal dengan menggunakan PIC 16F877A mikropengawal. Pada bahagian
software, terdapat 2 bahagian utama dalam membagunkan multi robot yang pintar ini.
Software yang digunakan adalah MPLAB Integrated Development Environment (IDE)
dan PICC LITE, dua unit RC Servo Motor (C36R) digunakan sebagai actuator untuk
setiap robot. KC Wirefree Bluetooth Module KC21 digunakan sebagai peranti
perhubungan di antara robot di mana ia akan mengikut perlakuan master-slave. Satu
robot akan bertindak sebagai master dan satu robot akan bertindak sebagai slave. Robot
slave akan mengikuti pergerakan robot master. Fungsi master-slave bagi robot akan
bertukar bergantung kepada persekitaran.
iv
TABLE OF CONTENTS
Chapter
Description
Pages
ACKNOWLEDGEMENTS
I
ABSTRACT
II
TABLE OF CONTENT
IV
LIST OF FIGURE
VII
LIST OF TABLE
X
1.0
INTRODUCTION
1
1.1
Objectives
1
1.2
Scope Of Work
2
1.3
Problem Statement
3
1.4
Research Methodology
4
2.0
3.0
LITERATURE REVIEW
6
2.1
Research Project
6
2.1.1
i-Mars
6
2.1.2
Insect Behavior Robot
8
2.1.3
EDUBOT
9
ROBOT DESIGN
10
3.0
Introduction Robot Design
10
3.1
I-MS Robot Mechanical Structure
12
3.1.1
Robot Frame Material
13
3.1.2
Wheel
14
3.1.3
Actuator
15
3.1.4
Bluetooth Module
16
3.1.5
Infrared
19
v
3.1.6
3.2
3.3
4.0
21
Software and Circuitry System
22
3.2.1
Circuitry System
22
3.2.2
Microchip PIC16F877A Microcontroller
24
3.2.3
PIC Startup Kit - SK40A
26
3.2.4
Bluetooth Communication Circuit
29
3.2.5
Power Supply Unit Circuit
29
3.2.6
Motor Driver Circuit
30
3.2.7
Infra-Red Sensor Circuit
31
Software Development
33
3.1.1
33
Programming for the robot
PROJECT DEVELOPMENT
4.0
Introduction
39
4.1
Mechanical Part
39
4.1.1
Robot Frame
39
4.1.2
Wheel
40
4.1.3
Jointing Wheel & The Base
40
4.1.4
Screw & Nut
41
4.1.5
Complete Base Of Mechanical Structure
42
4.2
4.3
5.0
Battery
Electrical Part
42
4.2.1
Sensors
42
4.2.2
Batteries
44
4.2.3
Polystyrene
45
4.2.4
Strip Board
45
4.2.5
Complete Of The Electrical Part
46
Wiring
47
RESULT AND DISCUSSION
5.0
Introduction
48
5.1
The Movement Of The Robot
48
vi
6.0
5.2
Robot Abilities
50
5.3
Project Evaluation
50
5.4
Summary
52
CONCLUSION AND FUTURE SUGGESTION
53
Reference
54
APPENDIX A
55
APPENDIX B
57
APPENDIX C
66
vii
LIST OF FIGURE
No
Title
Pages
1.1
Scope Of Project
3
1.2
Diagram illustrate the methodology
5
2.1
Three Robots Systems
7
2.2
Two Robots Systems
7
2.3
I-MARS Three-Layered Reactive
8
2.4
Insect Behavior
9
2.5
EDUBOT
9
3.1
Ideas Of The Design
10
3.2
Isometric View of i – MS Robot
12
3.3
Top View
12
3.4
Side View
12
3.5
Front View
12
3.6
Acrylic Base
13
3.7
Wheel
14
3.8
RC Servo Motor
15
3.9
RC Servo Motor Component
15
3.10
KC Wirefree Bluetooth Module KC 21
17
3.11
Infrared Emitter And Receiver
19
3.12
IR Signal Transceiver
20
3.13
Reflected IR Sensor
21
3.14
Type of Battery That Using for Robot Power Source
21
3.15
Type of Battery That Using for Motor Driver Circuit
22
3.16
Overview of Electrical System Block Diagram
23
3.17
PIC16F877A
24
3.18
Pin Diagram for PIC16F877A Microcontroller
25
3.19
PIC Startup Kit - SK40B
26
3.20
Schematic Diagram for Microcontroller with Boot Loader
28
viii
3.21
Bluetooth Module Circuit Board
29
3.22
Schematic Circuit for Power Supply Circuit
30
3.23
Schematic Diagram for Driver Motor
31
3.24
Infra-red Sensor Circuit
32
3.25
Infra-red pair sensors setup
32
3.26
Flow of the programming process
34
3.27
Make a new project in MPLAB
34
3.28
Select the language tool suite
35
3.29
Set the language tool location
36
3.30
Setting the build option for the project
36
3.31
MPLAB programming
37
3.32
Flow chat for i-ms multi agent mobile robot
38
4.1
Base Robot
39
4.2
Top layer of the robot
40
4.3
Wheel
40
4.4
Special press nut
41
4.5
Combination wheel, servo motor and base
41
4.6
Screw 2.7 inch
41
4.7
Castor wheel
41
4.8
Complete mechanical structure
42
4.9
Castor wheel height adjusted
42
4.10
Sensors
43
4.11
Voltage regulator
43
4.12
Sensor are placed
43
4.13
Target board battery
44
4.14
Motor Driver Battery
44
4.15
Polystyrene
45
4.16
Microcontroller Is soldered
45
4.17
Soldered Bluetooth
46
4.18
Soldered motor driver base
46
4.19
Complete Electrical Part
46
4.20
Schematic Circuit
47
ix
4.21
Complete Of i-MS multi agent mobile robot
47
5.1
Movement of the Multi Agent Mobile Robot
49
5.2
i-MS multi agent mobile robot
51
x
LIST OF TABLE
No
Title
Pages
3.1
Specifications for RC Servo Motor (C36R)
16
3.2
PIC16F877A Device Features
25
56
APPENDIX A
SCHEMATIC CIRCUIT OF ROBOT AND PSM PROJECT GANTT CHART
57
58
APPENDIX B
PIC16F877A DATA SHEET
59
60
61
62
63
64
65