Upload
kojiro-hadate
View
16
Download
0
Tags:
Embed Size (px)
DESCRIPTION
sada
Citation preview
PSZ 19:16 (Pind. 1/07)
DECLARATION OF THESIS / UNDERGRADUATE PROJECT PAPER AND COPYRIGHT
Authors full name :
Date of birth :
Title :
Academic Session:
I declare that this thesis is classified as:
I acknowledged that Universiti Teknologi Malaysia reserves the right as follows :
1. The thesis is the property of Universiti Teknologi Malaysia.
2. The Library of Universiti Teknologi Malaysia has the right to make copies for the purpose
of research only.
3. The Library has the right to make copies of the thesis for academic exchange.
Certified by :
SIGNATURE SIGNATURE OF SUPERVISOR
880210015285
(NEW IC NO. /PASSPORT NO.) NAME OF SUPERVISOR
Date : Date :
NOTES : * If the thesis is CONFIDENTIAL or RESTRICTED, please attach with the letter from
the organisation with period and reasons for confidentiality or restriction.
UNIVERSITI TEKNOLOGI MALAYSIA
CONFIDENTIAL (Contains confidential information under the Official Secret Act 1972)*
RESTRICTED (Contains restricted information as specified by the organisation where research was done)*
OPEN ACCESS I agree that my thesis to be published as online open access (full text)
NUR AZIM FAHADA AHMAD
10
TH FEBRUARY 1988
ARTIFICIAL ANT ROBOT
2010/2011
AP DR. MOHAMAD NOH B. AHMAD
"I hereby declare that I had read this thesis entitled Artificial Ant Robot and in my
opinion, this thesis is sufficient in term of quality and scope for the purpose of awarding
a degree of Bachelor of Engineering (Electrical-Mechatronics)".
Signature :______________________________
Name : AP DR. MOHAMAD NOH B. AHMAD
Date : 23th
MAY 2011
i
ARTIFICIAL ANT ROBOT
NUR AZIM FAHADA AHMAD
A thesis submitted in partial fulfillment
Of the requirements for the award of degree of
Bachelor of Engineering (Electric - Mechatronic)
Faculty of Electrical Engineering
University Teknologi Malaysia
MAY 2011
ii
I declare that this thesis entitle Artificial Ant Robot is the result of my own research
except as cited in the references. The thesis has not been accepted for any degree and it
not concurrently submitted in candidate of any other degree.
Signature : _________________
Name : NUR AZIM FAHADA BIN AHMAD
Date : 23th
MAY 2011
iii
This thesis is dedicated to
My beloved mother and father,
To my family members, lecturers and friends,
for their guidance, encouragement and support.
iv
ACKNOWLEDGEMENT
First of all, I would like to thanks to Almighty Allah S.W.T for his willingness
and His blessing for me to complete this project. In this opportunity, I also would like to
extend my sincerest gratitude to my supervisor. Assoc. Prof. Dr. Mohamad Noh Bin
Ahmad who has determinedly and persistently assisted me during the whole course of
this project. He has been good mentor that continuously overloaded with ideas to
improve my project.
I want to thanks to all my family members, especially to my parents, Ahmad bin
Sarju and Siti Jariah Bt Jazuli for their love, morale support and prayers along my study.
Their idea and supports catalyzed me to perform well until the end of the project.
Lastly, I would like to thanks to my entire course mate who has been share all the
knowledges and ideas during my entire journey of education in UTM.
v
ABSTRACT
The main purpose of this project is to design and developed a legged robot that
can move autonomously. The legged robot also has much ability better than the wheeled
robot especially the capabilities to move in various surface and situation. These robots
have the ability to mimic as the ant. The use of the four legged robot is due to its ability
and stability. But, it required more actuator to move every joint. These also increase the
cost, the robot weight and the power consumption. Besides, the robot programming
becomes more complicated. This Artificial ant robot brain is using the PIC16F876A
microcontroller. The source code is assembled using the MicroC Pro. Three servo
motors and 2 pair of distance sensors are use for the robot.
vi
ABSTRAK
Tujuan utama dari projek ini adalah untuk membina sebuah robot berkaki yang
dapat menggantikan robot beroda supaya dapat melakukan pelbagai tugas. Robot
berkaki juga mempunyai pelbagai kemampuan yang lebih baik dari robot beroda
terutama kemampuan untuk bergerak dalam pelbagai permukaan dan situasi. Robot ini
memiliki kemampuan untuk meniru sebagai semut. Penggunaan robot berkaki empat
adalah kerana kemampuan dan kestabilan. Tapi, itu diperlukan aktuator lebih untuk
setiap gerakan sendi. Ini juga mengakibatkan peningkatkan kos, berat robot dan
pengambilan kuasa. Selain itu, pengaturcaraan robot menjadi lebih rumit. Ini semut
buatan otak robot menggunakan mikrokontroler PIC16F876A. Kod sumber di
dilancarkan/diprogramkan menggunakan MicroC Pro. Tiga motor servo dan 2 pasang
Infra red sensor digunakan untuk robot ini.
vii
TABLE OF CONTENT
CHAPTER TITLE PAGE
Title page i
Student admittance page ii
Dedication iii
Acknowledgement iv
Abstract v
Abstrak vi
Table of Content vii
List of Figures x
List of Table xii
List of Abbreviation xiii
1 INTRODUCTION 1
1.1 Problem Statement 1
1.2Overview of Project 2
1.3 Objective 2
1.4 The Ant Structure 3
2 LITERATURE REVIEW 7
2.0 Introduction
2.1 Master Slave Behaviour Spider Robot 8
2.2 An Autonomous Four-Legged Robot 9
2.3 Utm Spiders Robot 10
viii
3 METHODOLOGY 13
3.0 Introduction 13
3.1 The Flow of the Project 13
3.2 Description of the Overall Process 14
3.2 Stage 1 15
3.2.1 Conceptualization 15
3.2.2 Prototyping 15
3.2.3 Sourcing for the component 16
3.2.4 Fabrication of the mechanical structure 16
3.3 Stage 2 16
3.3.1 Design and implementation of the
electrical circuit.
16
3.4 Stage 3 17
3.4.1 Software Programming 17
3.4.2 Test, Modification and Fine Tuning 17
4 ROBOT DESIGN 18
4.1 Mechanical Design 18
4.1.1 The Robot Criteria 19
4.1.2 Legged Robot 20
4.1.3 Main Problem in Developing the Artificial
Ant Robot
21
4.1.4 Material Selection 21
4.1.5 Main Structure 22
4.1.6 Legs 22
4.1.7 Gripper 23
4.2 The Electronic Design 24
4.2.1 The Main Circuit Board 24
4.2.2 Voltage Regulator Circuit 25
4.2.3 Current Booster Circuit 26
ix
4.2.4 Microcontroller 26
4.2.5 Transducers 27
4.2.5.1 Servo Motors 27
4.2.5.2 Sensors 30
4.2.6 The Power Supply 32
4.3 Software Design 33
4.3.1 Microchip PicKit 35
5 RESULT AND ANALYSIS 37
5.1 Robot Movement 38
5.2 Problem and discussion 39
6 CONCLUSION AND RECOMMENDATION 41
6.1 Conclusion 41
6.2 Limitations 41
6.3 Recommendations 42
BIBLIOGRAPHY 43
APPENDIX 44
x
LIST OF FIGURES
Figure No. Title Page
1.1
Ants Physicals
3
1.2 Front View Of Ant 4
1.3 Ants Leg 4
1.4 The Ants Head 5
1.5 The Mouth Of Ant 5
2.1 Master Slave Behavioural Spider Robot 8
2.2 The Slave Transmitting Command 9
2.3 Illustration Of The Autonomous Four-Legged Robot 10
2.4 An Autonomous Four-Legged Robot 10
2.5 Utms Four Legged Spider Robot 11
3.1 Flow Chart Of All Process 14
4.1 Mechanical Structure Design Using Google Sketch 19
4.2 The Main Structure 21
4.3 The Gripper Is Closed 23
4.4 The Gripper Is Open 23
4.5 The Main Circuit With The PIC16F876A 24
4.6 9V To 6V Voltage Regulator 25
4.7 9V To5v Voltage Regulator 25
4.8 Current Booster Circuit 26
4.9 Pic16f876a Diagram 27
xi
4.10 The Servo Motor 28
4.11 The Characteristic Of The Rotation 29
4.12 The LM324 Comparator 30
4.13 Sample Of The Sensor Circuit 31
4.14 IR Sensor Signal Tranceive 32
4.15 IR Sensor Signal Reflected 32
4.16 Energizer 9 Volt Battery 33
4.17 The programming Flow Chart 34
4.18 Programming using the MicroC Pro 35
4.19 PicKit Tools. 35
4.20 The software for the PicKit 36
5.1 Artificial Ant Robot Side View 37
5.2 Right walking sequence 38
5.3 Left walking sequence 38
xii
LIST OF TABLE
Table No. Title Page
4.1
Servo Specification
28
4.2 The Robot Movement 34
xiii
LIST OF ABBREVIATION
I - Current
V - Voltage
J - Current Density
R - Resistor
IR - Infra Red
IC - Integrated Circuit
PIC - Programmable Integrated Circuit
W - Weight
H - Height
1
CHAPTER 1
INTRODUCTION
1.1 Problem Statement
Mobile robots are becoming a common sight nowadays. They can be seen
deployed in various situations to perform many different tasks. There are two major
types of mobile robots the wheeled and the legged mobile robots.
Wheeled robots are more common as they are easier to design and build. The
cost of building a wheeled robot is generally low. However, wheeled robots are more
suited to application on fairly even terrains as they are less adept when traversing
uneven or rough terrains.
Legged robots, on the other hand, are less common, although the interests in
them have been growing at a frantic pace over the past few years. Legged robots are
more difficult to design and built as compared to the wheeled robot. This is due the
complexity in designing the actuators and joints. These two factors are crucial in
determining the success of a design. The cost of building a legged robot is also generally
quite high. However, the legged robot has a distinct advantage over the wheeled robot.
They are more capable of traversing rough and uneven terrains.
2
1.2 Overview of Project
Artificial Ant Robot has behavior as ant robots. The robot is categorizes an
autonomous four legged insect robot. This robot can move using only three servo motors
as the engine for this robot. This robot is controlled by a microcontroller type
PIC16F876A as a brain of the robot and supported by integrated circuit as a driver with
electronic components. This Artificial Ant robot is autonomous robot that will be
equipped with several sensors to make it move as desired.
This robot is also equipped with a mouths gripper that functions as the tool to
grasps the small objects that disturb on his ways.
1.3 Objective
The main objective of this project is to build four legged insects robots that will
be actuated by three servos motors. This robot is also expected to be able to move
forward and backward and also overcoming barriers. The two servo motors will actuate
for the two pair of legs (4 legs) and the other one is for actuating for the gripper. The
gripper is assigned to show the angry emotion when something disturb on the ants
track. Generally, the objective can be divided into three parts, robots structural
construction (hardware), robots communication and robotic control system construction
(software).
For the step of construction and fabrication of robot structure, the main intention
is to make the robot move smoothly and stable like a real ants movement in all condition
and possesses terrific strength to be moved freely.
The construction step involves the skills of attaching the components onto
circuits, programming the micro controller and installation of sensors to the robot to
drive it into specific movement.
3
The final step is to combine both software and hardware specifications and
manipulates controlling system to control the movement of the Artificial Ant Robot.
1.4 The Ant Structure
Most ants are between 2mm and 10mm long. Some ants however, are mere
0.7mm and other nearly 3 cm long. Like other insects, ants have bodies that contain
three major segments: the head, the thorax (alitrunk), and the abdomen (gaster). Figure
1.41 shows the entire ants physical.
Figure 1.1: Ants Physicals
In all ants, at the back of head is an opening through which nerves, the beginning
part of the digestive tract and the blood pass into alitrunk.
4
Figure 1.2: Front view of Ant
The middle part of the body bears three pair of joined legs as shown in Figure
1.42, each of which ends in a claw. The legs are use not only for walking or running but
also for more dexterous tasks, such as handling food. Each of ants front legs contains
two combs that ant uses to clean its other legs and the antennae as shown in Figure 1.43.
Figure 1.3: Ants Leg
In males and young queens, the alitrunk contains two pairs of wings. Larger pair
of wings is on the front and a smaller on the rear. During flight, the hind pair of wings is
hooked to the rear edge of the front pair so that the two pairs function as a single unit.
Behind the alitrunk is the narrow petiole, a one or two segmented section that
form what appears like waist. The slender body part helps ants to bend while passing
through twisting underground tunnels.
5
The hindmost body section of the ant, called the gaster. It is contains the heart,
the most of the digestive system, the excretory system and the reproductive system. The
segments of the gaster are from a series of rings of different sizes, with the largest ring
in the middle.
The head of the ants consist of the antennae, mouth (gripper), eye and brain as
shown in Figure 1.4 and Figure 1.5. The brain of the ant will process information from
various sense organs via a nerves cord that runs along the lower side of the body. The
ants use the mouths grippe to grasp the solid food or other particle to be eaten or
relocate things. Once the food inside the mouth, the solid food enters into the chamber
will beneath the mouth opening where the mouth filter prevent solid particles from
entering the digestive tract.
Figure 1.4: The Ants Head
Figure 1.5: The Mouth of Ant
6
All the part of the ant body has their own function to their own body. The
autonomous Artificial Ant Robot is designed to be the autonomous robot that has the
function and movement merely same to the real ant. The difference of theconstruction of
the robot from the original ant physical are only use two pair of legs and there is no
wings.
7
CHAPTER 2
LITERATURE REVIEW
2.0 Introduction
Recently, there are many robot projects that are inspired from the biological
insect structure and functions. There also many similar and relevant projects that can be
found and search across the internet from the other individual projects from many
universities and the projects from many researches group across the world.
In this chapter, the discussion will be made on the quadruped robot which is
relevant to the project objectives. There are few approaches such as the bio-mimetic
approach and the functional similarity approach to build the biological inspired robot.
The basic method of designing the Artificial Ant robot is the robot will be build
to imitate the function of the biological creature and not necessarily mimicking the
physical appearances. Then, by using the functional similarity approach in building the
robot, it may help to eliminate the need for extra gears, motors and bearings which
might complicate in the construction of robots and result in high costs, weight and
premature failure (Bar-Cohen 2002).
Nowadays, there are many project carried out that can be found in many
universities that search across the internet. Some of them are listed below:
8
2.1 Master Slave Behavior Spider Robots
Figure 2.1 shows that the compact robot designs that is improved from the
UTMs Spiders Robots. Basically, for Master-Slave spider robot design refer to this
existing robot for mechanical design. This robot operated with two servo motors and
simple circuit design. This legged robot able to walk onto inflated surface, grumble and
grassed.
Figure 2.1: Master Slave Behavioral Spider Robot
The Master Slave Behavioral Robot has two robot acted as the master robot and
the follower robot. The masters robot transmits the signal to the follower by using the
transmitter.
9
Figure 2.2: The Slave Transmitting Command
This Four Legged Spider Robot is very light in weight and the design is unique.
Thats why the researcher made a selection to choose this design for Artificial Ant
Robot. The legs robot is specializes to function like behavioral spiders robot.
Robot Specifications:
Motor : Futaba S3003, 7.3V maximum voltage with
interlock
Power Source : 9V batteries
Sensors : Infra Red sensors
PIC for Sensor : LM 324
Microcontroller : PIC16F627 by Microchip
PIC for Transmitter @ receiver : PT2262 and BX315A
2.2 An Autonomous Four-Legged Robot
This project objective is to design a legged robot at a minimum cost but at the
same time it without affecting the robot capability. Figure 2.21 shows that the
illustration of the robot.
10
Figure 2.3: Illustration of the Autonomous Four-Legged Robot
The scope of the project is to design a mechanical structure with dimension
approximately 18 cm length, 16 cm width and 7 cm height.
The controller which consists of PIC18F452 microcontroller and appropriate
electronic circuitry will be feed input from two analog sensors (front) and drive the three
servos motors as the actuators based on specific command.
Figure 2.4 : An Autonomous Four-Legged Robot
11
Finally, this project is focusing on the programming aspect to control the robots
movement. The suitable program arrangement needs to be programmed to ensure
smooth movement of the robot and able to respond sensitively to sensor.
2.3 UTM Spiders Robot
This robot as shown in figure 2.31 is a compact and simple design. The robot is
actuated by two servo motors and simple circuit design. Basically, for Artificial Ant
Robot design refer to this existing robot for the mechanical structures design.
Figure 2.5: UTMs Four Legged Spider Robot
This robot as shown in figure 2.31 is a compact and simple design. The robot is
actuated by two servo motors and simple circuit design. Basically, for Artificial Ant
Robot design refer to this existing robot for the mechanical structures design.
This robot movement mechanism is also very simple and works efficiently. This
legged robot also able to walk onto inflated surface, grumble and grasses. The Four
Spider Robot very light in weight and the that is why the researcher made a selection to
use this design for Artificial Ant Robot.
12
Robot Specifications:
Motor : Futaba S3003, 7.3V maximum voltage with interlock
Power Source : 9V Duracell batteries
Sensors : Infra Red sensors
PIC for Sensor : LM 324
Microcontroller : PIC16F627 by Microchip
13
CHAPTER 3
METHODOLOGY
3.0 Introduction
Generally, building an autonomous robot required knowledge from various
aspects, discipline and studies. Thus a systematic approach is crucial in the development
process. This chapter describe the development methodology and guidelines in
designing the quadruped robot that will emulate the functional similar to the objectives.
All the process can be divided to three main categories which is mechanical design, the
software design and the circuitries design. Later, both design will be integrated together
to build up the entire system.
3.1 The Flow of the Project
The entire project plans are split into three steps which make it easier, systematic
and manageable to be implemented. The project will run with splitting sections because
it will have different role and process. The stage 1 will cover about designing the robot
fabrication of the mechanical system while the second stage involves the design and
implementation of the electrical circuit. The stage three involves the software
programming, test and modification of the robots for enhancement.
14
The project was carried out for the two semesters and the implementation of the
project for the stage 1 is for the semester 1 and the stage 2 and stage 3 for the semester 2.
The flow chart in Figure 3.1 below shows the entire plan of the project.
Figure 3.1: Flow Chart of All Process
15
3.2 Stage 1
This stage will involve the conceptualization, prototyping, sourcing components
and the fabrication of the mechanical structure.
3.2.1 Conceptualization
From the objective that we have create for the project, from the various of robot
design had been analyze with their own specific functions to get the idea how to design
the robot with the simples mechanism can optimize the whole operation of the robot.
The analysis is base on the advantages of the robot design and the mechanism of the
robot. The choice of the design is choose based on the practicality, cost and capability.
3.2.2 Prototyping
The prototyping process started with the sketching all the mechanism for the
entire robot with the functioning part. Then, we will design and construct the body of the
robot with the plastic sheet, bolt and nut, Styrofoam and the aluminum sheet as we
sketch earlier. The bolt and nut are used to enable the rotational motion of the robot. The
prototype also used to identify the best cutting size and placement of the entire
component.
16
3.2.3 Sourcing for the Component
Firstly, the information of the entire component from various kinds of type is
collected. Secondly, the most suitable component is selected based on the capability and
practicality of the component functions to fulfill the objectives.
3.2.4 Fabrication of the Mechanical Structure
Firstly, the design of the mechanical structure is sketched by using the AutoCad
2007 and Google Sketch for two and three dimensions. We start construct the robot with
the frame of the body and the legs by using the aluminum plates. Motorcycle rims stick
is used to create the legs according the dimension properly. Then, the body of the robot
is tested for the durability. Lastly, the body must be modified and change to get the exact
function.
3.3 Stage 2
The stage 2 involves design and implementation of the electric circuit.
3.3.1 Design and implementation of the electrical circuit
Firstly, the electric circuits of the robot component are drawn using the Proteus
7. The electric circuit is split to three parts. Firstly, the main board circuit is connected to
the power supply circuit (voltage regulator), the Infra Red sensor circuit and the all
component that connect without the interface with other addition electrical interface.
The second and the third circuits is the power supply and Infra Red circuit. When all the
component on the circuit are purchased, we need to connect all the component in the
17
board in simples way and only small size of board are required to make the robot looks
simple. When we have completed the circuit, we must test the circuit to make
modification when the problem detected.
3.4 Stage 3
This stage involves software programming, test, modification and fine tuning.
3.4.1 Software Programming
The first step is the program that we want to create is identified and listed. Then
the flow of the program is drawn. After that, the program is written as the flow that we
have been created and the program is rechecking back after finish. Then the program
assembled using Micro-C Pro and the problem or error that arises must be refining back.
Lastly the program is tested with the rob`ot and problem that arises must be identified
and corrected.
3.4.2 Test, Modification and Fine Tuning
The robot now is given a trial run testing its gait. Modification must be carried
out on its gait when necessary. Then the front and back leg are modified and tested with
the various configurations to find the most stable and durable. After that, different
material and design of the feet padding of the robot are tested and the most give smooth
and suitable movement is chosen. Lastly, all the electrical connection and mechanical
structure were checked and tightened.
18
CHAPTER 4
ROBOT DESIGN
4.0 Introduction
This chapter discusses the design of the mechanical structures, electronic
circuitries and micro controller programming of the autonomous Artificial Ant Robot.
All the main components must be carried out nicely for developing the robot.
4.1 Mechanical Design
The mechanical design is the crucial that should be focused because the
mechanical structure will enable the robot to move and operate as we want. The legged
robot is also more complicated and difficult to design in order to achieve the objective of
the project. The good combination of programming and suitable mechanical structure
design, the ant robot can move forward, backward, turn left and turn right easily and
smooth. It also will give the best result for the movement of the ant robot in the aspect of
the speed, strength and distance. All the movements are inspired from the movement of
the ant, spider and cockroaches.
19
Figure 4.1: Mechanical Structure design using Google Sketch
4.1.1 The Robot Criteria
The hardware design of the Autonomous Artificial Ant Robot is designed with
the scope that is:
The robot is expected to have walking capabilities forward, backward,
turning right and turning left.
Uses 3 servo motors- 2 pair of leg and mouth gripper.
Use 2 set of Infra Red sensor.
The robot's brain is based on a PIC microcontroller, connected with 3 set of
servo, it will operates upon receiving command signal from the switch and
I/R sensor.
An autonomous robot
Easy to carry
There are many references are collected and used as a guidance for this project.
Many information had been gathered across the university through the internet
especially information regarding to robots structure and the mechanism. Among the
20
existing robot designed those have been looked into for this project is Four Legged
Spider Robot, Master Slave Behavior Spider Robot and An Autonomous Four-Legged
Robot. Artificial Ant Robot moves using only three motors. Below are the robots
features that may exist in other type of robots:
1) Using only three motors, ease of programming to enables robot to move in any
directions.
2) Less in weight, reduce the power needed by the robot.
3) Wide and low gravity centre, ease to spot the stability point in static or moving.
Basic structure of robot was built using metal rods (motorcycle rims stick) as
legs, pieces of aluminum iron as the spine and servo motors functioning as the body.
Apart of that, screws and aluminum pieces are used to hold the circuits on the robot.
4.1.2 Legged Robot
The main purpose creation of the legged robot is to overcome the problem faced
by the wheeled robot. Nowadays, there are various types of the legged robot become
popular from wheeled robot because of its capabilities even it is more complicated and
the cost not effective.
Most existing mobile robots rely on wheels for locomotion. This is the best
solution for traversing relatively even surfaces, but wheeled robots have difficulties
dealing with obstacles which legged robot can simply step over. On the other hand,
wheeled robots are inherently stable, since the wheels are intended to remain on the
ground. A legged robot must shift its center of gravity as it walk in order to maintain
stability. In addition, the driving mechanism for a wheeled vehicle can be relatively
simple and cheap to construct, while the leg mechanism requires complicated linkages
21
and multiple motors, as well as sensors to determine the location of the leg relative to the
ground. The Figure 4.2 below shows the basic mechanical structure.
Figure 4.2: The Main Structure
4.1.3 Main Problem in Developing the Artificial Ant Robot
There are many problem encountered during the developing the Artificial Ant
Robot. Firstly, the challenge when getting the right posture of the ant robot to ensure the
static stability and dynamic while moving. Secondly, the challenge when creating the
forward movement, backward, turns right and turn left. Thirdly, the creation of the robot
which is too heavy from that we had expected. Lastly, the robot needs extra power to
supply to all the 3 servos and some modification must be done to the power supply.
4.1.4 Material Selection
The material selection is also the crucial part in the designing the robot. A good
material selection can affect the success of this project. Therefore, to build the small
22
robot, the material is selected based on the weight, strength, flexibility and ease to
reshape. This is including the selecting the suitable recycled material from all sources.
4.1.5 Main Structure
The main structure of the robot is made from the aluminum sheet that had been
cut and bends to the dimension required. The main structure of the robot consists of the
body frame and the head frame.
The main function of the main structure is to hold all the body part and as the
platform of the electrical circuit. Therefore, it is very important that the main structure is
constructed from material that is robust so that it can withstand the weight of the whole
robot as well as the abuse that the robot might experience during its operation. The
selection and design of the main structure also must be light and suitable enough to
reduce the stress to the servo motors. Less weight can make the robot more stable and
easy to move.
4.1.6 Legs
The criteria for the material for the robots legs are that it must be strong and
rigid enough to withstand the stress that is subjected to it during the operation of the
robot. A rigid leg will also ensure that the maximum power transfer is achieved so that
the robot will move efficiently. The legs part must be easy to form. The items that were
identified for possible use are the coated metal from the iron hanger and the spoke of the
motorcycle rim. The characteristic of the both of them is very strong and firm. After all,
we chose the spoke from motorcycle rim as the legs because it easier to assemble.
23
4.1.7 Gripper
The criteria for the gripper of the artificial Ant Robot are must be strong, very
light and easy to reshape or bend. The gripper inspired from the biological gripper that
can hold and grip small things. The gripper also must be firm or rigid when it combines
with the head of the ant robot. For the 1st trial, we use the aluminum sheet (1mm) make
gripper. But there is to heavy even the gripper can move properly. The material that we
chose is the Perspex (like plastic) that can be reshape easier by using knife, small saw
and bend using heat. All the join that make the mechanism can move are by using the
bolt and nut. We also make sure that the head and the gripper of the Artificial Ant robot
light enough to avoid from disturbing the motion of the ant. Figure 4.3 and Figure 4.4
shows the gripper mechanism.
Figure 4.3: The gripper is closed
Figure 4.3: The gripper is open
24
4.2 The Electronic Design
The electronic design of the robot arm involves the design of the main controller
circuit board. This main controller circuit board will control the entire operation of the
Artificial Ant Robot. Besides main controller board, the voltage regulator 5V for PIC,
the voltage regulator 6V with current booster for Servomotors and the circuit of the Infra
Red sensors with the comparator are designed.
4.2.1 Main Circuit Board
The main circuit board that we design are connected with the infra red sensor
circuit, the voltage regulator circuit (9V to 6V and 9V to 5V), the servos motors, the
indicator of led and the distance sensors.
Figure 4.5: The main circuit with the PIC16F876A
25
4.2.2 Voltage Regulator Circuit
The artificial Ant robot needs the voltage regulator to supply power of 5 volt to
the main circuit and 6 volt to the servos motors. The needs of the voltage regulator are to
reduce the voltage value and make the current supply more stable. When the voltage
source from any kinds of source is regulated, the voltage supply are more stable and safe
to be used for whole circuitries. Figure 4.6 and Figure 4.7 shows the circuits of both
voltage regulators.
Figure 4.6: 9V to 6V Voltage Regulator
Figure 4.7: 9V to5V Voltage Regulator
26
4.2.3 Current Booster Circuit
Current boaster is use in this project since the servo need constant 1Ampere
current. LM 7806 in the voltage regulator circuit limits the current to only 0.1Ampere.
Thus current booster must be use for this project in order to get the desired current
supply. In earlier trouble shooting part, the robot didnt work properly because the
current supply is too low. Thus, the current booster circuit had been installed to
overcome the problem as shown in figure
Figure 4.8: Current Booster Circuit
4.2.4 Microcontroller
For the main controller circuit board, the PIC16F876A is used as the processor
for the Artificial Ant Robot. There is where all the program sequences will be stored and
the robot executes the sequences when it is called. It is a device that can be
reprogrammed because it uses flash read-only memory for program storage. It has a total
of 28 pins and has 4 input/output ports. The 3 input/output ports are Port A, Port B and
Port C. The project select the PIC16F876A because it has the ADC converter and have
enough I/O pin for whole circuit diagram. It is small enough to locate on the main board.
27
Figure 4.9: PIC16F876A Diagram
4.2.5 Transducers
A transducer is a device that converts one type of energy to another type of
energy. The conversion can be from electrical, electro-mechanical, electromagnetic,
photonic and photovoltaic or any form of energy to another form of energy. Any devices
that convert energy also can be categorized as transducer. The transducer that we use in
this project is Infra red sensor, distance sensors and the servos motors.
4.2.5.1 Servo Motors
The movement of the robot arm totally depends on the servomotors. Therefore,
the right selection of servomotors is vital in order for the robot arm to perform the
movement of sequences smoothly. For this robot arm, a servomotor labelled as Cytron
C55S & C40S was chosen to be used. It is produced by Cytron Technologies. Figure 3.9
28
shows the Cytron C55S servomotor. This servomotor rotates in half circle of 0 degree to
180 degrees.
Figure 4.10: The Servo Motor
Table 4.1 below shows the specification of the Cytron C55S and C40S
servomotor. This is affordable enough for the robot arm to work strongly.
Table 4.1: Servo Specification
Model C55S C40S
Weight (g) 55 38
4.8V Speed/60 0.22 0.19
Torque (kg-cm) 9.00 6.00
6.0V Speed/60 0.20 0.16
Torque (kg-cm) 11.00 7.00
7.2V Speed/60 0.17 -
Torque (kg-cm) 13.00 -
29
All of the servomotors used in this project were joined to the link by using the
servo horn. This servo horn was provided together with the servomotor. It mounts firmly
the connection and this helps in moving the links to the position desired.
The tuning for the rotation of the servo motor can be done using the
programming and the power impulse that we give to the servos. The standard duty cycle
for the power pulse of the servo is 20 mili second. The degree and the torque are
manipulated using the programming on the power supply from the microcontroller.
Figure 4.11: The characteristic of the rotation
30
4.2.5.2 Sensors
Sensor Circuit is a circuit that received analog signals from sensor and
transforms it into digital signals to be sent to PIC16F876A. Integrated Circuit LM324 as
shown in Figure 4.12 is used to transform analog signals to digital signals. Analog
signals are transformed to digital signals to distinguish the input voltage from sensor
with reference voltage LM324. If the input voltage is smaller than reference voltage,
output 0 will be sent to microcontroller while bigger input voltage will provides output 1
to microcontroller.
Sensor used is an infrared type. Transmitter and receiver are combined to
produce better responses towards objects or obstacles. Transmitter will send infrared
signals, and receiver receives the signals when it reflects on objects or obstacles.
Figure 4.12: The LM324 Comparator
Infra-Red sensors consist of a pair of transmitter and receiver as shown in Figure
4.13. A pair of infra-red sensor will be emitted by the sensor, reflected by the target and
received by the sensor. Infra-red sensor can be classified into two categories, which are
Reflective Infra-red Sensor and Transmissive Infra-red Sensor. Both categories contain
31
an infra-red photodiode to emit the light and an infra-red detector to sense (absorb) the
emitted light. The difference lies in the lights penetration path.
Figure 4.13: Sample of the Sensor Circuit
The reflective sensor function to emit light (beam signal) strikes the target and
reflected back to the detector. It is normally used as presence sensing. With the
transmissive detector, the photodiode are pointed at one another by face to face
arrangement, and the target interrupts the beam path.
32
Figure 4.14: IR Sensor Signal Tranceive
Figure 4.15: IR Sensor Signal Reflected
4.2.6 The Power Supply
In this project, I will use the Energizer 9 Volt battery as the main source
of the robot. This battery was selected because it small, light and can supply enough
current for the servos and main circuit. The battery is rechargeable and it can give move
current supply than the other type of compact battery.
33
Figure 4.16: Energizer 9 Volt Battery
4.3 Software Design
Figure 4.17: The programming Flow Chart
34
Figure 4.17 shows that the application flowchart that has been use to guided the
project. First, the robot is switched on. Then, there is two push buttons that function as
the buttons selector for number of function and the other is button for execution. Then
the robot will operate depend on its function selection until the push for another time on
reset button to execute another function or stop.
The function that has been build is in Table 4.2:
Table 4.2: The Robot Movement
NO. of
Functions
Functions
1 Move straight forward
2 Move straight forward until the two
sensor detect obstacle, move backward.
3 The robot avoid the obstacle
4 The robot move in pattern 1
Several softwares had been used for reason such programming the
microcontroller and uploading the program into a microcontroller. The software
selection is depends on it capability and the simples to be operated. The software that we
use is MicroC Pro with the simple c programming.
35
Figure 4.18: Programming using the MicroC Pro
4.3.1 Microchip PicKit
Once the source code file has been completed and built successfully using the
compiler, the file with extension of the hex file will exist in the same folder as directory.
Next, to load the .hex file into the robots microcontroller the PICkit was used.
Figure 4.19: PicKit Tools.
36
Figure 4.20: The software for the PicKit
The microcontroller must be connected to the laptops USB using USB ICSP
programmer in order to upload the hex file into the microcontroller. The USB ICSP
Programmer then connected to the 10-pin straight box that prepared on the main board
of circuit main controller.
Once connected and launched the PICkit 2 program successfully, the displayed
window will been found by the programmer and software. Then, import the extension
.hex file from the specified directory and write the file. The chosen .hex file will
automatically loaded to the microcontroller. show up and the status box will state
device found which mean that the PIC16F876A have.
37
CHAPTER 5
RESULT AND ANALYSIS
The Figure 5.0 below shows the result of the Artificial Ant Robot that has been
finished. Most of the objective of the project had been achieved. The robot can move in
various type of movement such as move forward, backward, turn right, turn left and also
open and close their gripper.
Figure 5.1: Artificial Ant Robot Side View
This is can be done because of the combination of the three part of the robot
mechanism are builds according the suitable combination. It go through a long period of
fine tuning to get the exact proper movement. The Figure 5.2 and Figure 5.3 show the
left and right walking sequences.
38
Figure 5.2: Right walking sequence
Figure5.3: Left walking sequence
5.1 Robot Movement
The movements of the robot that we create are the combination of the simples
movement like figure above. The front legs and the back legs must move simultaneously
to give enough torque to the robot. The combination of the movement is for the left
sequence movement is the front servo must turns 450 degree while the back servo also
turns 450 degree (because the installment is opposite) with the different time execution
can be varies from 0 s to 0.2 s of the front leg and back legs. Then, the combination of
the movement is for the right sequence movement is the front servo turns 1350 degree
and the back servo also turn1350 degree with the different time execution can be varies
39
from 0 s to 0.2 s of the front leg and back legs. The combination of the two simple
movements will result 1 step of forward. Then the straight forward movement can be
programmed with the repetition of the 1 step forward movement.
The backward movement also can be implemented with the method same like the
forward movement but the back legs movement led the front leg movement. The
different time for the execution is between 0 s to 0.2 second.
The side movement also can be implemented on this robot by manipulating the
back legs degree rotation. The rotation of the back legs is bigger on the left side to make
the robot turn to the right side and vice versa. The rotation needs at least 8 steps to make
the turning movement smooth.
The gripper movements only use the servo to turn on 900 degree to make the
gripper close and 1800 degree to make the gripper open. The movement of the gripper
show the ant robot in angry mode.
5.2 Problem and discussion
There are several minor problem occur during the manufacturing process of this
robot. First, the servo motors do not have constant current. This can be detected when
the servo motor at the body of the robot cannot push the robot upward. The problem is
because, voltage regulator, LM7806 in voltage regulator circuit limit the output current
only to 0.1A. Servo motors need at least 1A to maximize its potential. The problem is
solved by using current boaster circuit. Current boaster make is one by making simple
adjustment at voltage regulator circuit by adding transistor TIP2933 and few resistors
and capacitors.
40
The other problem is the sensor and the push button didnt work properly. After
we analyze all the programming structure, we try to build the programming in switch
mode to replace the if-else mode in order to make the push button and sensors to work.
Then, the programming run well with the objective desired.
The mechanism of the Artificial Ant Robot is too heavy from the preliminary
work. The preliminary assumption is going worse. the robot cannot walk properly
because of the power of the servo motor is low. After we make some modification on the
power supply and the programming on the servo to give extra signal pulse to the servo,
the servos run well. Then with the enough power (torque) and capability of the servo
mechanism, we can make the robot move well as we desired.
41
CHAPTER 6
CONCLUTION AND RECOMMENDATION
6.1 Conclusion
This thesis have discuss all about developing the artificial Ant Robot that can
move in various direction and surface with the capability to avoid the obstacles. As the
result, this project successfully meeting its objectives. This robot is successfully control
by the PIC16F876A that programmed by using the C Programming.
6.2 Limitations
There are some limitations of the Artificial Ant robot project. The limitations are:
The robot must be Autonomous
The power supply must be internal power supply (not wired).
6.3 Recommendations
Since there several problems occur in this project. Here, listed some
recommendation for the further research in other to make improvement to this project
and the other project especially that related to the autonomous legged robot.
42
The model of the servo motor can be change with the higher ability that has extra
torque with less energy consumptions.
The servo motor movement can be optimizing with the good mechanism of the
legs.
Include the object detection sensor to enable the robot relocate the small
obstacle.
Make various movements that can make the robot more intelligent.
The mechanical structure can be made of more stronger and light material to
ensure the mechanism movement going well.
43
BIBLIOGRAPHY
1. Mohamad Taib Bin Miskon (2008), Rope Climbing Robot, Bachelor thesis
Universiti Teknologi Malaysia.
2. Owen Bishop (2007), Robot Builders Cookbook, Elsevier Ltd. Companies.
3. Ahmad Saifuddin Bin Iskandar (2009),Four Legged Robot, Bachelor Thesis,
Universiti Teknologi Malaysia.
4. Cik Marzu Suhaidi Bin Che Mat (2006), Master Slave Behavioral Robot ,
Bachelor Thesis, Universiti teknologi Malaysia.
5. Willard S., MacDonald (1994). Design and Implentation of a Multilegged
Walking Robot. University Of Massachussetts-Amherst.
6. Khairul Anwar Hanafiah (1998). Lukisan Kejuruteraan Berbantu Komputer.
Johor Darul Takzim, Penerbit UTM.
7. Assoc. Prof Dr. Shamsudin Amin (2002). Intelligent Robotics: Behavior
Based Robotics. Lecture Notes.
8. P. Myko(2003). Programming Robot Controller .McGraw Hill.
.
44
APPENDICES
Appendix A: Pictures Of Artificial Ant Robot
45
Appendix C: Programming Artificial Ant Robot
#define servo1 PORTC.F1
#define servo2 PORTC.F2
#define servo3 PORTC.F3
#define led1 PORTB.F5
#define led2 PORTB.F4
#define led3 PORTB.F3
#define button1 PORTB.F1
#define button2 PORTB.F2
#define ir1 PORTA.F1
#define ir2 PORTA.F2
unsigned int i;
unsigned double t;
void function1(void);
void function2(void);
void fuuction3(void);
void function4(void);
void forward(void);
void backward(void);
void gripper(void);
void right(void);
void left(void);
void stop(void);
void no (void);
void main()
{
46
ADCON1 = 1;
TRISC=0b00000000;
TRISB=0b00000110;
TRISA=0b00000110;
Delay_ms(1000);
led1 = 1;
led2 = led3 = 0;
Delay_ms(1000);
led2 = 1;
led1 = led3 = 0;
Delay_ms(1000);
led3 = 1;
led2 = led1 = 0;
while(1)
{
mode= Select_led(3)
Switch(mode)
{
case 1: while (1)
{
funtion1()
}
break;
case 2: while (1)
{
funtion2()
}
break;
case 3: while (1)
{
funtion2()
}
break;
47
case 4: while (1)
{
funtion2()
}
break
}
}
void function1(void);
{
delay_ms(1000);
led1=1;
led2=led3=0;
forward();
if ( ir1= ir2 && ir1==0);
{
Stop()
}
else;
{
forward ();
}
}
void function2(void);
{
delay_ms(1000);
led2=1;
led1=led3=0;
forward();
if ( ir1= ir2 && ir1==0);
backward();
else;
{
forward ();
48
}
}
void function3(void);
{
delay_ms(1000);
led3=0;
led1=led2=1;
forward();
if ( ir1= 1 && ir2==0);
{
backward();
delay_ms(500);
left();
delay_ms(500);
right();
}
else if
( ir2= 1 && ir1==0);
{
backward();
delay_ms(500);
right();
delay_ms(500);
left();
}
else if
( ir1= ir2 && ir1==0);
{
gripper();
backward();
gripper();
forward;
}
else
{
stop();
}
}
void function4(void);
49
{
delay_ms(1000);
led3=1;
led1=led2=0;
forward();
if ( ir1= 1 && ir2==0);
gripper();
delay_ms(2000);
backward();
delay_ms(500);
left();
delay_ms(500);
right();
else if
( ir2= 1 && ir1==0);
gripper();
delay_ms(2000);
backward();
delay_ms(500);
right();
delay_ms(500);
left();
else
stop();
}
void no()
{
for(count=3;count>=0;count--)
{
switch(count)
{
case 0:led1=0;led2=0;led3=0;
break;
case 1: led1=0;led2=0;led3=0;
break;
case 2: led1=0;led2=0;led3=0;
break;
case 3: led1=0;led2=0;led3=0;
50
void forward(void)
{
for(i=0 ; i
51
void backward(void)
{
for(i=0 ; i
52
delay_ms(800);
}
}
void gripper(void)
{
for(i=0; i
53
for(i=0 ; i