Anda di halaman 1dari 92

1

Acknowledgement
The project in the final year is an important milestone in an engineers life where we obtain the fruit of experience. We use this opportunity to thank those people who with their proper insight and timely advice have been an inspiration to us during this Crucial Phase of our career.

We would like to take opportunity to acknowledge the innumerable guidance and support extended to us by our project guide ARPIT PATEL in execution and preparation of the project.

The real debt of gratitude that we owe to him without whom this project would not have seen light of day .

We, the members of the team, who developed HEXABOT is very delighted to take the opportunity to acknowledge whole-heartedly the innumerable guidance & support extended to us by our project guide and internal guide MRS. MINAL PURANIK.

In spite of being the Senior Lecturer, having an immensely busy work schedule, we never found any of our requests of help and guidance to her being turned down. Nor did she show even the slightest bit of impatience about us pestering her so much and so often. Carefully, she looked after all our hardware, software and system requirements and that was not enough, she is also responsible for rendering most of the illustrations of this project. We shall indeed remain ever grateful to this great person.

ABSTRACT
Robotics fields are the most dynamic course. Through out this year the field becomes so popular. Many research done by top university to understand the movement and coordination found in animal locomotion. Dynamic locomotion in animals and insect demonstrates a simple, robust, fast, intelligent and challenging way to communicate with its environments. The goal for this project is to design and construct a six-legged robot that mimics the way the six-legged insect walk. The robot is only mimicking the insect in the way it moves by its legs in certain condition and the physical structure is almost the same as most six-legged insect. The robot, which has been successfully designed, has six legs and with implemented with sensor for obstacle detection placed at the front of the robot. It also has the capability to behave like insect that is do not like to be in a bright condition. The robot designed is capable moving around with basic movement like forward, backward, spin left and spin right. The controller for the robot is the microcontroller system using Philips P89V51RD2 SMD c on board. microcontroller and computer software using embedded C. The moving mechanism for this robot is using servomotor. Hopefully this thesis will provide sufficient information for those who are interested in understanding the nature of six-legged insect locomotion.

CONTENTS

1.

INTRODUCTION6 1.1ROBOT..8 1.1.1 LEGGED ROBOT.9 1.1.2 MOBILE ROBOT...9 1.2 WHY DESIGNA LIGHT PHOBIA, HEXAPOD BOT?..................10 1.3 OBJECTIVE...11 1.4 WORKSPACE.12 1.5 LITERATURE REVIEW.12

2. BASIC MECHANICAL ROBOT STRUCTURE16 3. ELECTRONIC DESIGN19 3.1 MOTOR SELECTION.20 3.2 THE MICROCONTROLLER CIRCUIT FOR MC68HC11E126 3.2.1 RESET CIRCUIT..27 3.2.2 5 VOLT REGULATOR CIRCUIT29 3.2.3 SERIAL COMMUNICATION CIRCUIT.30 3.2.4 TIMING CIRCUIT31 3.3 SUNX INFRARED SENSOR.32 3.4 LIGHT DEPENDANT RESISTOR(LDR).34 3.5 POWER ELECTRONICS...36

4. SOFTWARE ALGORITHM..38 4.1 BACKWARD MOVEMENT..40 4.2 FORWARD MOVEMENT.41 4.3 TURN LEFT MOVEMENT....41 4.4 TURN RIGHT MOVEMENT..42 5. HARDWARE DESCRIPTION.43 5.1 MAIN FEATURES44 5.2 IMPORTANT COMPONENTS45

6. SOFTWARE SPECIFICATION.63 7. APPLICATIONS.70 8. ADVANTAGES...74 9. LIMITATIONS78

10. REFERENCES.82 11. BIBLIOGRAPHY.83

CHAPTER 1

INTRODUCTION

CHAPTER 1

INTRODUCTION The definition on the term robot is defined in this chapter. What is a robot? There are many types of robots that have been built and its usage. Why building a hexapod robot instead of a mobile robot or a quadruped or a biped robot? This question will be discussed in details in this chapter. The objectives of this thesis and a brief review on some of the robots built worldwide will also be presented in this chapter.

1.1 ROBOT

Over the years, there are many definitions of robots. It is difficult to suggest an accurate meaning for the word robot, since there are various definitions of this word, different according to the points of view. Some view a robot through the aspect of reprogramming ability while others are more concern on the manipulation of the robot, behaviors, intelligence and so on. The British Robot Association (BRA) defines robot as: "A programmable device with a minimum of four degrees of freedom designed to both manipulate and transport parts, tools or specialized manufacturing implements through variable programmed motion for the performance of the specific manufacturing task" [Al Salameh, 2000].

The Robotic Institute of America, on the other hand defines the robot as: "Reprogrammable multifunctional manipulator designed to move material, parts, tools or specialized devices through variable programmed motion for the performance of a variety of tasks." [Fu et al., 87]. Based on the definition of robot by the two institutes, it can be concluded that a robot must be an automatic machine and be able to deal with the changing information received from the environment.

1.1.1 LEGGED ROBOT

Legged robots are grouped into different categories based on the number of legs a robot had. The robots are called biped, quadruped, hexapod for robots with two legs, four legs and six legs respectively. Biped and quadruped robots are most common today. The number of legs affects the stability and weight of the robot which must be taken into considerations when designing a legged robot. There are three actuating systems for a legged robot. They are pneumatic, hydraulic and electrical systems. Each of the systems has its advantages and disadvantages regarding to the power to weight ratio, cheapness, cleanliness, controllability and availability in the market. The degrees of freedom (DOF) of each leg and the number of legs a robot has determined the mobility and capability of the robot, and suggest whether it can move through one dimensional, two dimensional or three dimensional path.

1.1.2 Mobile Robot

A mobile robot moves from one place to another to do their task. The mobility of a robot is the robot's capability to move from one place to another in unstructured environments to a desired target. [Al Salameh, 2000]. Mobile robots may further categorized into wheeled, tracked or legged robot.

Mobile robots are mostly used in difficult task and dangerous environment such as demining and bomb defusing. Besides that, mobile robots are also used in manufacturing area and agriculture related activity such as in placing the seeds in the soil and fruit harvesting. Mobile robots may be used in houses to take care for the elderly and doing household chores.

10

1.2

Why Design A LIGHT PHOBIA HEXAPOD ROBOT?

Why the Light Phobia Hexapod Robot is designed? The idea is taken during the first on lecture Robotic class when lecturer show video clip of a six-legged (Hexapod) robot that runs away from noises. The original robot was brought by UTM in early years but now it is broken. The robot consists of 12 servomotors. The early inspiration gives the idea of building a new 12 servomotor Hexapod robot. But in the early stage of planning, the cost and the time to build the robot is estimated do not be enough.

The scope project is latter try to minimize in the sense of budget and time. In the latter the survey on Web, a commercially build 3 servomotors hexapod which also use the same concept of a 12 servomotors hexapod in motion is found and provide the basic inspiration to the project. The robot uses a very old controller, which is Basic. The robot itself cannot be found in Malaysia. The robot that sales by Parallax Inc is cost about 90 pound

This project tries to design the 3-servomotor hexapod with the size bigger that have stronger servomotor with more complex ability. Besides the microcontroller will be replaced with a better microcontroller.

11

1.3

OBJECTIVE

The main objective of this project is to design and construct a 3 servomotor Hexapod robot that has the ability to move like 12 servomotor Hexapod on a certain environment. There are three others objectives to be achieved beside the main objective stated above. The three are:

a) To expand the study about the Hexapod movement. Designing a controller

program for such a system is challenging using the 12-servomotor hexapods theory of movement.

b) To design a robot that can perform movement and navigation subject to certain obstacles. It has the ability to detect light and navigate obstacles that it encounters in its way.

c) To design a technique for swing locomotion which can help to understand the nature of swing which appears on a six legged insect. This new technique will simplify the present technique that uses the complex sequence of programming.

12

1.4

WORKSPACE

The following and guidelines are listed to ensure the project is conducted within its intended boundary. This is to ensure the project is heading in the right direction to achieve its intended objective. The first scope of this project is to create a robot that can move around on a flatarea. It will have the ability to run away from light and capable of obstacle avoidance. Secondly, the scope of this project is to design a controller for the robot leg which was powered by the servo motor. This servo motor can be positioned to specific angular positions by sending the servo a coded signal. This coded signal was called Pulse Width Modulation (PWM).

1.5 LITERATURE REVIEW The pictures below in the robot that invented through intense of the research done by a top university. Most of this project is very costly due to the component that is used is very expensive and hard to get even in Malaysia. Most robots that developed by these universities are very complex due to the program sequences and complex mathematical calculation.

The picture in figure 1.2 below shows the picture of SPRAWL.

Figure 1.1 SPRAWLS

13

Stanford University- SPRAWL is a design of a highly mobile, compliant legged biologically inspired robot from Stanford University. Stanford has developed the novel capability to build flexible structures with embedded sensors and actuators that will revolutionize the design of robotic parts. (Clark, J. E., 2001) Transferred concepts of differential leg function, orientation and placement in sprawled postured animals resulting in the dynamic, bouncing robot called SPRAWL built by Stanford. Determining the compliance or impedance of animal leg segments, joints and muscles, the robotic design is carefully considered to achieve highest performance.

CNM Hexapod (RHex) as shown in Figure 1.2 is a dynamically stable legged robot

Figure 1.2: RHex A highly mobile-legged robot called the CNM Hexapod developed by the University of Michigan and McGill University based on biological inspiration from the University of Michigan and McGill University. With provided data on insects maneuvering over rough terrain, RHex takes advantage of a tuned, dynamically stable mechanical system. Based on the finding that legged animals with diverse morphologies all operate as spring-mass systems, these engineers have developed a revolutionary approach to control a robot with many legs, joints and actuators (many degrees of freedom) (R. Altendorfer, 2001). With knowledge of how the body moves, simple rules can be developed to control the many parts that produce this movement.

14

Boadicea is a Hexapod with artificial muscles. The picture in Figure 1.3 show the robot of Boadicea develop by the MIT Insect Lab- the Poly-PEDAL Laboratory has worked with the laboratory of Prof Rodney Brooks at MIT (Insect Lab). Professor Full provided biological inspiration for a six-legged terrestrial robot named Boadicea built by Mike Binnard. Studies on cockroaches inspired the use of a much sprawled posture for stability using a linkage that still provides for a linear step. The joint axes were vertical first axes which tended to decouple the joint from gravitational loading. (Mike Binnard,1998) A differential leg design was employed which allowed overlapping workspaces. Larger workspaces translated into longer stride frequencies and an increase in speed. The robot was robust to failures in leg function as are the animals that can adopt a compensatory gait.

Figure 1.3 Boadicea

15

Figure 1.4 Basic Stamp

The picture in Figure 1.4 shows the Basic Stamp robot that taken Parallax Inc. This robot is very small and quite powerless because it use mini servomotor. It does not have any advance sensor capability but only installed with whisker sensor.

In this thesis, a Light Phobia hexapod Robot is developed a proposal. The robot is designed by on January. Several sensors are used and placed on the robot so that the robot will be able to sense light and obstacle. The sensors used are LDR resistor and SUNX infrared sensor. Thus, tha robot is capableof light detection and avoidance. The following chapters in this thesis outline the mechanical structure design and the electronic of the proposed light phobia hexapod robot.

16

CHAPTER 2

BASIC MECHANICAL ROBOT STRUCTURE

17

CHAPTER 2

BASIC MECHANICAL ROBOT STRUCTURE

Introduction

The Light Phobia Hexapod Robot walks using the alternating triangle method. At any time it has the front and back legs of one side on the ground along with the center leg on the opposite side. The alternating triangle method is the simplest system that allows Light Phobia Hexapod Robot to walk forwards and backwards in a straight line and to allow the left or right turning. The movement of Light Phobia Hexapod Robot basically is the same as the 12 servomotor hexapod robot. Below is the picture that being designed using AutoCAD for reference in the process of building the Light Phobia Hexapod Robot. The robot consists of 3 servos.

18

The mechanical design of this hexapod of 3-servomotor give the robot a much more advantage in term of cost, the weight, and size of the robot. Normally the 12 servomotors hexapod is heavier. Thus, in order to lift up the body the servomotors that used in a 12 servomotors hexapod are more expensive. Normally each of the servomotors can lift 6-8 Kg, that normally cause RM300-RM450. But in this design, the robot size become smaller and lighter.

19

CHAPTER 3

ELECTRONIC DESIGN

20

CHAPTER 3

ELECTRONIC DESIGN

3.1 Motor Selection

Through out this year final year student generally chose three types of motor for their final year project. The motors are stepper motor, DC motor and servomotor. Each type of motor has its own strength and weaknesses. The type of motor chosen for a project is based on its suitability and intended usage. Besides that, factors such as cost, availability and physical characteristics of the motor such as dimensions and weight must also be considered thoroughly before making any decision on the motor used. The wrong choice of motor only leads to over budget and brings difficulty to the project.

21

3.1.1

Servomotor

Servomotor is chosen for this project due to it flexibility to rotate to a specific angles of degree that required. In this project the hexapod robot is a mimic of six-legged insect autonomy. The servomotor is the solution to hexapod leg movement. The servomotor is the actuator for the hexapod robot legs.

Figure 3.1 General Servomotor with built in gear and DC servomotor. Generally there are actually two types of servomotors available. The DC servomotor illustrated at the right in Figure 3 is for industrial use and is much heavier, powerful and expensive. It is sometime used in building bigger robot mainly industry robots. The other type of servomotor as illustrated at the left in Figure 3 is the pager type; call pager type because it looks like a pager. Pager type servo motor or simply called a servomotor are used widely in building robots.

22

Major servo manufacturers are Futaba, Hitec, Sanwa, JR, Airtronics and Hobicco. The first Servomotor developed is to serve the purpose for the use in model airplanes, sailboats, and in radio controlled cars. Today, a lot of people use servomotor for building the robot arms, legs, grippers and sensor platforms. Servomotor still serves the same purpose as the DC servomotor where many student and hobbyist all around the world use it because it is cheaper. Servomotor is used in almost anywhere that needs repeatable position control and accurate degree of movement to be generated.

Figure 3.2 A Sanwa Servomotor that used in this project.

The servomotors that used for the hexapod robot are Sanwa servomotor. Normally, the body of servomotor is build from plastic and has three wires connected to it; one for controlling the motor and the other two is the power supply. Sanwa servomotor is use for this light phobia hexapod robot. It has three wires, blue for controlling signal, brown for positive and black for ground. Servomotor receives an

23

input signal in the form of a pulse width modulation (PWM) signal, and then turns their output shaft to the position indicated by the signal, typically swinging in an arc of 90 or 180 degrees depending on the motor's specifications.

Servomotors typically weight about 50 gram or 100 gram depending on the servo's architecture. Servomotor normally powered directly from a battery or other DC supplies. This is because when the servomotor holding heavier load servomotor will draw more current in most times greater than 1A if there is few servomotor working together under one power supply. Many previous projects, student did not notice this problem would cause the regulator chip to burn out.

The servomotor that used for this project can hold payload up to 3kg. The price for the servomotor is RM65 and can be found at Niko Sales and Service Center at Plaza Angsana, Johor Bahru. The price of the servomotor varies according to brand and the maximum payloads that can be hold by the servomotor. Sometimes the smaller the servo the more expensive it is because it is lighter.

A servomotor comes in a cartridge type casing usually with 20mm x 40mm x 35mm dimension. Inside this cartridge casing is a DC motor, a set of gears, potentiometer and a control circuit. The output shaft of the DC motor is attached to a set of gears and a potentiometer. The potentiometer is used to determine the exact position of the servomotor's output shaft. The control circuit is to control the output of the DC motor according to input signal from the potentiometer and from the control wire.

24

3.1.2

Servomotor Interface Circuit

One of the main reason the servomotor most popularly being use to build robot is the ease to interface the servomotor with the micro controller. Normally, if a DC motor is used a DC motor driver circuit is required to interface with micro controller. It is because the supply directly from the micro controller itself is not enough to drive the DC motor. The other reason is to protect the micro controller circuit so it will not be damaged due to the back EMF of the DC motor. The traditional method is to use a Hbridge circuit. This is rarely implement nowadays because a motor driver chip such as the L293-8 is more preferable for the ease of debug circuit mistake. For higher amps application for heavier DC motor the commercial motor driver card, relays based motor driver, opto coupler based motor driver and many more is preferable

For servomotor interface circuit as shown is the in diagram below shows how to interface the servomotor with micro controller.

The circuit diagram illustrated in Figure 3.3 shows that the servomotor is much more easier than building a DC motor. The servomotor is connected directly to port A to receive the PWM pulses generated by the micro controller at port A using timer function. The detail of the timer function will be discussed in chapter 4. The servomotor will share the same grounding with the microcontroller.

25

Figure 3.3 The interface circuit for servomotor with MC68HC11E1

26

3.2

The Microcontro ller Circuit For MC68HC11E1

The microcontroller unit that has been selected for the purpose to control the robot is the MC68HC11E1 microcontroller manufactured by Motorola. The chip is chosen based on the following facts:

I. The MC68HC11E1 is the most robust chip that is available in the market. II. The MC68HC11E1 have enough timer ports to support up to 4 servomotors. III. Its portability and low current consumption. IV. It supports serial interfacing with the personal computer. V. It has large web based technical support. VI. It has 4 A/D converters for Light Dependant Resistor (LDR).

In order for the chip to function the hardware, as shown in Figure 3.4 must be setup:

Figure 3.4 MC68HC11E1 chip supporting hardware block diagram

27

3.2.1

Reset Circuit

Reset circuit is to control the RESET pin on the microcontroller. The RESET pin is an active low bi-directional control signal. It is used as an input to initialize the Microcontroller. The MC 34064, which is a chip to sense low voltage (lower than 4V) into the micro controller is used although recommended by Motorola. The figure below is the circuit to build a reset circuit.

Figure 3.5 Reset Circuit for MC68HC11E1

Many previous final year project student having problems in that the microcontroller hang up or even not working due to the problem reset circuit problem. The reset circuit is an active low output circuit. So normally the circuit will give a high as output if the button is not pushed. When rest button is pushed, the reset circuit will give an active low signal to the MC68HC11. Many students in the previous project many blamed the chip as the reason for the voltage drop. But after try and error, the

28

main reason why the voltage drop it is because most of the students did not realize that when they connected the microcontroller unit connected with DC motor, it share the same power supply, thus the problem of power drop will the happen. The DC motor generally requires high Amp supply. When the amps running lower, the voltage will drop. This will cause the regulator the running at a lower voltage. When this happen this chip will continuously give a low in put to the reset pin for the microcontroller and cause the micro controller to kept reset when the input voltage drops lower than 4V. A MC 34064 costs around RM 5.00 while a capacitor cost only a few cents.

29

3.2.2

5 Volt Regulator unit

A 5V regulator is needed for this project. It is because most electronic component function only at 5 volt the maximum and 4V the minimum. The microcontroller, serial communication, and the reset chips use 5V. In order to protect all the electronic components and ensuring them to work in a constant input output value of 5V, a constant 5V is needed.

The chip that used to generate a constant 5V is the 7805. The maximum amp is 1A. The figure below show the circuit for the 5V regulator.

Figure 3.6

5V Regulator using 7805

30

3.2.3

Serial Communication Circuit

The micro controller MC68HC11 communicates with the user via serial communication interface using RS 232. A full duplex asynchronous SCI is provided with a standard NRZ format (one start bit, eight data bits and one stop bit) and a 9600 baud rate. The SCI transmitter and receiver are functionally independent, but use the same data format and bit rate. The component that use for this circuit is MAX 232. Figure 3.7 shows the circuit for the serial communication interface.

Figure 3.7 Serial Communication Interface Circuit

With this circuit, the microcontroller can communicate with the PC. From here user can burn the data at the EEPROM to load the program for the robot.

31

3.2.4

Timing Circuit

The timing circuit shown in Figure 3.8 is to provide external clock input into the microcontroller. XTAL and EXTAL pin provide interface for either a crystal or a CMOS compatible clock to control the internal clock generator circuitry. A 10M ohm resistor and two 22pF capacitor acts as a filter to filter-out external noise from interfering with the crystal frequency. The crystal used is 8 MHz.

Figure 3.8 Timing Circuit

32

3.3 SUNX Infrared Sensor

SUNX IR sensor is a 12V-24V powered sensor. It uses 35mA. The reason why SUNX infrared sensor chosen for this project is based on several reasons:

It is immune to strong light. It has build in filter to filter out strong ray of light that directed to it. It is a robust sensor. It is used in industrial sector. It is easy to interface with microcontroller.

To interface the IR sensor with the microcontroller, a very easy method is used. Figure 3.9 show how a SUNX IR sensor is used to interface with microcontroller. When there no obstacle detected by the sensor, the output from the sensor is 0V. This make the microcontroller read the input pin from port c as high. When there is obstacle the output of IR will be high, and make the port C read the input pin as 0V. In other words, this circuit made the setting to be active low for port C.

Figure 3.9 the interface circuit for IR SUNX Sensor

33

Figure 3.10 below showing how the connection with all the IR sensor:

Figure 3.10 Interface Circuit for SUNX IR Sensor

The SUNX sensors are directly connected to 16.8V source. There is no problem for the sensor to work under an unregulated DC source.

34

3.4

Light Dependent Resistor (LDR)

To enable the robot to detect the present of light, the LDR is normally used. It is cheaper than buying a light detector sensor. When the LDR did not being expose to light, the LDR is equal to open circuit. But when the LDR is exposed to light it behave as a resistor and the value of resistor becomes less if the beam of light becomes intense .The configuration is as shown in the figure below:

Figure 3.11 LDR circuit

The LDR must be part of a voltage divider circuit in order to give an outputvoltage, Vout, which changes with illumination. The maximum Vout that can be read by the A/D is around 4.9V as the circuit is configured based on a simple voltage divider theory below:

35

The following 3.8 is the configuration used for the light-phobia hexapod robot. As from Figure 3.8, a 4.7k ohm resistor is used and the LDR which is connected to the MC68HC11E1 A/D converter. The MC68HC11E1 provides a build in A/D converter for the user to use. It have 4 pin at port E which are PE0-PE4. Before it can use, user have to connect its VRH-VRL. The VRH it is connected to 5V and the VRL is connected to GND.

Figure 3.12 Interface Circuit For LDR

Figure 3.13 Interface Circuit For LDR

36

3.5

Power Electronic

The power supply unit is the most critical unit in an electronic project. Since there are 3 servomotors which needed a 5V- 6V supply, SUNX IR sensor which requires 12V-24V, and microcontroller require 5V, separate sources of power supply is a must. The separated source means for electronic use one battery and servomotor use another battery. Normally the servomotor will not share the same source with other electronic component because the current that draw for the 3 servomotors is very high as compared to the other electronic component. Beside the source that used for servomotor usually have back EMF whih cause by the DC motor inside the servomotor, this condition will cause the signal in the microcontroller circuit to be not stable. The separation of supply source using different battery not only allows the electronic circuit to be stable but also prevent the damage that can be done the 7805 chip.

Before implementing this concept, the original design was for the servomotor to get the power supply from the regulator 7805. But when running 3 servomotors together, the servomotor become weak and powerless and the 7805-regulator chip becomes very hot. Although the problem can be solve by adding extra heat sink but this will surely shorten the life span of 7805 as it is draw the maximum 1A of current and the servomotor still have no enough current. In the end, all current in the circuit will be drawn to servomotor only causing some component to not functioning. Thus, the idea of separating the power source was implemented.

37

Figure 3.10 Proper Interconnection for separated battery that used in this project

Although the source is separated all the grounding must be connected together. Figure 3.10 shows how the circuit is interconnected when separation power supply is Implemented

38

CHAPTER 4

SOFTWARE ALGORITHM

39

Software Algorithm For Robot Moving

The hexapod robot have a very complex ways to move. In this project the robot movement is categorize into 4 movements, forward, backward, turn left and turn right. Each of this movement use different algorithm to move. Before the subroutine of the robot movement is to be written each movement algorithms must be identify.

Figure 4.1 shows the few basic movement of Hexapod robot

40

4.2 Legs configuration for Hexapod Robot

Backward Movement To allow the robot to move backward Servo 3 must shift left. Then Servo 1 must swing forward, at the same time, Servo 2 must swing backward. Then again Servo 3 will shift right, followed by Servo 1 will swing backward at the same time Servo 2 will forward. Figure 4.9 show how the hexapod robot move backward.

Figure 4.3 Robot backward motions

41

Forward Movement

To allow the robot to Forward Servo 3 must shift right. Then Servo 1 must swing backward, at the same time, Servo 2 must swing forward. Then again Servo 3 will shift left, followed by Servo 1 will swing forward at the same time Servo 2 will backward. Figure 4.10 shows how the hexapod robot moves forward.

Figure 4.4

Robot forward motion

Turn Left Movement

To allow the robot to turn left Servo 3 must shift left. Then Servo 1 must swing backward, at the same time, Servo 2 must swing backward. Then again Servo 3 will shift right, followed by Servo 1 will swing forward at the same time Servo 2 moves forward. Figure 4.11 shows how the hexapod robot to turn left.

42

Figure 4.5

Robot turn left

Turn Right Movement To allow the robot to turn left Servo 3 must shift right. Then Servo 1 must swing forward, at the same time, Servo 2 must swing forward. Then again Servo 3 will shift left, followed by Servo 1 swing backward at the same time Servo 2 will backward. Figure 4.12 shows how the hexapod robot to turn right.

Figure 4.6 Robot turn right

43

CHAPTER 5

HARDWARE DESCRIPTION

44

Main features Philips P89V51RD2 SMD c on board. Autonomous robot. Completely mobile robot. ISP (In System Programming) support. Easy USB interface. On board provision for battery charging.

Three servo motors for accurate movement. 6V DC battery for continuous operation. IR remote for wirelessly controlled motion

The HexaBOT is basically a robot which uses legged locomotion. It is quite evident from the name that it will be six legs for locomotion. ,It is using only 3 servo motors to control 6 legs. MCS51 (P89V51RD2 ) based controller based board is used for controlling servo motors hence to control HexaBOT. HexaBOT is controlled using IR remote.

45

Important components

HexaBOT

46

47

Once you finished with all mechanical assembly the last thing you have to do is fix Black servo screws. But if you fix it when servo is in wrong position then you can damage your servo and your HexaBOT assembly too. To avoid that follow these instruction.

1.Make sure you have not fix black screw in your servo motor shaft.

2. Remove Black rings from motor shaft. Dont remove self threading screw holding HexaBOT legs to plastic ring.

3. Download Servo Rest code from resources CD to your microcontroller board. 4.Once you load that program and connected battery to board then all motor will be at 90 degree. That is considered as resting position for all servos.

5. Then only fix all black servo screws such that while in rest left and right leg perpendicular to HexaBOT and middle legs both legs touching ground. To know more about connection refer to your Board section and how to do connection section. Excessive pressure on servo can damage your servo.

48

A "servo" is a generic term used for an automatic control system. It comes from the Latin word "servus" - slave.In practical terms, that means a mechanism that you can set and forget, and which adjusts itself during continued operation through feedback. Disk drives, for example, contain a servo system ensuring that they spin at a desired constant speed by measuring their current rotation, and speeding up or slowing down as necessary to keep that speed. A Servo motor consists of the following components:

A DC motor Gears with an output shaft Position sensing mechanism Control circuitry

49

The control circuitry indicates to the servo the position that the output shaft should have. The position-sensing mechanism tells the servo what position the shaft currently has. The control circuitry notes the difference between the desired position and the current position, and uses the motor to "make it so". If the difference in position is large, the motor moves rapidly to the correct position; if the difference is small, the adjustment is more subtle.

50

51

52

The figures, the line diagram schematic and the exploded view of a servo motor. You can see the control circuitry and position sensing mechanism inside the servo motor. The position sensing is nothing but a potentiometer which gives the relative resistance to the origin at any point of time. The gear train inside the servo motor is also evident in the diagram. Finally we have three wires emanating out of the motor; VCC, Ground and Control. The motor shown can be driven with a maximum voltage of 5V DC.

Controlling the servo is quite easy. But you cannot drive it directly just byplugging it into 5V DC. You need a train of pulses along the control line. The width of the pulses that you provide determines the angle of rotation of the shaft of the servo motor. This method is called Pulse Width Modulation.To drive the servo, the pulses that you need to provide should have a minimum delay of 20ms. That is the off time between the pulses should have a minimum duration of 20ms. This off time may or may not be accurate. You cannot offset it by too much, but. you can exceed the 20ms mark somewhat but you cannot go below that. Now how do you think you drive the servo motor to various angles? Do you know that you can-not drive a stepper motor continuously in circles.* You can only make it rotate to several predefined angles like 0, 45, 90, 135 and 180. You would require to pass pulses of different widths, though!

53

Below, we have listed the pulse width required to move the servo to severa angles:

0 - 0.5 ms 45 1.0 ms 90 1.5 ms 135-- 2.0 ms 180-- 2.5 ms

If you notice, in each case, the off time of the signals remain the same: 20ms. This 20ms off time ensures that the pulses are repeated 50 times in one second. After you ensure this, you may vary the on time of the pulses from 0.5ms to 2.5ms to vary the angle of rotation of the servo motor shaft. Beware that the on time of the pulses should be maintained accurately, otherwise the servo wont rotate at all. You have to keep on providing the same pulse width until you want a change in rotation. After that you have to provide the new pulse width to maintain the position of the servo .

54

You have to understand that there is no easy way to make the servo rotate continuously. A servo is used only in those cases where you have fixed scope of rotations and you require accurate and exact positioning.Suppose that you require that your motor rotate only 45 and then stop over there. For this to happen, you have to provide a continuous pulse train with an off time of 20ms and an on time of 1ms. This situation can also be attained with a stepper motor, but in a different way. But the difference will be evident when you actually turn off the system and subject the motor to nay free rotations. In a stepper motor you do not have any reference as to where your motor shaft is exactly positioned. But a servo motor always knows where its shaft is positioned. So if you again turn the system on and start giving the same pulse width of 1ms, the motor will getback to its original 45 position.

There are servo motors available which can actually rotate 360 continuously. But these motors are very costly and are practically not feasible for small time projects. There is one another way in which you can make a normal servo motor rotate continuously. If you open a servo motor, you will find a hardware lock which actually prevents the motor rotate more than 180. You have to break that lock which will allow the motor to move to any angle you want. If you want the motor to come back to its reset position (0) you have to resume pulses of 0.5ms width. The advantage of this motor is that it can be operated even without a microcontroller. To achieve you can use two 555 timer IC to generate the desired pulses. Why two? This is because one 555 timer IC will generate a pulse with 20ms on time and the other one to invert it and also to introduce a specific on time inthose pulses. The other method is to generate PWM using a microcontroller.

55

Beside we have shown the functional diagram of how to connect a servo motor to a microcontroller. A servomotor has three leads, VCC, GND and Control. We have connected VCC to +5V DC, GND to Ground and Control to any port pin of the microcontroller which may be free. The servo motor draws the required electricity from an external source other than the microcontroller. So we do not require to connect a motor driver circuit or IC to the motor. In the next section we will look at the way about how to generate PWM through the microcontroller.

56

Generating PWM A microcontroller has four I/O ports. Each I/O port has eight pins. That means there are thirty two pins available for I/O. These I/O ports can be independently set to either input or output. They are called bit-addressable. This means that if one pin of a specific port has been marked for output then the other pins of the same port can be used for input. Now to connect the servo motor to a pin of the microcontroller we need to configure that pin in output mode. We have an inbuilt timer circuit inside the microcontroller. A timer is a circuit which can be used to count up or down or to generate time delay. So we use an inbuilt timer to generate a signal which has an on time of 20ms. We keep the output port pin low during that time. Then we reset that timer and again use it to generate another signal which has an on time of 0.5ms. We keep the output port pin high during that time. Thus if we analyze the output port pin, we will have a continuous signal which has an on time of 0.5ms and an off time of 20ms. When this signal reaches the servo motor on the control wire, it makes the servo to remain steady at 0 (reset) position. Even if you try to move the shaft of the motor with your hand during thistime, the motor will oppose the force that you apply. Now if you want to move the shaft of the motor to the 90 position, you have to make the timer generate the delays so that the output port pin stays low for 20ms and high for 1.5ms. The use of timers and start and stop of them are further explained in detail in the disc that accompanies this product. Please refer to them.

57

Beside, we have shown a schematic of the actual electronic board that has been provided with the HexaBOT. You can say that this is the brain of the robot. It contains all the controller ICs and other circuitry so that you can write your own programs and make the HexaBOT walk according your wish. You have to mount the board on the HexaBOT using a double-sided tape, so that the board does not fall of from the robot when it walks. Below we have listed some of the important components that are worth listing.

58

59

Symbol SENSOR SERVO

Devices Obstacle Avoidance Servo Motors Connector

Symbol TSOP LED U2 RX ,TX USB J1 POWER LED

Devices IR data reception indicator FT232 UART Trans-receive indicator USB Cable Connector Jumper for Battery Power Indictor LED Supply Selection Switch Charger Connector

CONNECTOR Other Sensors U1 L1,L2,L3 S1,S2,S3 TSOP RESET P89V51RD2 Output LED Input Keys

IR Remote Sensor POWER SWITCH Controller RESET BATTERY CHARGER

60

Dual TSOP is a handy sensor module used for obstacle detection. This module works on the principle of IR transmitter using IR LEDs and IR receiver using TSOP sensors. The distance for detection can be adjusted by tuning the pot. 555 IC is used to generate a frequency of 38khz which will be transmitted using the IR LEDs.

61

SERVO MOTOR SERVO A SERVO B SERVO C SERVO D

PORT PINS P1.4 P1.5 P1.6 P1.7

IDs 1 2 3 4

SYMBOL IR LED RX_L, RX_R POT LEFT and RIGHT U1

DEVICES LEFT and RIGHT IR transmitters TSOP receivers SENSITIVITY OBSTACLE INDICATOR 555 IC

62

63

CHAPTER 6

SOFTWARE SPECIFICATION

64

Lets start with Introduction to robosft.lib file and its uses. Robosoft.lib file defines 4 major predefined functions 1. void Servo_Init (void) 2. void Servo_Control (unsigned char Servo_No, unsigned char Angle) 3. void Remote_Init (void) 4. unsigned char IR_REMOTE (void)

1. void Servo_Init(void) This function has to be called at beginning of your main function to initialise servo motors. You don't have to pass any parameter to this function and it also don't return any parameter. E.g Servo_Init( ); //Initialise Servo Motors//all servo at 90 degree

2. void Servo_Control (unsigned char Servo_No, unsigned char Angle) This function is used to control servo motors. You have to pass 2 parameters to control servo motor. You have 4 servo motor connection available on board out of which you have to use any 3 to control your hexaBOT. Each servo is defined with its id as 1,2,3 or 4. For detail check know your board section. As you know servo motor can move from 0 degree to 180 degree. So while controlling servo motor you have to pass two parameters. That is servo number and Angle for that particular servo motor. After initiation all the servos will be set to 90 degree angle. Eg. Servo_Control( 1 , 95 ); //Move servo 1 to position 95 degree

65

3. void Remote_Init(void) This function has to be called at beginning of your main function to initialise IR remote. You don't have to pass any parameter to this function and it also don't return any parameter. E.g Remote_Init( ); //Initialise IR remote 4. unsigned char IR_REMOTE (void) Whenever you call this function IR remote will go for scanning for around 100 msec. If any key pressed then its equivalent value will be return by function. If no key is pressed then function will returnzero. The values for each buttons are defined in the header file of robosoft.lib.

1. #define NUM_1 2. #define NUM_2 3. #define NUM_3 4. #define NUM_4 5. #define NUM_5 6. #define NUM_6 7. #define NUM_7 8. #define NUM_8 9. #define NUM_9

66

10. #define

NUM_0 11. #define NUM_10 12. #define FWD 13. #define BWD 14. #define RIGHT 15. #define LEFT 16. #define STOP 17. #define PW 18. #define MD

So whenever you press any key its respective value will be return. Lets assume if you press MODE key then IR_REMOTE function will return value 18. Lets try sample program : Problem Statement if control servo 1 with IR remote if UP key is pressed angle should increase If DOWN key is pressed angle should decrease.

67

PROGRAMMING
#include <reg51f.h> #include robosoft.h void main ( void ) { unsigned char key = 0; Unsigned char angle = 90; Servo_Init( ); Remote_Init( ); Servo_Control( 1 , angle); while ( 1 ) { // header file for P89V51RD2 //include servo and IR remote function //main function starts here //variable assigned to store IR remote key //variable assigned to store servo angle //Initialise servo motors //Initialise IR remote control //Move servo 1 to angle position i.e. 90 here //repeat code continuously

68

key = IR_REMOTE( ) ; if( key == UP ) { If( angle < 180) angle++; Servo_Control( 1 , angle); } If(key == DOWN) { If( angle > 0) Angle- -; Servo_Control( 1 , angle); } //Scan IR remote once //if UP key is pressed //if angle is less then 180 //then increment angle //and move servo to that angle

//if DOWN key is pressed //if angle is greater then 0 //then decrement angle //and move servo to that angle

69

How to Add Library : Step1: First thing is you have to copy both robosoft.lib and robosoft.h file to current project folder. And when you are adding file to source group add your *.c file containing main function and robosoft.lib file also.

Step2: You have to include library in main c file also just below your reg51f file declaration. i.e. #include <reg51f.h> #include robosoft.h Step3: Before using any function related to Servo and IR remote you have to initialise servo motors and ir remote after declaration of main function i.e. void main (void) { Servo_Init( ); Remote_Init( ); //.. And so on // after this you can use servo control and ir remote function any time...

70

CHAPTER 7 APPLICATIONS ADVANTAGES LIMITATIONS

71

APPLICATIONS OF THE HEXAPOD:

I- Flight Simulators: After the start of the space era in the early sixties of this century, simulation of actual conditions passed by pilots either on planes or space shuttles became a must in order to give the pilots an adequate and necessary training. This is because planes and space shuttles are considered to be "expensive". Not only that, but also because the life of the pilot is equally expensive as the vehicle. The aim of flight simulators is to simulate man/vehicle interaction, through measurement of the pilot readiness and performance and putting a scale for his maneuvering. The simulator is an actual cockpit mounted on a hexapod. The hexapod is of the "six axis positioner" type, with six hydraulic struts and 12 universal joints distributed on both the base and the platform, which is the cockpit in this case. Such a simulator can be easily modified to simulate a wide range of both ground-based and flight vehicles. Through computer system, the simulator gives a quantitative evaluation for the pilot. From a medical view point, the existence of the body in a 6 DOF system will produce precise simulation on the body's visual and tactile sensors. In other words, the biological effects on the inner ear, and kinesthetic organs ,body's muscle and skin tissue, which are used by humans to sense motion in all directions. According to McFadden, a company specialized in this type of flight simulators, the benefits of a 6 DOF system on simulation are: Enhances realism of the experience Increases rider acceptance of simulation Virtually eliminates motion sickness Improves synchronization of visual and motion information cues Able to accommodate more realistic and panoramic visual displays

72

II- PRECISION MACHINING: With the growing interest in quality of produced parts, a new generation of machines that combine high speed, accuracy, stiffness, and multi-axial capabilities started to appear. The basic design of these structures is based on the conventional Stewart Platform. In this case, the machining tool is carried on the platform, hence having the ability to move six degrees of freedom. There are two possible designs. The first is the one that uses the telescopic struts, hence having universal joints at the end of the strut. The second design is with the ball and socket joint at the end of the strut. These designs have the following advantages: It allows free access to the work zone. There is nothing to impede the motion of the machining tool to the work piece. Unlike most industrial robots, the hexapod design provides stiffness beyond what the design shows. The struts act longitudinally on the platform, hence producing either tension or compression on it. The machine offers micron to sub-micron accuracy. This is because of the software package that is used to control the robot. Low friction at the joint, giving long life time for the robot. III- PRECISION SURGICAL ROBOTS: Since most medical disciplines, especially in the field of surgery, require high accuracy and controllable forces when working on human organs, the precision controllers were introduced to the field of medicine as well. Research on the use of hexapod positioners in this field is done by the support of Siemens Medical Engineering. The aim of this robot is

73

to help the surgeon operate on a sub-micron accuracy. This is in order to increase safety in surgeries and prompt further improvement and give a chance for more complicated surgeries. The use of the robot with hexapod arms enables the high precision and high forces to reach very complicated zones, mostly in the brain because the model was developed for neuro-surgery. Not only that, on the other side the surgeon will be sitting in the operating cockpit. This is described as the workspace of the future surgeon. The cockpit is mounted on a hexapod platform so that the impression is transmitted to the surgeon for the endoscope going inside the patient. This helps the surgeon to control the tools and give him a feeling of the spatial orientation of the scalpel. As they say, they want the surgeon to "fly through the patient" ! Such a complicated technology is controlled by a computer simulation to avoid errors, where errors are not originally possible! Other Applications and Research: 1 - Fine Positing device for the mirrors of high resolution telescopes. 2 - Positioning of optics, electron guns, Lasers, and other energy resources.

74

THE ADVANTAGES The current paradigm in design and manufacturing involved integration of numerous hardware and sophisticated software in order to create An unique product of extremely high accuracy . The objective of this integrated product is to enhance quality and reliability, reduce the cost and overall cycle time, and increase flexibility. Hexapod is a dramatic departure from conventional mechanism design; it offers many new attributes for the most manufacturing processes.

* Six degree of freedom

The hexapod consists of six struts which expand and contact between the movable platform, which carries a spindle, and the fixed platform. Coordinated motion of these six struts enables the spindle to move in any direction. In addition to the traditional motion in orthogonal axes, X,Y, and Z, this device also is able to move in the rotary complements of pitch, yaw, and roll. This advantage allows the spindle to reach unusual angles and geometrical features. In contrast to the conventional multi-axis positioning tools, the hexapod technique requires all six struts to alter their lengths if a change of the platform in only one axis is required. On the other hand, if only one strut alters its length, all six coordinates (X, Y, Z, q, a, j ) will change. The twelve multidegree-of-freedom joints must assure precision and zero backlash. Unlike other multi-axis positioning devices, in which any change in one coordinate influences the position of the pivot point and the other coordinates, the hexapod can compensate itself automatically. Through the sophisticated software, the coordinate transformations and individual velocity /coordinate information are transmitted to each motor controller axis.

* High precision and accuracy

75

* Computer visualization tools

Due to unconventional design of the hexapod, the control for the hexapod is through visualizations of the products and the processes by sophisticated software, which is needed to support extremely detailed visualization. This software package must have " zoom-through" ability; moreover, it should have the ability to scan the whole workplace through an individual multi-mode system. The advantages of applying such numerical visualization tools are copious. The actual hexapod will not need to be tied up, freeing it for the other tasks. Safety procedure will be eliminated. A profound set of visual motion data can be attained with minimum human labor; in other words, this will reduce the human interference and at the same time the human faults. Using graphic simulation and animation of the downstream manufacturing process provides a map for the entire workplace envelope. Tool velocity and acceleration data will be registered for different locations in the workspace and for various speeds and accelerations of the ball- screw struts. Due to extraordinary kinematics of the hexapod it is predicted that characteristic motion at the tools reference frame will be highly dependent on the location in the workspace. Detailed kinematics map will be resolved from the obtained data, identifying regions of the greatest achievable tool velocity and acceleration and those of the lowest. This will give a clear perception of the optimal regions of the workspace for achieving that most use of different machining process. Ultimately this will promote the development of the hexapod in different manufacturing processes.

* Graphic simulation and computer animation

76

* High stiffness

Besides the various advantages stated above, the hexapod offers another important feature, which is the high stiffness and rigidity of its components and all moving parts, such as bearings and joints, and drive screws. This feature results in extraordinary high natural frequencies (500 Hz@10 kg load);consequently, this gives very high speed of cutting and the other maching objectives. In addition, high stiffness of the hexapods components will prevent any bending effect in the six legs or in the platform, and that what makes the hexapod very advantageous.

*High load/weight ratio

The high nominal load/weight is a very important advantage of the hexapod. The weight of a load in the platform is approximately equally distributed on the six parallel links. That means each link just suffers only from 1/6 of the total weight. Furthermore, under certain load, the struts on the hexapod act longitudinally and therefore exerts either tension or compression on the struts in other words, no axial forces are applied. Consequently, there is no need to design it as massive as the conventional machines.

* Variety in the size

Rotary hexapods can be as small as soda can or as big as 3meters in diameter depending upon the objective of the machine. Comparing with the conventional multi-axis machines, the number of parts from which the hexapod is composed is one third fewer which means lighter weight and lower friction.

77

* Hexapod is a soft machine

According to Hexel Corporation, a leading company in hexapod development and production, the hexapod is "a soft machine ." However, that is not in reference to the machining centers stiffness, thrust, or the other traditional descriptions of the machine tool strength. Soft in the case of the hexapod means that the machines accuracy and repeatability are not dependent on its structural alignments. Hexel clarified that by saying , instead on relying on the ability of the skilled assemblers to scrape in way surfaces and other critical mating points to assure that the base, column, and other components are square and true, a hexapod does not require that kind of intensive assembly. Its 25- micron accuracy is derived from mathematical formulas that are the heart of the software that coordinates the relative motions of its six struts. He continued, repeatability of the hexapod design is about 10 microns, comes from its need to move a significantly lower amount of mass when machining. Only the spindle motor, cutting tool, and their carrier exert inertia and momentum beyond the servo motors themselves. The hexapod can provide higher production rate in limited time. Since that needs continuos work processing capability, the hexapod design can accommodate a pallet shuttle system that can automatically move work pieces in and out of the work zone. That can be achieved by designing the machine to be above the worktable. In essence, the hexapod design obviously has a great potential in revolutionizing a host of manufacturing processes. The merits of such machine are numerous. That providing improved accuracy , stiffness, speed, etc. As a multi processing system those merits will extend beyond individual

* High production rate

78

processing improvements and into a system- oriented improvements in the manufacturing cell. Reduction in set-up and processing time, and consequently the overall cycle time is one of the most important benefits. High quality and readability will be easily attained through such advanced systems.

LIMITATIONS AND SHORTCOMINGS

As any new design, hexapod has turned up some problems some of them have been addressed, and some still need further developments and refinements.

Friction

Friction in the ball joints is a crucial problem for the hexapod. That the friction coefficient is about 0.8,and that is enough to exert some axial deflection on the struts that influences the accuracy and repeatability. Using a ceramic coating and special lubricant, the modified struts are down to 0.2 coefficient of friction

Length of the struts

The length of the struts affects the accuracy of the machine. When the length increases, the accuracy decreases dramatically (possibility of bending). This problem have been overcome by mapping each screw before installing in the machine.

Dynamic thermal growth

This problem has appeared also in the serial linkage mechanism. That with the increase in the speed of the spindle, there is a dramatic increase in the dynamic thermal growth. One way to overcome that hurdle is by monitoring the struts in real time employing one dimension finite element analysis that activates an automatic error compensation routine built into the software and based on the known growth rate of the struts.

79

Calibration

The accuracy of the parallel- mechanism is not only dependent upon an accurate control of the length of its links but also upon a knowledge of its geometrical characteristics. According to the fabrication tolerances many factors will play a role in the final accuracy of the machine. Up to 132 parameters must be specified to describe the geometrical characteristics of the mechanism which seems to be very difficult to adjust all parameter. Therefore the calibration of the hexapod still an open problem.

An example for milling machine that uses one kind of hexapod joints. The 6 DOF decreases the machining time required by the machine to perform machining in very fine positions, with outstanding quality of machining. The hexapod joint when used in flight simulators. The above platform acquires 6 DOF, which exactly simulates air craft experience.

80

The basic Stewart Platform, with ball and socket joints at both ends of the strut. This system has six local mobilities.

The hexapod initial design put by D. Stewart.

81

Applications of Hexapods in milling machines.

82

REFERENCES
1. Edwin Wise (1999). Applied Robotics. Indianapolis: Prompt Publications. 2. James L. fuller (1998). Robotics, Introduction, Programming and Project.. USA: Macmillan Publishing Company. 3. Artificial Intelligence and Mobile Robot. The MIT Press Massachusetts Institute of Technology. 4. Al Salameh, Abd. Al Salam Sheikh (2000). "Design And Construction Of Robot Leg For Walking And Climbing Based On Animal Locomotion Characteristics." University Teknologi Malaysia: Thesis M. Electrical Engineering 5. Binnard, Michael B. (1995). "Design of a Small Pneumatic Walking Robot." Massachusetts Institute of Technology: Thesis M. Science. 6. Fu, K.S., Gonzalez R.C., Lee, C.S.G. (). "Robotics: Control, Sensing, Vision And Intelligence." Singapore: McGraw-Hill Book Company.

83

BIBLIOGRAPHY
http://www.hexapods.com http://www.hexel.com http://www.ingersoll.com http://www.polytecpi.com http://nano.xerox.com/nanotech/6dof.html http://www.mel.nist.gov/namt/projects/hexapod

84

85

86

87

88

89

90

91

92

Anda mungkin juga menyukai