project report of computer guided optimal path finder

80
A PROJECT REPORT ON A Major Project Submitted to Maharaja Agrasen Institute Of Technology, Delhi In partial fulfillment of the requirements for the award of degree of Bachelor of Technology in ELECTRICAL AND ELECTRONICS ENGINEERING Under the guidance of Lect. Ashok Goel Department of Electrical & Electronics Engineering SUBMITTED BY GAURAV KUMAR 0691484906 ARCHIT MALHOTRA 0811484906 RISHIKUL SAXENA 0891484906 SAHIL AGGARWAL 0901484906 Maharaja Agrasen Institute Of Technology

Upload: gaurav-kumar

Post on 28-Apr-2015

52 views

Category:

Documents


0 download

DESCRIPTION

Our aim is to find the shortest possible navigation path using computer vision algorithms and guide a mobile robot amongst different obstacles by transmitting control signals with the use of wireless radio transmission.

TRANSCRIPT

Page 1: Project Report of Computer Guided Optimal Path Finder

A

PROJECT REPORT

ON

A Major Project Submitted to

Maharaja Agrasen Institute Of Technology, Delhi

In partial fulfillment of the requirements for the award of degree of

Bachelor of Technology in

ELECTRICAL AND ELECTRONICS ENGINEERING

Under the guidance of

Lect. Ashok Goel

Department of Electrical & Electronics

Engineering

SUBMITTED BY GAURAV KUMAR 0691484906 ARCHIT MALHOTRA 0811484906 RISHIKUL SAXENA 0891484906 SAHIL AGGARWAL 0901484906

Maharaja Agrasen Institute Of Technology

Page 2: Project Report of Computer Guided Optimal Path Finder

CERTIFICATE

This is to certify that a major project entitled Computer Aided Optimal Path Finder, which is submitted by the below mentioned students in partial fulfillment of the requirement for the award of degree B.Tech. in Electrical and Electronics Engineering to MAIT, GGSIP University, is a record of the candidates’ own work carried out by them under my supervision and guidelines. The matter embodied in this project is original and due acknowledgement has been made in the text to all other material used.

Students: GAURAV KUMAR 0691484906 ARCHIT MALHOTRA 0811484906 RISHIKUL SAXENA 0891484906 SAHIL AGGARWAL 0901484906 Date:

Lect. Ashok Goel EEE Department

(Project Guide)

Page 3: Project Report of Computer Guided Optimal Path Finder

ACKNOWLEDGEMENT

Lect. Ashok Goel initiated the founding ideas behind this project and provided insight and valuable information into many of the problems that were encountered. His positive attitude throughout the duration of this thesis always put things into perspective whenever difficulties arose. This thesis would not have been possible without him.

Many other people have contributed directly or indirectly to this project. Some acting as sounding boards, sources of information, or providing resources that contributed to the development of my electronics. While their individual contributions have been small, their efforts have still been greatly appreciated.

We are also highly grateful to Roborealm for developing state-of-the art computer vision software that led us to perform image processing, Logix4u for LPT interfacing DLL, RoboKits for wireless ICs. We are also thankful to Microsoft for developing Office productivity suite.

And special thanks to our parents.

Page 4: Project Report of Computer Guided Optimal Path Finder

CONTENTS

1. ABSTRACT .............................................................................................................................................. 1

2. PROBLEM DEFINITION ............................................................................................................................ 3

3. LITERATURE REVIEW .............................................................................................................................. 5

a) C-SPACE TRANSFORM ............................................................................................................................. 6

b) APPROACHES .......................................................................................................................................... 7

c) VISIBILITY GRAPHS .................................................................................................................................. 8

d) COMPUTER VISION ............................................................................................................................... 10

e) ARTIFICIAL INTELLIGENCE ...................................................................................................................... 13

4. COMPUTER VISION PROGRAMMING CODE ......................................................................................... 16

5. HARDWARE DESCRIPTION .................................................................................................................... 39

a) LINE PRINT TERMINAL (LPT) .................................................................................................................. 39

b) RADIO FREQUENCY MODULATOR ......................................................................................................... 42 i. ENCODER ................................................................................................................................................ 43

ii. TRANSMITTER ......................................................................................................................................... 43

c) RADIO FREQUENCY DEMODULATOR ..................................................................................................... 47 i. RECEIVER ................................................................................................................................................ 47

ii. DECODER ................................................................................................................................................ 49

d) ANTENNA ............................................................................................................................................. 51

e) DC MOTOR ............................................................................................................................................ 52

f) H-BRIDGE .............................................................................................................................................. 55

g) POWER SOURCE .................................................................................................................................... 57 i. LEAD-ACID BATTERY ................................................................................................................................ 57

ii. SWITCHED MODE POWER SUPPLY (SMPS) ............................................................................................... 58

h) WEBCAM .............................................................................................................................................. 60

6. CIRCUIT DIAGRAM ................................................................................................................................ 61

7. TECHNICAL SPECIFICATIONS ................................................................................................................. 62

8. IMAGES ................................................................................................................................................ 63

9. SOFTWARE DESCRIPTION ..................................................................................................................... 66

a) ROBOREALM ......................................................................................................................................... 66

b) LPT INTERFACING DLL ........................................................................................................................... 67

c) VBSCRIPT .............................................................................................................................................. 67

10. APPLICATIONS ...................................................................................................................................... 69

Page 5: Project Report of Computer Guided Optimal Path Finder

11. POSSIBLE EXTENSIONS .......................................................................................................................... 72

12. RESULTS & CONCLUSION ...................................................................................................................... 74

13. REFERENCES ......................................................................................................................................... 75

Page 6: Project Report of Computer Guided Optimal Path Finder

1

Fig. 1

ABSTRACT

This project consists of three parts:

1. Computer Vision Algorithm

A webcam is connected to the computer that is placed above the arena where it captures the video of the moving robot. After the processing of the live video the computer sends the appropriate signals via the parallel port of the computer.

Page 7: Project Report of Computer Guided Optimal Path Finder

2

2. Wireless Radio Transmission

The parallel port is connected to an encoder for Amplitude Shift Keying (ASK). Encoder output is fed into a transmitter IC where the signals are sent through an antenna. At the receiving end the antenna receives the signals and gives it to the receiver IC. Then the decoder decodes the signals which drive the motors.

3. Motor driving circuit

The signals decoded are used to drive two dc geared motors via a motor driving circuit called an H-Bridge.

The foremost requirement of our project is the differentiation between robot, target and obstacles. The criterion of making the project autonomous is based on wireless transmission of data from transmitter to the receiver on the robot.

The mentioned transmitter and receiver were used because of their optimal operating frequency range of 315/434 MHz effective low cost, small size, and simple-to-use for designing. For this project, proper operation of DC motor cannot be done without the use of the H-Bridge.

Page 8: Project Report of Computer Guided Optimal Path Finder

3

PROBLEM DEFINITION

Our project is to plan a path through the workspaces constrained by borders and obstacles and find the best path from the set of all possible paths to the goal.

Fig. 2

• q_start: the start configuration

• q_goal: the goal configuration (may have more than one!)

• C-space Transform: a transformation to a robot and obstacles that turns a robot into a single point.

Given a point q_start, the starting location, and another point q_goal, the target or the goal, we generate the best continuous path of all the possible legal configurations between these two points, if such a path exists.

Page 9: Project Report of Computer Guided Optimal Path Finder

4

A webcam is connected to the computer that is placed above the arena where it captures the video of the moving robot.

After the processing of the live video the computer sends the appropriate signals via the parallel port of the computer.

The programming techniques used in the processing of the video captured starts with image processing so that it can “see” where the obstacles are. The task is then to obtain a shortest path from all the possible ones.

Fig. 3

As the computer here processes the live video feed, it works easily with moving obstacles.

Page 10: Project Report of Computer Guided Optimal Path Finder

5

LITERATURE REVIEW

CONFIGURATION SPACE

A robot has:

A footprint: The amount of space a robot occupies

Degrees of freedom (DOF): The number of variables needed to fully describe a robot’s position in space

Fig. 4

Page 11: Project Report of Computer Guided Optimal Path Finder

6

C-SPACE TRANSFORM

By using this technique we change the size of the obstacle. The robot is assumed to a point traversing in the arena and the size of the obstacles is increased by the value, the size of the robot is decreased.

This is done to make the calculations easier as it is easier to find paths for points than for polygons, the polygon here being the robot.

Fig. 5

1. Initial problem: find a path for a 2D polygon robot past 2D polygon obstacle.

Why Use C-Space Transform?

2. Transformed problem: find a path for a point robot past a 2D polygon obstacle.

3. It is easier to find paths for points than for polygons.

Page 12: Project Report of Computer Guided Optimal Path Finder

7

C-SPACE TRANSFORM STEPS

For a mobile robot that only translates

o Choose a reference point on the robot.

o Grow obstacle by translating the robot around the edge of the

obstacle and tracing line made by the reference point of the robot.

o Represent the robot only by the reference point.

o Legal configurations now consist of all non-obstacle points.

Robots that can rotate are usually represented by a circle.

Once the obstacles have been grown, you can plan a path!

APPROACHES

Visibility graphs

Voronoi diagrams

Cell decomposition methods

Potential methods

Page 13: Project Report of Computer Guided Optimal Path Finder

8

VISIBILITY GRAPHS

A visibility graph is built linking all non-blocked vertices of the obstacles (first they are roughly assumed to be polygonal), start and goal and shortest path to goal is found.

As the path shaves corners of C-space obstacles it’s not a very robust path to follow and requires some path smoothing for fast following.

It requires some path smoothing for fast following.

Fig. 6

Page 14: Project Report of Computer Guided Optimal Path Finder

9

• Suppose that you have a c-space with polygonal obstacles

VISIBILITY GRAPH

• If there were no blocks, shortest path is a straight line

• Else, it must be a sequence of straight lines shaving corners obstacle

Fig. 7

• Find all non-blocked lines between polygon vertices, start and goal

VISIBILITY GRAPH ALGORITHM

• Search the graph of these lines for the shortest path (O(n3) for a graph with n vertices, O(n2 log n) for a smarter version)

Fig. 8

Page 15: Project Report of Computer Guided Optimal Path Finder

10

COMPUTER VISION

Computer vision is the science and technology of machines that see. As a scientific discipline, computer vision is concerned with the theory for building artificial systems that obtain information from images. The image data can take many forms, such as a video sequence, views from multiple cameras, or multi-dimensional data from a medical scanner. As a technological discipline, computer vision seeks to apply its theories and models to the construction of computer vision systems. Examples of applications of computer vision include systems for:

Controlling processes (e.g., an industrial robot or an autonomous vehicle). Detecting events (e.g., for visual surveillance or people counting). Organizing information (e.g., for indexing databases of images and image

sequences). Interaction (e.g., as the input to a device for computer-human interaction)

In most practical computer vision applications, the computers are pre-programmed to solve a particular task, but methods based on learning are now becoming increasingly common.

Fig. 9 - To computer, the car’s side mirror is just a bunch of numbers

Page 16: Project Report of Computer Guided Optimal Path Finder

11

The following characterizations appear relevant but should not be taken as universally accepted:

Image processing and image analysis tend to focus on 2D images, how to transform one image to another.

Computer vision tends to focus on the 3D scene projected onto one or several images.

Machine vision tends to focus on applications, mainly in manufacturing, . There is also a field called imaging which primarily focus on the process of

producing images, but sometimes also deals with processing and analysis of images. For example, medical imaging contains lots of work on the analysis of image data in medical applications.

Finally, pattern recognition is a field which uses various methods to extract information from signals in general, mainly based on statistical approaches. A significant part of this field is devoted to applying these methods to image data.

The classical problem in computer vision, image processing and machine vision is that of determining whether or not the image data contains some specific object, feature, or activity. This task can normally be solved robustly and without effort by a human, but is still not satisfactorily solved in computer vision for the general case: arbitrary objects in arbitrary situations. Different varieties of the recognition problem are described in the literature:

Recognition

Object recognition: one or several pre-specified or learned objects or object classes can be recognized, usually together with their 2D positions in the image or 3D poses in the scene.

Identification: An individual instance of an object is recognized. Examples: identification of a specific person's face or fingerprint, or identification of a specific vehicle.

Detection: the image data is scanned for a specific condition. Examples: detection of possible abnormal cells or tissues in medical images or detection of a vehicle in an automatic road toll system. Detection based on relatively simple and fast computations is sometimes used for finding smaller regions of interesting image data which can be further analyzed by

Page 17: Project Report of Computer Guided Optimal Path Finder

12

more computationally demanding techniques to produce a correct interpretation.

Fig. 10 - Stereo-vision

It is aimed at providing the basic tools needed to solve computer vision problems. In some cases, high-level functionalities in the library will be sufficient to solve the more complex problems in computer vision. Even when this is not the case, the basic components in the library are complete enough to enable creation of a complete solution to almost any computer vision problem. In the latter case, there are several tried-and-true methods of using the library; all of them start with solving the problem using as many available library components as possible.

‘Free Image Library’

Page 18: Project Report of Computer Guided Optimal Path Finder

13

ARTIFICIAL INTELLIGENCE

What is artificial intelligence?

It is the science and engineering of making intelligent machines, especially intelligent computer programs. It is related to the similar task of using computers to understand human intelligence, but AI does not have to confine itself to methods that are biologically observable. AI research has discovered how to make computers carry out some of the mechanisms and not others. If doing a task requires only mechanisms that are well understood today, computer programs can give very impressive performances on these tasks. Such programs should be considered ``somewhat intelligent''.

Concepts in AI

LOGICAL AI What a program knows about the world in general the facts of the specific situation in which it must act, and its goals are all represented by sentences of some mathematical logical language. The program decides what to do by inferring that certain actions are appropriate for achieving its goals.

SEARCH AI programs often examine large numbers of possibilities, e.g. moves in a chess game or inferences by a theorem proving program. Discoveries are continually made about how to do this more efficiently in various domains.

PATTERN RECOGNITION When a program makes observations of some kind, it is often programmed to compare what it sees with a pattern. For example, a vision program may try to match a pattern of eyes and a nose in a scene in order to find a face. More complex patterns, e.g. in a natural language text, in a chess position, or in the history of some event are also studied. These more complex patterns require

Page 19: Project Report of Computer Guided Optimal Path Finder

14

quite different methods than do the simple patterns that have been studied the most.

INFERENCE From some facts, others can be inferred. Mathematical logical deduction is adequate for some purposes, but new methods of non-monotonic inference have been added to logic since the 1970s. The simplest kind of non-monotonic reasoning is default reasoning in which a conclusion is to be inferred by default, but the conclusion can be withdrawn if there is evidence to the contrary. For example, when we hear of a bird, we can infer that it can fly, but this conclusion can be reversed when we hear that it is a penguin. It is the possibility that a conclusion may have to be withdrawn that constitutes the non-monotonic character of the reasoning. Ordinary logical reasoning is monotonic in that the set of conclusions that can the drawn from a set of premises is a monotonic increasing function of the premises. Circumscription is another form of non-monotonic reasoning.

COMMON SENSE KNOWLEDGE AND REASONING This is the area in which AI is farthest from human-level, in spite of the fact that it has been an active research area since the 1950s. While there has been considerable progress, e.g. in developing systems of non-monotonic reasoning and theories of action, yet more new ideas are needed. The Cyc system contains a large but spotty collection of common sense facts.

LEARNING FROM EXPERIENCE Programs do that. The approaches to AI based on connectionism and neural nets specialize in that. There is also learning of laws expressed in logic. Programs can only learn what facts or behaviors their formalisms can represent, and unfortunately learning systems are almost all based on very limited abilities to represent information.

Page 20: Project Report of Computer Guided Optimal Path Finder

15

PLANNING Planning programs start with general facts about the world (especially facts about the effects of actions), facts about the particular situation and a statement of a goal. From these, they generate a strategy for achieving the goal. In the most common cases, the strategy is just a sequence of actions.

Applications of AI

COMPUTER VISION The world is composed of three-dimensional objects, but the inputs to the human eye and computers' TV cameras are two dimensional. Some useful programs can work solely in two dimensions, but full computer vision requires partial three-dimensional information that is not just a set of two-dimensional views. At present there are only limited ways of representing three-dimensional information directly, and they are not as good as what humans evidently use.

SPEECH RECOGNITION Speech recognition is the process of converting an acoustic signal, captured by a microphone or a telephone, to a set of words. The recognized words can be the final results, as for applications such as commands & control, data entry, and document preparation. They can also serve as the input to further linguistic processing in order to achieve speech understanding. One popular measure of the difficulty of the task, combining the vocabulary size and the language model, is perplexity, loosely defined as the geometric mean of the number of words that can follow a word after the language model has been applied. The simplest language model can be specified as a finite-state network, where the permissible words following each word are given explicitly.

Page 21: Project Report of Computer Guided Optimal Path Finder

16

COMPUTER VISION PROGRAMMING CODE

<head><version>2.18.10</version></head>

<Crop>

<auto_crop>FALSE</auto_crop>

<x_start>110</x_start>

<x_end>547</x_end>

<max_auto_crop>20</max_auto_crop>

<y_start>0</y_start>

<y_end>480</y_end>

<tolerance>1</tolerance>

</Crop>

<Marker>

<include_graphics>FALSE</include_graphics>

<name>ORIGINAL</name>

<revert_to>Current</revert_to>

</Marker>

<Floor_Finder>

<result_type>1</result_type>

<histogram_spread>10</histogram_spread>

<sample_width>70</sample_width>

<fill_highlights>TRUE</fill_highlights>

<sample_height>20</sample_height>

Page 22: Project Report of Computer Guided Optimal Path Finder

17

<threshold>1</threshold>

<sample_shape>1</sample_shape>

</Floor_Finder>

<Negative/>

<Blob_Filter>

<filters>

<tab>

<filter>

<create_array>1</create_array>

<weight_threshold>0.00000</weight_threshold>

<count_threshold>5</count_threshold>

<filter_id>21</filter_id>

<invert_threshold>0</invert_threshold>

</filter>

</tab>

</filters>

<sort_array_on_y>FALSE</sort_array_on_y>

<largest_is_background>FALSE</largest_is_background>

<sort_array_on_x>FALSE</sort_array_on_x>

<show_weights>FALSE</show_weights>

<create_blob_array_variable>FALSE</create_blob_array_variable>

</Blob_Filter>

<Marker>

<include_graphics>FALSE</include_graphics>

<name>FILTERED</name>

Page 23: Project Report of Computer Guided Optimal Path Finder

18

<revert_to>Current</revert_to>

</Marker>

<Blob_Filter>

<filters>

<tab>

<filter>

<create_array>0</create_array>

<weight_threshold>0.00000</weight_threshold>

<count_threshold>1</count_threshold>

<filter_id>86</filter_id>

<invert_threshold>0</invert_threshold>

</filter>

</tab>

</filters>

<sort_array_on_y>FALSE</sort_array_on_y>

<largest_is_background>FALSE</largest_is_background>

<sort_array_on_x>FALSE</sort_array_on_x>

<show_weights>FALSE</show_weights>

<create_blob_array_variable>TRUE</create_blob_array_variable>

</Blob_Filter>

<Display_Point>

<display_as_annotation>FALSE</display_as_annotation>

<color_index>4</color_index>

<y_coord>100</y_coord>

<size_index>4</size_index>

Page 24: Project Report of Computer Guided Optimal Path Finder

19

<clear_image>FALSE</clear_image>

<data_source>1</data_source>

<shape_index>2</shape_index>

<x_coord>100</x_coord>

<xy_variable>BLOBS</xy_variable>

</Display_Point>

<Blob_Filter>

<filters>

<tab>

<filter>

<create_array>0</create_array>

<weight_threshold>0.00000</weight_threshold>

<count_threshold>1</count_threshold>

<filter_id>34</filter_id>

<invert_threshold>0</invert_threshold>

</filter>

</tab>

</filters>

<sort_array_on_y>FALSE</sort_array_on_y>

<largest_is_background>FALSE</largest_is_background>

<sort_array_on_x>FALSE</sort_array_on_x>

<show_weights>FALSE</show_weights>

<create_blob_array_variable>TRUE</create_blob_array_variable>

</Blob_Filter>

<Set_Variable>

Page 25: Project Report of Computer Guided Optimal Path Finder

20

<set_1_once>FALSE</set_1_once>

<set_3_once>FALSE</set_3_once>

<value_1>[BLOBS:0]</value_1>

<variable_2>targ_y</variable_2>

<set_4_once>FALSE</set_4_once>

<set_2_once>FALSE</set_2_once>

<value_2>[BLOBS:1]</value_2>

<variable_1>targ_x</variable_1>

</Set_Variable>

<Display_Variables>

<display_as_annotation>FALSE</display_as_annotation>

<font_size_index>3</font_size_index>

<display_value_only>TRUE</display_value_only>

<dim_background>TRUE</dim_background>

<border_color_index>5</border_color_index>

<southwest>targ_x

targ_y

</southwest>

</Display_Variables>

<Marker>

<include_graphics>FALSE</include_graphics>

<name>TARGET</name>

<revert_to>Current</revert_to>

</Marker>

<Marker>

Page 26: Project Report of Computer Guided Optimal Path Finder

21

<include_graphics>FALSE</include_graphics>

<name>RESTORE FILTERED</name>

<revert_to>FILTERED</revert_to>

</Marker>

<Blob_Filter>

<filters>

<tab>

<filter>

<create_array>0</create_array>

<weight_threshold>0</weight_threshold>

<count_threshold>1</count_threshold>

<filter_id>73</filter_id>

<invert_threshold>0</invert_threshold>

</filter>

</tab>

</filters>

<sort_array_on_y>FALSE</sort_array_on_y>

<largest_is_background>FALSE</largest_is_background>

<sort_array_on_x>FALSE</sort_array_on_x>

<show_weights>FALSE</show_weights>

<create_blob_array_variable>TRUE</create_blob_array_variable>

</Blob_Filter>

<Geometric_Statistics>

<basic_statistics>FALSE</basic_statistics>

</Geometric_Statistics>

Page 27: Project Report of Computer Guided Optimal Path Finder

22

<Set_Variable>

<set_1_once>FALSE</set_1_once>

<set_3_once>FALSE</set_3_once>

<value_1>[ANGLE]</value_1>

<set_4_once>FALSE</set_4_once>

<set_2_once>FALSE</set_2_once>

<variable_1>robo_angle</variable_1>

</Set_Variable>

<Display_Point>

<display_as_annotation>FALSE</display_as_annotation>

<color_index>3</color_index>

<y_coord>100</y_coord>

<size_index>6</size_index>

<clear_image>FALSE</clear_image>

<data_source>1</data_source>

<shape_index>12</shape_index>

<x_coord>100</x_coord>

<xy_variable>BLOBS</xy_variable>

</Display_Point>

<Blob_Filter>

<filters>

<tab>

<filter>

<create_array>0</create_array>

<count_threshold>1</count_threshold>

Page 28: Project Report of Computer Guided Optimal Path Finder

23

<weight_threshold>0.00000</weight_threshold>

<rgb_color>#00FF00</rgb_color>

<filter_id>27</filter_id>

<invert_threshold>0</invert_threshold>

</filter>

</tab>

</filters>

<sort_array_on_y>FALSE</sort_array_on_y>

<largest_is_background>FALSE</largest_is_background>

<sort_array_on_x>FALSE</sort_array_on_x>

<show_weights>FALSE</show_weights>

<create_blob_array_variable>TRUE</create_blob_array_variable>

</Blob_Filter>

<Set_Variable>

<set_1_once>FALSE</set_1_once>

<set_3_once>FALSE</set_3_once>

<value_1>[BLOBS:0]</value_1>

<variable_2>robo_y</variable_2>

<set_4_once>FALSE</set_4_once>

<set_2_once>FALSE</set_2_once>

<value_2>[BLOBS:1]</value_2>

<variable_1>robo_x</variable_1>

</Set_Variable>

<Display_Variables>

<display_as_annotation>FALSE</display_as_annotation>

Page 29: Project Report of Computer Guided Optimal Path Finder

24

<font_size_index>3</font_size_index>

<display_value_only>TRUE</display_value_only>

<dim_background>TRUE</dim_background>

<border_color_index>5</border_color_index>

<southeast>robo_angle

robo_x

robo_y

</southeast>

</Display_Variables>

<Marker>

<include_graphics>FALSE</include_graphics>

<name>ROBOT</name>

<revert_to>Current</revert_to>

</Marker>

<Marker>

<include_graphics>FALSE</include_graphics>

<name>RESTORE FILTERED</name>

<revert_to>FILTERED</revert_to>

</Marker>

<Blob_Filter>

<filters>

<tab>

<filter>

<create_array>0</create_array>

<weight_threshold>0</weight_threshold>

Page 30: Project Report of Computer Guided Optimal Path Finder

25

<count_threshold>3</count_threshold>

<filter_id>21</filter_id>

<invert_threshold>0</invert_threshold>

</filter>

</tab>

</filters>

<sort_array_on_y>FALSE</sort_array_on_y>

<largest_is_background>FALSE</largest_is_background>

<sort_array_on_x>FALSE</sort_array_on_x>

<show_weights>FALSE</show_weights>

<create_blob_array_variable>TRUE</create_blob_array_variable>

</Blob_Filter>

<Set_Variable>

<set_1_once>FALSE</set_1_once>

<set_3_once>FALSE</set_3_once>

<value_1>[BLOBS]</value_1>

<set_4_once>FALSE</set_4_once>

<set_2_once>FALSE</set_2_once>

<variable_1>[obs]</variable_1>

</Set_Variable>

<Dilate>

<count>30</count>

<avoid_connection>FALSE</avoid_connection>

<dilate_borders>TRUE</dilate_borders>

<kernal_shape>4</kernal_shape>

Page 31: Project Report of Computer Guided Optimal Path Finder

26

</Dilate>

<Marker>

<include_graphics>FALSE</include_graphics>

<name>OBSTACLES</name>

<revert_to>Current</revert_to>

</Marker>

<Set_Variable>

<set_1_once>FALSE</set_1_once>

<set_3_once>FALSE</set_3_once>

<value_1>[BLOBS]</value_1>

<set_4_once>FALSE</set_4_once>

<set_2_once>FALSE</set_2_once>

<variable_1>[obs]</variable_1>

</Set_Variable>

<Math>

<image2>OBSTACLES</image2>

<function>1</function>

<divisor>1</divisor>

<image1>TARGET</image1>

<all_channels>TRUE</all_channels>

<bias>0</bias>

</Math>

<Marker>

<include_graphics>FALSE</include_graphics>

<name>TARGET + OBSTACLES</name>

Page 32: Project Report of Computer Guided Optimal Path Finder

27

<revert_to>Current</revert_to>

</Marker>

<Math>

<image2>ROBOT</image2>

<function>1</function>

<divisor>1</divisor>

<image1>TARGET + OBSTACLES</image1>

<all_channels>TRUE</all_channels>

<bias>0</bias>

</Math>

<Negative/>

<Path_Planning>

<waypoint_color>4</waypoint_color>

<robot_color>2</robot_color>

<plot_shortest_waypoint_path>1</plot_shortest_waypoint_path>

<reset_waypoints_on_destination>FALSE</reset_waypoints_on_destination>

<destination_y>targ_y</destination_y>

<overlay_image>Current</overlay_image>

<waypoint_removal_distance>15</waypoint_removal_distance>

<destination_x>targ_x</destination_x>

<route_color>3</route_color>

<robot_x>robo_x</robot_x>

<plot_along_non_zero_pixels>1</plot_along_non_zero_pixels>

<visited_waypoint_color>3</visited_waypoint_color>

<robot_y>robo_y</robot_y>

Page 33: Project Report of Computer Guided Optimal Path Finder

28

</Path_Planning>

<Display_Variables>

<display_as_annotation>FALSE</display_as_annotation>

<font_size_index>2</font_size_index>

<display_value_only>TRUE</display_value_only>

<south>actual

PLAN_ORIENTATION

PLAN_POSSIBLE

</south>

<dim_background>TRUE</dim_background>

</Display_Variables>

<Button_Interface>

<4_is_toggle>FALSE</4_is_toggle>

<8_y_position>18</8_y_position>

<14_y_position>10</14_y_position>

<1_color>#00FF00</1_color>

<16_is_bold>TRUE</16_is_bold>

<2_clear_on_release>TRUE</2_clear_on_release>

<2_name>Pause</2_name>

<dialog_height>217</dialog_height>

<3_is_bold>TRUE</3_is_bold>

<dialog_width>355</dialog_width>

<15_is_toggle>FALSE</15_is_toggle>

<8_is_toggle>FALSE</8_is_toggle>

<15_is_bold>TRUE</15_is_bold>

Page 34: Project Report of Computer Guided Optimal Path Finder

29

<1_variable_value>1</1_variable_value>

<1_height>46</1_height>

<2_variable_name>INTERFACE_PAUSE</2_variable_name>

<13_x_position>10</13_x_position>

<16_text_color>#000000</16_text_color>

<14_color>#F0F0F0</14_color>

<2_is_toggle>FALSE</2_is_toggle>

<15_color>#F0F0F0</15_color>

<5_height>23</5_height>

<1_y_position>47</1_y_position>

<8_text_color>#000000</8_text_color>

<12_is_toggle>FALSE</12_is_toggle>

<15_clear_on_release>TRUE</15_clear_on_release>

<2_variable_value>1</2_variable_value>

<6_color>#F0F0F0</6_color>

<13_width>75</13_width>

<3_y_position>47</3_y_position>

<10_is_toggle>FALSE</10_is_toggle>

<16_clear_on_release>TRUE</16_clear_on_release>

<2_height>46</2_height>

<14_x_position>10</14_x_position>

<show_on_load>FALSE</show_on_load>

<14_height>23</14_height>

<7_is_bold>TRUE</7_is_bold>

<12_y_position>10</12_y_position>

Page 35: Project Report of Computer Guided Optimal Path Finder

30

<8_x_position>165</8_x_position>

<6_is_toggle>FALSE</6_is_toggle>

<5_width>75</5_width>

<10_is_bold>TRUE</10_is_bold>

<12_x_position>10</12_x_position>

<7_x_position>83</7_x_position>

<4_text_color>#000000</4_text_color>

<9_clear_on_release>TRUE</9_clear_on_release>

<10_clear_on_release>TRUE</10_clear_on_release>

<8_width>75</8_width>

<3_width>90</3_width>

<11_height>23</11_height>

<9_color>#F0F0F0</9_color>

<10_text_color>#000000</10_text_color>

<6_is_bold>TRUE</6_is_bold>

<7_width>75</7_width>

<11_clear_on_release>TRUE</11_clear_on_release>

<14_is_toggle>FALSE</14_is_toggle>

<5_text_color>#000000</5_text_color>

<11_width>75</11_width>

<dialog_y>800</dialog_y>

<3_name>Stop</3_name>

<dialog_x>468</dialog_x>

<14_text_color>#000000</14_text_color>

<12_width>75</12_width>

Page 36: Project Report of Computer Guided Optimal Path Finder

31

<8_color>#F0F0F0</8_color>

<9_is_bold>TRUE</9_is_bold>

<15_width>75</15_width>

<3_variable_name>INTERFACE_STOP</3_variable_name>

<6_height>23</6_height>

<2_width>90</2_width>

<3_clear_on_release>TRUE</3_clear_on_release>

<3_text_color>#FFFFFF</3_text_color>

<7_color>#F0F0F0</7_color>

<8_clear_on_release>TRUE</8_clear_on_release>

<6_width>75</6_width>

<16_width>75</16_width>

<13_is_bold>TRUE</13_is_bold>

<5_is_toggle>FALSE</5_is_toggle>

<12_is_bold>TRUE</12_is_bold>

<11_y_position>10</11_y_position>

<7_y_position>18</7_y_position>

<3_variable_value>1</3_variable_value>

<12_color>#F0F0F0</12_color>

<6_clear_on_release>TRUE</6_clear_on_release>

<1_name>Start</1_name>

<13_color>#F0F0F0</13_color>

<15_text_color>#000000</15_text_color>

<9_is_toggle>FALSE</9_is_toggle>

<11_x_position>10</11_x_position>

Page 37: Project Report of Computer Guided Optimal Path Finder

32

<3_is_toggle>FALSE</3_is_toggle>

<15_height>23</15_height>

<14_clear_on_release>TRUE</14_clear_on_release>

<11_is_bold>TRUE</11_is_bold>

<13_text_color>#000000</13_text_color>

<5_color>#F0F0F0</5_color>

<10_color>#F0F0F0</10_color>

<1_text_color>#000000</1_text_color>

<10_x_position>10</10_x_position>

<1_is_bold>TRUE</1_is_bold>

<13_is_toggle>FALSE</13_is_toggle>

<3_height>46</3_height>

<11_text_color>#000000</11_text_color>

<11_color>#F0F0F0</11_color>

<2_text_color>#000000</2_text_color>

<8_is_bold>TRUE</8_is_bold>

<2_y_position>47</2_y_position>

<2_is_bold>TRUE</2_is_bold>

<4_color>#F0F0F0</4_color>

<1_width>90</1_width>

<7_text_color>#000000</7_text_color>

<13_clear_on_release>TRUE</13_clear_on_release>

<4_is_bold>TRUE</4_is_bold>

<12_text_color>#000000</12_text_color>

<7_height>23</7_height>

Page 38: Project Report of Computer Guided Optimal Path Finder

33

<2_x_position>126</2_x_position>

<2_color>#FFFF00</2_color>

<3_color>#FF0000</3_color>

<1_is_toggle>TRUE</1_is_toggle>

<9_height>23</9_height>

<9_width>75</9_width>

<8_height>23</8_height>

<12_height>23</12_height>

<14_is_bold>TRUE</14_is_bold>

<6_y_position>99</6_y_position>

<16_y_position>10</16_y_position>

<7_is_toggle>FALSE</7_is_toggle>

<16_color>#F0F0F0</16_color>

<16_height>23</16_height>

<13_height>23</13_height>

<4_height>23</4_height>

<12_clear_on_release>TRUE</12_clear_on_release>

<16_is_toggle>FALSE</16_is_toggle>

<3_x_position>224</3_x_position>

<16_x_position>10</16_x_position>

<11_is_toggle>FALSE</11_is_toggle>

<6_text_color>#000000</6_text_color>

<4_clear_on_release>TRUE</4_clear_on_release>

<13_y_position>10</13_y_position>

<6_x_position>216</6_x_position>

Page 39: Project Report of Computer Guided Optimal Path Finder

34

<9_x_position>10</9_x_position>

<1_x_position>29</1_x_position>

<15_x_position>10</15_x_position>

<4_x_position>53</4_x_position>

<15_y_position>10</15_y_position>

<10_y_position>10</10_y_position>

<10_width>75</10_width>

<5_clear_on_release>TRUE</5_clear_on_release>

<7_clear_on_release>TRUE</7_clear_on_release>

<9_y_position>10</9_y_position>

<1_clear_on_release>TRUE</1_clear_on_release>

<1_variable_name>INTERFACE_START</1_variable_name>

<4_width>75</4_width>

<5_y_position>99</5_y_position>

<9_text_color>#000000</9_text_color>

<5_x_position>134</5_x_position>

<10_height>23</10_height>

<5_is_bold>TRUE</5_is_bold>

<4_y_position>99</4_y_position>

<14_width>75</14_width>

</Button_Interface>

<VBScript_Program>

<tab_size_index>2</tab_size_index>

<script>SetVariable "y1", GetArrayVariable("[obs]")(1) SetVariable "y2", GetArrayVariable("[obs]")(3) SetVariable "y3", GetArrayVariable("[obs]")(5)

Page 40: Project Report of Computer Guided Optimal Path Finder

35

If GetVariable("robo_y")&lt;GetVariable("y1") then SetVariable "chkpt1",1 else SetVariable "chkpt1",0 If GetVariable("robo_y")&lt;GetVariable("y2") then SetVariable "chkpt2",1 else SetVariable "chkpt2",0 If GetVariable("robo_y")&lt;GetVariable("y3") then SetVariable "chkpt3",1 else SetVariable "chkpt3",0 add=0

desiredOrientation = GetVariable("plan_orientation") if desiredOrientation = "-1" then SetVariable "lpt", 0 SetVariable "actual", "stop"

add=add+8 else robotOrientation = GetVariable("robo_angle") robotOrientation = CInt((robotOrientation / 45) ) * 45 if (robotOrientation = 360) then robotOrientation = 0 desiredOrientation = CInt((desiredOrientation / 1) ) * 1 diff = abs(desiredOrientation - robotOrientation )

if GetVariable("PLAN_POSSIBLE") = 0 then If GetVariable("chkpt1")=1 then add=4 If GetVariable("chkpt2")=1 then add=add+16 If GetVariable("chkpt3")=1 then add=add+32 add=add+192 SetVariable "lpt", add

SetVariable "actual", "stuck" elseif desiredOrientation = robotOrientation then If GetVariable("chkpt1")="1" then add=4 If GetVariable("chkpt2")="1" then add=add+16 If GetVariable("chkpt3")="1" then add=add+32 add=add+66 SetVariable "lpt", add SetVariable "actual", "forward" elseif (diff = 180) then

If GetVariable("chkpt1")=1 then add=4 If GetVariable("chkpt2")=1 then add=add+16 If GetVariable("chkpt3")=1 then add=add+32

add=add+129 SetVariable "lpt", add SetVariable "actual", "reverse" elseif (desiredOrientation &gt; robotOrientation and diff &lt; 180) or _ (desiredOrientation &lt; robotOrientation and diff &gt; 180) then

Page 41: Project Report of Computer Guided Optimal Path Finder

36

If GetVariable("chkpt1")=1 then add=4 If GetVariable("chkpt2")=1 then add=add+16 If GetVariable("chkpt3")=1 then add=add+32

add=add+192

SetVariable "lpt", add SetVariable "actual", "left" else

If GetVariable("chkpt1")=1 then add=4 If GetVariable("chkpt2")=1 then add=add+16 If GetVariable("chkpt3")=1 then add=add+32

add=add+3 SetVariable "lpt", add SetVariable "actual", "right" end if

SetVariable "add", add end if</script>

<font_size_index>2</font_size_index>

<source_mode>gui</source_mode>

</VBScript_Program>

<If_Statement>

<comparison_type_1>3</comparison_type_1>

<comparison_1>1</comparison_1>

<join_1>-1</join_1>

<value_1>1</value_1>

<variable_1>INTERFACE_START</variable_1>

<comparison_4>-1</comparison_4>

<comparison_type_4>-1</comparison_type_4>

<join_2>-1</join_2>

<comparison_type_3>-1</comparison_type_3>

<comparison_3>-1</comparison_3>

Page 42: Project Report of Computer Guided Optimal Path Finder

37

<join_3>-1</join_3>

<comparison_type_2>-1</comparison_type_2>

<comparison_2>-1</comparison_2>

<has_else>FALSE</has_else>

</If_Statement>

<Execute_Program>

<enable_send_sequence>TRUE</enable_send_sequence>

<program_filename>C:\Users\GauravKumar\Documents\Visual Studio 2008\Projects\ParPort64CmdLine\ParPort64CmdLine\bin\Debug\ParPort64CmdLine.exe</program_filename>

<wait_for_exit>FALSE</wait_for_exit>

<console_mode_index>1</console_mode_index>

<send_only_on_change>FALSE</send_only_on_change>

<program_arguments>[lpt]</program_arguments>

</Execute_Program>

<end_if/>

<Watch_Variables/>

<Marker>

<include_graphics>FALSE</include_graphics>

<name>PATH</name>

<revert_to>Current</revert_to>

</Marker>

<Marker>

<include_graphics>FALSE</include_graphics>

<name>RESTORE TO ORIGINAL</name>

<revert_to>ORIGINAL</revert_to>

Page 43: Project Report of Computer Guided Optimal Path Finder

38

</Marker>

<Math>

<image2>ORIGINAL</image2>

<function>4</function>

<divisor>1</divisor>

<image1>PATH</image1>

<all_channels>TRUE</all_channels>

<bias>0</bias>

</Math>

<Marker disabled>

<include_graphics>FALSE</include_graphics>

<name>RESTORE TO ORIGINAL</name>

<revert_to>ORIGINAL</revert_to>

</Marker>

Page 44: Project Report of Computer Guided Optimal Path Finder

39

HARDWARE DESCRIPTION

LPT (Line Print Terminal) is the original name of the parallel port interface on IBM PC-compatible computers. It was designed to operate a text printer that used IBM's 8-bit extended ASCII character set. The name derives from the fact that "line printer" was a common generic term at the time for any type of text printer. The Parallel Port is an inexpensive way to communicate to external TTL 0-5V devices using your PC's parallel port.

LINE PRINT TERMINAL (LPT)

An LPT port has an 8-bit data bus and four pins for control output (Strobe, Linefeed, Initialize, and Select In), and five more for control input (ACK, Busy, Select, Error, and Paper Out). Its data transfer speed is at 12,000 kbit/s.

Pinout

Fig. 11

Page 45: Project Report of Computer Guided Optimal Path Finder

40

The Parallel Port pins are divided into three groups of pins mean for difference purposes. The three sets are DATA (in/out), CONTROL (out) and STATUS(in). The DATA pins are meant for input and output of data (typically this was to send the printer the information to be printed). The CONTROL port was mean to output control information to the printer and the STATUS pins were inputs back from the printer to the PC meant to communicate things like ‘out of paper’, etc.

Each pin is used to literally communicate 1 bit of information. A pin is either a ‘0’ or ‘1’. All pins can transmit information simultaneously in parallel as opposed to serially (one by one) as is done through a serial port. The standard parallel port is capable of sending 50 to 100 kilobytes of data per second.

The voltage level of an on pin is about 5volts and can be used to directly drive an LED. To test out your parallel port with RoboRealm you can configure you Parallel Port module as shown in the interface below, connect one end of an LED to pin3 (data2) and the other to pin25 (ground). As the image count increases the LED should blink on and off.

The parallel port can output/send 8 bits at a time and input 5 bits. On the more modern Standard Parallel Port (SPP) ports the 8 data pins can become input pins if the DIRECTION bit on the CONTROL port is set high. See below as to how to change this bit.

There are several versions of parallel ports beyond the original design. The Enhanced Parallel Port (EPP) was created by Intel, Xircom and Zenith in 1991. EPP allows for much more data, 500 kilobytes to 2 megabytes, to be transferred each second. The Standard Parallel Port (SPP) and has completely replaced the original design. Bidirectional communication allows each device to receive data as well as transmit it. Pins 18 through 25, originally just used as grounds, can be used as data pins also. This allows for full-duplex (both directions at the same time) communication. The Extended Capabilities Port (ECP) allows for bidirectional.

Page 46: Project Report of Computer Guided Optimal Path Finder

41

Pin # Name Input/Output Bit Inverted 1 nStrobe Out Control-0 Yes 2 Data0 In/Out Data-0 No 3 Data1 In/Out Data-1 No 4 Data2 In/Out Data-2 No 5 Data3 In/Out Data-3 No 6 Data4 In/Out Data-4 No 7 Data5 In/Out Data-5 No 8 Data6 In/Out Data-6 No 9 Data7 In/Out Data-7 No

10 nAck In Status-6 No 11 Busy In Status-7 Yes 12 Paper-Out In Status-5 No 13 Select In Status-4 No 14 Linefeed Out Control-1 Yes 15 nError In Status-3 No 16 nInitialize Out Control-2 No 17 nSelect-Printer Out Control-3 Yes 18 Ground Out (Control-4) No 19 Enable Bi-Directional Port Out (Control-5) No

20-25 Ground - - -

Table 1

The initial purpose of the parallel port was to interface the PC with a computer. So the pin names will reflect that specific purpose. If you are using the parallel port to connect with your own devices the main quality of the pins that will be important to you will be whether they are input or output pins. I.e. if you using Pin 11 the "Busy" pin to input a bit of data from your circuit it does not have to reflect that your circuit is 'busy'.

Most of the bit values are logically on when the voltage level is high but 4 of the bits are swapped.

Page 47: Project Report of Computer Guided Optimal Path Finder

42

RADIO FREQUENCY MODULATOR

The idea is to use off-the-shelf RF Tx/Rx modules. These modules, once a rare commodity, are now widely and cheaply available. In this particular discussion, we shall be using ASK (Amplitude Shift Keying) based TX/RX pair operating at 433 MHz. The transmitter module accepts serial data at a maximum of XX baud rate. They can be directly interfaced to a microcontroller or can be used in remote control applications with the help of encoder/decoder ICs. The encoder IC takes in parallel data at the TX side packages it into serial format and then transmits it with the help of a RF transmitter module. At the RX end, the decoder IC receives the signal via the RF receiver module, decodes the serial data and reproduces the original data in the parallel format.

Fig. 12

Page 48: Project Report of Computer Guided Optimal Path Finder

43

In the block diagram above, the switches represents the input from the computer’s parallel port.

After this is decided by the computer program, where is the robot supposed to go, it has to send instructions to the robot. This is done by wireless transmission.

Encoder

The encoder is the IC which is to convert the data from the parallel port of the computer to serial data. As of now our requirements being low we have used an 8-channel encoder IC (HT12E).

Transmitter

The transmitter used is available in a Transmitter-Receiver IC pack. It transmits serial data at a frequency of 434 MHz and the technology is ASK (amplitude shift keying).

The ST-TX01-ASK is an ASK Hybrid transmitter module. ST-TX01-ASK is designed by the Saw Resonator, with an effective low cost, small size, and simple-to-use for designing.

SAW (surface acoustic wave) resonators are electromechanical devices commonly used in radio frequency applications. Electrical signals are converted to a mechanical wave in a device constructed of a piezoelectric crystal or ceramic; this wave is delayed as it propagates across the device, before being converted back to an electrical signal by further electrodes.

Page 49: Project Report of Computer Guided Optimal Path Finder

44

The delayed outputs are recombined to produce a direct analog implementation of a finite impulse response filter. This hybrid filtering technique is also found in an analog sampled filter. SAW filters are limited to frequencies up to 3 GHz.

Frequency Range: 315 / 433.92 MHZ.

Features:

Supply Voltage: 3~12V

Output Power : 4~16dBm

Circuit Shape: Saw

It transmits serial data at a frequency of 434 MHz and the technology is ASK.

The frequency is 434 MHz which requires a very small antenna of about 17cm which help keep the robot small.

Why 434MHz frequency?

Table 2

Page 50: Project Report of Computer Guided Optimal Path Finder

45

Transmitter Block Diagram

Fig. 13

TRANSMITTER IC

Fig. 14

Page 51: Project Report of Computer Guided Optimal Path Finder

46

Fig. 15

TRANSMITTER-ENCODER CIRUIT

Page 52: Project Report of Computer Guided Optimal Path Finder

47

RADIO FREQUENCY DEMODULATOR

RECEIVER

The receiver receives data from the transmitter in ASK form and converts it to serial data.

The ST-RX02-ASK is an ASK Hybrid receiver module. A effective low cost solution for using at 315/433.92 MHZ. The circuit shape of ST-RX02-ASK is L/C.

Receiver Frequency: 315 / 433.92 MHZ

Typical sensitivity: -105dBm

Supply Current: 3.5mA

Low power consumption.

Features:

Easy for application. Operation temperature range : ﹣20℃~+70℃ Operation voltage: 5 Volts. Available frequency at: 315/434 MHz

Page 53: Project Report of Computer Guided Optimal Path Finder

48

Table 3

Receiver Block Diagram

Fig. 16

Page 54: Project Report of Computer Guided Optimal Path Finder

49

RECEIVER IC

Fig. 17

Why ASK?

1) Although FSK (Frequency Shift Keying) has greater advantages over ASK – Higher noise immunity Higher bit rate Better sensitivity

2) But the deciding factors leading to the choice of ASK are

Lower cost Irrelevancy of noise immunity

The decoder IC converts the serial data into parallel data that is used to control the movement and the direction of the robot.

Decoder

Page 55: Project Report of Computer Guided Optimal Path Finder

50

RECEVIVER-DECODER CIRCUIT

Fig. 18

Page 56: Project Report of Computer Guided Optimal Path Finder

51

ANTENNA

An antenna is a transducer designed to transmit or receive electromagnetic waves. In other words, antennas convert electromagnetic waves into electrical currents and vice versa. Antennas are used in systems such as radio and television broadcasting, point-to-point radio communication, wireless LAN, radar, and space exploration. Antennas are most commonly employed in air or outer space, but can also be operated under water or even through soil and rock at certain frequencies for short distances. Physically, an antenna is simply an arrangement of one or more conductors, usually called elements in this context. In transmission, an alternating current is created in the elements by applying a voltage at the antenna terminals, causing the elements to radiate an electromagnetic field. In reception, the inverse occurs: an electromagnetic field from another source induces an alternating current in the elements and a corresponding voltage at the antenna's terminals. Some receiving antennas (such as parabolic and horn types) incorporate shaped reflective surfaces to collect EM waves from free space and direct or focus them onto the actual conductive elements.

A coaxial antenna

(often known as a coaxial dipole) is a particular form of a quarter-wave dipole antenna, most often employed as a vertically polarized omni-directional antenna.

Fig. 19

Page 57: Project Report of Computer Guided Optimal Path Finder

52

DC MOTOR

Fig. 20

From the start, DC motors seem quite simple. Apply a voltage to both terminals, and it spins. However, what if we want to control which direction the motor spins? Correct, we reverse the wires. Now what if we want the motor to spin at half that speed? We would use less voltage. However, how would we get a robot to do those things autonomously? How would we know what voltage a motor should get? Why not 50V instead of 12V? What about motor overheating? Operating motors can be much more complicated than we think.

Fig. 21

Voltage - We probably know that DC motors are non-polarized - meaning that we can reverse voltage without any bad things happening. Typical DC motors are rated from about 6V-12V. The larger ones are often 24V or more. But for the purposes of a robot, we probably will stay in the 6V-12V range. So why do motors operate at different voltages? As we all know (or should), voltage is directly related to motor torque. More the voltage, higher is the torque. But don't go running our motor at 100V cause that’s just not nice. A DC motor is rated at the

Page 58: Project Report of Computer Guided Optimal Path Finder

53

voltage it is most efficient at running. If we apply too few volts, it just will not work. If we apply too much, it will overheat and the coils will melt. Therefore, the general rule is, try to apply as close to the rated voltage of the motor as we can.

Current - As with all circuitry, we must pay attention to current. Too little, and it just won't work. Too much, and we have meltdown. When buying a motor, there are two current ratings we should pay attention to. The first is operating current. This is the average amount of current the motor is expected to draw under a typical torque. Multiply this number by the rated voltage and we will get the average power draw required to run the motor. The other current rating, which we need to pay attention to, is the stall current. When we power up the motor, but we put enough torque on it to force it to stop rotating. This is the maximum amount of current the motor will ever draw, and hence the maximum amount of power too. Therefore, we must design all control circuitry capable of handling this stall current. In addition, if we plan to constantly run our motor, or run it higher than the rated voltage, it is wise to heat sink the motor to keep the coils from melting.

Power Rating - How high of a voltage can we over apply to a motor? Well, all motors are (or at least should be) rated at a certain wattage. Wattage is energy. Inefficiency of energy conversion directly relates to heat output. Too much heat, the motor coils melt. So the manufacturers of [higher quality] motors know how much wattage will cause motor failure, and post this on the motor spec sheets. Do experimental tests to see how much current our motor will draw at a desired voltage. The equation is:

Power (watts) = Voltage * Current

Fig. 22

Page 59: Project Report of Computer Guided Optimal Path Finder

54

Power Spikes - There is a special case for DC motors that change directions. To reverse the direction of the motor, you must also reverse the voltage. However, the motor has a built up inductance and momentum, which resists this voltage change. So for the short period of time it takes for the motor to reverse direction, there is a large power spike. The voltage will spike double the operating voltage. The current will go to around stall current. The moral of this is design your robot power regulation circuitry properly to handle any voltage spikes.

Torque - When buying a DC motor, there are two torque value ratings, which you must pay attention to. The first is operating torque. This is the torque the motor was designed to give. Usually it is the listed torque value. The other rated value is stall torque. This is the torque required to stop the motor from rotating. We normally would want to design using only the operating torque value, but there are occasions when you want to know how far we can push our motor. If we are designing a wheeled robot, good torque means good acceleration. If we have 2 motors on our robot, make sure the stall torque on each is enough to lift the weight of our entire robot times our wheel radius. Always favor torque over velocity. As stated above, our torque ratings can change depending on the voltage applied.

Velocity - Velocity is very complex when it comes to DC motors. The general rule is, motors run the most efficient when run at the highest possible speeds. Obviously however this is not possible. There are times we want our robot to run slowly. So first you want gearing - this way the motor can run fast, yet we can still get good torque out of it. Unfortunately gearing automatically reduces efficiency no higher than about 90%. So include a 90% speed and torque reduction for every gear meshing when we calculate gearing. The voltage and applied torque resistance obviously also affects speed.

Control-Methods - The most important of DC motor control techniques is the H-Bridge. After we have our H-Bridge hooked up to our motor, to determine our wheel velocity/position we must use an encoder. Lastly, we should read up on good DC Motor Braking methods.

Gears - No good robot can ever be built without gears. As such, a good understanding of how gears affect parameters such as torque and velocity are very important.

Page 60: Project Report of Computer Guided Optimal Path Finder

55

The H-Bridge is the link between digital circuitry and mechanical action. The computer sends out binary commands, and high powered actuators do stuff. Most often H-bridges are used to control rotational direction of DC motors. And unless you buy a potentially expensive motor-driver, you need an H-bridge to control any robot with a motor. This is a quickly sketched H-Bridge circuit with supporting circuitry.

H-BRIDGE

An H-bridge can be implemented with various kinds of components (common bipolar transistors, FET transistors, MOSFET transistors, power MOSFETs, or even chips).

The motor driver IC receives logic inputs from the decoded serial data (now parallel) according to those decided by the program. The motor driver IC used here is L293D which is a common H-bridge circuit. This is used so that the robot is able to run in the reverse direction as well which greatly simplifies the commands.

When the motor direction or speed is changed specialized circuits (motor drivers) have been developed to supply motors with power and to isolate the other ICs from electrical problems. These circuits can be designed such that they can be completely separate boards, A very popular circuit for driving DC motors (ordinary or gear head) is called an H-bridge. It's called that because it looks like the capital letter 'H' on classic schematics. The great ability of an H-bridge circuit is that the motor can be driven forward or backward at any speed, optionally using a completely independent When we take a battery; hook the positive side to one side of our DC motor and connect the negative side of the battery to the other motor lead. The motor spins forward& on swapping, the battery leads the motor spins in reverse. Using Micro Controller Unit (MCU) to control the motor, we can do these using solid-state devices like transistor.

Page 61: Project Report of Computer Guided Optimal Path Finder

56

Basic H-Bridge Circuit

Fig. 23

L293D BLOCK DIAGRAM (MOTOR DRIVER)

Fig. 24

Page 62: Project Report of Computer Guided Optimal Path Finder

57

POWER SOURCE

Lead-Acid Battery

Fig. 25

Lead-acid batteries are the oldest type of rechargeable battery. Despite having the second lowest energy-to-weight ratio (next to the nickel-iron battery) and a correspondingly low energy-to-volume ratio, their ability to supply high surge currents means that the cells maintain a relatively large power-to-weight ratio. These features, along with their low cost, make them attractive for use in motor vehicles to provide the high current required by automobile starter motors.

Page 63: Project Report of Computer Guided Optimal Path Finder

58

Switched Mode Power Supply (SMPS)

A switched-mode power supply (SMPS) is an electronic power supply unit (PSU) that incorporates a switching regulator in order to provide the required output voltage.

While a linear regulator maintains the desired output voltage by dissipating excess power in a pass power transistor, the switched-mode power supply switches a power transistor between saturation (full on) and cutoff (completely off) with a variable duty cycle whose average is the desired output voltage. It switches at a much higher frequency (tens to hundreds of kHz) than that of the AC line (mains). This means that the transformer that it feeds can be much smaller than one connected directly to the line/mains. Switching creates a rectangular waveform that typically goes to the primary of the transformer.

Fig. 26

Page 64: Project Report of Computer Guided Optimal Path Finder

59

Usually several secondary feed rectifiers, series inductors and filter capacitors are connected to provide various DC outputs with low ripple.

Fig. 27

The main advantage of this method is greater efficiency because the switching transistor dissipates little power when it is outside of its active region. Other advantages include smaller size and lighter weight and lower heat generation due to higher efficiency. Disadvantages include greater complexity, the generation of high-amplitude, high-frequency energy that the low-pass filter must block to avoid electromagnetic interference (EMI), and a ripple voltage at the switching frequency and the harmonic frequencies thereof.

Very low cost SMPS may couple electrical switching noise back onto the mains power line, causing interference with A/V equipment connected to the same phase. Non power-factor-corrected SMPSs also cause harmonic distortion.

Page 65: Project Report of Computer Guided Optimal Path Finder

60

A webcam is a video capture device connected to a computer or computer network, often using a USB port or, if connected to a network, ethernet or Wi-Fi.

WEBCAM

Their most popular use is for video telephony, permitting a computer to act as a videophone or video conferencing station. This can be used in messenger programs such as Windows Live Messenger, Skype and Yahoo messenger services. Other popular uses, which include the recording of video files or even still-images, are accessible via numerous software programs, applications and devices.

Fig. 28

They are well known for their low manufacturing costs and flexibility.[1] Some, for example those used as online traffic cameras, are expensive, rugged professional-grade hardware.

Page 66: Project Report of Computer Guided Optimal Path Finder

61

CIRCUIT DIAGRAM

Page 67: Project Report of Computer Guided Optimal Path Finder

62

TECHNICAL SPECIFICATIONS

Table 4

S. No. Circuitry Item Quantity

1. Encoder circuit (a) HT12E Encoder (b) Resistor(1M) (c) Transmitter(ASK 434MHz) (d) Antenna

1 1 1 1

2. Decoder Circuit (a) HT12D Decoder (b) Resistor(51K) (c) Receiver (d) Antenna

1 1 1 1

3. Motor Driver (a) L293D Motor driver (b) 100rpm DC Motor (c) Capacitor (100 pF) (d) IC 7805

1 2 1 1

Page 68: Project Report of Computer Guided Optimal Path Finder

63

IMAGES

Fig. 30 THE BATTERY PACK (~8V) - powers the motors and the receiver circuit)

Fig. 31 THE TRANSMITTER CIRCUIT (WITH SMPS)

Page 69: Project Report of Computer Guided Optimal Path Finder

64

Fig. 32 THE RECEIVER CIRCUIT – consists of receiver IC, Decoder, H-bridge IC, and voltage regulator.

Fig. 33 THE ROBOT

Page 70: Project Report of Computer Guided Optimal Path Finder

65

Fig. 34 (LED ARRAY for checkpoint visual alarms)

Fig. 35

Page 71: Project Report of Computer Guided Optimal Path Finder

66

SOFTWARE DESCRIPTION

ROBOREALM

RoboRealm® is a powerful robotic vision software application for use in computer vision, image processing, and robot vision tasks. Using an easy to use point and click interface complex image analysis and robot control becomes easy!

The RoboRealm application contains all the tools you need for processing video images for use in robotic applications. It is easy enough for the casual user who wants to experiment with video processing, yet powerful enough for the serious robotic scientist who needs to integrate a vision system into their project.

Fig. 36

Page 72: Project Report of Computer Guided Optimal Path Finder

67

LPT INTERFACING DLL

1. Works seam less with all versions of windows (WIN 98, NT, 200 and XP) 2. Using a kernel mode driver embedded in the dll 3. No special software or driver installation required 4. Driver will be automatically installed and configured automatically when the

dll is loaded 5. No special APIs required only two functions Inp32 and Out32 6. Can be easily used with VC++ and VB 7. Functions are compatible with Inpout32.

Microsoft Visual Basic Scripting Edition brings active scripting to a wide variety of environments, including Web client scripting in Microsoft Internet Explorer and Web server scripting in Microsoft Internet Information Service.

VBSCRIPT

VBScript talks to host applications using Windows Script. With Windows Script, browsers and other host applications do not require special integration code for each scripting component. Windows Script enables a host to compile scripts, obtain and call entry points, and manage the namespace available to the developer. With Windows Script, language vendors can create standard language run times for scripting. Microsoft will provide run-time support for VBScript. Microsoft is working with various Internet groups to define the Windows Script standard so that scripting engines can be interchangeable. Windows Script is used in Microsoft® Internet Explorer and in Microsoft® Internet Information Service.

As a developer, you can license VBScript source implementation at no charge for use in your products. Microsoft provides binary implementations of VBScript for the 32-bit Windows® API, the 16-bit Windows API, and the Macintosh®. VBScript is integrated with World Wide Web browsers. VBScript and Windows Script can also be used as a general scripting language in other applications.

Page 73: Project Report of Computer Guided Optimal Path Finder

68

Pathfinder can be used for multiple target application. That is it can be used to reach different targets in a single go. And since the whole algorithm works on live video feed it chases movable targets in real time.

CHASING MULTIPLE TARGETS ON A PRIORITY BASIS

Principle -Checkpoints are cleared when the robot reaches them. They are indicated visually by using an LED.

CHECKPOINTS

Working- The robot in the 2-dimensional plane is represented by an X and a Y axis. Every obstacle or supposedly any target in the plane is also represented by the same. For calculation purposes the robot is represented by a point which coincides with its geometrical centre. When this point crosses the X-Y coordinate of the obstacle or the target, an indication in the form of an LED is given. Every time the robot crosses an obstacle or reaches the target, the particular LED lights up.

Application-The method of checkpoints can be used in automatic cargo delivery systems, preplanned passenger cart service and various other monitoring services.

Shadow fixture system

SYSTEM DESIGN IMPROVEMENTS

The need of this system arose from the dynamic and ever changing shadows of the surroundings. Therefore, a total of five 3 watt bulbs were put around the robot. Most of the shadows pertaining to robot movements and those of surrounding were removed. This made robot’s path more specific and less susceptive to change in the shadows.

Page 74: Project Report of Computer Guided Optimal Path Finder

69

APPLICATIONS

AUTOMATIC PATH FINDING WHEELCHAIR

Pathfinder could be used in wheelchairs to find path in a hospital or home. This will help physically challenged people to reach their target easily and without anybody’s help. Path can be found by using CCTV cameras and computer.

Fig. 37

Page 75: Project Report of Computer Guided Optimal Path Finder

70

FINDING ROUTES VIA SATELLITE AND STREET VIEW

Routes can be found using satellites. An inbuilt camera of a satellite can give live feed about traffic and can predict optimum path having less traffic. These types of robots will have secondary vision and sensors to avoid obstacles in real time. Street view is available in foreign countries and experts are working on the street view for India. Street view actually gives proximity camera feeds of streets in a particular area of interest. The robot will have an onboard GPS and a compass, and will communicate via station computers for real-time path planning and obstacle avoidance.

Fig. 38

Page 76: Project Report of Computer Guided Optimal Path Finder

71

DATA LOGGING IN EXTREME CONDITIONS

Robots equipped with data logging sensors like temperature, pressure, humidity etc. can be sent in a chamber or a building with CCTV access where it is difficult to for humans to go. The data logged by robots can then be interpreted and its analysis can be done to predict whether it is safe for humans to go inside or not along with the best possible path.

AUTONOMOUS TRASH COLLECTING ROBOT

This robot finds applications in various malls, fairs or public places that are monitored by CCTV cameras. It can be modified to collect trash, in this case the obstacles being the people. The CCTV cameras capture the live video and the computer gives the instructions to move it to the place where the trash is and the robot collects that and places it in the bin.

Page 77: Project Report of Computer Guided Optimal Path Finder

72

POSSIBLE EXTENSIONS

ROBOTIC ARM

A robotic arm can be attached with the pathfinder robot. With the help of robotic arm an object can be picked from one place and then carried to another. Also with the help of robotic arm assembly line could be done in a much more efficient way.

Fig. 39

Page 78: Project Report of Computer Guided Optimal Path Finder

73

STEREO VISION

Fig.40

Computer stereo vision is the extraction of 3D information from

digital images, such as obtained by a CCTV camera. By comparing information about a scene from several camera perspectives in the scene, limited 3D information can be extracted by examination of the relative perspectives. For this application 2 or more webcams are used with different viewing angles and different perspectives. One webcam, which will be located at the ceiling facing downwards, will give the aerial (top) view of the scene, and another will be placed on the robot. This will give us front view of the obstacle. By the combination of these two webcam feeds we can produce a limited 3D view of the scene. By combination of two or more webcams we can produce nearly 3d view of obstacle. That way we can modify the robot to go over the obstacle. For instance if it’s a piece of paper or something like that, it is seen as an obstacle by the overhead webcam, in these situations it will be necessary to use stereo vision.

Page 79: Project Report of Computer Guided Optimal Path Finder

74

RESULTS & CONCLUSION

Minor errors were reported during obstacle detection procedure.

Errors significantly reduced through dilation and self axis rotation.

Surface irregularities were of minor inhibition.

Computer guided navigation system based Path Finder robot was successfully operated.

Page 80: Project Report of Computer Guided Optimal Path Finder

75

REFERENCES

WWW.WIKIPEDIA.COM

WWWW.SOCIETYOFROBOTS.COM

WWW.SUMMITECH.COM

WWW.ROBOKITS.CO.IN

ONLINE ROBOREALM DOCUMENTATION

AUTONOMOUS ROBOTS RESEARCH PAPERS BY M. Bernardine Dias and

Brett Browning

Encarta & Britannica Encyclopedia