GPS Guided Autonomous Rover
GPS Guided Autonomous Rover
GPS Guided Autonomous Rover
ELEN3017
1
Table 1: Issued components and relevant ratings Table 2: Tested load characteristics of rover under normal
conditions.
Components Relevant
Ratings Component Voltage(V) Load Load
Current(A) Power
2 Continuous Rotation Servo 6V (W)
Motors Arduino 5.0 80m 0.4
1 Battery pack 6V 2.8Ah GPS 3.3 40m 0.13
50 300mm Perspex sheet N/A Servos 6.0 190m 1.14
2 Rubber/plastic wheels (not 9cm diameter Rover in motion 6.0 360m 2.16
issued) (under no load)
1 Track ball (not issued) N/A Rover in motion 6.0 420m 2.52
(under load)
3. DESIGN APPROACH Load currents are tested using a DC power supply and
reading off the current drawn. These test results show that
3.1. General Design Approach
the rover requires at least a 6V supply at <1Amp.
When comparing the constraints and requirements of the
3.3. Servo Motors
design the following two options for the drive mechanism
of the rover are presented. One way is to use a single Two FS5109R standard continuous rotation servos are
continuous rotation servo to produce the driving force used to drive and steer the rover. A PWM signal
acting on the rear axle of the rover and to use a 0-180 generated by the microprocessor controls the angle of
semi rotational servo to direct the front wheel which rotation. Since our servos are continuous rotation, the
controls the direction. Another way is to use two angle is used to determine the wheel direction once off,
continuous rotation servos to drive each wheel i.e. forwards or backwards. The servos continue to rotate
independently. This would allow us to turn on our axis by until a new command is given as they do not contain a
rotating the wheels in opposite directions. The latter limiting potentiometer. In order to turn the rover, the
option became the chosen one as the rover needs to make servos must be set to rotate the wheels in opposite
immediate turns when advancing passed coordinates. directions. The duty cycle of the PWM determines the
direction of the rotation of the servos and the frequency
The choice of the microprocessor used is dependent on a
determines the speed of rotation. Our frequency is set in
number of factors. The microprocessor must contain
order to get maximum speed of rotation while still
enough memory to house our entire code. The processing
providing enough torque to carry the battery pay load.
speed must be enough to calculate in real time before the
This frequency is set to be 333.3 Hz rated at the
rover crosses the next point. The micro must contain
maximum our plastic gears can handle. The normal
enough input/output pins so that the GPS and servo
operational frequency is between 50-60 Hz [4]. The
motors can be connected.
rovers speed is noticeably faster.
The Arduino ATMega328 fits all this criteria and is
Table 3: Servo Motor Ratings from datasheet
readily available at most electronic suppliers. The
sketch is coded in c providing an easier platform than
Components Ratings Ratings
PICs requiring assembly or mipps.
2
Different sets of wheels are tried and tested until the load the Arduino in order to receive the desired data. Once this
on the servos is minimised and the speed of the rover is data is received we can use string manipulation to extract
maximised. A final wheel of diameter 9cm is chosen. The the latitude and longitude. Checks need to be performed
wheels are taken from an old Mecano/Lego set and are in order to make sure data is being received else the
fixed in place using rods. Glue is used to secure these information is insufficient.
rods. A table of varying size wheels and their respective
speed is shown below. The GPS module takes roughly 30 seconds to begin
receiving information and therefore initial loops need to
Table 4: Wheel diameter and resultant speed/time be put in place to prevent the rover from moving forward
before this information is received. The Latitude and
diameter Perimeter Rotations Time to longitude are displayed with five decimal places in order
per meter cover a meter to depict an accuracy of 1.1 meters [6]. The accuracy
(sec/meter) during final tests was less than this and caused minor path
4cm 12.5cm 8 7.68 variations for this rover. With a larger antenna and the
6cm 18.85cm 5.3 5.08 storage of latitude and longitude in integer format as
9cm 28.27cm 3.53 3.39 opposed to floats, we can reduce this error significantly.
There was not enough time to incorporate this fix in the
Speed is the Inverse of the time taken to cover a meter. code and hence the error was relatively high. The GPS
output can be found in Appendix B.
3.5. The Chassis
3
protruding from the rear of the rover prevents the rover 7. RESULTS
from toppling backwards if the weight is shifted
drastically. 7.1. Test day
The wheels need to be perfectly aligned as a slight degree Assumptions are made for the testing of the rover: the
of inaccuracy can cause a large change in direction when course is assumed to be smooth, the GPS module would
travelling over large distances. This takes copious trials constantly provide accurate information and that the
and error. Additionally the servos can be tweaked by power supply would be constant. This is an ideal case.
altering their variable resistors; this can slow down a During testing however these factors come into play and
servo independently allowing the rover to tend towards a cause variations in the results. The rover completed the
certain direction. This is used for correction of alignment course but overshot one or two vertices on occasion. The
and compensation of independent speed inaccuracy. speed and direction was hindered by the uneven surface
which caused the rover to veer off the path towards the
end. After much initial tests prior to the demonstration,
the battery output voltage was lower than its initial value
6. PATH FINDING ALGORITHM and the rover had to be connected directly to a PC in
order to provide enough current for all the components.
The path finding algorithm is initially drafted in sudo The rover did manage to complete the entire path at a
code to get a better understanding of the objective relatively fast pace with all the constraints adhered to.
required. The code is then simulated in Matlab which
provides a visual representation of the calculated angles
and their respective paths. These simulated results can be
seen in Appendix C. Once the algorithm is tried and 8. IMPROVEMENTS
tested on Matlab, it is then coded in c and used on the
Arduino to output the required results. The rovers improvements can be made in the form of
additional sensors such as sonar or a gyroscope. The
The algorithm begins with finding the direction required sonar sensor can measure the distance to an object in its
for the rover to move. This can only be done with two sets path and hence trigger an object avoidance algorithm. An
of reference coordinates. Thus the rover must move example of this algorithm is shown in Appendix D. The
forward initially to retrieve these two sets of coordinates. gyroscope can be used to measure the angle of rotation.
The coordinates are passed to a function that calculates This would be preferable as the current design requires
the angle of movement and the rover is rotated the rover to move forward and retrieve new coordinates
accordingly. The rover must continuously loop through and hence calculate its angle.
this set of instructions until the desired point is reached.
The rover then checks for the next vertices and re- The rover build quality was of high standard but the
evaluates its position. uneven surface can cause undesired results. The rover can
be built with a wider base and thicker tires to absorb
bumps in the track.
9. CONCLUSION
A GPS guided autonomous rover was designed, constructed and tested. The system followed a strict set of constraints
with regards to the structure of the Rover as well as the implementation. The employed system autonomously navigates
its way through a path set out in GPS coordinates powered by a single 6.3V battery pack. The accuracy of the GPS
module was questioned and the desired outcome was hindered. The algorithm that was initially drafted in Matlab did
not function as well as expected when converted to c, but the overall construction and implementation produced the
required result. This project is a prime example of an intelligent autonomous vehicle.
4
REFERENCES
Appendix A
5
Figures 4: Rear View of Rover
Appendix B
Appendix C
General order
Initialisation
Find goal
drive forward
determine "direction"
goalFind = 0
Running
turn & drive
if goalFind = 1
find goal + 1
goalFind =0
end
acquire position
check angle
check if success
if success
goal = goal + 1
goalFind = 1
end
7
Figure 3: Visual Matlab Map Simulation
MATLAB code:
clc;
%close all;
%clear all;
longPath = longP;
latPath = latP;
longA = longVert(1,1);
latA = latVert(1,1);
longB = longVert(1,2);
latB = latVert(1,2);
longC = longVert(1,3);
8
latC = latVert(1,3);
longD = longVert(1,4);
latD = latVert(1,4);
vertN = 5;
vertM = size(longVert) + 1;
evalResponse = input('prompt');
while vertN < vertM(1,2)
longA = longC;
latA = latC;
longC = longD;
latC = latD;
longD = longVert(1,vertN);
latD = latVert(1,vertN);
vertN = vertN + 1;
longP = longG;
latP = latG;
longP = longG;
latP = latG;
longA = longC;
latA = latC;
longC = longD;
latC = latD;
9
longABC = [longA, longB, longC , longA];
latABC = [latA , latB , latC , latA ];
longPC = [longP, longC];
latPC = [latP , latC ];
longPD = [longP, longD];
latPD = [latP , latD ];
Appendix D
Appendix E
10