AKREM ITR Maze Solving Assignment

33
Maze solving by using BOE BOT Mobile Robot NAME : Akram Mansoor Ali STUDENT NO : TP024367 INTAKE : UC3F1310ME MODULE CODE : EE010-3.5-3 NAME OF LECTURER : Ms.ILANOR MUHAINI DATE DUE : 5/3 2014

description

APU assignment

Transcript of AKREM ITR Maze Solving Assignment

Maze solving by using BOE BOT Mobile Robot

NAME

: Akram Mansoor Ali

STUDENT NO

: TP024367

INTAKE

: UC3F1310ME

MODULE CODE : EE010-3.5-3NAME OF LECTURER : Ms.ILANOR MUHAINIDATE DUE

: 5/3 2014

Contents

3Table Of Figures

4Introduction

5Objective

6Tasks to be done

7Applications of Mobile Robot

8Types of mobile robot

8Wheels

9Tracks

10Advantages

10Disadvantages

10Legs

10An increasing number of robots use legs for mobility. Legs mobile robot are often good for robots that must navigate the terrain is very uneven. Most amateur robot is designed with six legs, which allows the robot to be statically balanced (balanced at all times at 3 feet). Robots with legs are a little more difficult to balance.

11Advantages

11Disadvantages

11Arms and Grippers

12Advantages

12Disadvantages

12Navigation methods used by mobile robots

13Mobile Robot Description

13Boe-Bot Robot

14Microcontroller (Basic Stamp 2)

14Servos

15Board of Education

16QTI sensors Infrared Line Follower

17Program Concept for maze solving

18Program Description

23Discussion

24References

Table Of Figures

6Figure 1 Maze

7Figure 2 Boe-BOt Mobile Robot

9Figure 3 Wheels Mobile Robot

10Figure 4 Tracks Mobile Robot

11Figure 5 Legs Mobile Robot

12Figure 6 Arms and Grippers Mobile Robot

14Figure 7 Boe-Bot Robot

15Figure 8 Microcontroller

15Figure 9 Servos

16Figure 10 Ultrasonic sensor

16Figure 11 Board of Education

17Figure 12 QTI sensors Infrared Line Follower

18Figure 13 MAZE

IntroductionRobotics is technology that deals with the design, construction, operation and application of robots. Robots are machines device and it program to perform task and interact with its environment, without the use of the aid of human interaction. It can work by program them or give them task and they will do it. In order to call the device robot it must contains three main parts a controller (a brain); mechanical parts to help it move (robots can be powered by air, water, or electricity), and sensors that can tell the robot about its surroundings. These parts work together to control how a robot functions. Mobile robotics is a multidisciplinary field involving computer science and engineering. Overcoming automatic system design, it is located at the intersection of artificial intelligence, computational vision, and robotics. A mobile robot is an automatic machine that has the ability to moving in a certain environment. It can be controlled by the human or automatic. Also its able to perform certain tasks set for it and achieved within some given limitation. The robot needs to have the ability to navigate in order to do this. Navigation capabilities of each mobile robot must accurately and within a certain range, and this will increasingly depend on the size of the robot and the robot work to be done. Mobile robot must have a locomotion system in order to make it move. This system gives our mobile robot the ability to move forward, backward and take turns it may also provide for climbing up and down. The concept of locomotion invariably needs rotational motion. This involves conversion of electrical energy into mechanical energy, which we can easily achieve using electrical motors. The issue is to control these motors to give the required speed and torque. The main aim of this assignment is to understand the underlying basic robotic concept which is the Parallax Boe-Bot robot and make it work. ObjectiveThe objective of this assignment is to program mobile robot to navigate through the maze shown below and it also will cultivate students knowledge in areas such as sensors, programming and control system.

Tasks to be done1. To assemble a mobile robot (students will be provided with a package of robot parts.)

2. To program a mobile robot in solving the maze (composed of walls) and line maze.

BOE - BOT can navigate through a maze whose dimensions are given but to do that , the programmer must still take into account how long the BOE - BOT should continue to perform certain steps to navigate through the maze . For example, if it consists of a maze 1m straight line , curve to the right and then straight line 2m , you must notify the BOE - BOT how long it should continue to move forward before turning , and then for how long it should continue to move forward after the turn. As a result, the program is highly dependent on the maze that you are working with, and for each maze you have to navigate around the code must be changed .

For this task , you will use the PING sensors ( ultrasonic ) to navigate through the maze with walls , and you will build a program that will allow you to navigate the robot through the maze of any kind, regardless of the way the BOE - BOT should follow . The fastest mobile robot to accomplish the task will be given the highest score

Applications of Mobile RobotThe use of autonomous mobile robots has increased recently due to the increase in flexibility, reliability, speed, accuracy, and many other advantages that have robots. Humans have a limited amount of stamina and reaction, so it is not possible to remain alert to the danger all the time. The range of potential applications is very large for a mobile robot. These include agricultural robotics applications, routine material transport in factories, warehouses, office buildings and hospitals, indoor and outdoor security patrols, inventory verification, handling hazardous materials, hazardous site cleanup, underwater applications, and various military applications.Areas of application:

1) Support to medical services SERVICE ROBOTS

Transportation of food, medication, medical exams,

Automation of pharmacy service2) Automatic cleaning of (large) areas

Supermarkets, airports, industrial sites

Glass cleaning

Domestic vacuum-cleaner3) Client support

Museum tours, exhibitions guides4) Agricultural and Forests Fruit and vegetable picking, fertilization, planting

Cleaning, fire preventing, tree cutting.Like this autonomous robots become more prominent in our lives, the need to design and implement a robust system that responds intelligently to the environment a priority in robotics. Autonomous robots have proven useful, but they have not proven completely safe. If we invest more resources into robotics, we will be able to develop a robot that is equipped with a navigation system that is stable. Types of mobile robotClassification of the mobile robots depends on how the robot will look like and what is the task that can perform. The types of robots possible are unlimited and there are many types of mobile robotWheelsWheel far the most popular method of providing mobility robots and robots are used to encourage many different sizes and robotic platforms. Wheels can be just about the size, of the fraction of an inch to 10 to 12 inches. Tabletop robots tend to have smaller wheels, typically less than 2 inches in diameter. Robots can have just about any number of wheels, though 3 and 4 are the most common. Usually three wheeled robot using two wheels and casters at one end. More complex two-wheeled robot using gyroscopic stabilization. It is rare that a wheeled robot using nothing but skid steering (like that of the tank). Rack and pinion steering as found on a car requires too many parts and the complexity and cost more than most of the profits.Advantages

- Usually low-cost

- Simple design and construction

- Near infinite different dimensions cater to your specific project

- Six wheels can replace a track system

- Diameter, width, material, weight, tread etc. can all be custom to your needs

- Excellent choice for beginners

Disadvantages

- May lose traction (slip)

- Small contact area (small rectangle or line)TracksTracks (or footprint) are similar to what are used tanks. The best thing to drive the robot used outdoors and in soft ground. Although the track does not provide the added "power", they reduce slippage and more evenly distribute the weight of the robot, making them useful for loose surfaces such as sand and gravel. Most people tend to agree that the tank tracks added "aggressive" look to the robot as well.

Advantages- Constant contact with the ground prevents slipping that might occur with wheels

- Evenly distributed weight helps your robot tackle a variety of surfaces

Disadvantages- When turning, there is a sideways force that acts on the ground; this can cause damage to the surface the robot is being used on, and cause the tracks to wear.

- Not many different tracks are available (robot is usually constructed around the tracks)

- Increased mechanical complexity and connectionsLegsAn increasing number of robots use legs for mobility. Legs mobile robot are often good for robots that must navigate the terrain is very uneven. Most amateur robot is designed with six legs, which allows the robot to be statically balanced (balanced at all times at 3 feet). Robots with legs are a little more difficult to balance.

Advantages- Closer to organic/natural motion

- Can potentially overcome large obstacles and navigate very rough terrain

Disadvantages- Increased mechanical, electronic and coding complexity

- Lower battery size despite increased power demands

- Higher cost to build

Arms and GrippersArms and grippers are the best way for a robot to interact with the environment it is exploring. Simple robot arm can have only one movement, while more complex arm may have a dozen or more unique degrees of freedom.Advantages- Very simple to very complex design possibilities

- Easy to make a 3 or 4 degree of freedom robot arm (two joints and turning base)

Disadvantages- Stationary unless mounted on a mobile platform

- Cost to build is proportional to lifting capability

Navigation methods used by mobile robots

Mobile robots dont have the ability to move in a certain environment without a proper navigation system. It's easy to make the robot move, but it is not easy to make it move according to the situation. Mobile robot should be able to follow the behavior of human drivers because of the way it was programmed. The navigation system is composed of three parts: behavioral constraints - avoiding local, global goal -seeking behavior, and coordination behavior. Behavior problems focusing on avoiding obstacles in the sensing range of sensors attached to the robot . Global goal it makes the robot just focus on achieving the goal position. The robot will ignore the obstacles. Finally, Behavior coordination system is what makes this a unique navigation system. If we want the robot to focus on safe, he will focus on avoiding obstacles. If we want the robot to reach the goal quickly, it will ignore the obstacles that are not considered to be very dangerous. This means that the robot will choose a path that corresponds to the user's preference robot.Mobile Robot DescriptionBoe-Bot RobotThe Boe-Bot is a basic robot designed by Parallax and its a short name for Board of Education robot that combines variety topics of electrical, mechanics, electronics and problem solving. It consists of built-breadboard that can be used in conjunction with a computer program. The circuit of 16 pins that line in the breadboard in the left side can be programmed. The pins have two states 0 which mean false or 1 which mean true. In order to run the wheels there are two servos motor connected to the robot through the pin 12 for the right servo and pin 13 for the left.

Microcontroller (Basic Stamp 2)Microcontroller is considering the brain of the Boe-bot its because its connecting and controlling every part of the robots. Most of the programs are transferred to the microcontroller which will transfer it to the other parts to start moving the boe-bot to the desired path and operating as programmed.

Servos

The servos, or the wheels, are what allow the Boe-Bot to move. The CRS (Continuous Rotation Servos) on the Boe-Bot use an analog signal to encode the rotation rate. Each servo is controlled by three input wires: the red wire is usually connected to the power supply (Vdd), the black wire is usually connected to the ground (Vss) and the white wire is usually connected to the controlling signal (in this case pin 12 for the right servo and pin 13 for the left).

Ultrasonic sensorUltrasound is an acoustic wave that has very high frequency and its beyond human hearing. Its frequency range between 20Hz and 20Khz. Ultrasound has many characteristics that make it so useful in our life and led to use in several electronics applications. Ultrasound waves can be produced with high directivity and they have lower propagation speed than light or radio waves.

Board of Education

Its attached to the robots body and some other parts such as the servo motors, sensor, battery pack, and microcontroller. Thought the board of education the microcontroller can transfer the program and codes to the other robot parts.

QTI sensors Infrared Line FollowerThe QTI infrared line follower as shown in the figure above is made of eight infrared emitter and receiver pairs for high precision line following application (Parallax, 2013). The kit is uses the QTI infrared 8 eight infrared emitter to enhance the line following capability of the Boe-bot. The eight infrared included sensors to the underside of the boe-bot chassis and adjust the position to detect lines of different widths. The QTI sensors for close-proximity infrared detect black lines in order to follow the white line. When the surface of the path is white the IR light up to detect the white colour. This sensor communicates with the Boe-Bot thought a single bit 0 for low or 1 for highProgram Concept for maze solvingAs mentioned before, Mobile robots dont have the ability to move in a certain environment without a proper navigation system. By using program language called Basic Stamp Editor Mobile robot should be able to follow the behavior of human drivers because of the way it was programmed. We will use the Basic Stamp Editor to write programs that the BASIC STAMP module will run. Also we can use this software to display messages sent by the BASIC Stamp that help to understand what it sense. Getting started with BASIC Stamp microcontroller modules is similar to getting started with a brand-new PC or laptop. The first things that most people have to do is download the software then plug it in the boe-bot by using serial cable or USB port, test some software, and write the commands.

From the figure above it shows that the BOE-BOT could navigate through a maze whose dimensions were given but for doing that, programmer had to keep account of how long the BOE-BOT should keep performing a certain move in order to navigate through the maze. For example, if the maze was composed of a 1m straight line, a curve to the right and then a 2m straight line, you had to tell the BOE-BOT how long it should keep moving forward before turning, and then for how long it should keep moving forward after the turn. As a consequence, the program is highly dependent on the maze that we were working with, and for each maze that we had to navigate the entire code had to be changed.Program Description

'{$STAMP BS2}

'{$PBASIC 2.5}

'[ PIN connections I/O ]'

RightServo PIN 13 ' Right Servo Pin

LeftServo PIN 12 ' Left Servo Pin

Ping_fron PIN 1 ' PING))) Front Sensor Pin

Ping_lef PIN 0 ' PING))) Left Sensor Pin

'[ Variables declaration ]'

distance_front VAR Word ' Distance Of Object in Front

distance_left VAR Word ' Distance Of Object at Left

pulseCount VAR Byte ' Measuring Turns

'[ Program Code ]'

Main:

DO

GOSUB Ping_front

GOSUB Ping_left

IF (distance_front > 15 ) AND (distance_left < 20) THEN '

IF (distance_left > 10) THEN 'adjusted left

PULSOUT 13, 650

PULSOUT 12, 650

ELSEIF (distance_left < 10) THEN 'adjusted right

PULSOUT 13, 850

PULSOUT 12, 850

ENDIF

GOSUB Forward_Pulse

ELSEIF (distance_front < 20 ) AND (distance_left < 25) THEN

GOSUB Turn_Right 'turn left

ELSEIF (distance_front > 20 ) AND (distance_left > 20) THEN

GOSUB Turn_left 'turn left

ENDIF

PAUSE 20

LOOP

'[ Distance Calculating ]'

Ping_front: 'Check front distance

PULSOUT Ping_fron, 5 'Activate PING)))

PULSIN Ping_fron, 1, distance_front

distance_front = distance_front ** 2257 'Calculate Distance

RETURN

Ping_left: 'Check front distance

PULSOUT Ping_lef, 5 'Activate PING))) Pulse

PULSIN Ping_lef, 1, distance_left

distance_left = distance_left ** 2257 'Calculate Distance

RETURN

'[Boe-Bot Navigation]'

Forward_: 'Move Forward

FOR pulseCount = 0 TO 10 'Number Of Pulses To Turn

PULSOUT 13, 850 'Left Servo Right

PULSOUT 12, 650 'Right Servo Right

PAUSE 60 'Refresh Delay

NEXT

RETURN

Forward_25cm: 'Move Forward

FOR pulseCount = 0 TO 60 'Number Of Pulses To Turn

PULSOUT 13, 850 'Left Servo Right

PULSOUT 12, 650 'Right Servo Right

PAUSE 20 'Refresh Delay

NEXT

RETURN

Forward_Pulse: 'Move Forward for

FOR pulseCount = 0 TO 9 'Number Of Pulses To Turn

PULSOUT LeftServo, 850 'Left Servo Forward

PULSOUT RightServo, 650 'Right Servo Forward

PAUSE 20 'Refresh Delay

NEXT

RETURN

Turn_Left: 'Turn Left 90 Degrees

FOR pulseCount = 0 TO 20 'Number Of Pulses To Turn

PULSOUT LeftServo, 650 'Left Servo Left

PULSOUT RightServo, 650 'Right Servo Left

PAUSE 20 'Refresh Delay

NEXT

RETURN

Turn_Right: ''Turn Right 90 Degrees

FOR pulseCount = 0 TO 20 'Number Of Pulses To Turn

PULSOUT LeftServo, 850 'Left Servo Right

PULSOUT RightServo, 850 'Right Servo Right

PAUSE 20 'Refresh Delay

NEXT

RETURNFrom the following program statements that has been shown above under program description we can conclude that the Boe-Bot used left hand rule method navigation this lead us to

If the left ping sensor detect the wall and the front sensor didn't detect this will tell the Boe-Bot to move forward.

If the left sensor detects the wall also the front sensor this will tell the Boe-Bot to turn right by 90 degree. If the left sensor detect the wall and the front sensor does not this will tell the Boe-Bot to keep moving forward. The Boe-bot will keep moving forward when the left sensor detect the wall until the front sensor detect the wall so at this case the Boe-Bot will turn left by 90 degree.

DiscussionFrom the entire results displayed above the bot-bot mobile robot was already assembled in the lab. The only thing we did is only connected two ultrasonic one in front and the other one in the left side. There are 3 pins coming from the ultrasonic sensor and pins are all connected to the Boe-Bots the ground pin goes to Vss, the supply voltage pin (5V) goes to Vdd pin and finally to the Signal pin is connected to Pin 1 for the front ultrasonic and Pin 0 for left sensor. The boe-bot were given specific paths in order to program it to pass through. First was to connected the ultrasonic to the boe-bot and program it to follow the maze given from the start point till the end point. The Boe-bot was able to detect the wall and working so good but before the end point. We used the righ hand rules in order to make the boe-bot turn right if its facing the wall in front and left side so that the boe-bot only will turn right if the left sensor detect a wall as well as the front sensor. The boe-bot was not able to go through the end of the maze, its because before the end point the sensor must detect the front wall only in order to make it turn left side but if failed to do that so it keep detecting the left and front wall and keep turning right again. Thus, this make the boe-bot turn right again to the wrong direction. After trying to improve and modified the program we still could not make it turn to the left side if the left ultrasonic didnt detect any wall. For an ultrasonic sensor to work, the sound must bounce back from the target. This means that the sound must travel twice the distance from the sensor to the object. For an object 10 meters away, the sound must travel 10 meters to the object, and 10 meters back to the sensor, for a total of 20 meters. After that we connected the line follower sensor in order to make the boe-bot follow the path given and detect the white tape only. This program works by detecting either the white tape or green poster board. When detecting the white, both wheels propel the robot forward in a straight line. If the robot strays towards the green line, it sends a signal to make the opposite motor spin faster and slows the other one, twisting the robot back onto the track. ConclusionIn this chapter a brief overview of fundamentals in ultrasonic sensing is presented. Some advanced techniques and applications to non destructed evaluation are also introduced. The essentials of ultrasonic sensing are how to drive an ultrasonic wave into an object and how to capture the ultrasonic wave from the object. In addition, another essential is how to extract the information we want from the captured ultrasonic wave. To accomplish to drive an ultrasonic wave into an object and how to capture the ultrasonic wave from the object. In addition, another essential is how to extract the information we want from the captured ultrasonic wave. To accomplish anology, but, it should be noted that classical techniques and methods are still attractive and have the potential to create something new. References Chapter #1: Detect Distance with the Ping)))(TM) Ultrasonic Sensor. 2014. [online] Available at: http://users.ece.utexas.edu/~valvano/Datasheets/PingAN.pdf [Accessed: 2 Mar 2014].

hara, I. n.d. Ultrasonic Sensing: Fundamentals and Its Applications to Nondestructive Evaluation. [online] Available at: http://mcweb.nagaokaut.ac.jp/~ihara/column/ultrasonic%20sensors%20draft.pdf [Accessed: 2 Mar 2014].

Intechopen.com. 2014.Mobile Robots: towards New Applications | InTechOpen. [online] Available at: http://www.intechopen.com/books/mobile_robots_towards_new_applications [Accessed: 28 Feb 2014].

:Latech. 2014.UltrasonicDistance Sensor. [online] Available at: http://www2.latech.edu/~dehall/LWTL/ENGR122old/notes/1_PING.pdf [Accessed: 3 Mar 2014].

Parallax.com. 2014.Boe-Bot Robot | Parallax Inc. [online] Available at: http://www.parallax.com/product/boe-bot-robot [Accessed: 5 Mar 2014].

Ribeiro, M. I. 2002.MOBILE ROBOTICS. [e-book] Pedro Lima: Instituto Superior Tcnico/Instituto de Sistemas e Robtica. pp. 2-30. http://users.isr.ist.utl.pt/~mir/cadeiras/robmovel/Introduction.pdf [Accessed: 5 Mar 2014].

Robotshop.com. 2014.Basics: What Types of Mobile Robots are There? - RobotShop Blog. [online] Available at: http://www.robotshop.com/blog/en/what-types-of-mobile-robots-are-there-3652 [Accessed: 3 Mar 2014].

University of Pennsylvania ESE 112: Introduction to Electrical & Systems Engineering. 2014. [online] Available at: http://www.seas.upenn.edu/~ese112/fall09/labs/MazeNavigation.pdf [Accessed: 3 Mar 2014].Figure SEQ Figure \* ARABIC 1 Maze

Figure SEQ Figure \* ARABIC 2 Boe-BOt Mobile Robot

Figure SEQ Figure \* ARABIC 3 Wheels Mobile Robot

Figure SEQ Figure \* ARABIC 4 Tracks Mobile Robot

Figure SEQ Figure \* ARABIC 5 Legs Mobile Robot

Figure SEQ Figure \* ARABIC 6 Arms and Grippers Mobile Robot

Figure SEQ Figure \* ARABIC 7 Boe-Bot Robot

Figure SEQ Figure \* ARABIC 8 Microcontroller

Figure SEQ Figure \* ARABIC 9 Servos

Figure SEQ Figure \* ARABIC 10 Ultrasonic sensor

Figure SEQ Figure \* ARABIC 11 Board of Education

Figure SEQ Figure \* ARABIC 12 QTI sensors Infrared Line Follower

Figure SEQ Figure \* ARABIC 13 MAZE