PSZ 19:16 (Pind.

1/07)

UNIVERSITI TEKNOLOGI MALAYSIA
DECLARATION OF THESIS / UNDERGRADUATE PROJECT PAPER AND COPYRIGHT

Author’s full name : Date of birth Title : :

NUR AZIM FAHADA AHMAD 10TH FEBRUARY 1988 ARTIFICIAL ANT ROBOT

Academic Session:

2010/2011

I declare that this thesis is classified as:

CONFIDENTIAL RESTRICTED  OPEN ACCESS

(Contains confidential information under the Official Secret Act 1972)* (Contains restricted information as specified by the organisation where research was done)* I agree that my thesis to be published as online open access (full text)

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.) Date :

AP DR. MOHAMAD NOH B. AHMAD
NAME OF SUPERVISOR 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.

"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 Date

:______________________________ : AP DR. MOHAMAD NOH B. AHMAD : 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. Signature Name Date : : : _________________ NUR AZIM FAHADA BIN AHMAD 23th MAY 2011 . The thesis has not been accepted for any degree and it not concurrently submitted in candidate of any other degree.

for their guidance. encouragement and support.iii This thesis is dedicated to My beloved mother and father. To my family members. . lecturers and friends.

Mohamad Noh Bin Ahmad who has determinedly and persistently assisted me during the whole course of this project. Assoc. . Prof. Dr. In this opportunity. morale support and prayers along my study. Lastly. I want to thanks to all my family members. He has been good mentor that continuously overloaded with ideas to improve my project. Their idea and supports catalyzed me to perform well until the end of the project.W.T for his willingness and His blessing for me to complete this project. I also would like to extend my sincerest gratitude to my supervisor. especially to my parents. I would like to thanks to Almighty Allah S.iv ACKNOWLEDGEMENT First of all. 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. Ahmad bin Sarju and Siti Jariah Bt Jazuli for their love.

These also increase the cost. This Artificial ant robot brain is using the PIC16F876A microcontroller. Besides. These robots have the ability to mimic as the ant. Three servo motors and 2 pair of distance sensors are use for the robot. the robot programming becomes more complicated. But. . The source code is assembled using the MicroC Pro. the robot weight and the power consumption. The legged robot also has much ability better than the wheeled robot especially the capabilities to move in various surface and situation. The use of the four legged robot is due to its ability and stability.v ABSTRACT The main purpose of this project is to design and developed a legged robot that can move autonomously. it required more actuator to move every joint.

pengaturcaraan robot menjadi lebih rumit. berat robot dan pengambilan kuasa. Kod sumber di dilancarkan/diprogramkan menggunakan MicroC Pro. Robot ini memiliki kemampuan untuk meniru sebagai semut.vi ABSTRAK Tujuan utama dari projek ini adalah untuk membina sebuah robot berkaki yang dapat menggantikan robot beroda supaya dapat melakukan pelbagai tugas. Ini semut buatan otak robot menggunakan mikrokontroler PIC16F876A. Tiga motor servo dan 2 pasang Infra red sensor digunakan untuk robot ini. Robot berkaki juga mempunyai pelbagai kemampuan yang lebih baik dari robot beroda terutama kemampuan untuk bergerak dalam pelbagai permukaan dan situasi. itu diperlukan aktuator lebih untuk setiap gerakan sendi. Selain itu. . Tapi. Ini juga mengakibatkan peningkatkan kos. Penggunaan robot berkaki empat adalah kerana kemampuan dan kestabilan.

3 Objective 1.3 Utm Spider’s Robot 7 8 9 10 .0 Introduction 2.2Overview of Project 1.2 An Autonomous Four-Legged Robot 2.vii TABLE OF CONTENT CHAPTER Title page TITLE PAGE i ii iii iv v vi vii x xii xiii Student admittance page Dedication Acknowledgement Abstract Abstrak Table of Content List of Figures List of Table List of Abbreviation 1 INTRODUCTION 1.1 Master Slave Behaviour Spider Robot 2.1 Problem Statement 1.4 The Ant Structure 1 1 2 2 3 2 LITERATURE REVIEW 2.

1. 3.1.3 Main Problem in Developing the Artificial Ant Robot 4.1.1.1 The Robot Criteria 4.2 Description of the Overall Process 3.2.2 Legged Robot 4.4.4 Material Selection 4.viii 3 METHODOLOGY 3.3 Sourcing for the component 3.2. Modification and Fine Tuning 13 13 13 14 15 15 15 16 16 16 16 17 17 17 4 ROBOT DESIGN 4.1.3.2 Test.2.2 The Electronic Design 4.1 The Main Circuit Board 4.2.6 Legs 4.1.2.7 Gripper 4.0 Introduction 3.4.2 Stage 1 3.2.1 Mechanical Design 4.2.1.4 Fabrication of the mechanical structure 3.1 Design and implementation of the electrical circuit.1 The Flow of the Project 3.2 Prototyping 3.2 Voltage Regulator Circuit 4.1 Software Programming 3.1 Conceptualization 3.3 Stage 2 3.3 Current Booster Circuit 18 18 19 20 21 21 22 22 23 24 24 25 26 .4 Stage 3 3.5 Main Structure 4.

1 Microchip PicKit 26 27 27 30 32 33 35 5 RESULT AND ANALYSIS 5.2.3 Recommendations 41 41 41 42 BIBLIOGRAPHY 43 APPENDIX 44 .1 Conclusion 6.3 Software Design 4.ix 4.1 Servo Motors 4.2 Sensors 4.5.1 Robot Movement 5.2.4 Microcontroller 4.2.3.5 Transducers 4.5.2 Limitations 6.6 The Power Supply 4.2.2.2 Problem and discussion 37 38 39 6 CONCLUSION AND RECOMMENDATION 6.

4 1.1 4.3 4.3 2.5 2.1 4.1 1.3 1.4 4. Ant’s Physicals Front View Of Ant Ant’s Leg The Ant’s Head The Mouth Of Ant Title Page 1.x LIST OF FIGURES Figure No.9 3 4 4 5 5 8 9 10 10 11 14 19 21 23 23 24 25 25 26 27 Master Slave Behavioural Spider Robot The Slave Transmitting Command Illustration Of The Autonomous Four-Legged Robot An Autonomous Four-Legged Robot Utm’s Four Legged Spider Robot Flow Chart Of All Process Mechanical Structure Design Using Google Sketch The Main Structure The Gripper Is Closed The Gripper Is Open The Main Circuit With The PIC16F876A 9V To 6V Voltage Regulator 9V To5v Voltage Regulator Current Booster Circuit Pic16f876a Diagram .2 2.7 4.5 3.2 4.1 2.2 1.8 4.6 4.5 4.4 2.

11 4.17 4.13 4.xi 4.14 4.3 The Servo Motor The Characteristic Of The Rotation The LM324 Comparator Sample Of The Sensor Circuit IR Sensor Signal Tranceive IR Sensor Signal Reflected Energizer 9 Volt Battery The programming Flow Chart Programming using the MicroC Pro PicKit Tools.10 4.1 5.2 5.15 4.20 5.19 4. The software for the PicKit Artificial Ant Robot Side View Right walking sequence Left walking sequence 28 29 30 31 32 32 33 34 35 35 36 37 38 38 .16 4.12 4.18 4.

1 4.xii LIST OF TABLE Table No.2 Servo Specification The Robot Movement 28 34 . Title Page 4.

xiii LIST OF ABBREVIATION I V J R IR IC PIC W H - Current Voltage Current Density Resistor Infra Red Integrated Circuit Programmable Integrated Circuit Weight Height .

Wheeled robots are more common as they are easier to design and build. However. are less common. They are more capable of traversing rough and uneven terrains. the legged robot has a distinct advantage over the wheeled robot. although the interests in them have been growing at a frantic pace over the past few years. . However. They can be seen deployed in various situations to perform many different tasks. Legged robots. The cost of building a wheeled robot is generally low.1 Problem Statement Mobile robots are becoming a common sight nowadays. There are two major types of mobile robots – the wheeled and the legged mobile robots.1 CHAPTER 1 INTRODUCTION 1. These two factors are crucial in determining the success of a design. wheeled robots are more suited to application on fairly even terrains as they are less adept when traversing uneven or rough terrains. This is due the complexity in designing the actuators and joints. on the other hand. The cost of building a legged robot is also generally quite high. Legged robots are more difficult to design and built as compared to the wheeled 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. robots structural construction (hardware). This robot can move using only three servo motors as the engine for this robot. the objective can be divided into three parts. The construction step involves the skills of attaching the components onto circuits. . For the step of construction and fabrication of robot structure. The gripper is assigned to show the angry emotion when something disturb on the ant‟s track. robots communication and robotic control system construction (software). The two servo motors will actuate for the two pair of legs (4 legs) and the other one is for actuating for the gripper. Generally.3 Objective The main objective of this project is to build four legged insects robots that will be actuated by three servos motors.2 Overview of Project Artificial Ant Robot has behavior as ant robots. This Artificial Ant robot is autonomous robot that will be equipped with several sensors to make it move as desired. 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. This robot is also expected to be able to move forward and backward and also overcoming barriers.2 1. 1. The robot is categorizes an autonomous four legged insect robot. programming the micro controller and installation of sensors to the robot to drive it into specific movement. This robot is also equipped with a mouth‟s gripper that functions as the tool to grasps the small objects that disturb on his ways.

at the back of head is an opening through which nerves.1: Ant‟s Physicals In all ants.4 The Ant Structure Most ants are between 2mm and 10mm long. ants have bodies that contain three major segments: the head. the beginning part of the digestive tract and the blood pass into alitrunk. Figure 1. Figure 1. Some ants however.7mm and other nearly 3 cm long. are mere 0. the thorax (alitrunk). . 1. Like other insects. and the abdomen (gaster).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.41 shows the entire ant‟s physical.

Behind the alitrunk is the narrow petiole.2: Front view of Ant The middle part of the body bears three pair of joined legs as shown in Figure 1. the alitrunk contains two pairs of wings. Figure 1. .3: Ant‟s Leg In males and young queens. a one or two segmented section that form what appears like waist. such as handling food.4 Figure 1.42.43. During flight. The legs are use not only for walking or running but also for more dexterous tasks. 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. Each of ant‟s front legs contains two combs that ant uses to clean its other legs and the antennae as shown in Figure 1. each of which ends in a claw. Larger pair of wings is on the front and a smaller on the rear. The slender body part helps ants to bend while passing through twisting underground tunnels.

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. eye and brain as shown in Figure 1. The head of the ants consist of the antennae.4: The Ant‟s Head Figure 1.5. mouth (gripper).5 The hindmost body section of the ant.5: The Mouth of Ant . It is contains the heart. with the largest ring in the middle. The segments of the gaster are from a series of rings of different sizes. The ants use the mouth‟s grippe to grasp the solid food or other particle to be eaten or relocate things.4 and Figure 1. called the gaster. the excretory system and the reproductive system. 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 most of the digestive system.

The difference of theconstruction of the robot from the original ant physical are only use two pair of legs and there is no wings. The autonomous Artificial Ant Robot is designed to be the autonomous robot that has the function and movement merely same to the real ant.6 All the part of the ant body has their own function to their own body. .

There are few approaches such as the bio-mimetic approach and the functional similarity approach to build the biological inspired robot.7 CHAPTER 2 LITERATURE REVIEW 2. there are many robot projects that are inspired from the biological insect structure and functions. 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. „it may help to eliminate the need for extra gears. there are many project carried out that can be found in many universities that search across the internet. Then. weight and premature failure‟ (Bar-Cohen 2002). In this chapter.0 Introduction Recently. the discussion will be made on the quadruped robot which is relevant to the project objectives. by using the functional similarity approach in building the robot. motors and bearings which might complicate in the construction of robots and result in high costs. Some of them are listed below: . 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. Nowadays.

1 Master Slave Behavior Spider Robots Figure 2. Basically. The master‟s robot transmits the signal to the follower by using the transmitter. 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. for Master-Slave spider robot design refer to this existing robot for mechanical design.8 2.1 shows that the compact robot designs that is improved from the UTM‟s Spiders Robots. This legged robot able to walk onto inflated surface. This robot operated with two servo motors and simple circuit design.

That‟s why the researcher made a selection to choose this design for Artificial Ant Robot.3V maximum voltage with 2. Figure 2.9 Figure 2. Robot Specifications: Motor interlock Power Source Sensors PIC for Sensor Microcontroller PIC for Transmitter @ receiver : 9V batteries : Infra Red sensors : LM 324 : PIC16F627 by Microchip : PT2262 and BX315A : Futaba S3003.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. The leg‟s robot is specializes to function like behavioral spider‟s robot. 7.21 shows that the illustration of the robot. .2: The Slave Transmitting Command This Four Legged Spider Robot is very light in weight and the design is unique.

4 : An Autonomous Four-Legged Robot . 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.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. Figure 2. 16 cm width and 7 cm height.10 Figure 2.

The suitable program arrangement needs to be programmed to ensure smooth movement of the robot and able to respond sensitively to sensor. Figure 2.5: UTM‟s Four Legged Spider Robot This robot as shown in figure 2. this project is focusing on the programming aspect to control the robot‟s movement. for Artificial Ant Robot design refer to this existing robot for the mechanical structure‟s design. Basically. The robot is actuated by two servo motors and simple circuit design. 2. This legged robot also able to walk onto inflated surface.31 is a compact and simple design. 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.31 is a compact and simple design. The robot is actuated by two servo motors and simple circuit design. for Artificial Ant Robot design refer to this existing robot for the mechanical structure‟s design.11 Finally. . This robot movement mechanism is also very simple and works efficiently. Basically.3 UTM Spider’s Robot This robot as shown in figure 2.

3V maximum voltage with interlock : 9V Duracell batteries : Infra Red sensors : LM 324 : PIC16F627 by Microchip .12 Robot Specifications: Motor Power Source Sensors PIC for Sensor Microcontroller : Futaba S3003. 7.

This chapter describe the development methodology and guidelines in designing the quadruped robot that will emulate the functional similar to the objectives. 3.13 CHAPTER 3 METHODOLOGY 3. 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. Later. All the process can be divided to three main categories which is mechanical design. the software design and the circuitries design. test and modification of the robots for enhancement. . building an autonomous robot required knowledge from various aspects.1 The Flow of the Project The entire project plans are split into three steps which make it easier.0 Introduction Generally. both design will be integrated together to build up the entire system. Thus a systematic approach is crucial in the development process. discipline and studies. systematic and manageable to be implemented. The project will run with splitting sections because it will have different role and process. The stage three involves the software programming.

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.1: Flow Chart of All Process . The flow chart in Figure 3. Figure 3.1 below shows the entire plan of the project.

2 Prototyping The prototyping process started with the sketching all the mechanism for the entire robot with the functioning part. The choice of the design is choose based on the practicality.2. 3. Styrofoam and the aluminum sheet as we sketch earlier. sourcing components and the fabrication of the mechanical structure. we will design and construct the body of the robot with the plastic sheet. The analysis is base on the advantages of the robot design and the mechanism of the robot.2 Stage 1 This stage will involve the conceptualization.1 Conceptualization From the objective that we have create for the project. The prototype also used to identify the best cutting size and placement of the entire component. cost and capability. . 3. 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 bolt and nut are used to enable the rotational motion of the robot.2. Then. prototyping.15 3. bolt and nut.

We start construct the robot with the frame of the body and the legs by using the aluminum plates. the body of the robot is tested for the durability. the body must be modified and change to get the exact function. the information of the entire component from various kinds of type is collected.1 Design and implementation of the electrical circuit Firstly. 3. The electric circuit is split to three parts. When all the component on the circuit are purchased. the electric circuits of the robot component are drawn using the Proteus 7. Motorcycle rim‟s stick is used to create the legs according the dimension properly.2. Then. we need to connect all the component in the .3 Stage 2 The stage 2 involves design and implementation of the electric circuit. the Infra Red sensor circuit and the all component that connect without the interface with other addition electrical interface.16 3. The second and the third circuits is the power supply and Infra Red circuit.3. the most suitable component is selected based on the capability and practicality of the component functions to fulfill the objectives. Secondly. Firstly. 3.3 Sourcing for the Component Firstly.2. 3.4 Fabrication of the Mechanical Structure Firstly. Lastly. the main board circuit is connected to the power supply circuit (voltage regulator). the design of the mechanical structure is sketched by using the AutoCad 2007 and Google Sketch for two and three dimensions.

3.4 Stage 3 This stage involves software programming. Then the front and back leg are modified and tested with the various configurations to find the most stable and durable. .17 board in simples way and only small size of board are required to make the robot looks simple.4. 3. we must test the circuit to make modification when the problem detected. different material and design of the feet padding of the robot are tested and the most give smooth and suitable movement is chosen. all the electrical connection and mechanical structure were checked and tightened. Lastly the program is tested with the rob`ot and problem that arises must be identified and corrected. Then the program assembled using Micro-C Pro and the problem or error that arises must be refining back. Then the flow of the program is drawn. the program is written as the flow that we have been created and the program is rechecking back after finish. 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. 3.2 Test.4.1 Software Programming The first step is the program that we want to create is identified and listed. After that. modification and fine tuning. After that. Lastly. When we have completed the circuit. test.

strength and distance.0 Introduction This chapter discusses the design of the mechanical structures. All the movements are inspired from the movement of the ant. It also will give the best result for the movement of the ant robot in the aspect of the speed. The good combination of programming and suitable mechanical structure design. the ant robot can move forward.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. electronic circuitries and micro controller programming of the autonomous Artificial Ant Robot. . spider and cockroaches. backward.18 CHAPTER 4 ROBOT DESIGN 4. All the main components must be carried out nicely for developing the robot. The legged robot is also more complicated and difficult to design in order to achieve the objective of the project. 4. turn left and turn right easily and smooth.

Many information had been gathered across the university through the internet especially information regarding to robot‟s structure and the mechanism. turning right and turning left. it will operates upon receiving command signal from the switch and I/R sensor.2 pair of leg and mouth gripper. Use 2 set of Infra Red sensor.19 Figure 4.1. Among the . The robot's brain is based on a PIC microcontroller. backward.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.   An autonomous robot Easy to carry There are many references are collected and used as a guidance for this project. connected with 3 set of servo.1: Mechanical Structure design using Google Sketch 4. Uses 3 servo motors.

Most existing mobile robots rely on wheels for locomotion. Nowadays. while the leg mechanism requires complicated linkages . Master Slave Behavior Spider Robot and An Autonomous Four-Legged Robot. pieces of aluminum iron as the spine and servo motors functioning as the body. 2) Less in weight. Artificial Ant Robot moves using only three motors. ease of programming to enables robot to move in any directions. 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. since the wheels are intended to remain on the ground. Below are the robot‟s features that may exist in other type of robots: 1) Using only three motors. 3) Wide and low gravity centre. Basic structure of robot was built using metal rods (motorcycle rim‟s stick) as legs. Apart of that. 4. the driving mechanism for a wheeled vehicle can be relatively simple and cheap to construct. In addition. 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.20 existing robot designed those have been looked into for this project is Four Legged Spider Robot. On the other hand.2 Legged Robot The main purpose creation of the legged robot is to overcome the problem faced by the wheeled robot. screws and aluminum pieces are used to hold the circuits on the robot. wheeled robots are inherently stable. reduce the power needed by the robot. ease to spot the stability point in static or moving. A legged robot must shift its center of gravity as it walk in order to maintain stability.1.

1. the robot needs extra power to supply to all the 3 servos and some modification must be done to the power supply. Figure 4. Secondly. as well as sensors to determine the location of the leg relative to the ground. the challenge when getting the right posture of the ant robot to ensure the static stability and dynamic while moving. turns right and turn left.21 and multiple motors.2: The Main Structure 4. The Figure 4. the challenge when creating the forward movement.4 Material Selection The material selection is also the crucial part in the designing the robot.1. the creation of the robot which is too heavy from that we had expected.2 below shows the basic mechanical structure. to build the small . backward. A good material selection can affect the success of this project. 4. Therefore. Firstly. Lastly. Thirdly.3 Main Problem in Developing the Artificial Ant Robot There are many problem encountered during the developing the Artificial Ant Robot.

The legs part must be easy to form.1. strength. The main structure of the robot consists of the body frame and the head frame.22 robot. Less weight can make the robot more stable and easy to move. The main function of the main structure is to hold all the body part and as the platform of the electrical circuit. 4. A rigid leg will also ensure that the maximum power transfer is achieved so that the robot will move efficiently.6 Legs The criteria for the material for the robot‟s 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. 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. Therefore. The selection and design of the main structure also must be light and suitable enough to reduce the stress to the servo motors. flexibility and ease to reshape.1. we chose the spoke from motorcycle rim as the legs because it easier to assemble. 4. The characteristic of the both of them is very strong and firm. The items that were identified for possible use are the coated metal from the iron hanger and the spoke of the motorcycle rim.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. After all. . the material is selected based on the weight. This is including the selecting the suitable recycled material from all sources.

But there is to heavy even the gripper can move properly.3 and Figure 4. The gripper also must be firm or rigid when it combines with the head of the ant robot. we use the aluminum sheet (1mm) make gripper.7 Gripper The criteria for the gripper of the artificial Ant Robot are must be strong. 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. For the 1st trial.23 4. Figure 4. small saw and bend using heat.1. Figure 4. very light and easy to reshape or bend.4 shows the gripper mechanism. The material that we chose is the Perspex (like plastic) that can be reshape easier by using knife.3: The gripper is closed Figure 4. All the join that make the mechanism can move are by using the bolt and nut.3: The gripper is open . The gripper inspired from the biological gripper that can hold and grip small things.

the indicator of led and the distance sensors. This main controller circuit board will control the entire operation of the Artificial Ant Robot. 4.2.24 4.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.5: The main circuit with the PIC16F876A .2 The Electronic Design The electronic design of the robot arm involves the design of the main controller circuit board. the voltage regulator 5V for PIC. Figure 4. the voltage regulator 6V with current booster for Servomotors and the circuit of the Infra Red sensors with the comparator are designed. Besides main controller board.

Figure 4.2. When the voltage source from any kinds of source is regulated.6: 9V to 6V Voltage Regulator Figure 4.7 shows the circuits of both voltage regulators. The needs of the voltage regulator are to reduce the voltage value and make the current supply more stable.7: 9V to5V Voltage Regulator . the voltage supply are more stable and safe to be used for whole circuitries.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.25 4.6 and Figure 4. Figure 4.

8: Current Booster Circuit 4.26 4. In earlier trouble shooting part. There is where all the program sequences will be stored and the robot executes the sequences when it is called.2. It has a total of 28 pins and has 4 input/output ports. the robot didn‟t work properly because the current supply is too low. the PIC16F876A is used as the processor for the Artificial Ant Robot.1Ampere. The project select the PIC16F876A because it has the ADC converter and have enough I/O pin for whole circuit diagram.4 Microcontroller For the main controller circuit board. Port B and Port C. Thus current booster must be use for this project in order to get the desired current supply.3 Current Booster Circuit Current boaster is use in this project since the servo need constant 1Ampere current. The 3 input/output ports are Port A.2. It is a device that can be reprogrammed because it uses flash read-only memory for program storage. the current booster circuit had been installed to overcome the problem as shown in figure Figure 4. It is small enough to locate on the main board. LM 7806 in the voltage regulator circuit limits the current to only 0. Thus. .

The transducer that we use in this project is Infra red sensor. electromagnetic.5. the right selection of servomotors is vital in order for the robot arm to perform the movement of sequences smoothly. It is produced by Cytron Technologies. electro-mechanical. distance sensors and the servos motors. photonic and photovoltaic or any form of energy to another form of energy. The conversion can be from electrical.9 .27 Figure 4.1 Servo Motors The movement of the robot arm totally depends on the servomotors. Therefore.9: PIC16F876A Diagram 4. Any devices that convert energy also can be categorized as transducer. a servomotor labelled as Cytron C55S & C40S was chosen to be used. 4.2. Figure 3. For this robot arm.5 Transducers A transducer is a device that converts one type of energy to another type of energy.2.

This is affordable enough for the robot arm to work strongly.28 shows the Cytron C55S servomotor. Table 4.19 6.2V Speed/60° Torque (kg-cm) C55S 55 0.00 C40S 38 0. This servomotor rotates in half circle of 0 degree to 180 degrees.10: The Servo Motor Table 4.00 - . Figure 4.17 13.0V Speed/60° Torque (kg-cm) 7.8V Speed/60° Torque (kg-cm) 6.1 below shows the specification of the Cytron C55S and C40S servomotor.00 0.16 7.20 11.1: Servo Specification Model Weight (g) 4.00 0.22 9.00 0.

Figure 4. 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. It mounts firmly the connection and this helps in moving the links to the position desired. This servo horn was provided together with the servomotor.29 All of the servomotors used in this project were joined to the link by using the servo horn. The degree and the torque are manipulated using the programming on the power supply from the microcontroller.11: The characteristic of the rotation .

Figure 4. A pair of infra-red sensor will be emitted by the sensor.2. Both categories contain . Infra-red sensor can be classified into two categories. Sensor used is an infrared type. Integrated Circuit LM324 as shown in Figure 4.13. Transmitter and receiver are combined to produce better responses towards objects or obstacles. reflected by the target and received by the sensor. 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. which are Reflective Infra-red Sensor and Transmissive Infra-red Sensor. and receiver receives the signals when it reflects on objects or obstacles.12 is used to transform analog signals to digital signals.12: The LM324 Comparator Infra-Red sensors consist of a pair of transmitter and receiver as shown in Figure 4.2 Sensors Sensor Circuit is a circuit that received analog signals from sensor and transforms it into digital signals to be sent to PIC16F876A. output 0 will be sent to microcontroller while bigger input voltage will provides output 1 to microcontroller.30 4.5. Transmitter will send infrared signals.

31 an infra-red photodiode to emit the light and an infra-red detector to sense (absorb) the emitted light. It is normally used as presence sensing. The difference lies in the light‟s penetration path. and the target interrupts the beam path.13: Sample of the Sensor Circuit The reflective sensor function to emit light (beam signal) strikes the target and reflected back to the detector. With the transmissive detector. Figure 4. . the photodiode are pointed at one another by face to face arrangement.

14: IR Sensor Signal Tranceive Figure 4. The battery is rechargeable and it can give move current supply than the other type of compact battery.2. . This battery was selected because it small. light and can supply enough current for the servos and main circuit.15: IR Sensor Signal Reflected 4.6 The Power Supply In this project. I will use the Energizer 9 Volt battery as the main source of the robot.32 Figure 4.

33 Figure 4.3 Software Design Figure 4.16: Energizer 9 Volt Battery 4.17: The programming Flow Chart .

17 shows that the application flowchart that has been use to guided the project. 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 software selection is depends on it capability and the simples to be operated.2: The Robot Movement NO.2: Table 4. of Functions 1 2 Move straight forward Move straight forward until the two sensor detect obstacle. move backward. First. there is two push buttons that function as the buttons selector for number of function and the other is button for execution. The software that we use is MicroC Pro with the simple c programming. The function that has been build is in Table 4. the robot is switched on. Then.34 Figure 4. Functions 3 4 The robot avoid the obstacle The robot move in pattern 1 Several softwares had been used for reason such programming the microcontroller and uploading the program into a microcontroller.

18: Programming using the MicroC Pro 4.19: PicKit Tools.hex file into the robot‟s microcontroller the PICkit was used.1 Microchip PicKit Once the source code file has been completed and built successfully using the compiler.35 Figure 4. Figure 4. . the file with extension of the hex file will exist in the same folder as directory.3. Next. to load the .

Then. The USB ICSP Programmer then connected to the 10-pin straight box that prepared on the main board of circuit main controller. the displayed window will been found by the programmer and software.36 Figure 4. show up and the status box will state “device found” which mean that the PIC16F876A have.hex file from the specified directory and write the file. . Once connected and launched the PICkit 2 program successfully. The chosen . import the extension .hex file will automatically loaded to the microcontroller.20: The software for the PicKit The microcontroller must be connected to the laptop‟s USB using USB ICSP programmer in order to upload the hex file into the microcontroller.

Most of the objective of the project had been achieved.3 show the left and right walking sequences.37 CHAPTER 5 RESULT AND ANALYSIS The 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. turn right. turn left and also open and close their gripper. Figure 5. It go through a long period of fine tuning to get the exact proper movement. The Figure 5.2 and Figure 5.0 below shows the result of the Artificial Ant Robot that has been finished. backward. The robot can move in various type of movement such as move forward.

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 . Then.3: Left walking sequence 5.1 Robot Movement The movements of the robot that we create are the combination of the simple‟s movement like figure above.2 s of the front leg and back legs.2: Right walking sequence Figure5. 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.38 Figure 5. The front legs and the back legs must move simultaneously to give enough torque to the robot.

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 didn‟t 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.

.  Include the object detection sensor to enable the robot relocate the small obstacle.   Make various movements that can make the robot more intelligent.  The servo motor movement can be optimizing with the good mechanism of the legs. The mechanical structure can be made of more stronger and light material to ensure the mechanism movement going well.42  The model of the servo motor can be change with the higher ability that has extra torque with less energy consumptions.

Four Legged Robot”. “Robot Builder‟s Cookbook”. 4. “Master Slave Behavioral Robot” . Penerbit UTM. 3. “Programming Robot Controller” . Elsevier Ltd. Bachelor Thesis. Ahmad Saifuddin Bin Iskandar (2009). Khairul Anwar Hanafiah (1998).” University Of Massachussetts-Amherst. Prof Dr. MacDonald (1994). . 6. “Design and Implentation of a Multilegged Walking Robot. Willard S. Myko(2003).. “Intelligent Robotics: Behavior – Based Robotics. 2.” Johor Darul Takzim. Shamsudin Amin (2002). . Cik Marzu Suhaidi Bin Che Mat (2006). Bachelor thesis Universiti Teknologi Malaysia. Bachelor Thesis.43 BIBLIOGRAPHY 1.McGraw Hill. Companies. Universiti Teknologi Malaysia. “Lukisan Kejuruteraan Berbantu Komputer. 8. 7. Universiti teknologi Malaysia.” Lecture Notes. Owen Bishop (2007). Assoc. Mohamad Taib Bin Miskon (2008). P. “Rope Climbing Robot”. 5.

44 APPENDICES Appendix A: Pictures Of Artificial Ant Robot .

F2 unsigned int i. void function2(void).F2 #define ir1 #define ir2 PORTA. void function1(void).45 Appendix C: Programming Artificial Ant Robot #define servo1 PORTC. void backward(void). void fuuction3(void). void gripper(void).F4 #define led3 PORTB. unsigned double t. void main() { . void no (void). void left(void). void right(void).F2 #define servo3 PORTC. void stop(void).F3 #define button1 PORTB.F1 #define servo2 PORTC.F1 #define button2 PORTB.F5 #define led2 PORTB. void forward(void). void function4(void).F1 PORTA.F3 #define led1 PORTB.

led2 = 1. . Delay_ms(1000). Delay_ms(1000). led2 = led3 = 0. case 2: while (1) { funtion2() } break. while(1) { mode= Select_led(3) Switch(mode) { case 1: while (1) { funtion1() } break. led1 = 1. Delay_ms(1000). led1 = led3 = 0. led3 = 1.46 ADCON1 = 1. led2 = led1 = 0. TRISC=0b00000000. case 3: while (1) { funtion2() } break. TRISB=0b00000110. TRISA=0b00000110.

forward(). { forward (). backward(). led1=1. { delay_ms(1000). { delay_ms(1000). led1=led3=0. if ( ir1= ir2 && ir1==0). } } void function2(void). else. led2=1. if ( ir1= ir2 && ir1==0). led2=led3=0. { Stop() } else. forward(). { forward (). .47 case 4: while (1) { funtion2() } break } } void function1(void).

delay_ms(500). led1=led2=1. } else if ( ir2= 1 && ir1==0). . } else if ( ir1= ir2 && ir1==0). forward. { delay_ms(1000). delay_ms(500). delay_ms(500). left(). forward(). if ( ir1= 1 && ir2==0). gripper(). backward(). { backward(). led3=0. { backward(). delay_ms(500). } } void function4(void). right(). left().48 } } void function3(void). { gripper(). right(). } else { stop().

delay_ms(500). left().led2=0. } void no() { for(count=3. delay_ms(500). break. gripper(). case 3: led1=0. delay_ms(2000). gripper(). case 1: led1=0.led3=0.count--) { switch(count) { case 0:led1=0. case 2: led1=0. forward(). led1=led2=0. backward(). break. led3=1. delay_ms(500). delay_ms(500).led3=0. if ( ir1= 1 && ir2==0). else if ( ir2= 1 && ir1==0). else stop(). . left(). right().count>=0.led2=0. delay_ms(2000). backward().led2=0. right().led3=0. break.49 { delay_ms(1000).led3=0.led2=0.

i<10 . for(i=0 . Delay_us(1810). Delay_us(1150). i++) { servo2 = 1. i<10 . Delay_us(18850). for(i=0 . servo2=0. i++) { servo3 = 1. Delay_us(18190). i++) { servo2 = 1. i++) { servo3 = 1. } delay_ms(800). i<10 . Delay_us(1810). } delay_ms(100). servo3=0. servo3=0. } delay_ms(100). Delay_us(18190). delay_us(18850). servo2=0.50 void forward(void) { for(i=0 . for(i=0 . } . Delay_us(1150). i<10 . } delay_ms(1000).

Delay_us(1810). for(i=0 . i++) { servo2 = 1. for(i=0 . } delay_ms(100). servo2=0. i<10 . Delay_us(18190). servo3=0. i<10 . Delay_us(18850). delay_us(18190). i++) { for(i=0 . for(i=0 . i<10 . Servo2=0. i++) { servo2 = 1. } . } delay_ms(100). i++) { servo3 = 1. Delay_us(1810). Delay_us(1150). i<10 . i++) { servo3 = 1. Delay_us(1150).51 void backward(void) { for(i=0 . Delay_us(18850). i<5 . servo3=0. } delay_ms(1000).

delay_us(18000). } } void gripper(void) { for(i=0. } void right(void) { . servo1=0. } delay_ms(1000). } } void stop(void) { servo1 = servo2 = servo3 = 0. Delay_us(1000).52 delay_ms(800). delay_us(19000). i++) { servo1 = 1. } delay_ms(1000). servo1=0. i<15 . led1 = led2 = led3 = 1. i<5. i++) { servo1 = 1.i++) { for(i=0 . Delay_us(2000). i<8 . for(i=0 .

i<7 . Delay_us(18850). i++) { servo3 = 1. i<10 . } delay_ms(100). Delay_us(18190). Delay_us(1150). i++) { servo2 = 1. servo2=0. Delay_us(18190). for(i=0 . i<10 .53 for(i=0 . } delay_ms(800). Delay_us(1810). i++) { servo2 = 1. } . for(i=0 . servo2=0. } delay_ms(100). _us(1810). i<7 . servo3=0. Delay_us(1150). for(i=0 . i++) { servo3 = 1. } delay_ms(1000). delay_us(18850). servo3=0.