|
General Synopsis:
The Global Positioning System (GPS) is a network of satellites
orbiting the planet. Each of these satellites transmits a constant signal
containing accurate time stamps and other data to GPS receiving units.
Receiver units take the signals from at least four satellites to determine
through mathematical equations the exact location of the receiver on the
planet. GPS receiving units can be very accurate in measurements and
generally have an accuracy of five to fifteen feet. GPS units retail in
cost from under 100 dollars for very simple receiving units into the
thousands of dollars for more complicated and accurate units.
GPS receivers output the data that
they receive and interpret into location data via a standard serial
communications protocol called RS232. This serial data line can be hooked
to a number of things one of these being the Parallax Basic Stamp micro
controller. The Parallax Basic Stamp can receive this data and be
programmed to retain certain parts of the data for use.
My project consisted of using a Garmin brand GPS receiver unit
called an ETrex. The Etrex is
a very small handheld unit produced by Garmin and generally retailing just
under $100. With a custom Garmin cable the unit was connected to the
Parallax Basic Stamp II, which was programmed to receive two specific
pieces of data from the twelve sentences of data the ETrex was
transmitting to the Stamp. Each sentence starts with a specific ID name,
the two sentences that the stamp was programmed to look for are $GPRMC and
$GPRMB. Commas in the sentences separate each piece of data. The data
consists of pieces of information such as current latitude, longitude,
current heading and many other pieces of information.
Waypoints are a vital part of the system; a waypoint is stored
place in the GPS unit. Generally the unit has to have been to a particular
place to set a waypoint, while the unit is at a location the user chooses
to select a location as a waypoint. The stored waypoints can be turned
into a Route in the unit. The user selects the sequence in which the
waypoints will be followed. The waypoints may be half way across the globe
or ten feet away.
My Project:
My goal for class was to use a remote controlled truck (I chose to
use the electric version of the truck for simplicity at this point) and
have it guided from waypoint to waypoint with guidance from the ETrex
summit GPS unit attached to its back. To make this happen I combined a
Parallax Basic Stamp II, an add-on control board to simplify use of hobby
servos to control the truck, a remote control system including receiver,
ETrex Summit GPS unit, and a number of relays .
The system was setup so that I had to go to the various places I
wanted setup for waypoints and set them in the GPS. I could then choose a
route for the GPS to follow and give control to the Basic Stamp II and it
would steer the truck to the approximate location. This is a very
simplified explanation of the process. Now lets get a little more
technical.
A Futaba brand radio system was used to control the truck along
with an MOSFET electronic speed control. The battery used to drive the
motor for truck propulsion is a 7.2 Volt DC motor. The electronic speed
control is controlled through the Futaba radio receiver, which outputs a
pulse to control the speed control. All hobby motors and servos (servos
are geared motors used to move control surfaces on model airplane and
steer wheels on R/C trucks) are controlled using a system called pulse
width modulation, simply put it is the length of time between pulses of
electricity coming from the radio receiver. These are not long pulses and
are generally measured in milliseconds.
The truck itself is an older version of a truck called a
Sledgehammer manufactured by Traxxas.
It is modeled after today’s monster trucks and is ideally suited
to carry the extra weight of batteries and GPS unit while still trudging
through the grass.
The Parallax Basic Stamp II is the brain of the outfit, it receives
the information from the GPS, which consists of all twelve sentences but
wades through all that information and stores two pieces of information.
Those two pieces of information are the GPS unit’s true heading and the
true heading to a waypoint. The Stamp takes those two pieces of
information and compares them to each other, if the true heading is
greater the heading to the waypoint then the Stamp tells the servo
controller to turn to the right until it receives another piece of
information from the GPS that the true heading is less then the heading to
waypoint and it turns back left.
This system is very simplistic at this point and leaves vast
amounts of room for programming. A large part of the programming would be
to change the severity of the turn depending on how off far course the
truck is heading.
The control system uses the extra channel on the transmitter, which
for model airplanes is reserved for landing gear. It is has been
configured to toggle a switch which triggers nine volts to a set of
relays, each relay has a servo signal line. On the common of the relay is
the signal to the servo, on the normally closed pin is the signal coming
from the transmitter. This is done so that if there is a malfunction with
the relays control can be taken back and the truck guided to safety. The
normally open or closed pin when the relay is activated is the signal
coming from the servo controller, which is linked to the stamp.
The stamp is always running it’s program and sending signals to
the servo controller it is just a matter of which way the relays are
tripped at the time.
Future:
At this point in development the truck program simply turns
left or right depending upon heading. One major setback at this point is
the speed of the Stamp II, it only processes data once every two seconds,
in two seconds the truck can turn almost a full 360 degrees on pavement.
One major improvement would be to upgrade speed and get to once every
second, which is how often the GPS unit sends out data. A larger motor,
which would have more torque and fewer problems with overheating with this
large a load would also be wise. |