Documente Academic
Documente Profesional
Documente Cultură
AUTHORS
SUPERVISOR
ENGR. SHOAIB ASLAM
JUNE 2014
Table of Contents
List of Figures ..................................................................................................................vii
List of Software.................................................................................................................. x
Certificate ........................................................................................................................xiii
Undertaking …..………………………………………………………………………..xiv
Acknowledgment ............................................................................................................. xv
Chapter # 1 ......................................................................................................................... 1
Chapter # 2 ......................................................................................................................... 4
2.2.3 Conclusion:......................................................................................................... 7
2.3.3 Conclusion:....................................................................................................... 10
2.4.3 Conclusion:....................................................................................................... 12
2.5.3 Conclusion........................................................................................................ 14
2.6.2 Conclusion........................................................................................................ 15
Chapter # 3 ....................................................................................................................... 16
Chapter # 4 ....................................................................................................................... 19
University Of Engineering and Technology, Taxila (Sub Campus Chakwal) Page iii
Maze Solving Autonomous Vehicle
4.7 Cotter joint design considerations for chains in sprocket chain mechanism .......... 28
Chapter # 5 ....................................................................................................................... 35
5.2.1 Working............................................................................................................ 37
5.3.1 Working............................................................................................................ 40
Chapter # 6 ....................................................................................................................... 44
Chapter # 7 ....................................................................................................................... 49
Chapter # 8 ....................................................................................................................... 56
Conclusion ....................................................................................................................... 68
Appendix .......................................................................................................................... 68
References ........................................................................................................................ 74
List of Figures
Figure 2.1: Block Diagram RP........................................................................................... 7
Figure 2.2: Pure Pursuit Algorithm .................................................................................... 9
Figure 2.3: Random Mouse Algorithm ............................................................................ 11
Figure 2.4: Tremaux’s Algorithm .................................................................................... 12
Figure 4.1(a) : 3D Modeling ............................................................................................ 21
Figure 4.1(b) : Picture of Robot ....................................................................................... 22
Figure 4.2: Free Body Diagram of Robot ........................................................................ 24
Figure 4.3: Free Body Diagram of Mechanical Power Consumption ............................. 27
Figure 4.4: Cotter Joint 2D Drawing ............................................................................... 28
Figure 4.5: Failure of spigot in tension ............................................................................ 31
Figure 4.6:Failure of the rod crushing ............................................................................. 31
Figure 4.7:Failure of socket in tension ............................................................................ 32
Figure 4.8:Failure of cotter in shear ................................................................................. 33
Figure 4.9 Socket collar Failure ....................................................................................... 34
Figure 5.1: Complete circuit of our Project on Proteous ................................................. 37
Figure 5.2: Working of IR Sensor.................................................................................... 38
Figure 5.3: IR sensor principle......................................................................................... 38
Figure 5.4:Color sensor cicuit diagram ............................................................................ 39
Figure 5.5: H-Bridge via Relays ...................................................................................... 41
Figure 5.6: H-Bridge via Mosfets .................................................................................... 42
Figure 6.1: ARDUINO Kit .............................................................................................. 45
Figure 7.1: Electrical Circuit Modeling ........................................................................... 50
Figure 7.2: Modeling of Motors....................................................................................... 51
Figure 7.3: Motor interface .............................................................................................. 53
Figure 7.4: MATLAB SIMULINK diagram ................................................................... 54
Figure 7.5: MATLAB SIMULINK graph ....................................................................... 55
Figure 8.1: Mechatronics system ..................................................................................... 57
Fig 8.2: Phases of Mechatronics system .......................................................................... 58
Fig 8.3: General Block Diagram of Mechatronics system ............................................... 60
Fig 8.3:Block Diagram of our Mechatronics system ....................................................... 61
Figure 8.4: General Block Diagram of our system .......................................................... 63
University Of Engineering and Technology, Taxila (Sub Campus Chakwal) Page vii
Maze Solving Autonomous Vehicle
List of Tables
Table 4.1: Dimensions of Robot ...................................................................................... 22
Table 4.2: Mechanical Components ................................................................................ 23
Table 5.1: Electrical Components .................................................................................... 36
Table 6.1: General Commands of AURDUINO v1.1.8 ................................................... 47
University Of Engineering and Technology, Taxila (Sub Campus Chakwal) Page viii
Maze Solving Autonomous Vehicle
List of Equations
Equation 4.1: Weight of Robot ........................................................................................ 24
Equation 4.2: Moment of Inertia ...................................................................................... 24
Equation 4.3: Gravitational Torque ................................................................................. 24
Equation 4.4: Frictional Torque ....................................................................................... 25
Equation 4.5: Load Torque .............................................................................................. 25
Equation 4.6: Uniform velocity equation......................................................................... 25
Equation 4.7: Total Torque .............................................................................................. 26
Equation 4.8: Mechanical Power ..................................................................................... 27
Equation 4.9: Failure of rod ............................................................................................. 30
Equation 4.10: Failure of spigot....................................................................................... 31
Equation 4.11: Failure of the cotter ................................................................................. 31
Equation 4.12: Failure of the socket ................................................................................ 32
Equation 4.13: Failure of cotter ....................................................................................... 33
Equation 4.14: Socket collar failure................................................................................. 34
Equation 7.1: Loop 1 differential equation. ..................................................................... 50
Equation 7.2: Loop 2 Differential eq. .............................................................................. 51
Equation 7.3: Loop 2 differential eq. ............................................................................... 51
Equation 7.4: Transfer function of motor ........................................................................ 52
List of Software
1- Solid Edge V16
2- Proteus V7
3- ARDUINO MEGA Training Kit Programming Software
4- MATLAB 2007a
5- Microsoft Office
List of Symbols
P= load carried by the rods
D= diameter of the rods,
D1= outside diameter of socket,
D2= diameter of spigot or inside diameter of socket
D3= outside diameter of spigot collar
T1= thickness of spigot collar
D4= diameter of socket collar
C = thickness of socket collar
B= mean width of cotter
T = thickness of cotter
L = length of cotter
A= distance from the end of the slot to the end of rod
Τ= Torque
σc= Crushing Stress
r = radius of wheel
Tm(s) = in terms of θm(s) if we are to separate the input and output variables and obtain
the transfer function, θm(s)/Ea(s).
Jm = inertia at the armature and includes both the armature inertia and, the load inertia
Dm = viscous damping at the armature and includes both the armature viscous damping
and, the load viscous damping
List of Abbreviations
Direct Current (DC)
Rotations per Minute (rpm)
Volts (V)
3-Dimensional (3D)
Infrared (IR)
Input and Output (I/O)
Light Dependent Resistance (LDR)
Artificial Intelligence (AI)
Control System Runs Based maze solving algorithm (LSRB)
Maze Solving Robot (MSR)
Central Processing Unit (CPU)
Analog to Digital Converter (ADC)
Digital to Analog Converter (DAC)
Bipolar Junction Transistor (BJT)
Light Emitting Diode (LED)
Pulse width Modulation (PWM)
Electrically Erasable Program able Read Only Memory (EEPROM)
Alternating Current (AC)
Static Random Access Memory (SRAM)
Universal Storage Bus (USB)
Millie Amperes (mA)
Input Voltage (Vin)
Output Voltage (Vref)
Analog to Digital converter Interrupt Flag (ADIF)
Analog to Digital converter least significant value (ADCL)
Analog to Digital converter highest significant value (ADCH)
Computer Aided Design (CAD)
Metal Oxide Semi-conductor Field Effected Transistor (MOSFET)
Sound Navigated And Ranging (SONAR)
National Engineering Robotics Contest (NERC)
Global Positioning system (GPS)
University Of Engineering and Technology, Taxila (Sub Campus Chakwal) Page xii
Maze Solving Autonomous Vehicle
Certificate
This is to certify that M. Ismail Zafar, Saquib Saeed, Omer Shahzad Mughal and
Abdul Hannan Shahid have successfully completed their final year project. This
project “Maze Solving Autonomous Vehicle” had been assigned to them to fulfill
the partial requirements for the bachelor degree of Mechatronics Engineering.
University Of Engineering and Technology, Taxila (Sub Campus Chakwal) Page xiii
Maze Solving Autonomous Vehicle
Undertaking
We certify that project work titled “Maze solving autonomous vehicle” is our own work.
The work has not, in whole or in part, been presented elsewhere for assessment. Where
material has been used from other sources it has been properly referred.
____________________
M. Ismail Zafar
(10-MCT-08)
____________________
Saquib Saeed
(10-MCT-25)
____________________
Omer Shahzad Mughal
(10-MCT-31)
____________________
Abdul Hannan Shahid
(10-MCT-35)
University Of Engineering and Technology, Taxila (Sub Campus Chakwal) Page xiv
Maze Solving Autonomous Vehicle
Acknowledgment
We have taken efforts in this project. However, it would not have been possible
without the kind and merciful support and help of Allah Almighty and support of many
individuals and organizations. We would like to extend our sincere thanks to all of them.
We are highly indebted to our project advisor Engr. Shoaib Aslam for his
guidance and constant supervision as well as for providing necessary information
regarding the project.
We are thankful to our parents and family members for their support and
motivation throughout the project morally and monetarily.
We are obliged to faculty members of our campus, for the valuable information
provided by them in their respective fields. We are grateful for their cooperation during
the period of our project.
Abstract
The main objective of the project is to come up with an autonomous robot that
can imitate the behavior of a Self-Guided Vehicle in an industry with manual loading
and automatic unloading at specified location. As we are also have a vision to win the
NERC 2014. So, we are preparing our vehicle on the theme of NERC 2014. Therefore,
we have to design the vehicle in the light of rules of NERC 2014.
We have selected aluminum sheet as material for the base of autonomous vehicle
because of its unique property of providing maximum strength with considerable less
weight than other metals. The DC Gear Motor having torque of 266 Nm and angular
speed 150 rpm was chosen over various other motors because the DC gear motor can
provide much greater torque than simple DC motor at same power rating. Chains of
suitable dimensions were used to provide drive to the wheels through motor. Mechanical
modeling of the project was implemented on Solid Edge (V16) successfully and after
consulting with our project supervisor, 3D model was translated and converted into
hardware.
We have used IR proximity sensors and SONAR sensor to perform path finding
and maze solving operations. IR proximity sensors are preferred over SONAR because
of its precision, high data refreshing rate and it is convenient to interface IR sensor with
AURDUINO kit than SONAR and other proximity sensors. Five IR proximity sensors
are used to solve the maze and for the alignment of vehicle in the arena while just a
single SONAR is interface with AURDUINO for the detection of wall in any case of
reverse motion. LDR based color sensors would be used for color detection and line
tracking operations in the workspace. Color detection is needed at the starting spot
where the vehicle would detect its initial path which it has to follow to reach at
unloading position and it would also be needed at traffic signals (zone detection) where
the vehicle had to stop during the course of its journey.
AURDUINO kit has been preferred over PIC and AVR microcontrollers
because it has more I/O terminals, operating power ratings are more desirable with a
less probability of burning out, data processing and execution speed are higher, higher
analog to digital convertor resolution and also there is no need for separate burner to
burn code into controller of AURDUINO kit.
To check the stability of our system (autonomous vehicle), the complete
University Of Engineering and Technology, Taxila (Sub Campus Chakwal) Page xvi
Maze Solving Autonomous Vehicle
mathematical modeling of the system was done using the techniques of control system
by which an improper fraction of transfer function was obtained. This equation
contains some constant factors related to the specifications of motor and would be
available to us when the pre ordered motors along with their data sheets will arrive.
Using MATLAB, the improper fraction has been converted into a proper one, than we
checked the stability of the equation by undergoing simulation in MATLAB
SIMULINK.
University Of Engineering and Technology, Taxila (Sub Campus Chakwal) Page xvii
Maze Solving Autonomous Vehicle
Chapter # 1
Preliminary Concepts
1.1 Introductions
The main objective of the project is to come up with an autonomous robot that
can imitate the behavior of a Self-Guided Vehicle in an industry with manual loading
and automatic unloading at specified location. A maze is a tour puzzle in the form of a
complex branching passage through which the solver must find a route. In everyday
speech, both maze and labyrinth denote a complex and confusing series of pathways, but
technically the maze is distinguished from the labyrinth, as the labyrinth has a single
through-route with twists and turns but without branches, and is not designed to be as
difficult to navigate. The pathways and walls in a maze or labyrinth are fixed (pre -
determined) puzzles where the walls and paths can change during the game are
categorized as tour puzzles.
The robot consists of Analog sensor array (Five IR Proximity sensors and one
SONAR); the Arduino board must stay centered within the base wood to prevent
compounding errors in distance and damages with the obstacles. Controlling the motors
is responsible for safely moving the robot through the maze. There are two
motors, each, with RPMs of 150 to carry a weight of about 13kg (including board and
battery). In order to ensure that the robot is not slipping and to avoid collision with the
obstacles, the motors are controlled with IR Proximity sensor. And according to our
needs, we can make use of it to control the speed of the motors. The chases need to carry
the board, circuits, sensors and batteries. And the chases are designed to turn 90 and
180. If the and track branching or ending are available in the routing, then it makes the
decision based on the algorithms.
1.4 Applications
1- Spy robots
2- Suicidal robots
3- Inspection Robots
4- Automated Industrial Trucks etc.
5- Bomb Sniffing robots
Chapter # 2
Literature review
2.2.1 Abstract
When the history of world would be written surely out contemporary age would
be called the age of science and technology. The marvels of science and technology has
not only bewildered human minds but also brought convenience and quality to human
life. Our project is continuation of this tradition of science. We have endeavored to
design an autonomous path tracker vehicle. It has limitless possibilities of usage and it
would certainly become a future workhorse. It can be used to detect the theft vehicles.
Autonomous robot for path finding and obstacle evasion is a vehicle, which follows the
path in two different ways, which are:
It is a vehicle, which is used to follow the reflecting line drawn on the floor. It
captures line position with IR sensors. The sensors will be mounted at front end of the
robot.
the positions of the sensors must be perfect. Now robot is left free on that line. Robot
will follow the line sensing it through the sensors placed on the front bottom of the
robot.
stop "too soon" since the end result cannot contain any dead-ends. Thus if dead-end
filling is done on a perfect maze (maze with no loops) then only the solution will
remain. If it is done on a partially braid maze (maze with some loops), then every
possible solution will remain but nothing more.
2.2.3 Conclusion:
The motion of robot will be controlled by the line tracking and the obstacle
sensors on the path from start to the end point. A vehicle will following an ascender that
will send the path to the follower, follower will follow that path. This is done using
storing the signal values and particular time for which a value is retained is stored in the
memory of controller and when there is no signal interrupt from user then all of the data
from memory contents is sent to the memory of the other controller. Then this data is
executed by the follower which results in following the same path that is followed by the
leader vehicle.
2.3.1 Abstract:
Path tracking is the process concerned with how to determine speed and steering
settings at each instant of time in order for the robot to follow a certain path. A path
consists of a set of points representing the positional coordinates of a particular route.
Often when implementing a path tracking algorithm, one also have to implement a path
recording unit responsible for saving all the coordinates that constitutes the path. A
human operator then has the possibility to manually steer the robot along some track
while the path recording unit saves the information about the path. The path tracking
algorithm also has to handle unplanned positional or orientation deviations from the
path. Such deviations can be caused by odd-metric errors of some kind, or by new
obstacles occurring on the path that must be avoided.
distance L between these look a-head points is called a look a-head distance.
In this algorithm the path is divided into small goal positions called look a-
head points as explained above. Once the robot achieves the first position it then
moves towards the second one then towards the third and finally reaches the end
position.
Path tracking techniques that use this look-ahead point are called geometric
algorithms.
There are two problems that need to be considered:
1- Regaining a path
2- Maintaining the path
2.3.3 Conclusion:
1- The look a-head distance method is useful where we just have to follow the path
and no alignment is required means accuracy is not important. Once the robot is
disturbed from the path during motion then it cannot find the path on its own
when its program is based on this method.
2- In vector pursuit method the robot can follow the path but whenever it is
disturbed from the path during motion it has the ability to find the path again on
its own. This is the benefit of this method over the look a-head distance method.
2.4.1 Abstract
In this activity you will use RoboMind, a robot simulation environment, to solve
simply connected mazes. A simply connected maze is a maze has no loops, and no
inaccessible areas. There is programming involved in completing this activity. The
RoboMind programming language is very simple based on the maze solving
algorithms. Algorithms are a description of the steps one takes to solve a problem; a
maze solving algorithm is just the rules that the robot will follow to solve the maze,
once you have translated it into code. However this activity does not include a
programming tutorial. If you don't have any programming experience, you might want
to try the Getting Started activity first, as it includes step-by-step instructions for
programming the RoboMind robot.
2.4.2Working Principle
These algorithms are based on the obstacle detection. In these algorithms when
the robot will find an obstacle in front of it, at sides or at the backside, it will turn and
find the other path where no obstacle is present. By wandering around the maze, using
this method it will find the end of the maze. In solving the maze, robot may or may not
visit a path which it has already visited.
This research paper actually described the following techniques of maze solving:
The Random Mouse algorithm is just what it sounds like: it's the way a mouse
would solve a maze. The Random Mouse algorithm is just wandering around the maze,
hoping you find the end. It was quite time wasting technique. The figure mentioned
below gives the best explanation of random mouse algorithm.
in circles or missing passages in braid Mazes.) If walking down a passage you have
visited before (i.e. marked once) and you encounter a junction, take any new passage if
one is available and otherwise take an old passage (i.e. one you've marked once). All
passages will either be empty, meaning you haven't visited it yet, marked once, meaning
you've gone down it exactly once, or marked twice, meaning you've gone down it and
were forced to backtrack in the opposite direction. When you finally reach the solution,
paths marked exactly once will indicate a direct way back to the start. If the Maze has no
solution, you'll find yourself back at the start with all passages marked twice.
2.4.3 Conclusion:
In my view these algorithms are best just for the initial learning and
building concepts about the maze solving techniques. But these algorithms are
not suitable for my project as these are quite time consuming algorithms.
Tremaux’s algorithm is the small application of A.I. but it is not the requirement
of my project.
2.5.1 Abstract:
This report is based around the robots involved in a MicroMouse competition,
that is, a robot which is able to search and solve a maze. This project will focus on the
design of such a robot, including the advantages and disadvantages of different robot
designs. It will also touch on methods for solving a maze, specifically focusing on a
real-time search, where the robot searches an unknown maze until it finds a goal. The
project also includes localization and mapping of the maze in real time.
180 degree laser sensor which is very precise. This became essential in the localization
and motion problem because as we would find out, its odometry is very poor. We also
lost some of the direct hardware control we would have had with the Explorer in moving
to the Pioneer which incorporates its own smoothing and trajectory to commands its
Player driver receives. There was fortunately a much smaller learning curve to working
with the Pioneer as we were already familiar with it from a previous assignment and
because it is a popular commercial product with many resources for help and
information.
2.5.3 Conclusion
The transition from a simulated model to real world testing is not a trivial one,
and exposes many factors which were not or could not be accounted for in the
simulation. The hard constraints of the real world mean that what is theoretically
possible and shown in a simulation may not be necessarily feasible to implement in
practice. The biggest challenge in our transition from simulation to the real world was of
that of accurate movement and localization. Due to the constraints of the Pioneer robot,
we solved the maze at a fairly low speed and did not do more advanced scanning of cells
to look ahead multiple positions as was possible in the simulation. The localization issue
was the biggest factor we had to deal with once we moved to the physical world. If this
problem were solved we could have much easier motion primitives and drift
compensation, have more precise and useful sensing and solved the maze at a higher
speed with essentially no risk of a collision. This project attempted to minimize the
difficulties of localization by leveraging the discrete structure of the maze, something
which did simplify the problem, but did not eliminate the problem of localization.
2.6.1 Abstract
This paper “MAZE SOLVING ROBOT USING ARDUINO AND LSRB
ALGORITHM” deals with the development maze robot using simple circuits. A MSR (maze
solving robot) is a clever little gadget with a silicon brain that finds its way through an
arbitrary maze. It competes against other members of its species, racing as fast as it can. Here
MSR is an electro-mechanical device, typically consisting of three main subsystems. They are
drive system, an array of sensors, and the control system. The drive system consists of a
mechanical chassis, a set of motors, gears and wheels. The chassis is usually designed
to operate like a wheel-chair, with two large drive wheels on either side of a
lightweight aluminum frame. The chassis is built to house the motors, gear system, batteries,
and circuitry, and must also be small enough to maneuver within the constraints of the maze.
The control system is series of circuit boards functioning as the brain of the critter. The control
system runs a maze solving algorithm (LSRB) based on the information received by the
CPU (ARDUINO BOARD) from the sensors. Typically the first several runs through the
maze will be a search sequence, in which the mouse learns the maze and stores it in memory. It
must then calculate the fastest possible path, which it will repeatedly run trying to achieve
successively faster times. The final sub-system is the sensors. They report to the CPU the
current state of the surroundings where the walls and paths are. These are usually either
infrared sensor which picks up light reflected light of the track. The main objective is to
achieve the fastest maze running time and easily find the goal.
2.6.2 Conclusion
Maze-solving involves Control Engineering and Artificial Intelligence. Using a good
algorithm can achieve the high efficiency of finding the shortest path. The proposed maze-
solving algorithm works better and has short searching time and low space complexity, and it
is significant for robot’s finding path in some areas like maze-solving.
Chapter # 3
Methodology
Chapter # 4
Mechanical Design
4.1.1.1.1Design strengths
1- High strength-to-weight ratio
2- High stiffness-to-weight ratio
3- High electrical and thermal conductivity
4- Easy to shape
5- Easy to recycle
4.2 Fabrication
For fabrication of our project we used a private workshop. Workshop provides us
with powered tools and guidance for completing our design of base of our robot. We have
also used the Lathe for the preparing of bushes for barring, Cylindrical Grinder for
smoothing purposes and some hand tools for the opening and fitting the parts of
mechanical in case of any fault during troubleshooting.
Acceleration required =?
Weight of wheels = 4.9N
As our maze is horizontal, so the reaction of cart and normal are perpendicular to each
other..
W = m*g* sinѲ
W = m*g* sin90°
W = m*g*1
W = m*g
Tgravitational = 10.5 kg * 9.8
= 102.9 Nm
Ѳ = 90
so
Fr = Cr*N*cosѲ
Fr = 0, as cos90° = 0
Now, we can say that in the case of wheel the frictional force is almost negligible as shown
in the calculations above
V = 0.21875 * 60 m/minute
V = 13.125 m/minute
ω = 13.125/r
ω = 13.125/0.0501975 m
ω = 261.46 rpm
The speed is now within our range and we can control it;
α=(ωf- ωt)/t
=16.3417m/min2
Now,
Stotal = S1 + S2 + S3
By putting values
Stotal = a*ta(tc-ta)
P = m*a*v
P = 6.60 Watts
This is the power which our robot requires only for travel. This amount of power
does not include the electrical power losses and power dissipation in stop and pause during
the motion. This is the power which robot consume during the continuous motion.
The dimensions for a socket and spigot cotter joint may be obtained by
considering the various modes of failure as discussed below:
= 12.5 mm
Figure
Figure 4.5: 9 Failure
10
FailureFailureofofspigot
of spigotspigot
inintension
intension
tension11
= 2.4 mm
= 11.1 mm
= 23.4 mm 7
Failure of socket end in shearing:
A = p/(d * τ) = 6.1 mm
As τ = 266.4 nm
P = τ / diameter of sprocket = 55.76 k pa. Σt = σc = 265.780 pa (calculated same as
above)
Chapter # 5
Electronic Circuitry
This circuit includes ARDUINO kit, IR Proximity sensors, LDR based analog color
sensors and LDR based line tracking sensors. The complete working and theory of the
circuit has been discussed in this chapter.
5.2.1 Working
It shines a beam of IR light from an LED, and measures the intensity of light that is
bounced pack using a phototransistor. If you stare at the sensor, you can see one of the
LEDs glowing slightly red as some of the IR falls into the visible-light spectrum.
Circuit Working
For the color and line tracking sensors we have used the LDR module.
5.3.1 Working
As the light dependent resistors gives the different ranges of voltages at output
according to the intensity of light. We know that the different colors of lights have the
different intensity then the LDR will give us the different ranges of voltages across the
green, red and yellow.
5.4.2.1 Advantages
Chapter # 6
Embedded System
6.2.1 Power
1- The ARDUINO Mega can be powered via the USB connection or with an external
power supply. The power source is selected automatically. External (non-USB)
power can come either from an AC-to-DC adapter or battery.
2- The board can operate on an external supply of 6 to 20 volts. If supplied with less
than 7V, however the 5V pin may supply less than five volts and the board may be
unstable. If using more than 12V, voltage regulator may overheat and damage the
board. The recommended range is 7 to 12 volts.
6.2.2 Memory
The AT mega 1280 has 128 KB of flash memory for storing code of which 4 KB
is used for the bootloader (A Bootloader is the first program which executes before the
main program) whenever a system is initialized), 8 KB of SRAM and 4 KB of EEPROM
6.2.4 ADC
1- 10-bit Resolution
2- 13μs - 260μs Conversion Time
3- 14 Differential input channels
2- Where VIN is the voltage on the selected input pin and VREF the selected voltage
differential channels are used, the result is
6.2.6 Programming
1- The ARDUINO Mega can be programmed with the AURDUINO software.
2- The ATmega1280 on the AURDUINO Mega comes pre-burned with a boot loader
that allows you to upload new code to it without the use of an external hardware
programmer.
3- You can also bypass the boot loader and program the microcontroller..
6.3.1 Examples
6.3.1.1 To turn on LED
void setup() {
pinMode(2,OUTPUT);
digitalWrite(2,HIGH);
delay(1000);
digitalWrite(2,LOW);
}
void loop()
{}
digitalWrite(4,HIGH);
delay(1000);
digitalWrite(4,LOW);
}
void loop()
{}
Chapter # 7
Control Circuitry
For loop 2:
By KVL;
Tm(s) in terms of θm(s) if we are to separate the input and output variables and
obtain the transfer function, θm(s)/Ea(s).
Jm = inertia at the armature and includes both the armature inertia and, the load
inertia reflected to the armature.
Dm = viscous damping at the armature and includes both the armature viscous
damping and, the load viscous damping reflected to the armature.
By simplifying we get
--------------------------
0.485 Ra S2 + Kb Kt S
Since this is the irregular equation and we have to convert it into the regular
equation this can be done by using the MATLAB commands of Partial Fraction.
University Of Engineering and Technology, Taxila (Sub Campus Chakwal) Page 53
Maze Solving Autonomous Vehicle
Chapter # 08
Mechatronics System
8.1.3 Computers
Computers are used to control the Mechatronics system. These are the sources of
code generations, HMI control and many other things such as motion cards and drives
etc.
8.5.10 Fabrication
After testing all the systems are ready to be fabricated and assembled. We
performed the machining processes required and our project is ready for testing.
Future Work
There are many possible directions from which future work could proceed from
this project. While we were able to successfully solve a maze in simulation and in the real
world, there are many improvements that could be made in order to correct for drift, be
able to solve a larger or more complex maze, or utilize multiple robots to solve a maze in
parallel. The drift accumulated throughout the experiments was by far the biggest factor
keeping the robot from solving the maze in any given trial. One possible improvement to
compensate for the drift could be an improved rotation primitive. Such a function could
act similar to the previous one in that it will rotate as near to 90 degrees as possible, but
would improve upon it by using laser 6 readings in order to position itself more precisely
to 90 degrees. By making small rotations and observing the left and right wall distances
the function could look for a local minimum in the wall distance on both sides, which
should be the situation in which the robot is aligned perfectly parallel to its side walls. In
this way very accurate 90 degree turns should be possible, even in the case where the
robot has undershot or overshot forward motion, or has a slightly incorrect orientation
prior to the rotation. Another motion improvement could take place in the forward motion
function. By determining the number of cells to either side of the robot using the laser,
the forward movement could be compensated with a small angle to keep the distance on
either side of ratios of cell sizes. We implemented a simple version of this which would
apply compensation when the robot is following a wall to either side, but a version of the
function as described above may have superior results. Given slow enough velocities
such a method should be able to keep the robot nearly perfectly aligned in the center of a
maze cell. Implementing this in addition to the improved turn function described above is
expected to solve much of the drift error and localization issues which we struggled with.
Implementing better search algorithms could be a major advantage especially in situation
where time is a major cost. The easiest way to increase the data available to the search
algorithms can be done by scanning the walls of the cells that the robot may not have
visited yet lie in the range scanning range of the SICK lasers. This can save us the time of
having the robot explore some cells, and allows it to make better informed decisions
during the course of the search. The more information that can be plotted by the robot,
the more effective the searching can be done. The search algorithm can also be enhanced
by making it enough to detect and avoid getting into areas which can by guarantee not
have the goal. One such situation is when the algorithm tries to get the robot to search
into an area which is surrounded by all four sides by scanned cells and the goal lies
outside it. By that we can know that there is no path that escapes out of this area to the
goal and thus can be avoided. Given that the robot knows the dimensions of the maze, a
segmentation algorithm could be very effective - avoiding many possible routes by
attempting to segment off the goal location from the majority of the maze recursively.
Apart from that, though the use of SICK lasers has been highly beneficial, using a
different and better suited-for-the-task mechanical design than that of the
Pioneer can definitely be looked into. Research can also be done on using motors that
would be have a higher accuracy and are still capable of high velocities. One of the
possibilities would be using the Explorer instead of the Pioneer. After implementing
sensing on an Explorer, it could be an exciting platform for maze solving problems. Due
to its size it would be simpler to implement and test large maze structures then with a
Pioneer robot. Because of the smaller mass of the Pioneer, it could make a high velocity
search of a maze structure more feasible without risking damage to the robot or the
environment from accidental collisions. Due to the onboard wireless communication
capabilities, the Explorer could be well suited for multi-agent maze search problems as
well. One very interesting prospect for research would be decreasing the cell size in the
maze and relaxing some of the other experimental constraints until this problem is similar
to common SLAM problems being looked at. Theoretically speaking, as the cell size
reaches zero, the problem opens up into full-scale SLAM. The same or similar techniques
as we used for the maze solving could then be applied to the SLAM problem to see what
their effectiveness is versus standard SLAM techniques.
Conclusion
Material handling is the backbone of any kind of industrial operation. The
efficiency of an industrial operation can be increased by reducing the time spent on
material handling rather than machining time as it is 80% to 90% of the total time. We
have tried to reduce the handling time by automating the process of material delivery or
taking the waste material away from the manufacturing site. Further, the vehicle we have
designed is capable of following traffic signals located in an industry or on a road. In
industrial applications zone detection is also an important task for an automated guided
vehicle, which helps in prevention of more than required number of vehicles in a specific
area and also prevents collisions between vehicles. If we have such area in the path where
there are no specific boundaries but a line on floor than the robot can find the path back
to track following that line, this also enables the robot to come back to its defined track in
case it gets out of the track given.
There are certain limitations in our robot because of the rules described by the
NERC. If we have to design the same kind of robot without any rules described we can
make many innovation in maze solving techniques and also the in the method of
unloading. One could use the latest technologies available like GPS for finding the paths
accurately and could also view the position of the vehicle via mobile application. Loading
of material in vehicle can also be automated with the help of a robotic arm.
Appendix
Source Code
The program burned in Aurdino kit for different paths, signals and unloading is as
follow:
////////////////////////////////////////////////////////////////////////////////////////
int frs,fls,bls,brs,fs,ap,bp,cp;
int rmf=22; // right motor forward direction if this is high
int rmb=24; // right motor backward direction if this is high
int lmf=26; // left motor forward direction if this is high
int lmb=28; // left motor backward direction if this is high
int rmm=30; // ball throwing from right pipe
int lmm=32; // ball throwing from left pipe
const int buttonPin = 34; // line tracking sensor input
double start=1,c1=0,b1=0,b2=1,b3=0; // different variables use
int buttonState = 0;
void setup()
{
Serial.begin(9600);
pinMode(rmf, OUTPUT); // setting as output
pinMode(rmb, OUTPUT);
pinMode(lmf, OUTPUT);
pinMode(lmb, OUTPUT);
pinMode(lmm, OUTPUT);
pinMode(rmm, OUTPUT);
pinMode(buttonPin, INPUT); // setting as input
void loop()
{
//////////////////////////////////
// for stopping on red signal
if (buttonState == HIGH && start==0) {
stopp();
bp = analogRead(A6)* 10*(5.0 / 1023.0);
while(bp>2)
{
bp = analogRead(A6)* 10*(5.0 / 1023.0);
}
}
///////////////////////////////////////////
////////////////////////////////////////////////
//for c path
if(fs==14 && path=3)
{
left();
delay(1250);
fs = analogRead(A4)* 10*(5.0 / 1023.0);
for (;fs!=19;)
{
forward();
fs = analogRead(A4)* 10*(5.0 / 1023.0);
}
brs = analogRead(A2)* 10*(5.0 / 1023.0);
for (;brs!=12;)
{
left();
brs = analogRead(A2)* 10*(5.0 / 1023.0);
}
path=0;
c1=1;
}
//for b path
if(fls>8 && bls>8 && b2==1 && path==2)
{
b1=1;
b2=0;
path=0;
}
}
forward();
delay(500);
b1=0;
b3=1;
digitalWrite(rmb, LOW);
digitalWrite(lmf, LOW);
digitalWrite(lmb, HIGH);
}
// function for spining clockwise
long right()
{
digitalWrite(rmf, LOW);
digitalWrite(rmb, HIGH);
digitalWrite(lmf, HIGH);
digitalWrite(lmb, LOW);
}
// stopp function
long stopp()
{
digitalWrite(rmf, LOW);
digitalWrite(rmb, LOW);
digitalWrite(lmf, LOW);
digitalWrite(lmb, LOW);
}
// function for backward moving
long back()
{
digitalWrite(rmf, LOW);
digitalWrite(rmb, HIGH);
digitalWrite(lmf, LOW);
digitalWrite(lmb, HIGH);
}
// function right turn
long right1()
{
digitalWrite(rmf, HIGH);
digitalWrite(rmb, LOW);
delay(10);
digitalWrite(rmf, LOW);
digitalWrite(rmb, LOW);
delay(55);
digitalWrite(lmf, HIGH);
digitalWrite(lmb, LOW);
}
// function left turn
long left1()
{
digitalWrite(rmf, HIGH);
digitalWrite(rmb, LOW);
digitalWrite(lmf, HIGH);
digitalWrite(lmb, LOW);
delay(10);
digitalWrite(lmf, LOW);
digitalWrite(lmb, LOW);
delay(55);
References
[1] Research Kitchen, Freshbrain, Hill Air Force Base
[2] Ronald C. Arkin; Behaviour-Based Robotics, the MIT Press, Cambridge, 1998
[3] G W. Lucas; A Tutorial and Elementary Trajectory Model for the Differential
Steering System of Robot Wheel Actuators, The Rossum Project, 2001
[4] J S. Wit; Vector Pursuit Path Tracking for Autonomous Ground vehicles, Ph.D
thesis, University of Florida, 2000
[5] T. Hellström; Autonomous Navigation for Forest Machines, Department of
Computing Science, Umeå University, Umeå Sweden, 2002
[6] R C. Coulter; Implementation of the Pure Pursuit Path Tracking Algorithm,
Robotics Institute, Carnegie Mellon University, January, 1992
[7] G. Dudek, M. Jenkin; Computational Principles of Mobile Robotics, Cambridge
University Press, New York, 2000
[8] Pressman, Roger S [1994]; “History of Automated Guided Vehicles", Second
Edition John Wiley & Sons Inc., 605 Third Avenue, New York.
[9] Automated Guided Vehicles, Applications [1990], Second Edition, Research and
Technology Development Center, John Hopkins University.
[10] Automated Guided Vehicles, An introduction and History
Safety Practices for Automated Guided Vehicles (AGVs), [2001], MIT Press.
[11] Pulse Width Modulation, Working and types, D. Murray and C. Jennings,
“Stereo vision based mapping and navigation for mobile robots,” in Proceedings of
the 1997 IEEE Conference on Robotics and Automation, 1997, pp. 1694–1699.
[12] S. Thrun and A. Bucken, “Learning maps for indoor mobile robot navigation,”
Artificial Intelligence, vol. 99, pp. 21–71, 1998.
[13] S. Thrun, A. Bucken, W. Burgard, D. Fox, T. Frohlinghaus, D. Hennig, T.
Hofmann, M. Krell, and T. Schmidt, Map learning and high-speed navigation in
RHINO. Cambridge, MA, USA: MIT Press, 1998.
[14] J. del R. Millan, The Handbook of Brain Theory and Neural Networks, 2nd ed.
MIT Press, 2002.
[15] H. Durrant-Whyte and T. Bailey, “Simultaneous localisation and mapping
(slam): Part i the essential algorithms,” Robotics and Automation Magazine, June
2006.