obstacle avoidance legged robot. mohamed faizan bin...

Download OBSTACLE AVOIDANCE LEGGED ROBOT. MOHAMED FAIZAN BIN ...umpir.ump.edu.my/id/eprint/459/1/MOHAMED_FAIZAN_BIN_BASHEERS_AHMAD. ·

Post on 21-Aug-2019

213 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • OBSTACLE AVOIDANCE LEGGED ROBOT.

    MOHAMED FAIZAN BIN BASHEER AHMAD

    This thesis is submitted as partial fulfillment of the requirement for the

    award of the Bachelor Degree of Electrical Engineering (Electronic)

    Faculty of Electrical & Electronic Engineering

    University Malaysia Pahang

    NOVEMBER 2008

  • ii

    DECLARATION

    “All the trademark and copyrights use here in are property of their respective owner.

    References of information from other sources are quoted accordingly, otherwise the

    information presented in this report is solely work of the author”.

    Signature : ________________________________________

    Author : MOHAMED FAIZAN BIN BASHEER AHMAD.

    Date : 21 NOVEMBER 2008.

  • iii

    DEDICATION

    Specially dedicate to

    My beloved parents, brothers and sisters.

  • iv

    ACKNOWLEDGEMENT

    First, I would like to express highest gratitude to my supervisor, Encik Saifudin

    b. Razali for the guidance and co-operation that been given throughout the progress and

    completion of this project.

    I also deeply thank to my family who‟s always giving a motivational support and

    show me a guidance to pursue my studies at University Malaysia Pahang. Thanks for

    their encouragement, support, love, my brothers, sister and many more.

    ALHAMDULILLAH.

    Finally, my great appreciation to my dear housemates that given me so many

    opinion and encouragement till I don‟t know which one to comprehend, especially Hanis

    , Khawarizmi and Mohd Noor thanks for their brilliant idea and my class mate whom

    involve directly or indirectly with this project. Last but not least the dedication of a

    thousand of thank to dear Hasinah that is a special one to me that had always been a

    backbone for me and gave plenty of motivation, moral support and so on. Finally thank

    you Allah since through your blessings I managed to do all in time. Thank You very

    Much.

  • v

    ABSTRACT

    Many mobile robots require an operator‟s vision and intelligence for guidance

    and navigation. Animals use sensory systems such as hearing, and tactile to move freely

    through their environment. The aim of this project is to develop an avoidance behaviors

    program for a mobile robot that consists of 8 servo motors that been employed at 4 legs.

    Each leg contains 2 servo motors, one for X-axis and one for Y-axis. A PIC

    Microcontroller has been implemented to act as a brain for the robot that controls the

    walking and turning algorithm. Ultrasonic sensor was also developed to act as an „eye‟

    to the system and tells the brain about existence of obstacle in front. As a resultant, the

    obstacle avoidance legged robot system is been successfully developed that allows and

    will navigate the robot to move through the environment freely. But there is a certain

    limitation for the robot such as the wideness of the area, type of obstacle and surface.

  • vi

    ABSTRAK

    Di dalam dunia permodenan dan kontemporari seperti ini robot memerlukan

    operator dan kebijaksanaan wawasan untuk tujuan panduan hala tujunya. Demikian

    adalah cara yang digunakan haiwan iaitu sistem-sistem deria pendengaran, dan sentuhan

    untuk bergerak dengan lebih bebas menerusi alam sekitar mereka. Matlamat projek ini

    adalah untuk membangunkan satu pergerakan pengelakan atur cara untuk satu

    kepergerakan robot yang mengandungi 8 servo motor yang berfungsi di setiap kaki.

    Keseluruhan robot itu mempunyai 4 kaki dan pada tiap kaki mengandungi 2 servo motor

    , satu untuk pergerakkan paksi X dan satu lagi untuk pergerakkan paksi Y. Satu PIC

    Microcontroller telah digunakan dan ia berfungsi sebagai satu otak untuk mengawal

    robot itu dengan wujudnya algoritma berjalan dan algoritma selekoh. Deria ultrasonik

    juga dibuat supaya ia berfungsi sebagai satu 'mata' bagi robot itu.

  • vii

    TABLE OF CONTENT

    Title Page i

    Declaration ii

    Dedication iii

    Acknowledgement iv

    Abstract v

    Abstrak vi

    Table of Contents vii

    List of Chapter viii

    List of Table xi

    List of Figures xii

    List of Symbol xiv

    List of Appendices xv

  • viii

    LIST OF CHAPTER

    CHAPTERS TITLE PAGES

    1 INTRODUCTION

    1.1 Overview 1

    1.2 Objective of the Project. 2

    1.3 Scope of Project. 2

    1.4 Outline of Thesis. 3

    2 THEORY AND LITERATURE REVIEW

    2.1 Introduction. 4

    2.2 Servo Motors. 4

    2.2.1 Pulse Width Modulation for Servo. 7

    2.2.2 Inside Servo. 8

    2.3 PIC Microcontroller. 9

    2.4 Robotics. 14

    2.4.1 Robot Component. 15

    2.4.2 Robot Kinematics: Position Analysis 16

    2.4.3 Denavit-Hartenberg Representation 18

    2.5 Sensors. 21

    2.5.1 Proximity Sensors. 23

    2.5.2 Optical Proximity Sensors. 23

    2.5.3 Infrared Sensors. 24

    2.5.4 Ultrasonic Proximity Sensors. 25

  • ix

    3 SYSTEM DESIGN

    3.1 Introduction. 27

    3.2 Hardware Implementation. 29

    3.2.1 Power Supply Module. 29

    3.2.2 PIC Micrcontroller. 30

    3.2.3.1 PIC. 31

    3.2.3.1 Oscillator and Reset. 32

    3.2.3.1 Programmer. 33

    3.2.3.1 LED Connection. 34

    3.2.4 Servo Motor. 35

    3.2.5 Ultrasonic Sensor. 37

    3.2.6 The Robot Movement Design. 41

    3.2.6.1 Walking Algorithm. 42

    3.2.6.2 Turning Algorithm. 45

    3.3 Software Implementation. 47

    3.3.1 Algorithm and Programming. 47

    3.3.2 Processing Explanation of Main Program. 48

    3.3.2.1 Initialize. 49

    3.3.2.2 PWM Generation. 50

    3.3.2.3 Analog to Digital Converter. 52

    3.3.2.4 Sensor Detection. 53

    4 RESULT AND ANALYSIS.

    4.1 Introduction. 55

    4.2 Total Result Robot Algorithm. 56

    4.3 Mathematical Expression of the Leg. 60

  • x

    5 CONCLUTION AND RECOMMENDATION.

    5.1 Conclusion. 63

    5.2 Problem and Solution. 64

    5.3 Recommendation. 65

    5.4 Costing and Commercialization 66

    REFERENCE 68

  • xi

    LIST OF TABLES

    TABLES NO. TITLE PAGES

    2.0 Hitec HS-322HD servo motor specification. 6

    2.1 The advantages and disadvantages of robots. 14

    2.2 Elements of robots. 15

    2.3 D-H parameters table. 20

    2.4 Sensor characteristic that need to be consider. 22

    3.0 Port connection to the leg. 36

    4.0 The robot leg D-H parameters table. 61

    5.0 Costing of the project. 66

  • xii

    LIST OF FIGURES.

    FIGURES TITLE PAGES

    2.0 Wires for the servo motor. 5

    2.1 Servo motor Hitec HS -322HD dimension. 5

    2.2 Position of motor shaft. 7

    2.3 The inner part of servos. 8

    2.4 Clock/instruction Cycle. 11

    2.5 Pin diagram. 12

    2.6 A D-H representation for joint link combination. 18

    2.7 Optical proximity sensors 24

    2.8 IR sensor reflections 25

    2.9 Schematic ultrasonic sensors 26

    3.0 Flow chart of the robot system. 28

    3.1 Picture of the robot. 28

    3.2 LM7805 regulator. 29

    3.3 Schematic circuit of +5V power supply. 30

    3.4 Pin configuration for PIC16F877A. 31

    3.5 Oscillator circuit. 32

    3.6 USB ICSP PIC PROGRAMMER. 33

    3.7 Connection at main development board. 33

    3.8 LED connections at PortB. 34

    3.9 Position of the servo motor in the leg. 35

  • xiii

    3.10 Circuit Configuration for all 8 Servo Motor. 36

    3.11 Ultrasonic sensor at the quadruped robot. 37

    3.12 The circuit design for ultrasonic. 38

    3.13 Transmitter circuit. 38

    3.14 Receiver circuit. 39

    3.15 Frog Movement. 41

    3.16 The movement style for robot walking straight. 42

    3.17 The movement style for robot walking straight (cont). 43

    3.18 The movement style for robot walking straight (cont). 44

    3.19 The movement style for robot to turn left. 45

    3.20 The movement style for robot to turn left (cont). 46

    3.21 General flow chart of program. 48

    3.22 Name and variable. 49

    3.23 Example pulse generation. 51

    3.24 ADC application in the main program 52

    3.25 Walking and the sensing flow chart. 54

    4.0 Result robot walk straight. 57

    4.1 Result of turning left after detection of the obstacle. 58

    4.2 Result of turning left after detection of the obstacle (