Docstoc

Tailgate Buddy

Document Sample
Tailgate Buddy Powered By Docstoc
					Tailgate Buddy

  Group 11




 Greg Koeppen, John Fuoco, John Maskasky,

 Ken Kauffman


 12/8/2008
Introduction                      2
  Executive Summary               2
  Project Motivation              2
  Applications                    4

Definition                        6
  Goals                           6
  Specifications                  6
  Requirements                    8
    Motors and Drivetrain         8
    Tracking System               8
    Chassis                       9
    Obstacle Avoidance            9
    Power Supply                  12
    Electronic Speed Controller   13
    RC Tx/Rx                      13
    Software                      13
    GPS                           14
    Water Gun                     14
    Master Microcontroller        15

Research                          17
  Tracking System                 17
  Obstacle Avoidance              19
  GPS                             23
  Motor/Drivetrain                32
  Power Supply                    35
  Radio Control                   36
  Master Microcontroller          38
  Software                        39
  Electronic Speed Controller     39
  Chassis                         42
  Water Gun                       44

                                   ii
Design                           46
 Design Summary                  46
 Block Diagrams                  47
 Subsystems                      49
   Tracking System Design        51
   Obstacle Avoidance Overview   54
   GPS                           64
   Master Microcontroller        68
   Software                      70
   Motor/Drivetrain              71
   Power Supply                  72
   Electronic Speed Controller   74
   RC Tx/Rx                      74
   Chassis                       76
   Water Gun                     77

Prototype                        80
 Procurement                     80
 Building Methods                80
 Subsystems                      81
   Motors and Drivetrain         81
   Power Supply                  82
   Electronic Speed Controller   83
   RC Tx/Rx                      84
   Water Gun                     85
 Final Build                     86

Testing                          89
 Parts                           89
 Subsystems                      90
   Chassis                       90
   Tracking System               90
   GPS                           97

                                 iii
    Motors and Drivetrain          98
    Power Supply                   99
    Electronic Speed Controller   100
    Obstacle Avoidance            101
    RC Tx/Rx                      110
    Complete Drive System         110
    Water Gun                     112
  Entire System                   113
    Testing Environments          116

Administrative Details            120
  Budget                          120
  Timeline                        122

Appendices                        123
  Copyright permissions           123
  Data-Sheets                     123




                                   iv
List of Figures
Figure 1 Obstacle Avoidance Detection Cone .................................................... 11
Figure 2 Detection Patterns ................................................................................ 21
Figure 3 Receiver Detection Patterns ................................................................. 22
Figure 4 PIC16F819 Pin Diagram....................................................................... 26
Figure 5 ZX4120 GPS Module............................................................................ 30
Figure 6 Secure Digital (SD) Memory Card ........................................................ 31
Figure 7 Antenna Socket (LEFT), GPS Antenna (RIGHT) .................................. 31
Figure 8 Photo of Futaba Skysport 3 AM Radio ................................................. 37
Figure 9 Photo of RoboteQ ax1500 motor controller .......................................... 41
Figure 10 Broken Tie Rods ................................................................................. 43
Figure 11 Approximate Location of Subsystems ................................................ 47
Figure 12 Inputs – Outputs Block Diagram ......................................................... 48
Figure 13 Microcontroller Block Diagram ............................................................ 49
Figure 14 Software Block Diagram ..................................................................... 49
Figure 15 Pulsed Circuit ..................................................................................... 52
Figure 16 Detection Cone ................................................................................... 53
Figure 17 Obstacle Avoidance Detection Cone .................................................. 55
Figure 18 Ultrasonic Sensor Connection ............................................................ 60
Figure 19 RS232 Connection ............................................................................. 60
Figure 20 Obstacle Avoidance Blind Spots ........................................................ 61
Figure 21 Ultrasonic Sensor ............................................................................... 63
Figure 22 PCB for GPS Unit ............................................................................... 65
Figure 23 GPS Unit Circuit Diagram ................................................................... 67
Figure 24 Master Microcontroller Schematic ...................................................... 69
Figure 25 Example of How to Launch GPS Parser Utility ................................... 71
Figure 26 - 12 Volt 9.5 Ah Rechargeable Battery ............................................... 73
Figure 27 - 12 Volt Quick Charger ...................................................................... 73
Figure 28 Basic Wiring Schematic ...................................................................... 76
Figure 29 RC Wiring Block Diagram ................................................................... 76
Figure 30 Basic Washer Pump System .............................................................. 78

                                                                                                               v
Figure 31 Basic Layout of Components.............................................................. 88
Figure 32 Photodiode Angular Sensitivity ........................................................... 96
Figure 33 IR LED Angular Sensitivity ................................................................. 97
Figure 34 Obstacle Avoidance Testing Areas................................................... 102
Figure 35 Side Sensors Viewing Angles ........................................................... 105
Figure 36 Forward Facing Sensor .................................................................... 107



List of Tables
Table 1 Specifications .......................................................................................... 7
Table 2 GPS Hardware List ................................................................................ 24
Table 3 Sample GGA Data ................................................................................. 27
Table 4 Sample GSA Data ................................................................................. 28
Table 5 Sample RMC Data ................................................................................. 29
Table 6 Sample GSV Data ................................................................................. 29
Table 7 Subsystem Legend ................................................................................ 47
Table 8 Tracking System Distance Test ............................................................. 92
Table 9 Test for Turning Response .................................................................... 93
Table 10 Expected Budget Cost ....................................................................... 121




                                                                                                                vi
Introduction

  Executive Summary
This document contains information on the Tailgate Buddy. The Tailgate Buddy
is an automated robot designed to track and follow the operator, or be controlled
directly by the operator. The Tailgate Buddy also is designed to carry a payload
of approximately 100 pounds. This will allow the operator to bring cargo along
with him or herself without having to carry it, leaving his or her hands free. The
motivation of the project is to make transporting cargo for long periods of time
easier. The objective of this project is to allow the operator to bring cargo over
long distances without having to carry, push, or pull it. Tailgate Buddy will allow
for easier tailgating at UCF, making lives easier of those who own the vehicle.

The technical approach to the tailgate buddy will be very modular. The entire
project is broken into several modules/subsystems and sub-modules, which
contain both software and hardware. Most of these subsystems will be
connected by a single master microcontroller. The subsystems which will be
connected by the master microcontroller are the ultrasonic sensors, the infrared
sensors, the water gun, the motor, drivetrain, and electronic speed controller, and
the RC control. The GPS module contains a separate microcontroller specifically
to parse data to a Secure Digital (SD) card. This data will be saved in a manner
that makes it easy for a graphical operator program to take the data and interface
with a mapping program to visually show the operator where he or she was that
day. This program will also be able to save the routes that get generated for
comparison purposes. It will also display the total distance traveled and the total
time of operation for that route.

An Algorithm needs to be developed to track the direction and distance to a
target that has an IR transponder. The algorithm will take this information and
tell the drive systems what they need to do to follow the operator as he or she
walks around.


  Project Motivation
One way for engineering design to start is to find a current problem for which
there is no solution. From this various ideas are thrown around to determine
different ways to solve this problem. The first thing that happens in this process
is a problem needs to be identified to be solved. The problem is not so simple,
when tailgating at the UCF campus for football games the best area is in Memory

                                                                                 2
Mall while the closest parking lot open for students is in front of the Visual arts
building. Carrying coolers and tents and chairs across this distance is not a fun
to do. This walk takes about 10 minutes without carrying anything so while
carrying all of the tailgating supplies it slows the trip down even more. After
some brainstorming in the group it was eventually agreed upon a single solution
that is believed to be the best solution to the problem. The solution that was
decided is best is an electronic mule; this is a robotic vehicle capable of hauling
approximately 100 to 150 pounds of gear it will follow the operator around
keeping within a certain distance of that operator. When the transponder and
robot are turned on the operator would be able walk and have the vehicle follow
within a 6 foot radius of the operator in an ideal case. It would also have features
like obstacle avoidance and GPS tracking. The GPS tracking would save data
points that would be able to once the operator got home be able to be uploaded
onto a mapping program and show precisely where the robot had been that day.
The vehicle would be able to avoid obstacles that were in the way and find a
route around them all while continuing to follow the operator. The primary use for
the vehicle would be to carry gear from your car to a tailgating site area some
distance away. And then at the conclusion of tailgating carry all that gear back to
your car.

The vehicle would need to be able to move at speeds that people would be
walking at and possible fast enough for a slow jog. The vehicle would also need
to have obstacle avoidance to avoid objects and be able to plot a course around
said obstacle to continue following the operator. The vehicle would need to be
able to traverse a semi off road terrain. Being able to climb over small obstacles,
grassy conditions all while maintaining stability of the load that is being carried. It
should be able to travel for about five to ten miles on a single charge or about 3
to 4 hours of operation to ensure that the operator would not have to then carry
the vehicle along with the payload back to the operator’s vehicle.

As an added bonus to having a robot carry your cooler and other tailgating gear
around another bonus feature that was decided to be added is a radio controlled
function in the vehicle in addition to its following mode. Since the entire
operation of the robot is being controlled via a Microcontroller it is relatively easy
to implement a radio controlled feature. This would be a nice feature to have if
for example, you are sitting in a chair and your friend fifty feet away would like
something out of the cooler so instead of getting up and giving it to him you just
grab the radio controller and drive the vehicle over to him. Then once he is
finished you drive the robot back over to yourself and enjoy an ice cold beverage
for a job well done.




                                                                                     3
  Applications
Although the vehicle is called “The Tailgate Buddy,” is made for the purpose of
having fun and is more of a novelty creation, it can also be used for many more
applications than just tailgating. The basic design of the vehicle is a robotic
wagon that follows the operator around while carrying a load. With a few simple
modifications the vehicle can be used for a variety of things. Simply changing a
few key design details, like overall size, motor and battery performance, wheel
size and type, the vehicle’s load capacity can change and be used for other
applications. It could be used for gardening and landscaping. Instead of pushing
a wheel barrow the operator could load the vehicle with tools, dirt, mulch, plants,
etc and instead of pushing these heavy loads long distances, they could walk to
the desired location and the vehicle would move the heavy load. This same
principal could be applied to construction. Most jobsites require a large amount
of tools and supplies. Usually this means workers must constantly move heavy
loads. Having a robotic hauler could prove to not only be easier for the workers
but also may prove to be safer for them as well. After construction finishes or a
major event is over there can be a daunting task of site cleanup. This vehicle
could make cleanup move a lot faster and require less workers. If scaled down a
little a vehicle like this may be used for work around the house. It could help with
everything from cleaning to household repairs. It may even prove beneficial for
traveling. It could be used in airports to carry heavy luggage from locations. The
list of uses is only limited by the imagination and the needs of potential users.

In some applications is may be helpful to have more than one vehicle following a
user at a time. If IR emitters are placed on the backs of vehicles they could be
placed inline like a train and be made to all follow the user. This could be helpful
in cases where vehicles that follow tracks or sensors in the ground could not be
used because the route that they must travel would change too often to keep
placing a tracking line in or on the ground. This would give freedom of movement
and versatility to situations that require a train-like vehicle but the path traveled is
rarely the same as it was for a previous trip. The primary tracked user may not
even need to be a person. It could be another vehicle that could either be driven
by a user or be a more advanced robot. This would leave the following vehicles
to be less advanced and cheaper vehicles and only the lead vehicle to be a more
advanced and expensive model. Another application could be underground
where GPS routed vehicles could not be used or in a place where GPS would not
be accurate enough to get to precise positions. This may be helpful in mining or
tunneling applications. Instead of taking time to lay down a track the vehicles
could immediately start hauling. The vehicle could be scaled up or down to meet
the demands of the user. They could be small vehicles the size of small RC cars
or as large as tanker ships. As long as all components of the vehicle are scaled
appropriately the vehicles should still operate properly. The design of the tracking

                                                                                      4
system is the key behind the project. The rest of the design is to suit the
application of tailgating. Take that all away and the vehicle can be reconfigured
to suit other needs. In this way the design of the robot is very modular and is
suited for use in many different fields of use.




                                                                               5
Definition
The Tailgate Buddy is made up of several different subsystems and various
components. The main subsystems are the chassis, motors and drivetrain,
obstacle avoidance system, power supply, electronic speed controller, master
microcontroller, RC system and the water gun. All of these systems have their
own purpose and specifications that will be discussed further in this section.


  Goals
The idea behind the goals is for the robot to accomplish its job of hauling a cooler
for the operator with little interaction from the operator besides unloading from
their vehicle. The first and foremost goal for the robot is for it to be able to
reliably follow the operator as he or she walks from one place to another. This
means the tracking system needs to robust enough to follow at a certain distance
from the operator, keep up in speed with the operator and be able to follow the
operator as he or she turns and walks in differing directions. If this does not work
well the vehicle will not be able to achieve its primary purpose and ultimately be
regarded by the group as a failure. The goal of the project would be to make the
vehicle as simply and cost efficient as possible, while still meeting all of the
design goals; speed, payload capacity, weight, range, etc.


  Specifications
The group decided upon the overall specification for the vehicle before going on
and detailing any other design goals or starting to research. Some of the original
specifications had to be modified from what information was found out during the
research but for the most part the specifications the group decided upon have not
changed drastically since the beginning of the project.            Some of the
specifications are based around the robot being relatively easy to transport the
around for an average person. While, other specifications are based upon what
was believed to be the maximum amount of travel or use a person would get out
of the robot while tailgating or using the device for a decent amount of time. All
of these specifications are well above what an average operator would use the
vehicle for during tailgating.

There are other specifications that have been agreed upon that are not quite that
easy to put into a quantified table. For the GPS mapping software it needs to be
as user friendly as possible while still retaining as many features as possible.
The Group will define user friendly in a few ways. Firstly, the user interface
visually appealing to the eye and are buttons laid out in a way that makes sense

                                                                                  6
to the average person. The group will consult the help of non engineering people
to see what they think of the layout when there is a preliminary version running.
It should be very easy to upload data from the robot to the mapping software; the
plan is to use a SD card to transfer the data. The program will have some
powerful features like being able to save routes traveled for comparison; it will
also be able to give total distance traveled and total time taken. For obstacle
avoidance the robot should be able to route itself around objects that are in the
way and still follow the operator. It should not run into any object that may be in
the way or come into the way while it is operating.

                                  Specifications

                   Size               Able to fit into a standard 4 door car

                  Speed                            Maximum 8mph

             Payload Capacity                       100 Pounds

                  Range                               5 Miles

       Average Following Distance                   5 to 7 Feet

        Max Distance to Operator             Greater Than 12 Feet

               Vehicle Cost                    500 to 700 Dollars

            GPS Logging Rate              Minimum 6 Times A Minute

             Weight of Vehicle                      50 to 70 lbs

             Water Resistance               Unaffected by Light Rain

            Water Gun Range                    Minimum of 5 feet

           Obstacle Avoidance          Should be Able to Avoid Obstacles

                  Terrain                   Fields and Parking Lots

                            Table 1 Specifications




                                                                                 7
  Requirements
In this section the various subsystems will be introduced and they will have their
primary purpose explained. Each subsystem will have its own requirements that
it needs to meet to be considered.


     Motors and Drivetrain
The drive system of the vehicle is very important as it must be built to move the
required load and perform the driving task well. The vehicle is slow moving, at a
max speed of just above a walking pace, so the drivetrain is not required to be
able to move the load fast. However it will be required to run for extended periods
of time and power the vehicle up gentle slopes and through grassy terrain. It also
has to be rugged enough to stand up to the tasks of carrying heavy coolers and
other tailgating necessities.

The drivetrain is quite simple. Its basic components are motors, gears and a
drive axle with wheels. The motors have to have the required torque and power
to propel the vehicle at full load and up gentle slopes without too much strain.
The gears transfer torque from the motor to the drive axle. They also provide
needed gear reduction to transfer the low torque, high speed rotation of the
motor to high torque and low speed drive axle rotation. The wheels need to be
large enough to be able to make it over small obstacles like sticks and to be able
to make it over transition points like when going from grass to a concrete
sidewalk that may be slightly raised. However they can’t be too large as to be too
hard for the motor to turn or lower the efficiency of the entire drive system.

     Tracking System
The tracking system might just be the most important system in the robot. It
takes the job of tracking the operator as her or she walks around. It feeds this
information to the microcontroller about where the robot needs to drive to follow
the operator. It will need to be able to follow the operator to a minimum distance
of twelve feet. The system will need to use a technology to track the operator
either radio frequency or optically or even using infrared radiation. The
technology that is used is not important what is important is that it is reliable and
will work in many different environments and in different weather conditions that
degrade the tracking ability.

The information that is transmitted will consist of two main things the direction
and the distance. Using code in the microcontroller it will take this information

                                                                                   8
and direct the vehicle where it needs to drive. The system is broken up into two
main subsystems are the transponder, and the Detector. The Transponder is a
small device that emits beacon that the Detector will receive and locate. With
these two systems working together the tracking system should be able to
reliably track the operator and pass the information on to the microcontroller to
steer the vehicle.


     Chassis
The there are several main purposes of the chassis with the design. First is that
it carries a payload. This is the main goal of the project to be able to carry a
heavy payload around without any effort from the operator. It should be able to
hold the payload easily and not lose it while maneuvering around in the projected
environment of use. The next thing that the chassis needs to do is be able to
carry all the complicated electronics and keep them protected from weather
conditions that the vehicle might be exposed to. Lastly the chassis needs to be
rugged enough to maneuver through the outdoor environment and do so safely
and securely.


     Obstacle Avoidance
An obstacle avoidance system will have to use either infrared or ultrasonic to
project a beam of light or a pulse of sound out in front of the sensors. If the light
or the pulse of sound is reflected back then the system can identify that there is
an object in that path. By transmitting the sound in pulses and measuring the
time delay between the time the sound was broadcast and the sound was
received its possible to determine the distance the object is at.

There are several different obstacle avoidance system designs that are
commonly used any of these could be used to model this system after. A simple
obstacle avoidance system in which the Tailgate Buddy will see be able to see
that there is an obstacle in the direct drive path, however will not be able to
maneuver around the object but instead will wait for the object to move from the
path before continuing. It will do this by incorporating one sensor in the front of
the vehicle that can view a wide angle with only a minimum blind spot. This
simple system will act as an electronic bumper for the Tailgate Buddy essentially
just preventing it from running into an object. The second system is more
complex giving the Tailgate Buddy the ability to not only see the obstacle in the
path but also to see at a forty-five degree angle from both sides and the front to
see if there is an object approaching it. Using this information it can make a
judgment as whether to maneuver around the obstacle, continue straight, or stop
and wait for the obstacle to be removed from the path. Using this system with

                                                                                   9
front sensor continues to watch for objects and act as an electronic bumper that
prevents the vehicle from ramming into an object. The two side sensors will
watch from the sides for objects and if they see an object they will cause the
Tailgate Buddy to turn with a limited turning radius to attempt to avoid the
obstacle. The drawback is the Tailgate Buddy may lose sight of its original path
and could still hit the obstacle since it won’t have a measure of distance to the
obstacle or speed at which the obstacle is approaching. The third type of
obstacle avoidance is more complex, using a system of three or more sensors
covering different angles in the forward and side directions giving the Tailgate
Buddy not only positions of obstacles but also distances of the obstacles allowing
the Tailgate Buddy to virtually build a two dimensional map of the obstacle layout
directly in the drive path of the Tailgate Buddy. This information will allow the
Tailgate Buddy to make an informed decision on its travel route to avoid nearby
obstacles and to make decisions on travel route that will also affect its future
travel path.

The reason for using ultrasonic sound for the obstacle avoidance detection
sensors is because using ultrasonic gives us the ability to easily measure the
distance from the sensors to objects in range. Infrared would be difficult to
measure the distance of the obstacles although it would be easy to determine if
an obstacle exists. Using radar to detect obstacles brings challenges of
detection of obstacle into the scenario. Radar also brings along a higher price
tag. This higher price tag and the extra processing power required to process
the data would make radar an impractical way to detect obstacles. Ultrasonic
require a low amount of processing power, low amount of battery power and an
easy way to identify the target and the targets distance from the sensor.
Ultrasonic’s also have the benefit of heavy use in the robotics world currently and
so there is much available online about their use.

The Obstacle avoidance system for the Tailgate Buddy will utilize ultrasonic
detectors. The ultrasonic detectors will give back distance measurements for
each of the obstacles they detect. One sensor pointed directly to the front and
two sensors, one on each side, each covering a forty-five degree angle. The
sensor field will be setup in such a way as attempt to prevent blind spots
between sensors while not overlapping the fields but allowing the angles to be
such that if there is an obstacle that it will pass through the blind spot quickly and
from one sensor to the next as the Tailgate Buddy is moving forward. Each
sensor will feed back a distance for the obstacle which will allow the Tailgate
buddy to see from the side sensor how far the obstacle is away and whether it
will need to steer to avoid the obstacle or if it have the necessary clearance. The
sensor pointing straight ahead will also be transmitting back distance of any
obstacles in front of it. This will allow the tailgate buddy to start slowing down
gradually to stop for the obstacle instead of having to make sudden stop. The
front sensor will not only act to stop the tailgate buddy from ramming an object

                                                                                   10
directly in front of it but this sensor will also act as the speed sensor for limiting
the speed of the tailgate buddy while trying to follow its target.




                 Figure 1 Obstacle Avoidance Detection Cone

                         [Figure drawn by John Maskasky]

As the target moves forward the tailgate buddy will utilize the obstacle avoidance
system, mainly the front facing sensor, to determine the distance the target is
away from the tailgate buddy. While trying to maintain a set distance the tailgate
buddies obstacle avoidance system will be able to speed up and slow down the
tailgate buddy to match the speed of the target and maintain the following
distance desired. The goal with the obstacle avoidance system is to have the

                                                                                   11
tailgate buddy start slowing gradually when a target comes into range as
opposed to stopping suddenly to avoid a target. With this goal in mind it is easy
to expand the obstacle avoidance system to use the distance measurement it
has to the target that it is following to determine the speed at which it needs to
travel to keep a safe following distance from its target while preventing it from
losing the target.

The ultrasonic detector mounted in the front of the unit will work together with the
infrared tracking system. This sensor will have a limited viewing range only
allowing it to see straight ahead. The infrared tracking system will keep the
target in direct line of sight of the vehicle. While the target is in direct line of sight
of the Tailgate Buddy the obstacle avoidance system will be able to calculate the
distance the target is from the tailgate buddy and keep the Tailgate Buddy a safe
distance behind the target. This system will also stop the Tailgate Buddy in the
instance that a passerby steps between the Tailgate Buddy and the target that
the Tailgate Buddy is following. While a sudden stop isn’t the preferred stopping
force, preventing the Tailgate Buddy from ramming an innocent passerby who
unknowingly steps in front of the Tailgate Buddy is preferable.


     Power Supply
The Tailgate Buddy’s power supply is a critical component of the system. Its
main components are the battery bank that is part of the vehicle and the battery
pack for the tracking device that the user will carry. The batteries must be able to
supply enough power to operate the Tailgate Buddy effectively and for a full day
of tailgating duty. The battery bank for the vehicle will need to operate the control
system as well as provide power to the drive motor and steering system. It will
need to be able to provide enough current to drive the vehicle while carrying the
maximum payload over grassy, rough terrain. Although the vehicle will likely sit in
a standby mode for the majority of its operation it will still need to have enough
storage capacity to do this for an extended period of time. If this battery dies, the
vehicle becomes completely useless as it will be stuck wherever it is, until the
battery can be recharged.

The battery pack for the user’s device will need to be much smaller in
comparison to the battery bank the vehicle will operate on. This is needed
because the user will have to carry this device and if the battery is too large it
may become too cumbersome to carry comfortably. However even when the
vehicle is sitting idle it will need to be putting out a signal constantly always ready
to alert the vehicle of movement. If this battery should fail, the vehicle will have to
be driven manually in the radio control mode. The next crucial component of the
power supply is a battery charger. The batteries will be rechargeable and need a
way to be recharged back to full power before the next day’s use. It must be able

                                                                                       12
to recharge the vehicle’s battery bank in a reasonable amount of time for the
vehicle to be useful. If it requires too much time to recharge, it may prevent the
user from being able to use it for another day of tailgating at another event.
Ideally it should charge overnight and be ready for the next day’s use.


     Electronic Speed Controller
In order to keep pace with the user the Tailgate Buddy requires a device to
control the speeds of the motors and to regulate power sent to them which will
control the vehicle’s speed. This is what is known as a motor controller or
sometimes referred to as an electronic speed controller. It accepts commands
from the microcontroller and determines how fast the motors should be moving.
Under normal conditions it powers the vehicle forward at a walking pace.
However it also must be able to supply enough power to enable the vehicle to
catch up to the user in cases where the vehicle was stopped by an obstacle and
has fallen behind. It must be able to supply enough current to move the
maximum payload of 100 lbs designated by the vehicle specifications for this
application.


     RC Tx/Rx
The vehicle will have a manual drive mode. This mode enables the user to be
able to drive the vehicle by radio control (RC). This is helpful when the user
wishes to send the vehicle to a position but doesn’t need to walk to that location.
One case where this could be handy is to deliver beverages from the cooler to a
friend. Instead of having to walk over and bring them a drink, the vehicle can be
driven over and the beverage can be retrieved by the recipient. The manual drive
function of the vehicle requires the use of a transmitter and receiver. It should be
made to be relatively easy for any user to be able to drive the vehicle around
without a high risk of loss of control which could potentially injure the user, other
people, animals, or damage property. Ideally any user who has experienced
driving a toy RC car should be able to operate the vehicle’s manual drive mode
without difficulty. The user will operate a normal RC transmitter which will
transmit signal to the receiver, and the receiver will output to the vehicles control
system which drives the vehicle.


     Software
This will be installed upon the operator’s computer and its primary purpose is to
take that data that is saved from the GPS logger and input this data onto a visual
map. The interface should be laid out in a way that all buttons are in areas that

                                                                                  13
they make sense to be in and they work the way people expect them to. This
entails that the interface should be user friendly, easy to look at and easy to use
for the user. It will take stored data from a SD memory stick.


     GPS
The GPS Unit will be stored in a compartment in the chassis of the Tailgate
Buddy, with a removable door (or similar mechanism) to allow access to the
Secure Digital (SD) memory card. The GPS Unit will function completely
separately from the rest of the components in the Tailgate Buddy. That is, there
will be no electrical connections to any other electrical component of the entire
Tailgate Buddy, with the exception of the main battery. The purpose of the GPS
Unit is to track where the Tailgate Buddy has traveled to during the course of its
use throughout a given day of use. The GPS Unit will track GPS satellites, and
record the coordinates of the Tailgate Buddy every six seconds to a SD card.
The data written to the SD card will be removable for analysis with a personal
computer (PC) at a later time. The GPS Unit must be small and light enough to fit
somewhere in the chassis of the Tailgate Buddy. The unit, including the door to
allow access to the SD card, must be water-resistant to guard against rain
damage during normal use. The unit will not be expected to be water proof in
case the Tailgate Buddy is submerged; the Tailgate Buddy’s intended use is not
aquatic.

The main components of the GPS module are the microcontroller, the GPS
receiver, and the SD card socket. These main components are assembled on a
PCB (printed circuit board) so they can interface with each other. Another
necessary component of the GPS module is the MMCX antenna socket and
antenna. This allows much better reception for the GPS receiver. There are other
various components, such as capacitors, resistors, and transistors that are
necessary to the GPS Unit’s functionality.


     Water Gun
One of the features on the vehicle is a water gun. When tailgating, it is often at a
busy and crowded location. There are usually people walking everywhere and
this may pose a slight problem when using a robotic vehicle that is tracking the
user. When the vehicle encounters an obstacle that blocks its “sight” of the
tracking device and is stuck in front of it, the vehicle will activate a water gun and
possibly an audible horn. The idea is simple, if the vehicle is following the user; it
should always want to be following the same path as the user is taking. For an
obstacle to suddenly appear in front of the vehicle, it is likely because someone
or several people have walked between the user and the vehicle blocking the

                                                                                   14
vehicles line of sight. In the case of someone standing in front of the vehicle for
an extended period of time, unknowingly or perhaps because they are examining
the robot closer, it is possible for the vehicle to become lost if the user continues
to walk away without knowledge of it being stopped. To combat this problem,
when the vehicle is blocked by an obstacle, and has no “sight” of the tracking
device, the water gun and horn are activated. Since it is likely to be a person
standing in front of the vehicle, the water spray and sound will get their attention,
and likely convince them to move out of the way. Once they are out of the way
the vehicle can continue on its path to the user.


     Master Microcontroller
The master microcontroller is to be small in size for easy mounting and
protecting. The master microcontroller must have the capability to control all of
the subsystems on the Tailgate Buddy. This means the master microcontroller
must have a fast processor and the available ports to plug into plus have the
memory space necessary to store all of the program files. The master micro
controller must be expandable in case its capacity is overcome and needs an
additional slave microcontroller, expansion ports or more memory.

The processor speed must be fast enough to manage all of the subsystems of
the Tailgate Buddy. The processor will have to monitor all of the sensors of the
Obstacle avoidance system and determine if there is an obstacle present, it must
also watch the front ultrasonic sensor and determine the speed the tailgate
buddy must travel to keep up with its target. The processor must also manage
the tracking system and determine which direction the Tailgate Buddy must turn
to keep tracking its target.

The microcontroller must be expandable in case it needs additional memory,
ports, or slave micron rollers to it in order to get the Tailgate Buddy correctly and
efficiently. Expandability in the master microcontroller is necessary because not
all problems can be foreseen in this initial design. If the processor speed of the
master microcontroller is not fast enough it may need an additional slave micron
roller to manage one or more systems to free up processor cycles on the master
micron roller and allow the master microcontroller to focus only on managing the
information rather than deriving the information and managing the information.
The advantage to adding a slave microcontroller is that the slave microcontroller
can actively monitor a subsystem and rather than return what the results of its
findings were it can sift through the data and return the necessary instructions to
adjust speed or direction. This will save processor cycles on the master
microcontroller and allow it to focus on other tasks. The ability to expand
memory or ports on the master microcontroller is necessary because it may need
extra storage space on the master microcontroller for programs or data. The

                                                                                  15
ability to add extra ports on the master microcontroller is important because of
the sensors it will have to monitor and the devices it will have to control. With
three ultrasonic sensors for the obstacle avoidance system, three infrared
sensors for the tracking system, and two servomotors for the drive system will
need at least eight ports minimum on the master microcontroller. This is the
reason the Digilent Cerebot microcontroller is being used in the vehicle. This
microcontroller has eight add-on ports with RS232 serial port add-on boards that
can be used with the sensors and an add-on board that can directly drive a
servomotor. This ability in the microcontroller help to simplify the building of the
Tailgate Buddy because it won’t have to build hardware circuits to interface
between the master microcontroller and the drive components of the Tailgate
Buddy. This gets rid of a lot of unnecessary extra design and testing that would
need to be done to get the system working correctly.




                                                                                 16
Research
A project of this magnitude with all the features defined in the above section
requires many components. It is important to pick out the best components for
this application. To make the best decisions extensive research has to be done.
Each system and part has to not only work well and be a quality part, but also
work together with all the other parts and systems. This is extremely important
when interfacing parts like a microcontroller with the electronic speed controller.
This section describes the research process and specific reasons each part was
chosen.


  Tracking System
There were several decided upon main goals for the tracking system. The first of
these goals is for the system to be able to follow the operator with many other
people and objects around. The second goal is for the system to have a range of
at least twelve feet. The last main goal is for the system to be cheaply
implemented.      The system must be able to work in a wide variety of
environments to perform its job effectively. It must be able to work in cloudy
conditions, bright sunny days, and even light rain. All of this requires a system
that either takes in little interference from these environmental factors or is able
to cope with them and still perform according to the specifications. With all of
these goals the tracking system is one of the most complicated systems on the
entire robot.

To be able to track the operator in various environments with many other
obstacles around requires the tracking system to be able to in a sense target the
operator specifically. After some research on a lot of the common tracking
systems commonly used on robots most of the common ones were thrown out
because they did not fit the specifications. The first one to be thrown out is an
optical based tracking system where the robot is set to follow an object of at least
a certain size that is moving. So if a person were walking the robot would follow
behind and track the walking person. While this sounds good it does not fit for
the application because there is no target discrimination, i.e. if the robot is
following person X and person Y comes in and walks between person X and the
robot the robot could potentially follow person Y now. So this would not quite suit
the application and environment that the robot will be used in; an area where
there are many other people around that could be distracting to the robots
tracking system. There are some more advanced optical based systems that
could be used to track a person first it could follow the shape of a person or it
could follow a specific color.


                                                                                 17
The first method of optical tracking involves scanning the image from the optical
sensor and scanning for a silhouette of a person. This would require a very
efficient algorithm to be designed to scan through the image for the outline of a
person. For optical tracking a group or group member should be at least
somewhat familiar with image processing and image processing algorithms. This
design also has a down fall in that it will follow any silhouette that comes into its
path. This could potentially lead to problems because the environment of use is
surrounded with many people. This makes this design impractical to use for the
project. The second method commonly used for optical tracking is to track an
object based upon its color. This seems like a good idea but the only way to get
it to work properly would be to choose a color of shirt that only the operator would
be wearing. This is counterproductive to the tailgating atmosphere where for
almost every game there are notices to wear a certain color. So becoming the
odd person out but being forced to wear a different color of clothing is not quite
an ideal situation. Also, if another person happened to be wearing the same
color shirt the robot could possibly change course and follow them instead of the
operator.

The second technology that was researched was a radio frequency based
transmitter and receiver. This would have the operator have with them a radio
transmitter that is linked in frequency to the robot. The robot would need to have
at least three omni-directional antennas to be able to tell precisely where the
person is located. With only two antennas via triangulation algorithms there are
two independent solutions of where the operator could be located. Adding a third
antenna into the mix gets rid of this extraneous solution and pinpoints the
location of the operator to a single point. This system meets the first goal of
being able to pick out the operator in an environment, and the second goal of a
minimum of a twelve foot range. The problem with a RF based system is that it
is expensive and hard to get working properly. While researching this topic was
were unable to find any robots built by people and not companies that used radio
frequency to locate the operator and follow him or her. After starting to punch
some numbers of what it would cost to get the radio frequency triangulation
system to a testing phase was realized that this doubled was original budget. The
eventually decided along with the input of Dr Richie to scrap the radio frequency
method of tracking that the operator and decided to pursue other means for a
tracking system.

This leads to the last area of research in the tracking systems area IR tracking.
The initial thought was that this would not work because in the environment there
will be many other people around to sidetrack the robot with their own IR
generated from their body. A little later on it was realized that human bodies only
emit IR in a rather narrow band of frequencies so long as this band of
frequencies is not used Infrared detection will function properly. While looking at
different IR LEDs and IR detectors the goal was to try to optimize the cost of the

                                                                                  18
system. This led us to decide on using a commonly available frequency 950nm.
The way the system will be set up is that the operator will wear an IR LED on
themselves that points to the robot and the robot will pick up this point source
and follow it.

While looking at different robot websites there were some examples of IR
tracking systems that were used to guide a robot around. Some systems had a
single IR detector while others had as many as five detectors. The most common
design and used only two detectors that were set up on the front of the vehicle
and had a slight overlapping cone in the middle of the front of the vehicle. This
design was picked by the group as the best way to get the robot to complete its
design criteria. It is the simplest to design and build. It is also the easiest design
to feed control to the rest of the robot and tell what the drive system needs to do
to follow the operator.


  Obstacle Avoidance
The Tailgate Buddy will be using ultrasonic sensors for the obstacle avoidance
system. Ultrasonic sensors will be advantages in comparison to other forms of
obstacle detection for the purposes. The ultrasonic sensors have been chosen
to use contain the basic circuits to return whether or not an obstacle is detected
and what distance the obstacle is at in comparison to the position of the Tailgate
Buddy. The obstacle avoidance system will consist of three ultrasonic obstacle
sensors, which will be controlled by the master microcontroller. The three
sensors will be setup with a semicircular detection pattern giving them a full one
hundred and eighty degree view from the front of the vehicle. This viewing angle
will allow it to see not only the objects it runs the chance of ramming but also any
obstacles it may run into if it has to make a turn.

The master microcontroller will be a Digilent Cerebot board. This board has
ATMega64 AVR processor, 128 Kbytes SRAM, 64Kbyte program flash memory,
2Kbyte EEPROM. This board is small and uses relatively low power. The
Digilent Cerebot microcontroller has flexible power input allowing it to be
connected to either wall power for programming or battery packs for use inside
the vehicle. This board has, as RS232 peripheral board plug in that will allow us
to easily interface with the sensors. The ultrasonic obstacle detection sensors
interface using an RS232 serial connection. The software will decode the serial
communication from the ultrasonic obstacle detection sensors and decode it to
be used with the algorithms for obstacle avoidance and speed monitoring.

--Given by Digilent Website.




                                                                                   19
The ultrasonic sensors operate at 42KHz frequency. The ultrasonic sensor will
take between 2.5 to 5.5 volts with only 2mA supply current. They have a 20Hz-
reading rate and have a RS232 serial interface operating at 9600bps. The
ultrasonic sensors also offer an analog output of 10mV per inch or a PVM output
of 147uS per inch. The modules are very small allowing them to be directly
mounted to the front of the vehicle. The ultrasonic sensors transmit the distance
data over the serial port via ASCII characters. It transmits an ASCII capital ‘R’
followed by three ASCII numbers representing the distance of the obstacle from
the sensor in inches up to a maximum of 255 inches or 21.25 feet. The
ultrasonic sensor will automatically perform a calibration cycle every time it is
powered up. It is necessary to keep objects at least seven inches away from the
sensor for good sensitivity. Best sensitivity is obtained of the object is kept up to
fourteen inches away during the ultrasonic calibration cycle. The ultrasonic
sensors are sensitive to temperature, humidity, or applied voltage changes
during their operation. If the temperature increases drastically during the
ultrasonic operation it could cause the sensor to have false up close readings. If
the temperature decreases drastically the ultrasonic sensor is more likely to
decreased up-close sensitivity. This means that the sensor won’t be accurately
detecting obstacles that the vehicle may encounter during its operation. Since
the vehicle may be taken outside and either run or allowed to sit for hours then
be forced to return after sunset. The sunset will cause changes in humidity and
temperature that could affect the Tailgate Buddy’s ability to navigate around
objects. A couple solutions exist; one solution to solve this problem might be to
force a sensor recalibration every time the Tailgate Buddy is turned on. Another
solution is to place a recalibrate button right on the Tailgate Buddy making it easy
to recalibrate the sensors, the third solution to the problem is to detect for
obstacles after its been in an idle state for a long period of time and if no
obstacles are present call to automatically recalibrate the sensors.

-- This information taken from maxbotics.com & sparkfun.com

The ultrasonic sensors are offered with five different beam width sizes. Beam
width size EZ0 has a long but wide beam of detection, beam width EZ1 has a
shorter but relatively narrower beam of detection, beam width EZ2 is the same
length of EZ1 but is even narrower, beam width EZ3 is about one half foot
narrower beam than EZ2, and beam width EZ4 is relatively smaller than EZ3.
The beam widths are represented in Figure 2 Detection Patterns. Each block on
the picture represents one foot. The sensors field of view is not actually in a
cone shape but more so in the shape of an eye drop as represented in the figure
below. Using the dimensions of each block in the picture below you can see how
the different rod sizes and beam widths will affect the ability to see objects side to
side and distance past the front of the vehicle.




                                                                                   20
                        Figure 2 Detection Patterns
                        [Figure drawn by John Maskasky]

The sensors will have to cover a semicircular pattern in order to protect the area
in the front of the vehicle from collisions. The two sensors on the sides will have
to have more of a shorter wider array in order to detect objects near the vehicle
that may be hit. A one-quarter inch diameter dowel set on EZ0 should be able to
detect objects that are in immediate danger of being hit. The sensor facing
forward should be set with a one-inch diameter dowel set on EZ0 to allow the
sensor to see only the target. The two side sensors will be protecting both the
corners of the vehicle allowing it to turn to miss a target. The sensor on the front
of the vehicle is primarily to detect the target and determine the speed the
Tailgate Buddy should be traveling. This sensor will also help to prevent the
Tailgate Buddy from running directly into an object.



                                                                                 21
                  Figure 3 Receiver Detection Patterns
                         [Figure drawn by John Maskasky]

The Vehicle length becomes an issue with this system, as the two sides are not
protected by the forward-looking obstacle avoidance system. To take care of the
body of the Tailgate Buddy to ensure it doesn’t turn into an obstacle the Obstacle
avoidance system will have to calculate the distance of the target by where the
target is in comparison with the vehicle. Using this information the Obstacle
avoidance system will have to calculate the distance the vehicle will be required
to travel in order to clear the target before it can be allowed to make a turn in that
direction. This system will help to reduce the amount of hardware the need and
reduce the overall unit price of the Tailgate Buddy.

Overall the system hardware will consist of three ultrasonic sensors. One
ultrasonic sensor will be looking forward and two looking at forty-five degree
angles off to the sides in the forward direction. This system will also require use
of the main microcontroller board to interpret the serial communications from the
ultrasonic sensors and determine what maneuvers it may need to make in order


                                                                                   22
to avoid a collision. It will also have to determine the overall speed and
acceleration of the Tailgate Buddy.


  GPS
This section covers the GPS functions and hardware (collectively referred to as
the “GPS unit” or “unit”) for the Tailgate Buddy. For a complete list of the Tailgate
Buddy’s GPS hardware, refer to Table 2 GPS Hardware List shown below.

The purpose of the GPS unit is to track where the Tailgate Buddy has traveled
throughout the course of its use. The GPS unit shall track GPS data of the
Tailgate Buddy’s movements, and write updated GPS coordinates to an SD
memory card every six seconds. The entirety of the GPS hardware shall be
concealed in the chassis of the Tailgate Buddy by a latched door (or similar
mechanism), which will allow access to an SD memory card for its removal and
interface with the user’s PC (personal computer). The unit will interface with the
rest of the device via a microcontroller.




                                                                                  23
  PIC16F819 Microcontroller
     ZX4120 GPS Module
  MMCX Antenna Connector
           Antenna
          PCB board

  LE33CZ Voltage Regulator

          Resistors:
            4k7 (1)
           100 k (4)
           470R (2)
            1 k (3)
            2k2 (2)
           330R (1)
           10 k (4)
           68 k (1)
         Capacitors:

          2.2 uF (1)

      100 nF ceramic (2)

      10 nF ceramic (2)
         Transistors:
       BC327 PNP (4)
            Diodes:
         1N4001 (1)
     Bi-Color R/G LED (3)
    SPST (push to make)

  5x, 7x, and 10x SIL sockets

   SD Memory Card Socket
Table 2 GPS Hardware List



                                24
Some relevant technical specifications for the PIC16F819 Microcontroller will
now be discussed. For complete technical specifications, please refer to
Appendix B. The PIC16F819 Microcontroller dissipates power at 1W. The
microcontroller contains 256 bytes of EEPROM. The RC oscillator of the
microcontroller has eight selectable frequencies: 31.25 kHz, 125 kHz, 250 kHz,
500 kHz, 1 MHz, 2 MHz, 4 MHz, and 8 MHz. For the purpose of the GPS unit,
the microcontroller will run at 8 MHz. Even though this is the fastest mode for the
microcontroller, this frequency still allows plenty of time for the SD card socket
and the ZX4120 GPS Module plenty of time to perform their tasks. The
PIC16F819 Microcontroller contains eighteen pins, with sixteen of those pins for
input and output. The input and output pins are divided into two groups: PORTA
and PORTB. PORTA contains RA0/AN0 (pin 17), RA1/AN1 (pin 18),
RA2/AN2/VREF- (pin 1), RA3/AN3/VREF+ (pin 2), RA4/AN4/T0CKI (pin 3),
RA5/MCLR/VPP RA5/              /VPP (pin 4), RA6/OSC2/CLKO (pin 15), and
RA7/OSC1/CLKI (pin 16). PORTB contains RB0/INT (pin 6), RB1/SDI/SDA (pin
7), RB2/SDO/CCP1 (pin 8), RB3/CCP1/PGM (pin 9), RB4/SCK/SCL (pin 10),
RB5/      (pin 11), RB6/T1OSO/T1CKI/PCG (pin 12), and RB7/T1OSI/PGD (pin
13). For a pin-out diagram illustrating the above pins, please refer to Figure 4
PIC16F819 Pin Diagram below. RA0 to RA4 is a bi-directional port (can be
configured as input or as output). RB0 to RB7 also form a bi-directional port,
which behaves in the same manner as RA0 to RA4, only there are eight bits
instead of five. VDD is the positive power supply, and must take a load of 2 V to 6
V. VSS is the negative power supply or ground (0 V). OSC1/CLKI and
OSC2/CLKO are for connecting an external clock if the microcontroller needs
one. MCLR is used to clear the memory locations in the EEPROM. Normally,
MCLR is connected to VDD. INT is an interrupt, which can be used to make the
program stop and restart. T0CK1 is another clock input, but operates an internal
timer. For more detailed functions of each pin, please refer to the full technical
specifications in Appendix B. The PIC16F819 Microcontroller will be programmed
using PIC assembly language. To do this, a PIC programmer is necessary to
interface with a PC (personal computer). The PIC compiler that will be used is
called gpasm. The PIC simulator that will be used is called gpsim. The
programming application that will be used is called Odyssey. All of these
software programs are licensed under the GPL. For the source code used for this
project, please refer to Appendix A.




                                                                                25
                      Figure 4 PIC16F819 Pin Diagram
                                [Permission Pending ]

Some relevant technical specifications for the ZX4120 GPS Module will now be
      ssed.
discussed. The module can tracks up to seven GPS satellites using sixteen
channels. The ZX4120 GPS Module interfaces using a standard RS232 (TTL
level) link operating at 9600 baud, and outputs using the NMEA0183 protocol.
The device measures 25.9 mm by 25.9 mm by 2.7 mm, and weighs 3.4 g, and
consumes 89 mW of power in continuous mode, and 99 mW in continuous mode
using LNA. For complete technical specifications, please refer to Appendix C.
The ZX4120 GPS Module contains nineteen pins, with seventeen of those pi          pins
for input and output (as shown in Figure 5 ZX4120 GPS Module below). Pins 11
through 16 (DSUMUX, DSUEN, DSUBRE, DSURX, and DSUACT are for a
                                                                           The
dedicated debug unit, and will not be connected to any other device. Th function
of GPIO [0] (pin 10) is to tell if the antenna is shorted or open circuit; GPIO [0] will
be set to high if it is detected that the antenna is open or shorted. The function of
GPIO [4] (pin 1) is to tell when the first satellite is detected; when the ZX4120
GPS module detects the first satellite, GPIO [4] will change from high to low. The
RESET pin (pin 6) is used to reset the device. NC (MODE) (Pin 2) is not used,
pin 8 is ground, and pin 9 is input voltage VDD (3.0 V to 3.6 V). VBAT (pin 7) is
  sed
used to attach an external battery for backup power. WAKEUP (pin 5) is used to
keep the ZX4120 GPS Module in standby mode for low power consumption
when it is idle, and to bring the device out of standby mode. NMEA TX (pin 3) is
                               output.
used for NMEA serial data output. NMEA RX (pin 4) is used for NMEA serial data
input. NMEA is a standard developed by an organization called the National
Marine Electronics Association originally created for communicating between
                                                              equipment.
marine electronics and computers and other marine equipment. For a more
detailed description of each pin’s function, please refer to Appendix C. The data
that will be stored to the SD memory card not as ASCII characters, but as pure

                                                                                     26
zeroes and ones. The SD card is intended to interface with the user’s PC. There
will be a console-based application to parse the GPS data into a text file from the
user’s PC. The text file will contain ASCII values. This text file will be able to be
uploaded to an online mapping service such as Google Maps.

The GPS data will be written to the SD memory card once every second. The
data is written as raw NMEA data sentences. Excluding carriage returns, the data
transfer rate should never exceed 512 bytes per second. The GGA, GSA, RMC,
and GSV. The GGA is the global positioning system fix data. GGA provides
three-dimensional location and accuracy data. The GGA data will include the
time, fix, latitude, longitude, altitude, and horizontal dilution of precision. Dilution
of precision is a measure of how the satellite geometry affects the accuracy of
the fix. In the fix quality field of the GGA data, 0 means the fix is invalid, 1
indicates a GPS fix (SPS), 2 indicates a DGPS fix, 3 indicates a PPS fix, 4
indicates real-time kinematic, 5 indicates float RTK, 6 indicates the data are
estimated, 7 indicates the data was input manually, and 8 indicates simulation
mode. Dilution of precision is a unitless number. A small dilution of precision is
desirable, with 1.0 being the desired value. The GGA data will take up 78 bytes
on the SD memory card. For greater detail of GGA data, please refer to Table 3
Sample GGA Data below. GSA provides details about the fix. The GSA data will

                    Sample GGA NMEA Sentence:
    $GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
          GGA               Global Positioning System Fix Data
         123519                  Fix taken at 12:35:19 UTC
       4807.038,N                Latitude 48 deg 07.038’ N
      01131.000,E               Longitude 11 deg 31.000’ E
            1                            Fix quality
            8               Number of Satellites Being Tracked
           0.9                 Horizontal Dilution of Precision
        545.4,M               Altitude Above Mean Sea Level
                                         (in meters)
         46.9,M            Height of geoid above WGS84 ellipsoid
                                                (in meters)
        (empty field)                  Time since last DGPS update
                                               (in seconds)
        (empty field)                     DGPS station ID number
           *47                                Checksum data
                                      (always begins with an asterisk)
                          Table 3 Sample GGA Data
           [Data Taken From http://gpsinformation.org/dale/nmea.htm]

                                                                                     27
include the GPS satellite numbers the GPS module is using, detailed geometric
dilution of precision data, and fix information. The fix information field in the GSA
NMEA sentence can take one of three values: 1 indicates that there is no fix, 2
indicates a two-dimensional fix, and 3 indicates a three-dimensional fix. For
greater detail about GSA data, Table 4 Sample GSA Data please refer to below.


     Sample NMEA GSA Sentence:
     $GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39
     GSA                          Satellite Status
     A                            Auto-Selection of 2D or 3D Fix
                                  (A = Auto, M = Manual)
     3                            Fix Status
     04,05,09,12,24, blank fields Pseudorandom Noise of Satellites
                                  Used in Fix
     2.5                          Dilution of Precision (DOP)
     1.3                          Horizontal Dilution of Precision (HDOP)
     2.1                          Vertical Dilution of Precision (VDOP)
     *39                          Checksum Data
                                  (Always Begins with an Asterisk)
                         Table 4 Sample GSA Data
           [Data Taken From http://gpsinformation.org/dale/nmea.htm]

The RMC data will include PVT data (position, velocity, and time). For greater
detail on RMC, please refer to

 Sample NMEA RMC Sentence:
 $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
 RMC                Recommended Minimum Sentence C
 123519             Fix Taken at 12:35:19 UTC
 A                  Status
                    (A = Active, V = Void)
 4807.038,N         Latitude 48 Degrees
                    07.038 Minutes North
 01131.000,E        Longitude 11 Degrees
                    31.000 Minutes East
 022.4              Speed Over the Ground
                    (in knots)
 084.4              Track Angle in Degrees
 230394             Date (March 23, 1994)
 003.1,W            Magnetic Variation
 *6A                Checksum Data

                                                                                  28
                         (Always Begins with an Asterisk)
Table 5 Sample RMC Data below. The GSV data will include data about the
satellites the GPS module might be able to find based on almanac data and its
viewing mask data, and the SNR (signal to noise ratio) which can be thought of
as signal strength. A high SNR is favorable. For greater detail of GSV data,
please       refer  to    Table    6     Sample        GSV     Data    below.




                                                                           29
Sample NMEA RMC Sentence:
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
RMC                Recommended Minimum Sentence C
123519             Fix Taken at 12:35:19 UTC
A                  Status
                   (A = Active, V = Void)
4807.038,N         Latitude 48 Degrees
                   07.038 Minutes North
01131.000,E        Longitude 11 Degrees
                   31.000 Minutes East
022.4              Speed Over the Ground
                   (in knots)
084.4              Track Angle in Degrees
230394             Date (March 23, 1994)
003.1,W            Magnetic Variation
*6A                Checksum Data
                   (Always Begins with an Asterisk)
                     Table 5 Sample RMC Data
        [Data Taken From http:://gpsinformation.org/dale/nmea.htm]

 Sample NMEA GSV Sentence
 $GPGSV,2,1,08,01,40,083,46,02,17,308,41,12,07,344,39,14,22,228,45*75
 GSV         Satellites in View
 2           Number of Sentences in View
 1           Sentence 1 or 2
 08          Number of Satellites in View
 01          Satellite PRN (Pseudorandom Noise) Number
 40          Elevation
             (in Degrees)
 083         Azimuth
             (in Degrees)
 42          SNR
             (Up to 4 Satellites per Sentence)
 *75         Checksum Data
             (Always Begins in an Asterisk)
                     Table 6 Sample GSV Data
        [Data Taken From http:://gpsinformation.org/dale/nmea.htm]




                                                                        30
                        Figure 5 ZX4120 GPS Module
                              [Permission Pending]

                  PC003
The 412D02F-09PC003 Secure Digital (SD) Card Socket will be used to interface
with the SD memory card used to store the recorded GPS data. The SD socket
will operate in SPI (serial peripheral interface) mode, which is commonly used to
interface with microcontrollers in full duplex, such as the PIC16F819 described
above. The SD standard has nine pins. DAT3/CS (pin 1) is used for chip select
and slave select. CMD/DI (pin 2) is used for MOSI (master out/slave in). VSS1
(pin 3) is ground. VDD (pin 4) is input voltage (either 2.7 V or 3.6 V). CLOCK (pin
5) is the SCK (serial clock). VSS2 (pin 6) is another ground pin. DAT0/D0 (pin 7)
is used for MISO (master in/slave out). DAT1/IRQ (pin 8) is IRQ (interrupt
                                                               pin-out diagr
request). DAT2/NC (pin 9) is not used in SPI mode. For a pin out diagram of a
Secure Digital (SD) card, please refer to Figure 6 Secure Digital (SD) Memory
Card below.




                                                                                31
                 Figure 6 Secure Digital (SD) Memory Card
                        [Figure Drawn by Ken Kauffman]

                                            PCB-ready,
The MMCX socket for the antenna is PCB ready, and is pictured with the
antenna in Figure 7 Antenna Socket (LEFT), GPS Antenna (RIGHT) below.
                                          (LEFT),
The antenna used is 47.0 mm by 45.4 mm by 14.4 mm, and weights 60 g. The
                  atures                       30
operating temperatures for the antenna are -30 degrees Celsius to 80 degrees
Celsius. The operating humidity for the antenna is 40% to 95%. The voltage
regulator chosen is the model number LE33CZ. The LE33CZ is a 100 mA
                                                     quiescent
regulator with a low drop voltage (0.2 V) and low quiescent current (0.5 mA).
                                                  F
These properties allow for low noise. A 2.2 µF capacitor will be required for
stabilizing the device. For the purpose of the GPS unit of the Tailgate Buddy, the
            92
3.3 V TO-92 version will be used. This version of the LE33CZ contains three
pins: VIN, VOUT, and GND. There will also be a SPST push to make button to
toggle the GPS receiver from standby mode to active mode, or it can be held
down for ten seconds to reset the unit.




                              (LEFT),
      Figure 7 Antenna Socket (LEFT), GPS Antenna (RIGHT)
                              [Permission Pending]

                                                                               32
The LEDs and external button for the GPS Unit will now be discussed. The status
LED shows the current GPS fix status. The LED turns on when the PIC
microcontroller synchronizes with the data sequence. The status LED is red
when the GPS module has no position. The status LED is orange when it has a
2D fix. The status LED is greed when it has a 3D fix. The next LED is the SD
card LED. This LED will light up green when the SD card is receiving power. The
SD card LED flashes orange when there is being data transferred. The button on
the outside of the GPS unit is the wake up/standby switch. Pushing the button
once starts the device. Pushing the button again will stop the device. If the button
is held down for a total of ten seconds, the write position in the SD card is reset
to the beginning of the card.

  Motor/Drivetrain
The motors are the muscle of the vehicle. There are many choices and things to
consider when selecting a motor. The first thing to consider is what will power the
motor. Today there are two common power types that could be used in the
Tailgate Buddy; combustion or electric. Either could feasibly be implemented but
both have strengths and weaknesses to consider.

A combustion engine would likely run on gas, mixed gas, propane, or possibly
nitro-methanol. One thing to consider is if the motor will be a two-cycle or four
cycle engine. This is usually a determining factor for fuel type. A two-cycle
usually runs on gas mixed with some oil for lubrication. So gasoline mixed with
motor oil or a nitro-methanol blend is usually used. A four-cycle could run on
gasoline, diesel, propane, etc. They typically have a separate oiling system that
is separated from the combustion chamber so they usually have cleaner
emissions than oil burning two-cycles. Whatever the fuel type, combustion
engines, for size to power ratio, are usually quite good. Although they require fuel
to run on and must be refueled periodically, this would cut down on batteries and
minimize recharging time as the batteries would only have to power the
electronics. The drivetrain would have to be fitted with a centrifugal clutch to
allow the motor to continue to idle and run when the vehicle is stationary. When
the engine is revved up to a certain speed, the clutch engages and the vehicle
would move forward. The disadvantage here is there is that it is a wearable part
that will need to be replaced from time to time depending on distance traveled
and the weight of the load that is carried.

Having a gas engine has a certain “cool factor.” Tailgating is all about having fun
and gas engines have an exciting aspect. They can be loud, powerful, and
amusing to see. Having a vehicle following you around carrying a cooler full of
drinks and other tailgating items, while displaying the raw power of a gas engine,
makes other tailgaters turn and take notice. This could add to the excitement of
tailgating and make for more fun. Another advantage to a combustion engine

                                                                                 33
would be extended run-time. The fuel tank could be large enough to supply a full
day of tailgating without the need for refueling. However, to accomplish this, the
engine may have to be shut down to save fuel when the robot is to be in a
stationary place for an extended period of time. Then when the user wants to
move to a new location, the engine would have to be restarted. This would
require the user to either pull start it, or an electric starter to be fitted to the
drivetrain. A pull starter can be rather annoying to use if the motor is having
trouble starting because it is flooded or cold. An electric starter is very easy to
use, but requires extra weight and usually a lot of battery power to crank an
engine.

There are also a few more complications with a combustion engine. Although the
centrifugal clutch automatically allows the vehicle to idle and still propel itself
forward when the engine revs up, and coast when the throttle is pulled back, it
doesn’t help the vehicle stop. So a braking system would have to be added. This
creates a few issues on its own. A braking system would either have to be
adapted to the vehicle or built from scratch. This could be costly and time
consuming. Time is something to be valued when trying to build a vehicle like this
in only one semester. This project is supposed to deal mostly with electrical and
computer engineering. In this case creating a braking system is a job better left to
mechanical engineers. Another problem is that braking sensitivity is a difficult
thing to program into the microcontroller. Not only do you have to program in
throttle sensitivity to tell the vehicle how hard to accelerate, you also have to tell it
how hard to brake. This is difficult as there are many factors that will affect this;
most importantly is the weight of the load to be carried, temperature of the
brakes, the slope of the terrain, and the conditions of the terrain itself. It is harder
to accelerate on rough terrain, up slopes, and with a heavy load. It is harder to
brake on down slopes and with heavy loads. So this poses potential problems as
one would not want the vehicle to be running into the user or other obstacles, nor
would it be desired to be applying the brakes all the time, burning more fuel by
loss of efficiency and wearing the brakes prematurely.

There is another major problem with a combustion engine. What to do when the
robot needs to reverse to move around an obstacle? It would need a reverse
gear. This complicates things as the drivetrain becomes even more complex and
expensive to build. This would be another part that would take too much time
given the goals of this project. Creating a drivetrain with a reverse gear is another
thing better left to mechanical engineers. The last key problem is that a
combustion motor would likely be restricted to outdoor use only, because of
carbon monoxide emissions. Propane would be a cleaner fuel with low carbon
monoxide emissions that can be ran in large indoor building if there is adequate
ventilation. A plus here would be that you could use the same bottle of propane
to power a grill when the vehicle is not in use. However it still limits where it can
be used and many tailgaters prefer charcoal anyway.

                                                                                      34
On the other end of the spectrum, an electric motor is another option. There are
different types of electric motors, but an easy way to categorize them would be to
split them between AC and DC. In this case a DC motor would be need as the
vehicle would be powered straight off battery power. DC motors can be broken
down into two categories, motors with brushes, and brushless motors. Motors
that use brushes to transfer current are typically cheaper and would allow for the
vehicle’s cost to be lower. Because of this, a more powerful motor can be
selected also. Brushless motors are nice because you do not have to worry
about the brushes wearing down and having to be replaced. However they are
more expensive and in many cases are less powerful than a comparable motor
that uses brushes. Electric motors are nice because they can be used indoors as
they do not produce any carbon monoxide or other harmful gasses. Most have
the ability to reverse direction by reversing polarity of the power source. They are
easy to control speed and can incorporate a built in braking function that in many
cases can be used as regenerative power to recharge the batteries a little. In this
application there is no need for a clutch or wearable brakes so there is less
maintenance. Not having all those parts saves quite a bit of money; not only for
initial building and designing, but also for cost to maintain the vehicle in the
future.

Many endeavors require purpose built items to accomplish an end result or task.
It is possible to design and build an entirely custom motor and drive assembly.
To do this, electric motors could be mounted to the chassis and sprockets or
gears would be fitted to them and the axles. If sprockets are used, chains or a
belt drive can effectively transfer the power from the motors to the wheels. Belt
drives are very forgiving with alignment of the sprockets, however chains are
usually better as they don’t stretch as much or have a tendency to slip. The
downside here is that all this is that there is an increased chance of failure points.
Usually every new design has to be tested and modified many times over before
being considered to be acceptable. If this approach is used, the time taken to
complete this process could eat into build time for other systems. If the drivetrain
fails, a tracking system is of no use to an end user. For this application a
premade vehicle or kit vehicle may be the best option, even if it is only to gather
main parts from.

There are a few places that motors and drive components could be scavenged
from, or an entire drivetrain could be designed and built from parts. One option
would be an electric wheelchair. These are quite powerful and run for very long
periods of time. They are more than capable of carrying the load selected for this
vehicle and can run for miles. They would easily be able to accomplish a full days
worth of tailgating activity and walking around. However they are quite expensive
and are a little overkill for this application. Electric scooters are another option for
scavenging. Many can push a full grown adult around for hours at a time before
needing the battery to be recharged. They are cheaper but are usually only one

                                                                                     35
wheel drive. The tailgate buddy should have two drive wheels on an axle for
better traction. So either the drive wheel of the scooter would have to be replaced
with an axle with two wheels, or two scooter drive systems would have to be
used. This adds work and cost to the build. A third option is to buy from a robotic
parts dealing website that sells complete drive assemblies and even complete
chassis kits that include everything one would need to build a running vehicle.
These kits range in price from a few hundred to a few thousand dollars. They are
designs that have been proven to be very reliable but the cost of the kits would
put a huge dent in the budget for this project. This application calls for a fairly
large vehicle and most of the robotic vehicle kits are pretty small. Also the larger
they get, the more expensive they are.

A fourth option is to modify the drivetrain of a children’s electric car. Power
Wheels is a common brand of these, and make many 12 volt cars that have
enough power to carry the intended load. The small batteries that they come with
provide a few hours for kids to drive them around, but if outfitted with a larger
battery like a deep cycle marine battery they could be able to run for more than
enough time for tailgating and have more than enough power to stand up to the
terrain it is required to drive on. Many of these electric cars have two drive
wheels in the rear. Each of these drive wheels has a motor and a gearbox
connected to it. Although not connected by a shared axle, both wheels are
powered and together should give enough traction for grassy and sloped
surfaces. The wheels are made of plastic but are quite durable. They also are an
appropriate size for this application. They are large enough to easily cross over
small transition points and obstacles yet were designed to not exceed the power
limitations of the motors and gearboxes. This seems like a viable option because
rather than just parts scavenging the entire vehicle can be modified and used to
carry tailgating supplies. Also it will be quicker than trying to build an entire drive
system from parts. They are relatively cheap also, at only around $200 for a
basic 12 volt vehicle that can run 5 mph without modification. Adding a second
set of batteries in parallel or changing to different batteries all together, could
extend run time to more than a user could ever need from it for a single day of
tailgating. It appears that one of these vehicles would be the best choice for this
application.


  Power Supply
The batteries are the main components of the power supply. Both the vehicle and
the tracking device need batteries. The tracking device has a few options for
batteries. Since they need to be small enough to fit in a small device but also
have enough power to last for a full day, small rechargeable battery packs, or
replaceable AAA batteries could be used. The vehicles batteries are where it
gets a little more complex. If a children’s electric car is to be used, it will come

                                                                                    36
with a 12 volt battery. However even though these batteries are quite powerful,
depending on distance traveled in a given day of tailgating by the user, one of
these batteries may not be of enough capacity for a full days use. Since different
users may habitually walk different distances, limiting the vehicle to just one of
these smaller batteries may not be quite enough.

Using lithium-ion (Li-ion) batteries has an advantage of being small in size while
still having a large storage capacity and power output. However they are much
more expensive than typical lead acid, nickel-metal hydride (Ni-MH), or nickel
cadmium (NiCd) batteries. Also they aren’t very safe. They need to be recharged
at specific rates, and do not respond well to quick instances of minor short
circuits that sometimes occur from accidental misuse or poor design. Misuse
could easily result in fires and sometimes even small explosions. Although the
NiCd and Ni-MH batteries do not store as much energy as a lithium-ion battery,
they still are still of a lower weight than lead acid however they are still much
more expensive. The children’s electric cars use sealed lead acid batteries.
Although they do not have the storage capacity of other three types of batteries,
they are cheaper, safer and more resilient than the other types.

The microcontrollers, the electronic speed controller, and the rest of the
electronics will require batteries as well. They could run off the same battery
system as the motors but with the motors turning on and off quite often and with
a gradual decline in available voltage that comes with the motors draining the
batteries as the day goes by, the sensitive electronics may have not be able to
have a steady input voltage. The best solution for this seems to be to give the
electronics a separate smaller power supply. A small rechargeable 12 volt battery
pack can provide plenty of power to run the electronics for days. The other
advantage here is that as the vehicles motor battery supply wears down the
vehicle won’t run out of control because of low power to the electronics
controlling the vehicle.


  Radio Control
The manual control feature of the vehicle requires the use of a transmitter (Tx)
and a receiver (Rx). The Tx and Rx will have multiple channels for operation. The
minimum required is two. One channel is for forward and reverse operation, and
a second is for steering. Two channel radios are very common. Four channel
radios are also very common for RC model airplanes and helicopters. A less
common style is the three channel radio like the Futaba Skysport 3 shown in
Figure 8 Photo of Futaba Skysport 3 AM Radio. The third channel is usually a
proportional slide switch but sometimes it is just a simple on-off switch. These
are usually used on nitro RC cars and trucks that have a reverse gear. The
switch is used to put the vehicle’s gear box into reverse. However any of these

                                                                               37
styles can be used for a number of things. In the case of the Tailgate Buddy, it
would be a fun feature to use the third channel of a 3 channel radio to manually
fire off the water gun to get people out of the way or just have fun spraying
people. A popular company in the RC hobby is Futaba. They make a three
channel radio called the Skysport 3. It has a proportional slide switch to the left of
the controller next to the left thumb pad. It can be seen in the photograph below.




            Figure 8 Photo of Futaba Skysport 3 AM Radio
                               [Permission Pending]

A three channel radio is a nice piece of equipment for this application. However
using one will add a bit of cost and extra time to the project. The Skysport 3 is
one of the more inexpensive models out there but at $60 for the radio and
receiver, it still would have a significant impact on the budget. There is one
particular style of two channel radios that would be very easy to implement into
the vehicle and would also save a significant amount of money. This is because
the receiver is so simple, it has no proportional control. There are two outputs on
the receiver. Each will only put out a full positive or negative 9 volts when used or
0 volts when at rest. There is no in between output, they are either outputting or
they are off. This could be helpful when wiring the vehicle for manual control.
Instead of the vehicle having a range of speeds that it can travel, it can operate
on either low or high speed like the Power Wheels jeep does in factory form.
There really is no need for a variable speed unless the vehicle is following a
target for autonomous mode. When manually driving the vehicle to another
location, going at a speed of about 5 mph the whole time would be perfectly
acceptable. The real advantage though is cost. This style radio and receiver can

                                                                                   38
be pulled from a toy R/C car and modified for this application for about $20.
Using simple switches and 12 volt automotive relays, power sent to the motors
can be switched on and off. The main disadvantage with using a two channel
radio system like this is that there is no manual firing option for the water gun.


  Master Microcontroller
The master microcontroller will be a Digilent Cerebot II. This board was used
due to its small size, processor and storage capacity, and its expandability. The
board has available add-ons that contain serial connectors, infrared detector, and
SD card reader which will make the system easier to build allowing it the
programming of the Tailgate Buddy via software. The Digilent Cerebot II does
not require a special programmer; this board can be programmed from a PC
using either an optional parallel communications cable or an optional USB
communications cable. Digilent provides their programming software free from
their                                   website                                  at
http://digilent.us/Software/Adept.cfm?Nav1=Software&Nav2=Adept.                The
programming language used to program the Digilent Cerebot boards is C by
doing this the different areas Digilent Cerebot board by addresses. This board
allows its self to be programmed it in C giving several advantages over other
boards. One advantage is that it uses a common programming language and the
only software that will be required to program the board is free software available
on Digilents website. While the software is free, it may be necessary to buy a
programming cable for the board. Since all of the Tailgate Buddy’s functionality
is going to be preformed through this one board, the programming of the board
may be more complicated as it will need to manage system resources efficiently
so that each primary system on the Tailgate Buddy will receive the amount of
clock cycles it needs in order to perform its task in an efficient and complete
manner.

The Tailgate Buddy will require multiple add-ons for the different systems. The
Obstacle avoidance system will require three serial ports because each of the
three ultrasonic sensors will require its own serial port to communicate its
distance information. The tracking system will require three plug in boards for
each of the three of the infrared detectors on the Tailgate Buddy. The drive
system will require several servomotors to control the throttle and the steering of
the Tailgate Buddy. This will require two or more servo motor add-on boards.
The GPS system for this device will require a serial connection and an SD card
reader.

The master microcontroller will manage all of the subsystems for the Tailgate
Buddy. The master microcontroller will make decisions on what the Tailgate
Buddy should do depending on the information given back by each of the

                                                                                39
subsystems. It’s necessary for the master microcontroller to manage the
subsystems because each of the subsystems will require a different priority. For
instance if the obstacle avoidance system detects an obstacle it will have to take
priority until the Tailgate Buddy has moved past the obstacle and is again in the
clear then the Tracking system can again have control of the track of the Tailgate
Buddy. While its important that the Tracking system can maintain visual contact
on its target its more important that the Tailgate Buddy not run down any
pedestrians or run into any obstacles in the process. This is why its important for
the master microcontroller determines priority of each subsystem and run
commands accordingly.


  Software
This section describes all external software related to the Tailgate Buddy. There
will be a console application written in C programming language to parse GPS
data. The GPS unit in the Tailgate Buddy records GPS data throughout the
course of the Tailgate Buddy's use. The GPS unit stores the raw GPS data to an
SD memory card. The memory card is removable, and will interface with the
user's PC. Once the user's PC is able to read the SD memory card, the user will
activate the C program that will parse the GPS data in a manner that will be
indirectly uploadable to Google Maps. The website http://www.gpsvisualizer.com
allows the user to upload a comma-delimited file. This website will allow the user
to select a mapping service (either Google Maps or Google Earth) he or she
would like to use to view the Tailgate Buddy's GPS data from its most recent use.
The user is also allowed to select multiple output files, such as JPEG, PNG, and
SVG files, an elevation profile, a GPX file, or a plain text spreadsheet. This
website can also read from a variety of input files, but the only concern for the
Tailgate Buddy’s GPS capabilities is the comma-delineated file, as created by the
C program.


  Electronic Speed Controller
There are many choices available when selecting an electronic speed controller
for the vehicle. The main points to consider are how much current the speed
control can put out, whether to use one for each motor or use only one that can
control two or more motors, and finally what kind of added features it has. This
vehicle is a rather heavy vehicle. It has been designed to carry a payload of 100
lbs and the vehicle weight is estimated at about 30-40 lbs dry weight. The fully
loaded vehicle requires quite a bit of current to move this kind of weight when
operating on a 12 volt system. To facilitate this need, a powerful speed controller
is needed. For this vehicle, the motors will need to be controlled independently to
steer the vehicle. There are many speed controls that are designed to control two

                                                                                40
motors and slow the speed of one motor while increasing the speed of the other
to turn the vehicle. Features are important in the selection process also. Many
features are obvious requirements. For example this vehicle requires a reverse
function and many controllers only have forward operation available so those will
not work for this application. However some controllers have other features may
not be required but they could make certain tasks easier. Some have add-ons
like built in connections for RC controlling that make that function nearly plug and
play. Other features are luxury items. For example many have a regenerative
braking function that recharges the batteries a little when reverse is selected.
This uses the motors as brakes, slows the vehicle to a stop while restoring power
and then allows the vehicle to reverse direction.

Many retailers and websites specialize in robotics and are key places to look at
when shopping for a speed controller. One such place is The Robot MarketPlace
[www.robotmarketplace.com]. They have many different brands and models of
controllers and accessories to choose from. The first four manufacturers on their
list are IFI Robotics, Vantec, 4QD, and RoboWars. They make a variety of very
powerful controllers however they are all setup to only have RC inputs and
cannot easily function off outputs of a microcontroller. The manufacturer Robot-
Power has a model out called the “Sidewinder.” It is a very powerful controller
that can put out 80 amps of continuous power for each motor. It also can put out
150 amps at peak power for 5 seconds for each motor. It only weighs 13 oz,
measures 108mm x 82mm x 28mm so it is quite compact. It has full reverse,
throttle mixing between motors for steering, and regenerative braking. It can
accept a serial input for control but was designed primarily for RC use. Also it is
set up to have an input of 14V to 48V supply voltage. That will only be useful if
the vehicle is configured to have the two 12 volt batteries wired in series. Finally
at $399.00, it is quite expensive considering the required work it would take to
get it to interface with a microcontroller.

RoboteQ is a company that makes several speed controllers that appear to be
useable for this application. Almost all of them have been designed to be used by
either RC control or by a microcontroller. A few even have the option of using
wireless modems for two-way remote control. Two of the more basic models are
the ax1500 and the ax3500. Both are 2-channel motor controllers. Their
operating voltage range is from 12V to 40V DC. They have 2 channel RC inputs
as well as an RS232 serial interface which operates at 9600 bauds and finally an
analog interface that has two inputs that operate at 0-5V with 8-bit resolution.
Both models have automatic current limit reduction. This kicks in when heat sink
temperature rises above 175° F. They both have a 5V, 100mA supply output for
powering radio equipment like an RC receiver. That is useful because a separate
small battery pack is not required to power the receiver as the controller can feed
it power off the 12 volt batteries it is using.



                                                                                 41
The ax3500 is the higher end model that has a couple extra features like eight
pulsed outputs for driving RC servos and optical encoder inputs. It has 0.25”
Faston male style terminals for connecting power wires while the ax1500 as
shown is Figure 9 Photo of RoboteQ ax1500 motor controller] uses a terminal
strip with a screw down connect that accepts a AWG 12 max sized wire. The
terminals can be seen on the right side of the controller. In relation to the needs
of this application the main difference between the two is the current output. The
ax1500 is rated for a 20 amp continuous current output to each motor and can
output 30 amps if a larger heatsink is added to the device. The ax3500 is rated
for a 40 amp continuous output to each motor and can output 60 amps if a larger
heatsink is used. Both are very compact and lightweight. The ax1500 is 4.2” x
4.2” x 1.5” and only weighs 3 oz. The ax3500 is understandably a little larger and
heavier at 106 4.2” x 6.75” x 1.2” and 7.5 oz, but it is still very small. This vehicle
is large enough to house either controller either under the hood or under the
original seating area and still have enough room to allow for adequate ventilation.
Either controller could be a promising device to use, however since cost is a
determining factor when selecting one it is important to consider what is really
needed for this application. The ax1500 is rated for a lower current output and
costs $275.00 while the ax3500 can put out double the current but boasts a hefty
price tag of $395.00. This vehicle at maximum weight should never continuously
pull more than 20 amps of current for each motor. There may be times when the
vehicle is asked to start up a slope, and the maximum current output may surge
beyond even the 30 amp mark, but it would only be for a brief period and the
controller is rated to handle those cases.




         Figure 9 Photo of RoboteQ ax1500 motor controller
                       [Permission to reprint from RoboteQ]

                                                                                    42
  Chassis
The chassis in the robot needs to be able to perform across a wide variety of
specifications. Firstly it needs to be able to fit into a car, this already rules out
many platforms that are available to be used for the robot. It needs to be able to
carry 100lbs of weight. The chassis must carry the payload over a wide variety
of terrain including hills, grass, roads, and sidewalks. This means it must have at
least a few inches of ground clearance and good stable tires with plenty of grip.
The vehicle also needs to be rugged enough to withstand water and the
outdoors.

Due to the size and payload a chassis will be needed that can be built that will fit
the needs of the Tailgate Buddy. Most hobby shops and robot stores on the
Internet do not sell any chassis nearly as big and strong as what will need for the
payload and rugged use. So then the search switched from normal stores that
sell robot parts to ones that sell machines to the public. The Tailgate Buddy are
currently deciding between buying a wagon from Lowe’s and buying a Power
Wheel from Wal-Mart and retrofitting them to work for your project. Both chassis
would meet the specifications easily. Size wise they would be able to hold the
cooler and weight. The wagon from Lowe’s is rated to hold between 500 and
600 lbs. The Power Wheel’s vehicle is rated to hold a maximum of 130lbs. So
they both satisfy the weight requirements that are necessary to support the
cooler. As far as size goes they will both fit into a 4 door car, the Power Wheels
will fit into a standard trunk and the wagon will fit into the backseat. So the
physical size requirement is accomplished with either choice. The wagon has at
a minimum of 5 inches of ground clearance and is designed to be used outdoors
so its platform would be stable and able to withstand and water that might occur
in the operation of the vehicle. The Power Wheels vehicle will select would be an
off-road model so it would also have the ground clearance and stability for the
application. However, it would need to be hardened against water since the
vehicle is plastic and the electronics are not fully shielded. So would have to
take some preventative measures to ensure that no water would get on any
critical components, i.e.; batteries, motors wiring etc. A positive with the power
wheels chassis is that it comes with batteries, motors and everything it needs to
ride all it will would need to do is interface with that to control the system. The
wagon would need a lot of work to add on an electric motor, batteries, and a
powered steering system.

The easiest way to power the vehicle is to get one that is already powered and
modify it from there. The main downfall with a lot of vehicles currently out there
is that they are built for kids to ride in and not for hauling things around. This
creates two problems firstly that the chassis will need to be modified to
accommodate carrying the payload will be used, a cooler. The second problem

                                                                                  43
is that for steering these vehicles use a steering wheel for control of the vehicle
direction. This system is difficult to convert to a powered system that can be
controlled electronically on a minimal budget.

To convert this steering into a powered version would require a lot of mechanical
design that is beyond the scope of what the group decided would be reasonable
to accomplish. The second idea was to just remove the steering from the front
wheels and allow them to freely turn since the will be using two separate motors
to power the rear wheels. It would be relativity simple to turn the vehicle using
just differential power to the rear wheels. The motorcontroller will be using
already has this feature built in and will accomplish it without many problems.
The problem using this is that just removing the wheels from the steering causes
them to not perform correctly. It can be likened to a car that has the tie rods
broken. The wheels either both point outwards or inwards. This happens
because the point of rotation for the wheel is inside the vehicle away from the
center of mass of the wheel. This causes under movement the wheels to point in
a set direction. This would make moving the vehicle very difficult as the wheels
would act as brakes to the vehicle. So, on a vehicle with a central steering
system the group would need to change it so that the wheels would be free
spinning and also have the point of rotation above the wheel itself, ie above the
center of mass of the wheel. See Figure 10 Broken Tie Rods for an example of
what happens when the steering rods are broken and the wheels center for
rotation is not above the center of mass of the wheel.




                        Figure 10 Broken Tie Rods
                              [Permission Pending]

                                                                                44
The chassis also needs to have adequate room to mount all the subsystems that
are being used in the robot. The location for attaching these devices needs to be
protected from the terrain and also from the weather conditions. So having a
vehicle that is just a flat platform with wheels attached is not desirable from the
standpoint of mounting the equipment to the chassis. The vehicle chassis that is
being used has spaces that are protected from the terrain and from any weather
that the vehicle might encounter. The electric motors are allready in the chassis
as are the batteries, this saves a lot of mechanical work to get these devices
mounted correctly and safely. There are areas that the rest of the electronics
can mount in the chassis, in the battery are there is space to place most of the
electronics. This helps out immensly to simplify the mechanical designing that
will be needed to do to properly install the electronics and to makes sure the will
be unaffected by the enviroment the vehicle is in.


  Water Gun
There are a few choices for what to use for a water gun and also for how to
power it. One option would be a pneumatic style water gun. In this configuration,
pressurized air, in a chamber, pushes water through a nozzle and sprays it out in
a stream. This is a common configuration for squirt guns and other sprays like
aerosol sprays and spray paint cans. It has the ability to spray a large quantity of
water at great distances. However it would require an air tank to be pumped up
using either a small on board compressor or to manually pump it by hand in
advance. This could pose a problem if there isn’t enough air stored in the tank or
if using an onboard compressor, it would have to be big enough to keep up with
demand. Another option would be to use a small electric pump and spray nozzle.
In this configuration the electric pump forces water through the spray nozzle. This
also can spray water at great distances but is limited only by the size and power
of the pump and size of the nozzle. There is no need to soak anyone from head
to toe, but there should be enough water spray to get people to take notice and
possibly get out of the path of the vehicle. Using a pump, reservoir, and nozzle
from an automotive windshield washing system is a perfect choice for this
application. The parts are cheap, easy to modify, and readily available. The
pumps are also built to run on 12 volts, so with the use of a relay that is
controlled by the microcontroller or the receiver from the manual control system,
power can be sent directly from the powerful 12 volt batteries, used for driving
the motors, to the washer pump. The pump is small but powerful. Most cars have
two separate sprayers, each with two spray streams. If only one sprayer is used,
the distance of the two remaining streams should be greater. The output of one is
more than adequate for this application.

Along with a water gun there is also a possibility of using a small horn to help get
people out of the way. This can easily be implemented into the design if it is to be

                                                                                 45
sounded whenever the water gun is to be fired. Since the water gun is of a 12
volt design, and automotive car horns are also 12 volts, running them off the
same power system is feasibly possible if the power system can output enough
current to operate both simultaneously without losing performance from the water
gun. The downside to using a horn is in cases of many obstacles or people, the
sound could become a nuisance.




                                                                             46
Design
The research process helped determine specific parts to use for the application.
With that information, the design process can be started. Each subsystem has to
be designed to work with all the other systems. This section explains in detail the
designing of each subsystem as well as the completed vehicle’s design.


  Design Summary
The Tailgate Buddy’s motors, 12 V battery, and chassis will come from a Fisher
Price Power Wheels toy vehicle. The reason for this is because the vehicle
includes a battery, a drivetrain, a chassis, independent motors, and an adequate
steering system which are all already integrated. Some of the superfluous
components of the Power Wheels vehicle will be removed, such as the
windshield and the seats, to make room for the payload. The Tailgate Buddy will
have two microcontrollers. One microcontroller is to control the functions of the
GPS module. The GPS module will track GPS satellites and record GPS data to
a Secure Digital (SD) card for later analysis. There will be a graphical user
interface that will allow the user to upload their data to and see the route
displayed.     This will tie into existing online mapping software for example;
Google Maps, Yahoo Maps, or Map Quest. The second microcontroller (the
“master microcontroller”) is responsible for handling any other input and output,
such as from sensors and the radio controlled (RC) remote control. Input to the
RC remote control comes directly from the user to manually move the Tailgate
Buddy. There will be two kinds of sensors used. Ultrasonic sensors will be used
to detect obstacles so the Tailgate Buddy can avoid them using obstacle
avoidance algorithms.       The microcontroller will utilize obstacle avoidance
algorithms to continue following the user without colliding with the foreign object.
Infrared (IR) sensors will be used to track the IR transponder carried by the user.
There will also be a small device mounted on the top of the vehicle to project
water if the sensors detect an object between the transponder the user is
carrying and the vehicle.




                                                                                 47
                 A
                                                                  E
                 B



                 A       C                               D
                 B
                                                                  E
                 A




                                      Front of Vehicle




          Figure 11 Approximate Location of Subsystems
                         [Figure created by John Fuoco]


                         Table Of Locations Of
                             Subsystems
                     A           Ultrasonic sensor
                     B              IR Detectors
                     C               Batteries

                     D        Microcontroller and GPS

                     E            Electric Motors
                         Table 7 Subsystem Legend

  Block Diagrams
The three block diagrams shown visually show the basic layout of the main
systems and subsystems of the project. There are identified all the inputs to the
                                                                              48
system and all the outputs that the entire system requires to function correctly.
There are a seemingly small number of inputs and outputs the system as a
whole. This is seeming deceptive making it appear as though the inputs and
outputs are easy to quantify and most of them are. All one input and one output
are very easy to quantify and pretty simple to accomplish. It is the IR
Transponder on the input side that will be the hardest to get working properly,
and on the output side it is the driving around that will require a lot of work to get
it to function properly.




               Figure 12 Inputs – Outputs Block Diagram
                        [Figure created by Greg Koeppen]

The block diagram entitled Microcontroller shows a basic over view of all the
major and minor subsystems that are in the project. It also shows what group
member is responsible for the design and testing of a certain subsystem. That is
not to say that because one person is not in charge of a system that they can’t
help the other member out. This is encouraging people to work together to solve
the problems that are encountered. The more people brainstorming on a
problem the better the potential solution could be. The software block diagram
shows a rough idea of what is known that software needs to be written for; this
software needs to perform the goals that have been laid out. The most important
piece of the software block is driving; if this piece of software does not work
correctly then no other features of the robot will work. It is by far the most
important piece of software that will be written for the project.

                                                                                   49
              Figure 13 Microcontroller Block Diagram
                      [Figure created by Greg Koeppen]




                  Figure 14 Software Block Diagram
                      [Figure created by Greg Koeppen]

  Subsystems
Most of all of the subsystems are being designed separately with a lot of
communication going on between the members of the group to ensure capability

                                                                         50
with the subsystems. Each group member has a few subsystems that they are in
charge of designing and testing. Whoever is in charge of a particular subsystem
is responsible for communicating to the other group member’s important
information about their system and how it interacts with another’s systems. For
example, if I was in charge of the GPS module I would need to tell the person in
charge of the microcontroller what communication protocol my system needs and
how it needs to be turned on and used properly. Most components are using the
subsystem design method because the project is varied enough to give each
member enough to work on separately so everyone can be in charge of a
different aspect of the project. This also lets each member be accountable for
some part of the project making sure that the work load is evenly spread across
the group members. There are also some areas where every group member is
involved in the design. The microcontroller is one of those areas because it is
vital to all the subsystems that are being designed that they interface with the
microcontroller correctly. So every group member is responsible for the
microcontroller to help reduce the chance of subsystems needing to be
redesigned because of compatibility issues with the microcontroller.

The Tailgate Buddy will have an array of subsystems to manage all of its
functionality. The subsystems it will contain are a GPS system to track where the
Tailgate Buddy has been. The Tailgate Buddy will have a drive train consisting
of all the drive components to move the Tailgate Buddy, an RC controller for
manual operation of the Tailgate Buddy. The Tailgate Buddy will also have a
water gun for a warning system for pedestrians, an obstacle avoidance system to
prevent the Tailgate Buddy from running into any obstacles, and a Tracking
system for use while trying to follow its target. Not all of the Subsystems will be
operational at the same time. The manual drive operation will make use of the
RC controller circuits allowing the driver full operation of the Tailgate Buddy. The
automatic operation will make use of the tracking system for following its target,
the obstacle avoidance system for adjusting speed and distance from its target
and to make sure the Tailgate Buddy doesn’t run into any obstacles. The GPS
will be operating all the time tracking where the Tailgate Buddy has been.

The master microcontroller will manage all of the subsystems, determining what
systems should be running and what each system should be doing. The master
microcontroller should be monitoring the status of the different systems and
determine if the Tailgate Buddy should be in manual operation mode or if it
should be running in full automatic operation mode. If the Tailgate Buddy is
running in manual mode it won’t power down the automatic systems but simply
ignore the inputs given to it by the automatic systems allowing the RC remote
control of the system. Once the Tailgate Buddy is put back into automatic mode
it will leave the power applied to the RC subsystems to monitor if it is supposed
to be manual operation or automatic operation and begin monitoring its automatic
subsystems to determine where it should be headed.

                                                                                 51
Since the Tailgate Buddy will only have one microcontroller to manage all of the
subsystems the software to manage the subsystems will consist of many
different pieces. The master microcontroller will have main function with the
purpose of calling all of the sub functions at appropriate times. The main function
will have the job of managing the sub systems. If the subsystem is not in
operation the main function simply will not call the sub routine to manage that
subsystem. If the subsystem is in operation the main function will have to job of
dividing the time among the subsystems appropriately. Dividing the time
appropriately is important since the obstacle avoidance system and the tracking
system are important in keeping the tailgate buddy moving in the correct direction
and at the right speed while not allowing it to run into any obstacles. While
systems like the GPS subsystem can’t be ignored as they are recording
important information they are not vital to the Tailgate Buddy fulfilling its role
successfully and thus it is important to ensure the Tailgate Buddy is going to
make a successful trip, keep following its target at a safe distance and avoid any
obstacles that may block its path by allowing the vital systems priority on the
microcontroller. While this shouldn’t present a problem it may mean that systems
such as the GPS tracking may be able to record all the GPS tracking points that
would like for a clean route to be recorded however should be enough to make
an accurate outline of where the Tailgate Buddy has been and what path it took
to get there.


     Tracking System Design
The tracking system must meet its design goals or the robot will not function, so
along with the drive system the tracking is the most important system on the
robot. The tracking system must be able to follow one person at ranges up to
about 20 feet. It must be able to discriminate between the operator it is to follow
and other people who might be around the robot. The tracking system is split
into two different subsystems, the transponder and the receiver.                The
transponder is a small device that the operator wears on themselves to emit IR
pulses that will be tracked by the detector. The receiver will receive these pulses
from the transmitter and translate them into directions for the drive commands
and then move the vehicle around accordingly. The tracking system will not work
if there is not a clear line of sight between the operator and the vehicle. So if an
obstacle comes into the line of sight the vehicle will have to decide on what to do
next. Should the robot attempt to drive around the new obstacle or should it stop
and wait for the operator to come and save it from being tapped.

The transponder will be a small little device that is battery powered and is able to
be affixed to the operator. It shall contain a battery, the IR LED (currently
TSAL7600 from Vishay Semiconductors), and a switch to turn it on and off. The
circuitry inside shall be simple a little circuit that minimizes battery use and

                                                                                 52
pulses the LED at a regular interval ex 10 kHz. See Figure 15 Pulsed Circuit
for a general circuit for the generation of the pulses. So far I feel that using a
LF351 Op-amp for the pulse generation should work well and make changing the
frequency as simple as changing the value of a resistor or a capacitor. The
values of R1, R2, R3, and C1 have yet to be determined and will be decided
upon depending what frequency works best in testing of the transponder. The
output of the OP-amp will drive the IR LED. It has been decided what frequency
is best to use but will do testing to determine what frequency is best to use for
performance and battery life. The on-off switch shall do just that turn the device
on and off. In off mode ideally the device would use not energy but as long as it
is close to zero that will be good for the purpose. The goal is to power the
transponder on a three volt watch battery for its small size and weight. The size
for the package that is the goal is about the size of a remote unlocking device for
a car.




                           Figure 15 Pulsed Circuit
                         [Figure created by Greg Koeppen]

The receiver will be able to detect the pulses from the transponder and determine
where the operator is in relation to the vehicle. The receiver will then tell the
drive systems what it needs to do in order to follow the operator around. It will
tell speed and direction to the drive system. The drive system will take these
commands and either drive straight or turn, or take action to follow the operator.
The vehicle will have at least two photo detectors that are optimized for the
950nm frequency. If the Tailgate Buddy only use two detectors they will be
positioned on the front of the vehicle at angles that allow overlapping in the
center, directly in front of the vehicle. Each detector is positioned at a corner on
the front of the vehicle. Since each detector has only a cone of where it can
detect from if set up in this manner it simplifies the drive circuitry. If the operator

                                                                                    53
is in the area that is overlapped by both detectors the vehicle will drive straight
ahead. If the operator is outside of the middle cone the vehicle will turn towards
the side that sees the operator, this angle of turning will depend upon the speed
that the vehicle is traveling. See Figure 16 Detection Cone below for a graphical
representation. The current photodiodes on the vehicle will be used are from
Vishay Semiconductors are the BPV22NF. These are readily available and have
a quantum efficiency of 90% at 950nm. So they match up with the IR LED very
well since they are both matched for the same frequency. In Figure 16
Detection Cone you can see that the IR detectors have an angle of detection of
60 degrees. The plan is set up the detectors so that they overlap by about 30
degrees in the center of the vehicle.




                         Figure 16 Detection Cone
                        [Figure created by Greg Koeppen]

This zone of overlap will be the area where the vehicle is following behind the
operator. This means that the vehicle shall continue to drive straight as long as
the operator stays within this zone. If the operator goes outside of this area
central zone of overlap the vehicle will need to take one of three different actions.
The first two actions are turning either right or left to continue to follow the
operator as he or she is walking around. If the operator is in the zone on the left
of the picture the vehicle will need to turn right to follow and continue to follow
until the operator is in the central zone of overlap. The same is true if the
operator is in the cone of detection for only the right cone a pictured, ie the
vehicle will turn left until the operator is back in the central zone of overlap. The
                                                                                  54
last option is that the operator is not in any of these three zones. This would
mean that the person is either too far off to the sides of the vehicle to be seen or
too close to the front of the vehicle. If the person is too close to the front of the
vehicle the obstacle avoidance will detect the person and take appropriate action
to not collide with the obstacle. If the operator goes off to the right or left of the
vehicle the vehicle will be programmed to slow down and increase the radius of
the turn until the operator has been detected again. If this slowing down and
scanning method does not work the vehicle will stop completely and wait for the
operator to come back with the detection area and will then start to drive again.

The last way for the vehicle to lose the person is if the person is approaching the
vehicle, close enough for the obstacle avoidance to stop the vehicle or steer
around it. Then the person is standing on the side of the vehicle where there is
no detection for the operator. The vehicle will remain stopped and will not scan
for the operator if the operator approaches the vehicle.


     Obstacle Avoidance Overview
The obstacle avoidance system must be fast at determining if an obstacle exists
and the position of the obstacle. The Obstacle avoidance system must also be
fast at determining what action must be taken to avoid the obstacle. The
obstacle avoidance system will consist of three ultrasonic sensors, each one
covering a different section of the front of the Tailgate Buddy. It is important to
have the entire front including the front corners of the Tailgate Buddy covered to
prevent the Tailgate Buddy from running into an object straight on or turning into
an object. Since the Tailgate Buddy is very heavy it could do some real damage
if it were to hit an object, making the obstacle avoidance system important to
prevent an accident from happening.




                                                                                   55
            Figure 17 Obstacle Avoidance Detection Cone
                        [Figure created by John Maskasky]

The front sensor of the obstacle avoidance system will have the job of
determining the speed of the Tailgate Buddy. The Tailgate Buddy will keep the
person it’s following directly in front of it. Since its target will remain directly in
front of Tailgate Buddy, the front sensor of the obstacle avoidance system will
see the target almost consistently. Since the front sensor will see the target
consistently and will be receiving distance measurements from the Tailgate
Buddy’s target consistently, the front sensor can be used to determine speed and
following distance from the Tailgate Buddy’s target. The Tailgate Buddy will try
to leave a safe following distance from the target. A safe following distance is the
distance it will take the Tailgate Buddy to stop without running into its target.
This distance will be affected by the fact that the Tailgate Buddy will not always
have sight of its target. If the target roams outside of the front sensor the
Tailgate Buddy will have to maintain, increase, or decrease its speed in order to
maintain control and regain sight of its target without running into its target or any
surrounding obstacles.
                                                                                    56
The side sensors will have partial view of the front and front corners of the
Tailgate Buddy. The readings the obstacle avoidance system receives from
these two side sensors will determine if the tailgate buddy has to make a turn to
avoid an obstacle or if the Tailgate Buddy has to avoid making a turn in a certain
distance to ensure that the tailgate buddy doesn’t turn directly into an obstacle or
sideswipe an obstacle. The algorithm for the obstacle avoidance system also
has to determine if the target has turned a corner that the Tailgate Buddy cannot
turn because of an obstacle. The algorithm for the obstacle avoidance system
has to realize this is the case and maintain speed allowing the Tailgate Buddy to
turn the corner when it is safe. If the target has disappeared from sight because
they have walked too fast for the Tailgate Buddy and has disappeared from the
obstacle avoidance system the algorithm has to tell the Tailgate Buddy to speed
up in order to reacquire its target. As the target gets closer to the Tailgate Buddy
the algorithm for the obstacle avoidance system has to slow the Tailgate Buddy
to match speed with its target. By matching speed the Tailgate Buddy can keep
up with its target without running into the target or losing the target by moving too
slowly. If the Tailgate Buddy has to turn to avoid an obstacle the tracking system
may lose its target. Since the Tailgate Buddy loosing the target would cause the
Tailgate Buddy to have to come to a stop and wait to reacquire a target, the
obstacle avoidance system will make an effort to point the Tailgate Buddy back
at the target before returning control of the Tailgate Buddy back to the tracking
system.

The obstacle avoidance system has the responsibility of protecting the Tailgate
Buddy from damage and protecting obstacles around it from taking damage. The
obstacle avoidance system will use ultrasonic waves to detect obstacles before
the Tailgate Buddy reaches the obstacle. By providing early detection of the
obstacles, the obstacle avoidance system can navigate the Tailgate Buddy
around the obstacles avoiding collisions. The obstacle avoidance system has
another important responsibility as well; it has to maintain proper speed following
its master. While the target walks forward the obstacle avoidance system has
the task of keeping up with the target by matching the speed. This task will be
completed by use of the front facing sensor. Since the front sensor will be
returning the distance of the target as an obstacle and the only obstacle directly
in front of the Tailgate Buddy is the target the front sensor will be returning the
distance of the target. Using this distance that can determine the speed the
Tailgate Buddy has to travel in order to keep up with the target. If another
obstacle appears in view of the front sensor the Tailgate Buddy, the Tailgate
Buddy will slow and stop to avoid hitting the obstacle. The Tailgate Buddy will
utilize the same algorithm for matching speed of its target, as it will stop for this
obstacle to prevent a collision. This phenomenon makes it practical to use the



                                                                                  57
forward facing sensor of the obstacle avoidance system for matching the speed
of the Tailgate Buddy’s target.

The obstacle avoidance system will consist of 3 ultrasonic sensors. Each sensor
will have a view of 7 feet forward and 4 feet to each side. They will all connect to
the microcontroller via the independent serial connections. The microcontroller
will manage the information coming in from the sensors and determine what
actions the Obstacle avoidance system must take in order avoid a collision and
maintain correct speed. Each ultrasonic sensor will have an area of the front of
the Tailgate Buddy it is monitoring. Two ultrasonic sensors will be watching each
side of the Tailgate Buddy ensuring that the Tailgate Buddy doesn’t turn into an
obstacle. Depending on the location of the obstacle in view of one of the two
side sensors, the Tailgate Buddy may need to maneuver to avoid hitting an
obstacle. The front sensor will be responsible matching the Tailgate Buddy’s
speed with its target. The front sensor will also slow or stop to Tailgate Buddy to
avoid hitting any new obstacles that appear directly in front of it. Each sensor will
have a viewing angle of forty-five degrees.

The software will receive the data from each sensor and determine from the input
whether there is an obstacle in danger. If there is an obstacle in the way, the
software will direct the Tailgate Buddy around the obstacle. If the obstacle is
directly in front of the Tailgate Buddy the front sensor will pick this up and
transmit this data to the software. The software will slow the Tailgate Buddy to a
stop or apply sudden breaks to prevent it from running directly into the obstacle.
The sensors have to be read more often than every second in order to get an
accurate estimation of the location of the surrounding obstacles. If the obstacle
is to one side the Tailgate Buddy may have to maneuver to clear the obstacle or
avoid turning until the Tailgate Buddy passes by the obstacle and the obstacle is
no longer a threat. If the obstacle is in the front of the Tailgate Buddy, the front
sensor has to detect the obstacle in enough time to slow the Tailgate Buddy to a
stop, as the Tailgate Buddy will take some time to stop fully loaded. Because of
the stopping distance the forward facing sensor will have to be read more often
by the software than the other sensors to detect the obstacles sooner and give
the Tailgate Buddy the extra time it needs to stop.

The obstacle avoidance system will determine the speed the Tailgate Buddy
needs to travel to keep up with its target while maintaining a following distance
that will allow it to stop short of its target without running into its target. The
obstacle avoidance system will determine the speed based on the following
distance. As the following distance increases the Tailgate Buddy will increase
speed to keep up, however as the following distance decreases the Tailgate
Buddy will have to decrease speed in order to keep from running into the target.
The sensors return the following distance up to seven feet in inches. Since the
following distance is reported so accurately the obstacle avoidance system can

                                                                                  58
use this to determine the speed it needs to travel and if the following distance
decreases quickly the Tailgate Buddy will decelerate quickly to ensure that it
does not run into the target that is slowing down. The side sensors will use
distance to determine if the obstacle is too close ensuring the Tailgate Buddy
doesn’t turn until the obstacle is clear. If the distance on a side sensor is
approaching the Tailgate Buddy rapidly the obstacle is coming towards the
Tailgate Buddy meaning that the Tailgate Buddy must make the necessary
maneuver, meaning the Tailgate Buddy must turn, to avoid the obstacle.
Sensing the obstacle in this way is possible because of the angle the side
sensors will see the obstacles at. The side sensors won’t make the distinction
whether the obstacle is in front or back of its viewing range, they will only
determine that they can see the obstacle. This is why the obstacle avoidance
system must determine the position of the obstacle by how fast the obstacle is
approaching the Tailgate Buddy.


        Description
The Obstacle avoidance system will use ultrasonic sensors for detecting
obstacles that the Tailgate Buddy could run into. This detection includes
obstacles directly in front of the Tailgate Buddy and obstacles that the Tailgate
Buddy could turn into. While obstacles that the Tailgate Buddy could turn into
are not as big of a threat they are still a concern for the safety of the obstacle and
the Tailgate Buddy. To do this it will be necessary to make use of some
advanced ultrasonic sensors. These sensors have the ability to detect obstacle
distances allowing the obstacle avoidance system to determine if an obstacle is
of immediate danger to the Tailgate Buddy.

The Ultrasonic sensors require a voltage in the range of 2.5 to 5.5 volts DC. It is
necessary to feed the ultrasonic sensors a steady voltage, changes in voltages
will cause the sensitivity to spike or drop. These changes could cause false
readings in the outputs greatly affecting the ultrasonic sensors accuracy. Each
sensor will have a coverage area of about seven feet long and four feet wide.
The length won’t be an issue, as the sensor will return accurate distance
measurements of objects. Using the distance measurements that can determine
if an object is in immediate danger or if that can continue without taking action to
avoid the obstacle. The ultrasonic sensor will communicate via RS232 serial
port, it will return an ASCII character ‘R’ followed by the three ASCII numerical
digits representing the distance the object is from the sensor. The obstacle
avoidance sensors must be able to accurately detect obstacles that are a four
feet distance away so it can avoid turning in to such obstacles. The ultrasonic
sensors must also be able to detect obstacles that are within one foot of the
Tailgate Buddy so that it can make an emergency stop or quick maneuver turn to
avoid hitting the obstacle. Regular quick last minute turns will indicate something

                                                                                   59
is wrong, as the Tailgate Buddy should be making small adjustments to its path
to avoid stationary obstacles rather than last minute maneuvers.

The microcontroller should have the ability to read RS232 serial, it should have
the hardware included to read RS232 serial included. The microcontroller should
have the ability to pole all three-obstacle avoidance sensors every second and
run the obstacle avoidance algorithm to determine obstacle threat.               The
microcontroller must have the ability to gather data from the front facing
ultrasonic sensor every quarter second, run a speed calculation and adjust for
changes in the targets speed. If this cannot be accomplished it will run the risk of
running into the target. The Cerebot microcontroller is rated to take a voltage
range of 3.6 to 9 volts DC, it will not accept voltages outside that range as they
may damage the microcontroller. To power the microcontroller and the ultrasonic
sensors it will need a stable voltage of 4 to 5 volts DC power. The power supply
must be stable and have a voltage protection circuit to cut off if the battery supply
voltage drops below 3.8 volts to protect the microcontroller and the ultrasonic
sensors on board. For the serial port connection the TX pin on the ultra sonic
sensor will connect to pin two on the ninepin RS232 serial connector. The
ground pin on the ultrasonic sensor will connect to the ground pin on the ninepin
RS232 serial connector. This is illustrated in the picture below.




                                                                                  60
   Figure 18 Ultrasonic Sensor Connection
[Permission to reprint figure given by www.Sparkfun.com]




          Figure 19 RS232 Connection
[Permission to reprint figure given by www.sparkfun.com]

                                                           61
The three ultrasonic sensors will be setup in a fashion that will provide a full view
in front of the Tailgate Buddy. The sensor in front will have the responsibility of
measuring distance to the target and controlling speed. The front ultrasonic
sensor will also prevent the Tailgate Buddy from running into an object head on.
The front sensor will have a range of seven feet in front allowing it to see the
target roaming ahead, if an obstacle comes between the Tailgate Buddy and the
target it will cause the Tailgate Buddy to come to a stop waiting for the obstacle
to move or the target to come back into view. The two side sensors will have an
angle view of the front and the sides of the Tailgate Buddy to watch for obstacles
approaching that the Tailgate Buddy may hit either straight on or turn into. If the
Tailgate Buddy will run into an obstacle, the Tailgate Buddy will have to make a
turn to avoid the obstacle. If the Obstacle is at such a distance so that the
Tailgate Buddy won’t run into it but will stand a chance of hitting the obstacle if it
turns the obstacle avoidance system will have to prevent the tailgate buddy from
turning until the obstacle is sufficiently past the Tailgate Buddy. The Tailgate
Buddy will not require any rear ultrasonic sensors for obstacle avoidance since
the Tailgate Buddy will not be operating automatically in reverse; therefore it will
not use any rear sensors to determine if the Tailgate Buddy is safe to turn. To
determine if the Tailgate Buddy is safe to turn it will use a calculation based on
the speed and length of the Tailgate Buddy. The Tailgate Buddy’s blind spots
and danger zone while making a turn are indicated in the figure below.




              Figure 20 Obstacle Avoidance Blind Spots
                                                                                   62
        Software
The software for the Tailgate Buddy will be designed to check each of the
sensors every half-second and the front sensor once every quarter second. The
side sensors are not a critical as they are only looking to see if its safe to turn the
Tailgate Buddy and checking to see if the Tailgate Buddy will have to make a
maneuver in order to avoid an obstacle approaching from the side. The front
sensor will have to be monitored every quarter second because it is critical in
adjusting the speed to ensure the Tailgate Buddy doesn’t run into its target, this
sensor is even more critical since the Tailgate Buddy won’t be able to stop
instantly but will require some distance to stop.

The software for the obstacle avoidance system will have no user interface. The
software will be monitoring the sensors and performing calculations on the
results returned by the sensor. While the front facing sensor is the most
important, the two side sensors are performing important observations the
software needs to know. The software will be designed to prevent the Tailgate
Buddy from turning directly into an object by simply taking the results from the
last reading from the side sensor and determining if there is an obstacle in range
and if the Tailgate Buddy will hit that obstacle if it turns. If the obstacle is far
enough away the software will allow the turn to take place allowing the Tailgate
Buddy to turn. The software will then be watching the side sensors and front
sensor to determine if the obstacle is now in immediate danger. If the target is in
view and the obstacle is safe control is returned to the targeting system, if the
obstacle is still a problem the obstacle avoidance system will have to continue
moving around the obstacle until the obstacle is clear then it will return control to
the targeting system.


        Hardware
The hardware for the obstacle avoidance system will consist of three ultrasonic
sensors and a Digilent Cerebot Microcontroller. This system will also require a
power supply admitting a stable 5volts DC. The entire system will have to be
mounted inside water resistant cases since the Tailgate Buddy is an outdoor
vehicle. The ultrasonic sensors will be tricky since the case they are put in could
affect their ability to detect obstacles. They will be cased in [material unknown]
because this material will not block or distort the ultrasonic signals being
transmitted by the sensors. The microcontroller will have to be mounted inside a
waterproof plastic case to prevent it from getting wet. The plastic case housing
the microcontroller will have to have multiple holes allowing the serial and power
cables through. Each hole will have to be sealed against the outside


                                                                                    63
environment preventing water penetration. This is important since the sensitive
electronics on the microcontroller will be damaged by moister.

The ultrasonic sensors will have to place inside weatherproof cases as well.
Since the case may affect the sensitivity of the ultrasonic sensor, it will be
necessary to adjust for this either by software or hardware. If the Tailgate Buddy
ha a false reading being given continuously by the ultrasonic sensors it can be
programmed the software to ignore the ghost image and continue. Another way
to get around this problem might be to use a different material over the sensor
that doesn’t block ultrasonic waves. The power supply will also have to be put
into a plastic waterproof case preventing water penetration. If water gets into the
power supply it could cause the power supply to short out or cause a spike in
power which could blow out the master microcontroller and slave microcontrollers
and blow out the ultrasonic sensors.




                       Figure 21 Ultrasonic Sensor
            [Permission to reprint figure given by www.sparkfun.com]


        Obstacle Avoidance Microcontroller
The obstacle avoidance microcontroller has the responsibility of monitoring the
ultra sonic sensors to determine if an obstacle is present. If there is an obstacle
present the microcontroller will have to make a decision as to whether the
Tailgate Buddy should turn to avoid the obstacle, avoid turning into the obstacle,
stop or slow to avoid running into the obstacle, or ignore the obstacle as it is not
in the path. The microcontroller will have obstacle avoidance as a priority
algorithm in the design. The algorithm will first check the front sensor judging
distance between the Tailgate Buddy and the target. After this the algorithm will
check the two side sensors, one than the other looking for obstacles. If there is
an obstacle it will determine if the obstacle is too close to the Tailgate Buddy and
there is a danger of hitting the obstacle if immediate action is not taken or if the
Tailgate Buddy is not in immediate danger. There will only need to be one
                                                                                 64
microcontroller, the master microcontroller will have the processing power
available to determine distance, speed and tracking without fumbling. The
master microcontroller will also have the available ports to read all the sensor
data and determine what needs to be done with it.

The ultra sonic detectors will be connected to the microcontroller via serial port.
By addressing a serial port to the microcontroller it gives direct access to the
ultrasonic detectors. The detector will transmit the data to the serial port via
ASCII characters. It will transmit a capital ‘R’ followed by three ASCII numeric
characters representing the distance the obstacle is from the detector in inches.
This routine will be a function on the main microcontroller. This is possible
because the checking the ports, retrieving the data, and running the algorithms to
determine speed and distance of obstacles. The software will have to take into
account the obstacle positions and determine if the Tailgate Buddy is safe to
travel in the chosen direction. The software will check the two side sensors and
determine if the obstacle is close enough to the Tailgate Buddy to cause it harm.
If the obstacle is too close the Tailgate Buddy the algorithm will cause it to turn to
avoid the obstacle. Next the algorithm will check the front sensor to detect the
distance the target is from the Tailgate Buddy. The function will use this distance
to determine the speed of the Tailgate Buddy. If the target is increasing in
distance from the Tailgate Buddy then the algorithm will increase the speed. If
the target is decreasing in distance from the Tailgate Buddy then the Tailgate
Buddy will decrease in speed to match the targets speed.


     GPS
The PCB will be printed and shipped via the internet using www.pcbexpress.com.
For a complete diagram of the PCB, please refer Figure 22 PCB for GPS Unit
below. The circuit will now be described in its entirety. For a complete circuit
diagram of the GPS unit of the Tailgate Buddy, please refer to Figure 23 GPS
Unit Circuit Diagram below. The PIC16F819 Microcontroller will be connected
in the circuit as follows. All connections are in series, unless otherwise noted. Pin
1 will be connected to a 1 k resistor (R5). The other end of R5 is connected to the
base of Q1, a BC327 PNP bi-polar junction transistor (BJT). The emitter of Q1
connects to VCC. The collector of Q1 has several connections, and will be
mentioned later in the description of the circuit. Pin 2 of the microcontroller
connects to a 470R resistor (R3).




                                                                                   65
                       Figure 22 PCB for GPS Unit
                              [Permission Pending]


The other end of R3 is connected to the green side of a bi-color LED (D2). D2 is
then connected to ground. Pin 3 of the microcontroller is connected to another
470R resister (R4). R4 is then connected to the red side of D2. Pin 4 of the
microcontroller is connected to a 4k7 resistor (R1). The output of R1 is connected
just after the receiving end of a 1N4001 diode (D1), and this connection joins pin
1 (VDD) the 5x SIL socket (CONN1). Pin 5 of the microcontroller is connected
directly to ground, and also connected directly to a 100 nF ceramic capacitor
(C2). C2 is then connected to the non-receiving end of D1, pin 2 of the MMCX
antenna connector (J1), which then connects to pin 14 of the microcontroller and
pin 2 of CONN1. C2 is also connected to the SPST push button (S1), which is
connected in parallel with a 10 nF ceramic capacitor (C3). The other end of S1 is
connected to a 100k resistor (R2). The other end of R2 is connected to ground.
The other end of J1 is connected to VCC. Pin 6 of the microcontroller is connected
to the junction between C3, S1, and R2. Pin 7 of the microcontroller is connected
to pin 7 of the SD card socket (CONN2). Pin 8 of the microcontroller is connected
to pin 2 of the SD card socket, and to a 10k resistor (R9). The other end of R9 is

                                                                               66
connected to the base of a BC327 PNP BJT (Q2). The collector of Q2 is
connected to a 330R resistor (R8). The other end of R8 is connected to the red
end of a bi-color LED (D3). D3 then connects to ground. The emitter of Q2 will be
mentioned later. Pin 9 of the microcontroller is not used in this circuit. Pin 10 of
the microcontroller is connected to pin 5 of the SD card socket. Pin 11 of the
microcontroller is connected to pin 1 of the SD card socket. Pin 12 of the
microcontroller is connected to pin 5 of CONN1. Pin 13 of the microcontroller is
connected to pin 4 of CONN1. Pin 15 of the microcontroller is connected to a 10k
resistor (R15). The other end of R15 then connects to pin 6 of the 10x SIL socket
(CONN3), and to another 10k resistor (R16). R16 is then connected to ground.
Pin 16 of the microcontroller connects to pin 3 of CONN3, and to a 10k resistor
(R14). R14 then connects to the base of a BC327 PNP BJT (Q4). The collector of
Q4 then connects to a 1k resistor (R13). R13 then connects to the red side of a
bi-color LED (D4). D4 then connects to ground. The emitter of Q4 connects to the
collector of another BC327 PNP BJT (Q3), pin 9 of CONN3, a 2k2 resistor (R12),
and a 100k resistor (R11). The other end of R12 is connected to the green side
of D4. The other end of R11 connects to ground. R11 is also connected in
parallel to a 100 nF ceramic capacitor (C5). The connections for the base and
emitter of Q3 will be mentioned later. Pin 17 of the microcontroller connects to
pin 4 of CONN3. Pin 18 of the microcontroller connects to a 1k resistor (R10).
R10 is then connected to the base of Q3. The emitter of Q3 connects to VCC, and
to a 68k resistor (R17). The other end of R17 connects to pin 7 of CONN3, and to
a 100k resistor (R18). The other end of R18 connects to ground. Pin 3 of CONN2
is connected to pin 6 of CONN2, which are both connected to ground. Pin 4 of
CONN2 is connected to the collector of Q1, to the emitter of Q2, to a 2k2 resistor
(R7), and a 100k resistor (R6). The other end of R6 is connected to ground.
There is a 100 nF ceramic capacitor (C4) connected in parallel with R6. The
other end of R7 is connected to the green side of D3. Pin 3 of CONN1 is
connected to ground. Pins 1, 2, 5, and 10 of CONN3 are not used in this circuit.
Pin 8 of CONN3 is connected to ground. VIN on the LE33CZ Voltage Regulator is
connected to a 3.6 V battery (B1). B1 then connects to ground. GND on the
voltage regulator also connects to ground. VOUT on the voltage regulator
connects to a 2.2 uF capacitor (C1), and VCC. The other end of C1 is then
connected to ground.




                                                                                 67
Figure 23 GPS Unit Circuit Diagram
        [Permission Pending]

                                     68
     Master Microcontroller
The Digilent Cerebot board is designed to work well with Digilents full line of
peripheral modules. These modules connect to the Digilent Cerebot board using
Digilents 6-pin connectors. These add-on boards are specifically designed to
work well with custom applications involving switches, buttons, LEDs, and other
circuits. The Digilent Cerebot board uses an ATMega64 AVR processor with
4KB of internal SRAM and 128KB external SRAM. The microcontroller also has
64KB of program flash memory that can be used for storing the program code
necessary to power the Tailgate Buddy and a 2KB EEPROM that will be used for
the purpose of storing a basic boot up algorithm allowing all the components of
the Tailgate Buddy to come alive using the proper startup process each
component will need. The microcontroller will have the ability to directly drive up
to eight servo motors and three H-bridge modules. This board is preferable for
the mobile app on the Tailgate Buddy because of its low power consumption,
small size, and processing power.

Using add-on board serial connectors, the drive controller and ultrasonic sensors
will be attached by serial port. The software will access the serial ports through
the add-on card calling the addresses of the add-on card and referencing the
serial port. Each devices driver will consist of a function containing the proper
protocol for communicating with the specified device and will receive and return
parameters in a common format that will make it easy for the master program to
use the device. The master program will manage the amount of processor time
each of the attached components is allowed to consume and prevent any
component from taking control of the microcontroller. It will do this by using a
watchdog timer to monitor the program and shutting down the Tailgate Buddy to
prevent it from causing harm should the watchdog time be forced to shut down a
critical process.

The master microcontroller will have a failsafe system to prevent the Tailgate
Buddy from running away or ramming obstacles. The fail safe system consists of
a watchdog timer and a rating associated with each process. If the process
freezes up and gets caught by the watch dog timer the process will be
terminated. Based on the rating associated with that process the Tailgate Buddy
may be shut down and require manual restart. If the process is a minor process
not essential to the operation of the Tailgate Buddy, the process will be
terminated and restarted to allow the Tailgate Buddy to continue to follow
uninterrupted. If the process is a critical process, like the obstacle avoidance
system, tracking system or the speed control system the Tailgate Buddy will be
shut down and allowed to roll to a stop to prevent it from causing damage or
injury to any surrounding pedestrians or obstacles. The Master microcontroller
will then attempt to restart the application. If the application restarts and

                                                                                69
operates properly returning the correct output, assuming the Tailgate Buddy’s
tracking system still has its target in view the Tailgate Buddy will resume its
course and catch up to its target. The master microcontroller will record this error
in a buffer file which will be saved in the onboard flash memory. The recorded
file will make for easier debugging later and allow the Tailgate Buddy to report
any errors it has encountered during its run.

The figure below shows the schematics for the Digilent Cerebot microcontroller,
the master microcontroller in the Tailgate Buddy. The schematic shows all the
power connection options and many of the ports available on the microcontroller.
The schematics show the details for how the SRAM is connected to the board
the reset button and the LED’s available for output on the board. The schematics
also show the available servo motor connectors and the PMOD connectors used
for connecting the Digilent Add-on boards.




             Figure 24 Master Microcontroller Schematic
                              [Permission Pending]


                                                                                 70
     Software
A simple console application will be programmed for extracting the GPS data
from the Secure Digital (SD) card. The data from the GPS receiver will be stored
on the SD card not as ASCII values, but as pure high and low bits, which means
that the data are not immediately readable or recognizable to any operating
system. The application will extract the data and parse it in a manner that will be
readable by Google Maps, or a similar online map service. This program will
allow the user to select a drive or directory on his or her PC (personal computer)
that contains relevant GPS data. The parsed data will be stored in a text file
which does contain ASCII values.

The main function of the application will take two arguments, as illustrated in
Figure 25 Example of How to Launch GPS Parser Utility below. The first
argument the application takes is the location of the input data. The second
argument the application takes is the location and file name of where the user
would like to store the output data. After the user presses the enter key, if the
user input is correct, the program begins parsing the data according to the user
specifications.

The previously mentioned program will create a comma-delineated text file. This
text file will then be able to be uploaded to a website with the address
http://www.gpsvisualizer.com. This website allows the user to choose which
service (Google Maps or Google Earth) on which the user would like to view the
coordinates from the most recent use of the Tailgate Buddy. This website alls
allows the user to save the coordinates as a map in a JPEG, PNG, or SVG file,
an elevation profile, or even as plain text.




                                                                                71
           Figure 25 Example of How to Launch GPS Parser Utility

                        [Figure created by Ken Kauffman]




     Motor/Drivetrain
In choosing to use a Power Wheels vehicle, the overall design of the drivetrain is
greatly simplified as mechanically, the original configuration can be used as-is.
There is no need to modify anything mechanical. The motors already have a
gearbox set up for a low gear ratio. This gives the ability to use the small but
efficient motors the vehicle comes with. Another nice quality with using the
motors and gearboxes in their original configuration is the resiliency of the
design. It is a proven design that has been engineered and revised by its makers
to make it a lasting quality part. They can stand up to the abuse that children
inevitably put them through. A few members of this project grew up with some of
the original Power Wheels’ Jeeps. From previous experiences, the vehicles have
proven to be water resistant, built with parts with good heat dissipating qualities,
and overall extremely rugged. T hey were driven through tall grass while going
up slopes even though they were designed to only be driven on hard surfaces.
They were subjected to carrying more weight than the original 130 lbs they are
rated for. One even stood up to being over powered by using a 12 volt marine
battery and then subjected to popping wheelies while being driven by an average
adult male. Never once did a vehicle strip a gear or burn up a motor while being
subjected through years of torture. All of these vehicles were given away and
used by younger children, and no doubt put through more abuse.

                                                                                 72
Although the motors and gearboxes can be used as-is in the mechanical aspect,
the wiring will need to be heavily modified for the purpose of this project. The
vehicle is set up for having both a low and high speed when operating in the
forward direction, and a low speed reverse function. The low speed is
approximately 2.5 mph and the high speed is approximately 5 mph. This is nice
for a child’s play toy as 2.5 mph is a nice walking pace and 5 mph provides for a
little bit more fun. Although the 2.5 mph speed would work for a normal walking
speed for the tailgate buddy to follow the user, this is not an ideal setup for a few
reasons. The first reason being, that not every user will walk the same speed.
Also as the batteries drain, the speed will gradually slow down. Finally if an
obstacle is encountered and causes the vehicle to fall behind the user, it should
be able to pick up a little more speed to catch up with the user when it is no
longer obstructed. Ideally the user should never have to wait around for the
vehicle to catch up.

To combat those problems the vehicle must be able to have a variable speed
setup. Only having a choice between 2.5 mph and 5 mph could work but the
operation would not be as smooth as a variable speed setup with at least four to
an almost infinite number of selectable speeds. Almost all of the original wiring
configuration is to be done away with. It will be replaced with an electronic
variable speed control, which is controlled by the microcontroller when in
autonomous mode, or by relays which can power the motors when signaled by
the receiver when in manual mode.


     Power Supply
The power supply is composed of three separate battery systems and their
chargers. The largest battery bank is made up of the two 12 volt 9.5 Ah lead-acid
rechargeable batteries. Each is of the same type as what comes with the Power
Wheels electric vehicle. An example of one and its charger are pictured below in
Figure 26 - 12 Volt 9.5 Ah Rechargeable Battery and Figure 27 - 12 Volt
Quick Charger. The “Pb” symbol on the battery in Figure 26 - 12 Volt 9.5 Ah
Rechargeable Battery indicates that the battery is a lead based battery.
However instead of just using one battery, two wired in a parallel configuration,
are to be used to extend run time. This will also require the use of two chargers
so as to not lengthen charging time.




                                                                                  73
           Figure 26 - 12 Volt 9.5 Ah Rechargeable Battery
                              [Permission Pending]




                    Figure 27 - 12 Volt Quick Charger
                              [Permission Pending]

Since the microcontroller is going to be run off a separate battery system, it does
not need to be as large or as high of a capacity of a battery system as the
batteries for the motors require. However is should still be rechargeable as
replacing batteries over and over will get expensive and should be reduced as
much as possible.




                                                                                74
     Electronic Speed Controller
The speed controller is a crucial part of the vehicle’s overall control and
movement. It has multiple types of inputs and outputs. The most obvious input is
the supply voltage. It will receive a 12 volt input voltage which it will use to power
itself and it will output a variable voltage and variable current, up to that 12 volt
supply, to the motors. It also will use an RS232 serial input that can be used for
either RC inputs or for receiving commands from the microcontroller. The last
output is a 5 volt output which is used to power an RC receiver. It can only output
100 mA so it would not be a good idea to power both the RC receiver and the
microcontroller off this one output as running both together could pull more than
100 mA at times.


     RC Tx/Rx
If the three channel radio system is used, the normal driving functions, forward,
reverse and steering can be handled in manual drive mode in much the same
way as in autonomous mode. The receiver outputs a DC voltage signal on each
channel which are connected to inputs on the microcontroller. The polarity and
voltage level are used to determine which direction to move and how fast to
power the motors or how far to turn the wheels when steering. For the water gun
function, the slide switch on the controller operates the on the third channel of the
radio. Although the switch is of a proportional style, and not just on-off, it can still
be used as an on-off style. When that voltage level exceeds a set threshold
which is predetermined by coding, it can signal the relay which applies a higher
DC current to the water pump. However since this radio system costs more and
would require more work to implement it into the drive control system because of
programming complications and the need for extra inputs to the microcontroller, it
may be a good idea to stick with the very basic two channel radio.

For the two channel radio to operate, there are two ways to go about designing it.
The RoboteQ speed controller does have inputs for this type of operation already
built into it. The microcontroller will connect to speed controller using the serial
input on it. Alternatively, the speed controller comes with an adapter for plugging
an RC receiver into that input. Once it is plugged in the controller can easily be
programmed to use the outputs of the RC receiver and control the motors. There
is a one touch setup button for programming throttle positions. By simply pushing
that button and toggling the throttle control of the transmitter from full reverse to
full forward, the throttle control is learned. If the motors are to be controlled
independently to aid in steering the vehicle there is a jumper on the speed
controller that can be selected and a tank steering mode can be activated. To
learn this function, the programming button would be pressed again and steering

                                                                                     75
would be toggled on the transmitter going from full left to full right or vice versa.
Once that is programmed the speed controller is ready to drive the vehicle. At
this point it is unknown whether programming the speed controller to do that
would make the serial input incompatible when switched to being controlled by
the microcontroller. If the speed controller was programmed to be driven by a
receiver and then is asked to instead be driven by the microcontroller, it may not
understand what it is asking it to do. Testing will have to be done to know for
certain whether or not that is a problem.

If the microcontroller cannot override the programming of the receiver input, there
is another plan for how to design the RC system. It is quite simple and uses an
array of switches and relays in combination with a very simple 2 channel
transmitter and receiver. Switches will be used to cut signal off from the outputs
of the microcontroller and power the autonomous system off since it will not be
needed. Then the receiver can be powered on with the other side of a 2 pole
switch that cuts power from the autonomous system. This will limit the number of
switches the user must toggle and will ensure that only one drive system can be
on at one time. The receiver is different for ordinary receiver as it does not put
out a proportional signal. It outputs a positive or negative 9 volts to 2 separate
channels. These outputs will each be connected to relays. The design will use
standard single pole, double throw, 12 volt DC automotive relays as they are
cheap and can be found everywhere. Although these are 12 volt relays, the 9 volt
output of the receiver is strong enough to toggle these relays. When the receiver
outputs to the low current side of a relay on pins 85 and 86 of the relay Figure 28
Basic Wiring Schematic, the relay trips and allows high current to flow from pin
30, to pin 87 which goes out to the corresponding motor. Since there are two
outputs, one output and relay could be used for each motor and when used
together both motors would get power, but when used separately one motor
would be on while the other was off which in turn causes the vehicle to turn to the
direction of the stalled motor. This will provide no proportional speed control. The
motors will either run at full speed or be stalled. This should not be a problem as
the vehicle will not be following the user in manual drive mode and can send the
vehicle to a location at a higher rate of speed. This also should make the vehicle
more fun to drive. Reverse will require the use of two additional relays that when
triggered will put power to the reverse wires of the motors.




                                                                                  76
     Receiver                                 86                           85

                                                          COIL
                      Battery

                                    3


      Motor                                   87

                                                                     87
                   Figure 28 Basic Wiring Schematic
                            [Figure drawn by John Fuoco]

The following figure shows the wiring in an easy to understand block diagram.
The receiver sends out the low current 9 volt output to the two relays when
signaled by the transmitter. When a relay is triggered, high current can flow
straight from the battery to one or both motors.


                                    Receive
                                    r
        Channel                                                  Channel
        1                                                        2 Relay
        Relay
                                     Batter
                                     y


                   Left                              Right
                   Motor                             Motor



                  Figure 29 RC Wiring Block Diagram

                           [Figure drawn by John Fuoco]

     Chassis
For out chassis design out of simplification that will have to be purchased is a
chassis that is already complete and meets most of the major goals for a chassis.
The chassis will have selected will be able to hold the required payload of 100

                                                                                77
pounds. It will be able to conqueror the terrain specification that the vehicle has.
Some modifications will need to be made to the vehicle for it to carry the payload
securely and hold the electronics.

The first modification that will need to be done to the vehicle is to cut a portion of
it out to make room for the payload it is using use. This will mean removing the
seat and making a suitable platform for a cooler to be placed. The second
modification that will need to be done is to mount the two IR Detectors on the
front of the vehicle as shown in Figure 16 Detection Cone. The detectors need
to be mounted on each side of the front of the vehicle. They also need to be
aimed fifteen degrees off center towards the outside of the vehicle for the proper
operation of the tracking system. This is a critical dimension to be kept so the
mounting of these two detectors needs to be very robust and needs to have as
little likelihood of breaking or changing direction as possible. The obstacle
avoidance hardware also needs to have a secure mounting on the front of the
vehicle.

The biggest modification that would need to be made to the vehicle is to convert
the steering system to a powered version capable of being controlled via a
microcontroller. The best idea on how to do this is to remove the steering wheel
and replace it with two linear actuators. Each of the actuators would be attached
to the chassis with the ability to rotate about an axis. Each one of the actuators
would control turning in one direction only. For example, if the right actuator was
activated by the microcontroller the wheels on the vehicle would begin to turn
right, this would work the same way for the left actuator turning the robot to the
left.

The other components, microcontroller, GPS module and antenna will be
mounted inside the compartment where the batteries are located. They will be
mounted inside of waterproof boxes to ensure that they will not get wet in the
event of any rain.


     Water Gun
The automotive washer pump system appears to be the ideal setup for this
application. All the parts for this design come from a 1999 Dodge Dakota pickup
truck. The reservoir and pump are fitted together in a compact unit. These parts
were chosen because of the compact design and also because they are
salvaged parts off a team-member’s wrecked vehicle. Using parts already in
possession of the team helps keep overall costs down. The pump and reservoir
are to be located on the floor of the chassis. Installing them under the plastic
hood of the Power Wheels Jeep would be a nice location; however there is not a
lot of space under there. What little extra space there that is available under

                                                                                   78
there will be taken by the extra battery that is to be installed in parallel with the
original battery which is already under there from the factory. There is space on
the floor of vehicle though. Since there will be no real driver or passenger,
legroom is not a concern. Also having the reservoir there still allows for easy
refilling.




                                  Reservoir


    Battery                                                     Nozzle

                                                       Hose
                   Switch         Pump

                 Figure 30 Basic Washer Pump System

                            [Figure drawn by John Fuoco]



The nozzle will be fitted to the plastic hood of the Jeep in much the same way as
they would on a car with the exceptions of the outlet facing forward instead of
facing a windshield, and mounted at the front of the hood instead of towards the
rear. This setup should put the nozzles in a prime position for hitting people with
the streams of water where they are likely to easily take notice, which is from the
abdomen down to the knees. The hose which connects the nozzle to the pump
and reservoir is routed underneath the hood and down through the base of the
under-hood bin and through the toe of the floorboard where it will be attached to
the pump outlet. To do this holes are drilled in the under-hood bin and through
the floorboard. This is merely to hide the hose, keeping the water gun as stealth
as possible until it is fired off. The original length of the hose is longer than
needed since it used to belong to a much larger vehicle. It is to be shortened so
there isn’t a long coil of unnecessary hose to fit into the vehicle. This is easily
accomplished as the hose connectors are a slip fit design. The hose can be
pulled off either the pump or nozzle ends and cut with scissors before reinstalling
it back on the connector.

If a horn is used in conjunction with the water gun, it will have to be made so it
can also be silenced. A simple two pole switch in line with its power wire can
easily interrupt it and render it inoperable. The switch will be mounted on a panel
along with other necessary switches. When the switch is off only the water gun

                                                                                  79
will operate. The same idea can also be applied to the water gun. In cases where
the water gun is not desired, like being used indoors, a switch can interrupt its
power as well. If neither feature is desired, both can be switched off; however the
user may have to go back and let the vehicle find the tracking device again
before it can move on. Although switches are a very simple solution, they add to
options that the user has available to them.




                                                                                80
Prototype
Since this project is a rather large venture that is composed of many smaller
projects, proper planning for the building of each system is very important. This
section is dedicated to the initial building of the vehicle and all of its subsystems.
A plan for how each subsystem is going to be built is detailed below.


  Procurement
All parts that it will use on the project will be purchased by the group. Most of the
parts will be bought from online retailers since they have lower costs for almost
everything. For any parts that need that are not worth buying online, resistors,
capacitors, excreta visit Skycraft Parts & Surplus. Most if not all of the part will
be on order by the start of the spring semester. This is to ensure that any parts
that have a long lead time that will be able to get with plenty of time to build and
test.

  Building Methods
There are several different methods for building the project that are going to be
used. To make the system easier to build, a system that is ready for integration
upon arrival will be purchase. The microcontroller is a good example of this; to
make the project simpler, the development board will be purchased and the PCB
etched by a professional company based on the specified design. A professional
PCB manufacturer will be contracted to build the boards to ensure a quality
board that won’t be troublesome in the final build. The two board fabrication
houses that can be used are PCB Express and PCB123. most likely PCB123 will
be contracted to manufacture the boards due to the free design software they
provide. At least one member of the group is familiar with using their software to
create PCB’s as well. PCB123 has a website that also has a pretty extensive set
of tutorials to help the board design process. The ordering process when using
their software is very easy to use and their prices are very reasonable. Once the
PCB boards are received, they will undergo extensive testing to ensure they
match the design and meet quality guidelines.

For part placement there are a few items that are required; soldering iron,
magnification glasses for small parts, tweezers, solder wick, solder, solder flux,
alcohol for cleaning the board. Two of the group members have a decent
amount of experience soldering electronic parts so they will be utilized to solder
all of the parts. After the parts have been soldered to the boards they will be
visually inspected for any defects by someone different than the person who did

                                                                                   81
the soldering. If everything looks good the board will be cleaned with alcohol and
tested for functionality. If it does not pass the functionality test then the board will
be trouble shot until it either works or the problem has been determined and a fix
decided upon. If it requires cutting traces and jumpers they will be done and then
retested again. This process of testing and fixing will continue until the board
works as expected. The cutting of traces and using jumpers is only a fix to
continue to test the board and only is to be used in prototyping; ideally there will
be no cuts or jumpers on any board in the final design that will be presented
when the project is due.

Because of the skill and knowledge required build some of the components
required to build the Tailgate Buddy, a lot of the parts will be ordered as an entire
subsystem and then be assembled. If the required parts took extensive time to
build and test, the Tailgate Buddy could run over time limits causing the project
not to be completed on time. By purchasing parts as whole units that can be
soldiered together and programmed through software, the Tailgate Buddy will
take less time to build and hopefully have a higher reliability factor.


  Subsystems
Each subsystem will have to be built independently. This allows for testing and
verifying that each system works properly before the Tailgate Buddy is put
together. This is necessary to ensure that every system is functioning properly.
If a subsystem is not functioning properly, the system will have to be debugged to
find the error and correct the problem. If the Tailgate Buddy is assembled before
all the systems are functioning properly it will be hard to analyze if the problem is
being caused by interference with anther subsystem or communication with the
master microcontroller or if the problem is being caused by the subsystem itself.
For this reason a prototype of each subsystem will be built and tested to comply
with the specifications for its operation. Each subsystem will be simulated first to
ensure all the algorithms and code function properly then the subsystem will be
built to scale and run under a controlled environment to ensure that each part in
the subsystem will communicate with the microcontroller and that each part in the
subsystem functions properly. Individual prototypes ensure that when the entire
Tailgate Buddy is built that no problems will arise from inside a given subsystem.

     Motors and Drivetrain
Since the main vehicle platform is being purchased from Power Wheels, the
majority of the parts for the drivetrain will come with the chassis. The motors and
gear boxes are already installed into the vehicle. However other smaller parts will
need to be acquired and added to the drivetrain. Most of these parts are for

                                                                                     82
wiring the main power circuits for the motors. These circuits are high current and
will be built using 12 AWG wire. Along with purchasing various colors of 12 AWG
wire, various connectors and terminals, heat shrink, fuses, wire loom, relays and
switches will be needed. Most of these parts will be purchased from Watek Inc.
[www.waytekwire.com]. They have just about every type of connector, color of
wire and type of switch anyone could ever need. Their selection is great and their
prices are very good considering there is usually a minimum order for each
product. For all the parts being assembled in the Tailgate Buddy, multiple
switches, relays, and various other components will be required making it
possible to order these items in bulk and get a reduced price.

Prototyping the drivetrain should be fairly easy in comparison to the rest of the
build. Since the motors and gear boxes are already mounted, the wiring is main
focus for this area of the build. The majority of the vehicle’s original wiring
configuration, as it comes from Power Wheels, will have to be removed and
reconfigured for this application. The wiring between the speed controller and the
motors will use the 12 AWG wire as it is the high current circuit. The controller
side will use the screw down connectors that are on the controller’s board. The
motor side of the wiring will be made with quick disconnect bullet style terminals.
The original wiring from the motor will be cut and fitted with one end of the quick
disconnect and the new wiring will be fitted with the matching counterpart
terminal. This will make reconfiguring the system easier as it will likely have to be
done a few times before it is right. All of the relays and switches have a standard
¼” male spade terminal at every connection. Sticking with this standard
connection, ¼” female terminals will be used to make all the connections for
those various components. All of the wiring needs to be neatly laid out to avoid
confusion. Wire loom will be used to group wires together to keep the layout
cleaner. However since the wiring will most likely be reconfigured a few times,
the wire loom needs to be easily removable so wires can be changed out and
rerouted if necessary. Split corrugated plastic wire loom will be used instead of
the mesh tube kind since the split design allows for the loom to be removed
without disconnecting all the wires that pass through it. This allows for only the
wires that need to be removed to be disconnected. Also more wires can be
added in without disconnecting all the wires that pass through it.


     Power Supply
The main batteries for the drive system are two 12 volt lead acid batteries wired
in parallel. One of these batteries and charger comes with the Power Wheels
vehicle. Since two are needed, a second battery will be purchased on eBay
[www.ebay.com]. There are many sellers on there who price the same batteries a
little lower than in stores and directly from Power Wheels. The batteries for the
user’s transponder will be AAA batteries so they can be bought from local stores

                                                                                  83
whenever they are needed. The microcontroller and other sensors will be
powered by a separate rechargeable Ni-Cd battery pack commonly used in toy
and hobby RC cars. This battery will also be bought new on eBay.

The two main 12 volt batteries for the drivetrain that are to be wired in parallel are
going to be mounted under the vehicles hood. Originally one battery is mounted
there. To mount a second there, some slight cutting will have to be done to fit it
next to the original battery. A new battery hold down strap will have to be made
as the original will not fit over both batteries. New wiring will have to go from
these batteries to the speed controller. The battery pack for the microcontroller
and sensors will have a quick disconnect that will allow for the battery to be taken
out and recharged. Another connector matching the one on the charger will have
to be installed into the vehicle so it can be easily connected and disconnected.


     Electronic Speed Controller
The RoboteQ ax1500 electronic speed controller will be bought from The Robot
MarketPlace [www.robotmarketplace.com]. They seem to have the widest
selection of motor controllers. Although most of the controllers are made only for
radio control, they have many designed for microcontroller interfacing. Most of
the other robot parts dealers specialize in combat robots which are mostly radio
controlled so as a result that is all some of those places carry. Although the price
of the controller may seem high at first, for the features and specs that it carries,
it is actually a very good value for this application.

The controller will have to be mounted somewhere between the drivetrain
batteries that are under the hood and the motors. The goal here is to keep the
wires as short as possible to limit resistance and maximize efficiency. There is
room for it under where the seats once were and the payload area will sit. This
will place it close to the motors. There will also need to be adequate ventilation
for it to cool itself properly so a couple of vent holes may need to be cut.
However these vent holes cannot be in any location that could allow moisture to
get to the controller. The vehicles main payload will be a large cooler. Since
coolers normally carry ice and water, it is crucial that any water spilled does not
make it down through a vent. So the vents should be located towards the bottom
of the chassis. To aid in cooling, a small 12 volt computer case fan may be
added to keep air flowing through the vents. There are a couple of these fans
already in possession of the team. One particular model is a 4.5” brushless DC
0.25 A fan. It should be able to flow more than enough air to help keep the speed
controller cool. The fan can be turned on when the controller receives its supply
power from the main batteries when the vehicle and controller are turned on. The
controller has a protection mode that engages when it reaches an excess
temperature. The first step of this is to limit output current to the motors. At a

                                                                                   84
certain point if the temperature does not fall back down to an acceptable level it
kills output all together. This fan should help keep the vehicle moving and avoid
unwanted cool down periods. There must also be a new platform made for the
payload to separate it from the electronics to keep water from seeping down
directly onto them.

The controller connects to the microcontroller and the RC receiver using a
standard 9-pin serial connector. The serial connectors come with the controller.
One is an adapter that allows a receiver to be plugged directly into the controller.
The other is a connector with leads that allow custom wiring to microcontrollers.
The original plan is to only connect one connector to this port at a time and
switch back and forth by disconnecting one and swapping for the other system’s
connector to switch between modes. It may be possible to get y-adapter that
would allow both serial connectors to be plugged in at once. However if this is
used it would have to be designed so that only one system could use the port at
a time. Having both on at once will likely confuse the controller and possibly
damage it. This may be done with a simple toggle switch that when flipped one
way only powers the microcontroller and when flipped the other way powers only
the RC receiver. This would ensure that only one system could be active and
using the serial port at a time. Also this is assuming that the controller can easily
be programmed to accept both modes of control and switched using the jumper
configuration. If it can, then a more advanced switch with two sets of inputs and
outputs can be used and then only one switch would have to be toggled to switch
between manual and automatic driving modes. However for the purpose of the
original prototype, manually swapping serial connectors and selecting of the
jumper switch will be done to avoid added complications. Adding switches and
splitters can be done later when the entire vehicle is functional.


     RC Tx/Rx
All of the radio equipment will be purchased from Tower Hobbies
[www.towerhobbies.com]. They specialize in the RC hobbies and have the widest
selection of products out of any other dealer. Local hobby shops were another
option. There are quite a few that are local and they have many RC parts that
would be helpful for this project. However their prices are usually a little higher
than ordering from Tower Hobbies, even after shipping and handling costs. Also
from previous buying experiences their shipping is quite fast and it is even priced
low. The RC equipment will have to be mounted near the speed controller as the
leads for connecting the receiver to the controller are not long enough to place it
anywhere else and they should not be lengthened too much or there may be a
loss of signal quality. The receiver also has to be mounted in an area where the
antenna can easily make it to the outside of the vehicle. Placing it near one side
of the vehicle will allow for the antenna to be placed far to one side of the vehicle.

                                                                                   85
Since the receiver and speed controller are located under the payload platform,
the antenna needs to be far to one side to keep it out of the way of the payload.
The antenna is a wire antenna and needs a plastic mast to support it upright.
This plastic mast is installed by drilling a small hole into the plastic of the chassis
and feeing the antenna up through it and out. The third channel of the radio that
is to control the manual firing of the water gun will use a servo that will also be
mounted near the receiver and speed controller. This servo manually toggles a
switch that feeds power directly to the water gun. To do this, both the servo and
switch need to be rigidly mounted to a plastic plate and a metal rod will connect
the servo horn to the end of the switch. When the servo moves it will flip the
switch in either direction turning it on and off. It will be in the off position when the
servo is in starting position; only toggling on when the user slides the switch on
the transmitter. It is possible to buy solid state devices that do this electronically
but they are $30 for the cheapest models and still require a relay. The radio
equipment already comes with two servos and one may be used for this part. So
the mechanical approach may not be the easiest but it does work and cost the
least amount. Channel one of the RC system will control the forward and reverse
movement of the vehicle. It is the part that connects directly to the speed
controller through the serial connector. Channel two is what controls the steering
of the vehicle. This channel will output to the steering actuator that will turn the
front wheels. It also may split and connect to the second input channel of the
speed controller. The speed controller can take this input and use it to do a sum
and difference measurement and control the drive motors independently. It will
slow the inside wheel and speed up the outside wheel to act as a differential and
aid the vehicle in steering. This differential function may not be necessary in the
initial prototype, as the original Power Wheels vehicle did not use a setup like
this, but it would be a nice feature to help the vehicle lower its turning radius and
increase maneuverability.


     Water Gun
The majority of the water gun is already acquired. The pump, reservoir, nozzles,
and even a car horn (if used) are all from the 1999 Dodge Dakota. There may be
a need for new hoses. If that is the case, it will be purchased from the local
AutoZone. The wire, switches and relays that will be needed for it will be included
in the parts that are ordered from Waytek for the drivetrain. The prototype for the
water gun is pretty simple. The spray nozzles will be mounted on the hood by
drilling a hole for each nozzle’s connector barb to pass through. The hoses will
connect to them from under the hood which hides them and gives the nozzles a
nice flush and stealth look. The important thing to consider here is that there will
be other sensors mounted near the nozzles. The IR receivers and ultrasonic
obstacle detector will be close by. The spray from the water gun must not hit
these sensors or expose them to any moisture from leaks or drips, so they will

                                                                                      86
have to be carefully mounted. The hose will continue through the hood and down
to the pump and reservoir which will be mounted to what used to be used as a
floorboard for passengers. The microcontroller will power it by using a relay and
the RC system powers it using the toggle switch. For the prototype, this is all that
is really required. Later on there could be an addition of an audible horn and
addition switching options but it is best to keep to a minimum for the early design
and to keep things simple.


  Final Build
After individual systems have passed basic testing the construction of the final
build can be started. The first step is to paint the chassis and body of the vehicle.
This may seem like a premature step but it needs to be done without any of the
electronics and parts inside the vehicle to avoid hitting them with overspray. To
show a little school pride and make for a real tailgating vehicle, it will be painted
black and gold with UCF and Knights logos on it. The body will be painted with a
black basecoat. Most likely a flat or satin black paint will be used, as gloss paint
tends to show imperfections in the spray pattern too easily. This is important
because the vehicle will primarily be used outdoors and the sun will usually show
all the imperfections in a gloss paint job very easily. All the trim and accents, like
light bezels, hubcaps etc, will be sprayed with gold. It is important not to go
overboard with the gold or some people may see it as gaudy and image is
everything with this vehicle. After the painting process is complete, all of the
decals that came with the vehicle can be used. There are fake headlight and tail
light decals that can be placed on. There are also Jeep logos and various other
tags that can be used. They will be placed in appropriate locations to make the
black and gold paint look like it is the original color scheme that the vehicle came
with.

At this point all the subsystems need to be pulled together and made to work as
one fully functioning robotic vehicle. The chassis is the starting point since all the
subsystems have to mount to it. The basic layout for the component locations is
shown in Figure 31 Basic Layout of Components. The motors are already
installed from in place from Power Wheels. They do not require any different
mounting techniques. The main drive batteries will be mounted under the hood
after the body is modified for them to fit and a new battery hold down them both
down is fabricated. The electronic speed controller will be placed into the vehicle
first. The vent holes will be cut and the cooling fans will be installed. The steering
actuator for the front steering system will be attached to the chassis and steering
system of the original Power Wheels design.

With the basic design for driving functions taken care of, the control system
needs to be addressed. All of the microcontrollers including the master controller

                                                                                   87
and their power supply will be placed under where the seats once were along
with the speed controller. The RC receiver will also be placed there and the hole
for the antenna mast will be drilled on one side of the rear corner of the vehicle.
The receiver’s wire style antenna will be fed up through the mast and out through
the top. The GPS logger also must be attached to the chassis. The antenna for it
will be fed up through like the RC antenna was, however it will be fed through on
the other side of the vehicle. The antenna will be mounted by either a screw
holder or double sided adhesive tape. Holes for connecting the new wiring
harness to the drive motors will need to be drilled from the area under where the
seats used to sit and the wires fed through and connected to each motor. The
main power wires from the drive batteries to the speed controller will be fed from
under the hood, through the vehicles toeboard of the floor, across the floor and
then through under the seat and to the controller. The high current wires
connecting the water guns power will need to be fed from the main batteries
under the hood, through the toeboard, to the relays under the seat before
returning back to the water pump and reservoir. The low current side of the relay
will be connected to the microcontroller in charge of obstacle avoidance. The
manual firing switch for the water gun’s RC firing mode will take power directly
from the high current side of the relay’s power feed and send it straight to the
water pump. The holes for the nozzles will be drilled and the nozzles can be
inserted and secured in place. The horn can be mounted under the front bumper
to help hide it and its power wires will be tied in with the water pump. The hose
for the water pumps output fitting will be fed up through from the floor, up under
the hood and to the nozzles. The IR receivers will be mounted up on the hood of
the vehicle higher than the nozzles. Their signal wires will be ran all the way back
to their microcontroller and attached securely. They will be run along the opposite
side of the floor as the power wires are ran to avoid electromagnetic interference.
The ultrasonic sensor will be mounted low on the vehicle’s plastic bumper to give
it an accurate field of vision for all low obstacles. The signal wires for it will be run
through the front of the body and then alongside those of the IR receivers. There
will also be a switch panel mounted on the floor of the vehicle that controls all the
various functions like power switches, horn and water gun selection and RC or
auto modes. Once all the main system components are in place and mounted
securely, final wiring connections can be made. Wires will be cut to their final
lengths and terminals can be crimped onto wire ends and inserted onto switches
and boards. Once all the wiring is in place, all of it will be covered with the plastic
corrugated wire loom. The wire loom can be clipped into place to keep it from
moving around or getting caught on a wheel or other object or dragged on the
ground.




                                                                                      88
  Wheel                                                  Wheel

                                    Compartment for:
                Steering Actuator   Microcontrollers,        M
                                    Rx, GPS logger,          o
Drive                               Speed Controller,        t
Batteries                           relays,        and       o
                                    Control    system        r
                                    battery                  s

                       Pump and
  Wheel                Reservoir                         Wheel



            Figure 31 Basic Layout of Components


                   [Figure drawn by John Fuoco]




                                                                 89
Testing
It is important to test not only the completed vehicle but also each subsystem for
proper operation. Testing will begin on some items as soon as they are acquired,
others will have to wait until systems are finished. If possible any individual part
will be tested first to ensure proper operation before it is used for building. This
will help keep limit faults with bad parts and help minimize time spent
troubleshooting. It will also give a better understanding of how each part works.
Testing of subsystems will begin as soon as they are built and will follow the
testing plan outlined below. Once each subsystem passes all of the tests, they
can be installed into the vehicle. After completion of the build process, the entire
vehicle can be tested. This section details the test plan, and testing environment
for every aspect of the project.

  Parts
Testing each of the parts prior to them being mounted in the Tailgate Buddy and
utilized is essential. Each part and accessories will have to be inspected, setup
properly, calibrated and activated in order to verify they function. Next each part
will have to be run under simulated conditions to verify it returns the correct
output and runs under the normal environmental conditions.

The first group is the passive device and active devices and they are like the
name suggests all passive or simple active devices. These will be the resistors,
capacitor and inductors that will be used in the project. These will only require a
visual inspection prior to use that they are not damaged in any way and that they
are the correct size and spec that the design calls for. If the design requires a
250K Ohm resistor that is a 1/2 Watt and the resistor that is ordered is a 250K
Ohm resistor but only 1/8 Watt then it will definitely not work for the design and a
different resistor needs to be procured. The same goes for all the other devices
that will be used in the design. If the part fails under normal operation but was
not inspected upon arrival, problems will arise upon final assembly of the Tailgate
Buddy that were previously unknown.

The next group of devices will be critical parts these parts need to be very correct
to make the design work. These parts will be tested individually to be sure that
they perform correctly. For the IR LEDs they will all be tested for angle of
radiation of the IR frequencies. They will also be tested to be sure that the
specified amount of radiation is coming out of them per the data sheet. This
intensity will be measured at three foot intervals straight in front of the device till
the measurements drop to low to read. The electric motors will be turned on and
tested under no load to be sure that they do not burn up spin without and major

                                                                                    90
problems ie; grinding noise, spraying grease, bent rotating shaft, etc. The
batteries that will power the vehicle will be used and drained and then recharged
to be sure that they function properly. The motor controller will be tested on the
motors and all functionality will be tested that will be used in the final design. The
motors will operate in a tank like mode using differential speed to turn the
vehicle.


  Subsystems
Each subsystem will be tested individually before the system is approved to be
installed on the final vehicle. Each subsystem has its own specific tests that
need to be performed. These tests are specified in the appropriate section below
for the system in question. Once a subsystem has passed all the tests the
design is then frozen and a final version is made. It is this final version that will
go on the vehicle. In some subsystems where the parts are expensive the
prototype will need to used in the final Tailgate Buddy vehicle.


     Chassis
The chassis is a very important part of the design of the vehicle because of the
environment that the robot will operate in. This means that the chassis needs to
be able to be driven off roads, across parking lots, and even be able to weather
some light rain and still function as expected. The decision was made to buy a
prebuilt chassis to ensure that there won’t be extensive problems with the
chassis that will take away valuable time needed to design, test, and build other
systems the Tailgate Buddy will need. As with all the systems on the Tailgate
Buddy, any changes or modifications made to the chassis will have to be tested
thoroughly to ensure that the chassis can still support the required weight and
was not weakened due to the design change. Any changes to the mechanical
structure of the vehicle need to be very thoroughly tested in the environment the
vehicle is to be operated in before the parts that are susceptible to breaking are
installed. Once the chassis has passed these tests it is ready for the subsystems
to be installed.


     Tracking System
The tracking system is composed of two main subsystems the Transponder and
the IR Detector. For the proper functioning of the tracking both subsystems must
be in proper working order and must have passed all the tests as laid out in their
testing described below. The overall tracking system has a single primary goal
and that is to tell the drive system what to do. It does this with two detectors and

                                                                                   91
a transponder that is on the operator. While the operator is in the central zone of
overlap by both detectors the tracking system will tell the drive system to drive
straight. The strength of the signal will tell the drive system how fast the vehicle
needs to move in the forward direction. The system will also compare the
difference in signal strength from the transponder to the two separate detectors
and use this information to determine which direction to turn and how much to
turn. The best way to test the tracking system is in conjunction with the drive
system on the vehicle and to test as a part of a partially integrated system. The
GPS, water gun features as well as the obstacle avoidance do not need to be
integrated into the vehicle at the time of this testing.

To test this in the lab the vehicle will need to be set up so that not one of the
wheels is touching the ground. Then the drive and tracking systems will be
turned on. The transponder will be placed directly in front of the vehicle at a
distance of five feet. The vehicle wheels should not move within six feet of space
from the vehicle. The testing table shown below Table 8 Tracking System
Distance and has the criteria for passing or failing this test. Once the distance
test has been passed the next important test to run is to test the system for
turning capabilities. The transponder will be placed at a distance of 10 feet from
the vehicle and then moved to one side and then the other using the testing table
shown in Table 9 Test for Turning Response. Both of these tests are critical
and require all elements of both tests to be passed for the device to be ready to
move on to outside testing.




                                                                                 92
Test of Tracking System for Distance

               Expected
Distance(ft)   response     of pass    fail
               vehicle

5              no movement

               rear wheels
8              slow
               movement

               increasing
10
               speed from 8ft

               increasing
12             speed      from
               10ft

               increasing
14             speed      from
               12ft

               maximum
16
               speed

               maximum
18
               speed

               maximum
20
               speed

               maximum
22
               speed

    Table 8 Tracking System Distance Test




                                              93
          Test for Turning Response

          Distance(ft)       and
                                  Expected
          direction off center at
                                  response          of pass        fail
          10 feet away from
                                  vehicle
          vehicle

          2 left                   straight

                                   slightly    turning
          4 left
                                   right at about 20°

                                   slightly    turning
          6 left
                                   right at about 30°

                                   sharply     turning
          8 left
                                   fight at about 40°

                                   turning right    at
          10 left
                                   about 45°

          2 right                  straight

                                   slightly    turning
          4 right
                                   left at about 20°

                                   slightly    turning
          6 right
                                   left at about 30°

                                   sharply     turning
          8 right
                                   left at about 40°

                                   turning left     at
          10 right
                                   about 45°

                     Table 9 Test for Turning Response
The next series of tests that will be run on these subsystems will take place
outside. All of the subsequent test described in the paragraph will be performed
in various conditions. The first condition is a cloudy day with no direct sunlight to
attempt to minimize the potential interference, secondly is on a sunny day, and
lastly is on a day of light rain. These different weather conditions are needed to
be tested in because they could have potentially different results of the
functioning of the vehicle. The tests to be performed outside are an analog of the

                                                                                  94
two previous tests that were run indoors with the vehicle up on blocks. This will
require at least two people to run the tests one person to hold the transponder
and the other to record the data. The first test will be the straight ahead speed of
the robot; the person with the transponder will start at the front of the vehicle and
slowly walk away from the vehicle. The data recording person will record the
approximate distance when the robot started to follow. The operator will then
walk at a constant speed and the robot should follow at about six feet behind. If
the robot does this then the operator will start to vary his or her walking speed to
see if the robot correctly adjusts to this change in distance to the operator.
Assuming this straight driving test works as stated there is one last test that
needs to take place. This is a test of the ability of the tracking system to turn the
vehicle. The operator will start to walk away from the robot at a constant speed
to get the robot to follow, and then he or she will turn off in one direction slightly.
If the robot responds as it should and turn to follow the operator the turning
radius will be increased till the tracking system looses line of sight of the
operator. Then the operator will perform the same steps but turning the other
direction. The data recording person will write down as accurately as possible
how well the robot responded to the differing turning radiuses of the operator. All
the tests will have to be rerun under the other test conditions to ensure no
systems will break down under normal operating conditions. If when the tracking
system can pass these tests it is ready for completion.


        Transponder
Since this device is critical to the proper functioning of the vehicle it will need to
undergo a little more testing than most subsystems of the vehicle. If any of these
subsequent tests do not pass then the design will need to be changed or
improved upon. These changes are to be sire the design does pass the
specifications given to it by the group. The first few tests of the transponder will
be tests to establish the maximum range of the detectable signal that it outputs.
This needs to be greater than a minimum of 12 feet. If the range is not adequate
the IR led might need to be replaced with a higher performing one that has better
range.

The second test involves the IR detector as well and will test what frequency is
best suited for performance and battery life. If it is possible to pulse 10 times a
second vs. 10,000 times a second the circuit will consume much less power and
require less batteries to work correctly. But, if the IR detector does not detect
well above 1 MHz for example and not well below 250 KHz then the frequency
will need to chosen from between those two frequencies for proper operation of
the system. So there will be a lot of testing that will be required to find this ideal
frequency of operation. To easily change the frequency instead of a resistor


                                                                                    95
being soldered into place a variable box will be in its place so changing
frequencies is as simple as flipping a switch or two.

The transponder will also need to be tested outside the lab to be sure that it gives
off the correct energy outside with other things around to disturb the operation of
the circuitry and even the IR transmitted beam. All the tests that are performed
outside are the same as the tests that get performed inside. All data that is
tested for gets recorded for further evaluation upon the completion of the test,
the evaluation is done by the system designer and if there are any major
changes required it is to be discussed with the entire group. A major change is
one that involves altering the design beyond changing values of passive
components. If a different circuit topology is required or more IR LEDs then the
consent of the group is needed before further work can continue on the
subsystem.

To ensure that this device will last long enough to provide for working operation
during the runtime of the vehicle a lifetime test will take place. This test will take
place in the lab but unlike before it will be running from its batter supply. The
transponder will be turned on for this test and record the output once every five
minutes until the device battery either dies or the received output goes below the
detection threshold for minimum operation. If it is deemed important enough
then a rechargeable battery might need to be installed and have proper
connections for recharging the device.


        IR Detector
This device is in most robots the part that has the highest rate of failure or works
the most inconsistently of all the subsystems present. This means that this
subsystem will need to built very robustly and be reliable. The design will need
to be simulated in SPICE a few times to be sure that it performs correctly. Then
the design will be bread-boarded to ensure that it performs just as well in the real
world as it does in SPICE. All necessary changes encountered will be made to
the circuit and then the circuit will be retested for stability and function. To test
for function the transponder will also need to be working so that there is at least a
signal being transmitted by the device. With both devices working they will need
to be tested together. This involves setting both devices up so that they are
pointed towards each other, turning both devices on and then seeing how much
signal is detected. There are a few parameters to vary and record data on that
will aid in the tracking program. The first parameter that will need to be varied is
frequency; this is the hardest parameter to changes because it requires
component changes on the transponder. A wide variety of frequencies will be
tested from 1Hz to 500 KHz to see what frequency seems to perform best. After
the ideal frequency has been found each frequency will be tested to see how

                                                                                   96
much signal drop there is from increasing and decreasing the distance from the
transponder to the detector. Starting at least three feet away and moving forward
will determine the distance at which the transponder will pick up the signal. This
max range where there is still a signal being detected shall be a distance greater
than twelve feet from the detector to the transponder. If the max range is less
than this major redesign will need to be done to ensure the range criteria is meet.
The next test will involve testing the off-angle sensitivity see Figure 32
Photodiode Angular Sensitivity, for a diagram of what the device should read
out according to the manufacture. A chart similar to the one below will have to
be recorded to determine the position of the target in front of the vehicle.




               Figure 32 Photodiode Angular Sensitivity
                     [Figure taken from Data Sheet Attached]

The next test that will be run is angling the transponder so that it is not pointed
directly at the detector. This data while important to the running of the device is
not as critical as the photodiode angular sensitivity to the operation of the robot.
The detector should be able to detect the transponder at angles of at least 30
degrees at a range of twelve feet. If the original design is unable to accomplish
this specification, then additional IR LEDS might be needed to be added to the
transponder, these would be angled in different directions so that the detector is
able to see the transponder in different angles with greater range and accuracy.
See Figure 33 IR LED Angular Sensitivity for the approximate power that
would be seen by the detector at various angles of the IR LED. It appears from
this that at 30 degrees of inclination the detector would only be seeing half the
power that is transmitted by the led. If this holds true and the max range is close
to the twelve feet minimum then more IR LEDs will need to be added to the

                                                                                 97
transponder to ensure correct operation of the tracking system, but if the max
range is for example twenty five feet then half of that power would mean that at
twelve and a half feet the detector would see the same signal if the led was
angled thirty degrees off the detector. All of these tests shall first be run inside
where the environment is controlled and there is minimal interference from other
sources. After the detector passes these tests it needs to be tested in its working
environment, which is outside during the day. All tests shall be rerun in various
conditions outdoors; the tests will take place on a cloudy day with no direct
sunlight, on a clear day with plenty of sunlight striking the transponder and the
detector, the devices should lastly be tested on a day of light rain to ensure they
can work through the rain and not malfunction.




                  Figure 33 IR LED Angular Sensitivity
                     [Figure taken from Data Sheet Attached]


     GPS
Before the GPS unit is installed in the chassis of the Tailgate Buddy, the unit will
be tested independently of any other system. Since the unit is completely
independent of the other components of the Tailgate Buddy, the GPS module
can be tested regardless of the status of the rest of the project. The unit will be
tested outdoors on a day with minimal cloud cover. The unit will be tested for ten
to twenty minutes. During part of the testing period, the unit will be driven around
in a car to obtain a wide variety of coordinates. This will also help to determine if
there is any effect on the unit due to being in a vehicle, due to the line of sight to
the satellites being partially obstructed. During the other part the testing period,
the unit will remain stationary to further confirm the accuracy of the entire unit.


                                                                                   98
The GPS Unit will also be tested in the same conditions, but on a cloudy day.
The clouds may interfere with the detection of satellites, and may at least partially
impede the recording of data to the SD card. The indoor test of the GPS Unit will
have to be conducted in a slightly different fashion, since a car will be
inconvenient indoors. The unit will still be tested on a clear day, but will have to
be carried by hand around inside a building. The unit will be tested in a building
with a metal roof, such as the atrium of the Engineering II building on the UCF
campus. The unit will also be tested in the same building on a cloudy day. The
cloud cover and the metal roof would probably be the worst case scenario for the
GPS Unit’s performance, as both of these conditions, depending on their
severity, can impede a GPS receiver to varying degrees.

The GPS unit will also be tested during the environmental tests. As the prototype
Tailgate Buddy travels in its testing sites, GPS data will be collected, which will
also determine how the GPS unit will fare in the rain (or simulated rain). At the
end (or near the end) of the tests, the SD memory card will be removed from the
GPS unit and the data will be loaded into a PC via a C program. The data will
then be mapped by Google Maps. If the data are mapped successfully by Google
Maps, the GPS unit test will be a success.


     Motors and Drivetrain
To properly test the motors and complete drivetrain, it must be tested in phases.
The first phase is required to test the motors in the original configuration that they
came in from the original Power Wheels vehicle. This is a fairly easy testing
procedure. The vehicle is to be assembled according the instruction manual’s
procedure for use as a child’s toy. This will ensure that the vehicle is working
properly before it is modified. If something is wrong with the vehicle from the
factory, the problem may arise and then may be dealt with before the building
can begin. This is important because if the vehicle is modified and then found to
be problematic, it cannot be returned to the place of purchase. The vehicle will
need a driver to do the initial test drive. Since the weight limit is rated for only 130
lbs and there is a physical size constraint, none of the members of this team will
be able to drive the vehicle. However one group member does have a niece and
a nephew whose combined weights equal almost exactly 130 lbs. They have
expressed that they are more than willing to go for the first test drive. Having the
appropriate weight, when testing the motors is important, because the vehicle will
need to carry loads near that weight on a regular basis. If the motors are
underpowered and cannot work effectively at what they are rated for, the vehicle
may not be able to be used for this application.

The next phase will test whether the motors can work properly when powered by
the electronic speed controller. This phase can happen only after construction

                                                                                     99
has started and the vehicle has been modified. This will not only test the motors
and how they can work with the speed controller but it will also test the main
power wiring that sends power from the batteries through the controller and then
out to the motors. The speed controller can take an analog input on each channel
and through the use of potentiometers speeds can be manually adjusted on both
motors. They will be tested at low through high speeds first, keeping the speeds
of both motors the same. Then with one motor moving much faster than the
other, the vehicle will be allowed to run on the ground to test its turning ability.
Then the speeds of the motors will be flipped and the vehicle will be allowed to
turn the other direction. When the vehicle can pass this phase, it can be further
built and move on to testing driving systems as a whole.


     Power Supply
The power supply will have several different tests. Each battery subsystem will
have to be tested. They will be tested for function, capacity, and lifespan. The
first battery system to test will be the original Power Wheels batteries. They will
be tested in the vehicle in its original unmodified form when the motors and the
rest of the chassis are being tested. During this procedure, the new batteries
must be charged to full capacity for 18 hours. This is required according to the
instructions and will be followed to ensure that the batteries are able to work at
full capacity. Although the design calls for two of these batteries, the original
vehicle is only wired to accept one. So each battery will be tested separately at
first. The obvious test will be to see if they can even power the vehicle. The
driving will continue to see roughly how far and for how long the vehicle can
travel. This will be done to make sure both batteries are within performance of
each other and within what they are rated for. To do this, the test drivers will be
required to drive the vehicle in a loop, at a walking pace, around their
neighborhood as many times as they can before the battery drains. When the
first battery is drained completely, the motors will be allowed to cool, the second
battery will be swapped into the vehicle, and then the test will begin with the
second battery. Their progress will be monitored by a group member and
distance traveled will be calculated. Assuming the batteries are performing close
to each other, they will be wired in the parallel configuration that the design calls
for. At that point testing on these batteries will be held off until testing of the
complete drive system is started.

The design calls for the microcontroller to have its own battery supply. This
battery will have to be tested in a few ways. The first will be how long it can
power the microcontroller at idle times. This is to test how long the electronics
can be left on while the vehicle is remaining stationary. It is merely to determine
the maximum standby time. The second test will be with the microcontroller
performing a repetitive task of powering the speed control in a pattern of

                                                                                 100
accelerating, slowing and stopping. The speed control will be powering small
motors but they will get their power from a secondary power source. The
microcontroller will only be putting out low signal power just like it would be doing
when functioning as the complete drive system will do.

The tracking device or transponder also has its own battery for its power supply.
This battery is required to last for a full days worth of tailgating. The test for this is
very simple. It is only required to light IR LEDs, but it is required to do this for
hours. This can be tested once the transponder is completed. It will simply be left
on for as long as possible while the IR receiver, that is to be used on the vehicle,
can still track it successfully. If it can pass 12 hours the test will be ended early,
before the battery is completely drained. While the battery should last a long
time, if it can’t last 8 continuous hours, the user will need to shut the transponder
off when not needing the vehicle to be following them. Normally this would not be
a problem, but being able to last for 12 hours would ensure that the user would
not forget and drain it prematurely. IR cannot be seen by the human eye so the
user may be more inclined to forget to check the on-off switch if there is no other
visible means of detection. If needed, one IR LED may be replaced or another
LED with coloring in the visible light spectrum may be added instead, to remind
the user when the device is on.


     Electronic Speed Controller
The first test for the speed controller will need to be tested before most of the
vehicle is even built. The location of this test is not of great importance as it will
be done in the prototyping process of the vehicle. It will likely be done in a
driveway and yard of a team member’s residence. It will involve a basic
communications check between it and the microcontroller. The microcontroller
will need to output signals that the speed controller can understand. The first
check will be with the speed controller wired to the motors and a sample program
flashed into the microcontroller. The program will be a simple test of sending
power to each motor and controlling them separately for a few seconds at a time.
This will most likely need to be done with both the microcontroller and the speed
controller installed into the vehicle. This will also test how the vehicle moves.
Once it can move on its own, the maximum payload of 130 lbs will be put into the
vehicle and movement will be tested again.

The second test will determine if the speed controller can accept control from the
RC receiver. The input will be switched to the RC adapter and the speed
controller will be programmed for radio control. Full driving functions will be
tested as the transmitter will have full function once the controller is programmed.
This will also be tested with the maximum payload to establish how the speed
controller handles under heavy load and radio control. Once this test can be

                                                                                     101
passed, the input of the speed controller will be switched back to receiving
control from the microcontroller. This will test whether the speed controller can
successfully switch between inputs and determine how it reacts to the change. If
it does not react well to the change, the RC system will have to be switched out
for the basic two-channel system that will use switches and relays to control the
motors directly, thus bypassing the speed controller entirely and allowing it to
remain programmed for the microcontroller. When the results of these tests are
completed the vehicle will be mobile and the building of other systems of the
vehicle can begin.


     Obstacle Avoidance
The ultra sonic sensors have a range of seven and a half feet in front and a side-
to-side view of four and a half feet. Using these parameters to test the sensors,
the sensor is required to identify objects anywhere within its field of view. To
Test the individual sensors, each sensor will be connected to a serial port on a
standard PC and powered up. Using a simple program written in the C
programming language to communicate with the serial port the computer will
record all the data communicated by the sensor. A variation of this program will
be used to develop and test an algorithm for the Obstacle Avoidance System.


        Ultrasonic Sensors
Each ultra sonic sensor will be connected to a PC individually. The sensor will
first be calibrated, the calibration cycle happens automatically on this model ultra
sonic sensor. To ensure accurate calibration of each sensor, all obstacles will
have to be cleared out of the sensors range of sight. Within ten feet in front of
the sensor and 6 feet from side to side will have to remain clear while the sensor
is calibrated. Once the calibration cycle is complete the sensor can be tested.
To test the sensor, an object will be introduced in the middle of the field of view to
ensure the sensor can see the object. If this is indeed true, the object will be
removed. The next step in the process is to test the extremes of the field of view.
First and object will be introduced at a distance of six feet to one side and moved
between zero feet to ten feet distance from the sensor. If the sensor does not
see the object the distance to the side will be moved in by one foot and the test
will be rerun. If the sensor still does not see the object, the distance the object is
from the side of the Tailgate Buddy will have to decrease by a foot. Once the
sensor sees the object and gives a distance reading of the object, this process
will continue until the object is passed immediately in front of the sensor and
reach six feet to the far side of the sensor. This will be repeated for each sensor
allowing us to map the field of view for each individual sensor. This will help to
determine the best position on the Tailgate Buddy for the sensor and if all three

                                                                                 102
sensors are identical or if one of the sensors has a blind spot or anomaly that
could be problematic in setting up an accurate detection grid with few or no blind
spots.




            Figure 34 Obstacle Avoidance Testing Areas
                        [Figure drawn by John Maskasky]

The sensors will also be tested for reaction time. To accomplish this the sensor
will be set up connected to the computer and an object will be dropped in front of
the sensor and removed quickly. Under controlled conditions the simulator can
record how long the object was present in the sensors field of view and the
distance the object was from the sensor. The computer will record and display
the object being present in front of the sensor, the distance the object was away
from the sensor, and the amount of time the object was present. This will allow
us to compare the results and determine the accuracy of the sensors. By
dropping the object in the sensors field of view for a very short amount of time
and removing it and comparing the results and repeating this process for slightly
longer amounts of time each attempt can help determine the sensors reaction
time. The reaction time will be of vital importance to the sensors for determining
the if they can maintain pace with the software and if the software will have to
take immediate action upon detection of an obstacle or if the software can
monitor the obstacles progress for determining the best plan for avoidance.


                                                                              103
        Algorithms
To test the algorithms of the obstacle avoidance system, a simulated
environment will have to be set up in software. Using the C programming
language the code could be written to simulate the Tailgate Buddy’s behavior.
Having the three ultra sonic sensors plugged into the PC setup in the manner
and scale they would be on the Tailgate Buddy would allow us to run obstacles in
front of the sensors and the computer would simulate the movement the Tailgate
Buddy made to avoid the obstacle without having a working vehicle or an
integrated system that will have to be tapped into in order to make changes to
the Tailgate Buddy’s obstacle avoidance system algorithms.

Each ultrasonic sensor will have an independent algorithm associated with its
operation. Because of this each sensor will be required to be tested individually.
Using the Tailgate Buddy simulated in the PC the tester will first start by testing
the right hand side sensor. Using the simulated Tailgate Buddy moving
approximately two miles per hour, the tester will first start out by introducing an
obstacle in front of the right hand side sensor at a distance approximately ten
feet from the sensor and slowly start moving the obstacle towards the sensor
until the Tailgate Buddy makes a turn to avoid the obstacle. The turn must be
made at such a distance so that the Tailgate Buddy will have a clearance of at
least one foot between it and the obstacle. This clearance will help to prevent it
from hitting the obstacle with any overhanging objects from the Tailgate buddy or
the obstacle that the Tailgate Buddy was unable to detect. Once again using the
Tailgate Buddy the tester simulated in the PC the tester will then test the left
hand side sensor. Using the simulated Tailgate Buddy moving approximately
two miles per hour, the tester will first start out by introducing an obstacle in front
of the left hand side sensor at a distance approximately ten feet from the sensor
and slowly start moving the obstacle towards the sensor until the Tailgate Buddy
makes a turn to avoid the obstacle. The turn must be made at such a distance
so that the Tailgate Buddy will have a clearance of at least one foot between it
and the obstacle. This clearance will help to prevent it from hitting the obstacle
with any overhanging objects from the Tailgate buddy or the obstacle that the
Tailgate Buddy was unable to detect.

The next algorithm to test will be the algorithm belonging to the front sensor of
the Tailgate Buddy. To Test this algorithm the tester will first setup the simulation
to always have the target directly in front of the Tailgate Buddy so that Tailgate
Buddy will setup to move in a forward direction. The next step will be to locate
an obstacle at a distance of two feet from the front ultrasonic sensor. This
distance should have the Tailgate Buddy sitting at a complete stop. Next the
obstacle will move away from the front sensor to a distance of four feet, the
Tailgate Buddy should remain stationary. Bringing the obstacle to a distance of

                                                                                  104
five feet from the Tailgate Buddy should cause it to begin to accelerate. The
Tailgate Buddy will accelerate up to one mile per hour in an attempt to match the
speed of the object. The Tailgate Buddy simulation will believe that that object is
moving in front of it at a constant speed because in theory the ultrasonic sensor
should be moving that the same speed of the Tailgate Buddy. By moving the
object to a distance of six feet in front of the ultrasonic sensor the Tailgate Buddy
should maintain its speed allowing for error in reading. By moving the object to
seven feet in front of the ultrasonic sensor the Tailgate Buddy should start
accelerating to two miles per hour to catch up with its target. If the object moves
to ten feet in front of the sensor or out of range of the sensor, depending on the
range of the sensor, the Tailgate Buddy should start accelerating up to its
maximum speed to attempt to catch its target. If the Tailgate Buddy is above two
miles per hour and the target moves to seven feet in front of the sensor then to
six feet within one second the Tailgate Buddy should slow to one mile per hour in
preparation for an emergency stop. If the target starts to move away the Tailgate
Buddy should increase speed to two miles per hour in an attempt to match
speed. If the object suddenly appears at a distance closer than five feet from the
Tailgate Buddy it should release all power from the electric motors, if the object
appears a foot or more closer than previously the Tailgate Buddy should make
an emergency stop meaning that the Tailgate Buddy should release all power
from electric motors and apply hard breaking to stop before a collision. If the
computer simulation output data verifies that the speed control algorithm is
functioning to these specifications than the algorithm is functioning properly.


        Two Side Sensors
Each of the side sensors will have a viewing angle of forty-five degrees. They
will be placed on the two sides of the Tailgate Buddy facing forward at an angle
of five-five degrees. This is illustrated in the picture below. This will allow them
to see obstacles coming at the Tailgate Buddy from both the front and obstacles
that will be run into if the Tailgate Buddy were to turn into them. To test these
sensors the simulated Tailgate Buddy will be setup to be moving forward with no
obstacles directly in front of it. This setup will keep the Tailgate Buddy moving
forward at a constant set speed of two miles per hour. The tester will start by
testing only one side sensor at a time, by mounting one side sensor to the corner
of a table to represent the front of the Tailgate Buddy the tester can effectively
simulate the conditions the sensor will be operating in on the Tailgate Buddy.
Once the sensor is mounted on the front corner of the table, the ground will be
marked off with the coverage area of the sensor. This technique will make it
easier to simulate moving obstacles around the sensor. Having the ground
marked off in front of the table to represent the ultrasonic sensors viewing range
the tester can easily pass objects or even walk in front of the sensor to test its
view and reaction times. This is illustrated in the picture below.

                                                                                 105
                Figure 35 Side Sensors Viewing Angles
                        [Figure drawn by John Maskasky]

The first step will be to move obstacles into the ultrasonic sensors field of view on
the side of the table and see if the software recognizes the objects location and
sets a flag to prevent the Tailgate Buddy from turning and clears that flag once
the Tailgate Buddy is past the obstacle. The next step will be to introduce an
object coming at the Tailgate Buddy from the front that will collide with the
Tailgate Buddy unless it makes a maneuver to miss the obstacle. Depending on
distance the Tailgate Buddy will have to make a calculated turn to avoid the
obstacle. As the obstacle approaches the sensor from the front, if the Tailgate
Buddy starts to turn to avoid the oncoming obstacle than the algorithm is
functioning properly. If the Tailgate Buddy remains traveling on its current
trajectory or if it turns into the obstacle than the algorithm is not functioning
properly and needs to be rewritten to cause the Tailgate Buddy to start
functioning properly.

It will also be important to test the Tailgate Buddy’s reaction to an object
approaching it from the side since the two side sensors will see objects

                                                                                 106
approaching it from the sides the same as objects approaching it from the front.
This should cause the Tailgate Buddy to turn away from the approaching object
the same as if the object is approaching from the front. As the object clears the
sensors field of view the Tailgate Buddy should continue heading in the same
direction for about four feet to clear the obstacle then turn back to its previous
course allowing it to regain view of its target.


        Front Facing Sensor
To test the forward facing ultrasonic sensor, the sensor will first need to be
mounted to a table facing forward as if it were mounted to the front of the
Tailgate Buddy. The sensor must then be connected to a PC, the sensor must
be turned on and allowed to run a calibration cycle, following the calibration cycle
the simulation software must be started to monitor the sensors results. The
simulation software will have to be setup to always read the two side sensors as
having no obstacles and the target always in front of the Tailgate Buddy so that it
will always be moving in the forward direction. To test the sensor itself, it will be
necessary to present an object to the outer range of view and slowly move the
item inward until the sensor picks up the objects position. The object must be
moved to the extremes of view of the forward sensor to ensure the sensor has a
minimum side-to-side view of four feet. The object must also be moved from
immediately in front of the sensor to ensure the sensor can detect objects as
close as two feet to a maximum distance of twelve feet to ensure the forward
sensor can see at least seven feet in front of forward facing sensor. The object
must be dropped and removed in a timed manner to test the reaction time of the
sensor. The object must also be move forward and back at a set speed to test
the reaction time and accuracy of the sensor. The sensor must be able to pick
up the changes in objects position in the minimum time of a quarter of a second.
If it fails to do this in actual operation the Tailgate Buddy could run into its target
causing injury. The sensors accuracy is also very important as the Tailgate
Buddy is depending on it to determine the speed the Tailgate Buddy will have to
travel in order to keep up with its target without running its target over.


        Speed Control
The speed control will require aggressive testing, as this may be the most crucial
section of the obstacle avoidance system. The speed control system is
responsible for matching the speed of the target. This system is crucial because
it is responsible for ensuring the Tailgate Buddy keeps up with its target and that
it does not run into its target. The first step to testing the Speed control system is
to set up the front ultrasonic sensor on a table to represent the front of the
Tailgate Buddy. The sensor will have to be plugged into a PC and allowed to run

                                                                                  107
a calibration cycle. Next the simulation software will have to be started and set to
have no obstacles to the side sensors and readings for the front sensor read
from the serial port. The speed control algorithm is a complex algorithm
therefore it will need extensive testing to ensure proper operation. The first step
is to place an object within two feet of the sensor to simulate the target being
very close to the Tailgate Buddy causing it to be at a stop. The object will then
slowly be moved away from the front of the Tailgate Buddy until it begins to move
forward, this should begin to happen at about five feet from the front. As the
object moves farther away from the front of the Tailgate Buddy to a distance of
five feet it will begin to accelerate to keep up with its target. As the target moves
to a distance of seven feet the Tailgate Buddy will increase speed up to two miles
per hour to keep up with its target. As the target moves out of range the Tailgate
Buddy should pick up to maximum speed to track its target. Moving the object
back into range the Tailgate Buddy should slow down to two miles per hour to
adjust for speed and as the target moves to a distance of five feet in front of it the
Tailgate Buddy should slow to one mile per hour in an attempt to maintain a safe
following distance from its target. The reason for running these tests in a
computer simulation is to ensure complete safety for both the people testing the
Tailgate Buddy and the Tailgate Buddy itself while the obstacle avoidance
systems and the speed control systems pass the tests and to measure accurate
distances and reaction times in both the software and hardware. The simulation
also allows the simulator the ability to estimate acceleration and deceleration
delays of the Tailgate Buddy and with these figures the simulator can derive a
good estimation of how far the Tailgate Buddy will require in order to safely stop
and accelerate allowing us to more accurately program the speed control
algorithm to prevent any harmful accidents.




                    Figure 36 Forward Facing Sensor
                         [Figure drawn by John Maskasky]




                                                                                 108
        Obstacle Avoidance Simulation
Once each of the three sensors are tested individually they will need to be
plugged into the simulation software at the same time to verify that the algorithms
for the different sensors do not conflict with each other as this could cause some
undesired effects. To test the system as a whole, the first step is to set up each
of the sensors on a table in the exact layout they will be on the Tailgate Buddy. It
is prudent that the sensors be laid out to scale to make sure that there is no
interference or blind spots in the physical layout. Next the area must be cleared
of all clutter within ten feet in front and four feet side to side for each one of the
sensors before they are powered up to ensure that the calibration cycle is
successful and the sensors are accurate. The next step to setting up the
simulation environment is to power up the sensors, let them run a calibration
cycle, then startup the simulation software. The software will have to be setup to
monitor all three sensors and to figure the target moving straight ahead.

Placing a false object two feet in front of the forward facing sensor and increasing
the distance to six feet in front of the forward facing sensor should train the
software that the object is the target and should start the simulation moving at
two miles per hour to maintain speed with the target. Once the simulation is
underway, it will be necessary to try to trip up the simulation and the sensors.
The tester will start by first simply introducing objects in front of the two side
sensors and monitor the simulations movement. If the simulation attempts to
turn to avoid the obstacle then the two side sensors are function properly. The
next attempt to trip up the sensors will be to introduce an object suddenly in front
of the forward facing sensor at a distance of two feet. If the Tailgate Buddy
attempts to make a sudden stop to avoid the obstacle then the front sensor
algorithm is working successfully. The next step will be start the simulation
moving forward again then walk from one side of the of the simulation layout to
the other side passing through the field of view of all the sensors. At a close
distance to the sensors should cause the Tailgate Buddy to attempt to turn to
avoid the obstacle and when passing in front of the front sensor, the Tailgate
Buddy should stop to avoid the obstacle and remain stopped until the obstacle
clears. Other methods to try are walking in front of the sensor grid at an angle of
five degrees from far away to close to it causing the first sensor to ignore the
obstacle as not being a threat the front sensor to decrease speed, if passing at a
close enough distance to the sensor, and the last sensor will detect the obstacle
and attempt to turn to avoid the obstacle. The next attempt the tester will get the
simulation moving again and reverse this movement to test the system in the
reverse direction. If this is successful, the tester will then introduce an object that
all three sensors can see, like a wrap around wall, to ensure that the Tailgate
Buddy successfully stops and doesn’t turn into the sidewalls or run into the front
wall. This test is necessary as this could trip up the algorithms. The last test the

                                                                                  109
tester will run in simulation is to introduce an object that one side sensor and the
front sensor can view and ensure that the simulation slows down for safety and
turns to avoid the object. If this simulation is successful the tester will attempt the
same test on the other side sensor to ensure the response is the same.


        Entire Obstacle Avoidance System
Testing the entire system is different than testing the sensors in the simulator
because the environmental variables are changing and the obstacles are
constantly moving towards the Tailgate Buddy. This test will ensure that the
obstacle avoidance system communicates accurately with the other systems on
the Tailgate Buddy. To test the entire system first the ultrasonic sensors will
have to be mounted in place on the front of the Tailgate Buddy. The ultrasonic
sensors will have to be connected to the microcontroller, which will be connected
into the main system of the Tailgate Buddy. The ultrasonic system will have to
be powered up and the area in front of the Tailgate Buddy cleared up to ten feet
in front and four free side to side of it to allow the ultrasonic sensors to calibrate
properly. After the Tailgate Buddy is up and running, the target will position
themselves in front of the Tailgate Buddy and begin moving forward. The front
sensor on the Tailgate Buddy should start detecting the increasing distance to
the target and ultimately cause the Tailgate Buddy to start accelerating forward to
match the speed of its target. While the Tailgate Buddy is moving forward the
tester will introduce obstacles moving towards the Tailgate Buddy on the left side
to observe if it turns to avoid the obstacle then the tester will do the same thing
on the right hand side. Next the tester will drop an obstacle in front of the
forward facing sensor to determine if the Tailgate Buddy will slow then apply
brakes to make an emergency stop to avoid hitting the object. The act of doing
this will make a full test of the vehicles braking system. For the remainder of the
tests will be run very similar to how they were run in the simulations. It is of vital
importance to run these tests again with the Tailgate Buddy as a whole as this
will test how the subsystems communicate with each other and the reaction time
of the microcontrollers and subsystems. The reaction time is a vital factor to test
as this could cause the Tailgate Buddy to run into an obstacle it didn’t know was
present because it failed to read from the sensor often enough. Another
important test to run is to place an object in a location to the front but offset to
one side to cause the Tailgate Buddy to turn to avoid the obstacle and observe if
it loses the target when it turns to avoid the obstacle. If the Tailgate Buddy is
able to avoid obstacles, handle emergency stops and stay focused on its target
through a maze of obstacles than the obstacle avoidance system if functioning
properly.




                                                                                  110
     RC Tx/Rx
Once an RC system is finalized and built the real testing of driving function can
be tested. Here it will be tested for range, control and function. The vehicle will
need to be driven at various distances away from the user to determine a
maximum driving range. This is where vehicle control is tested. One test it will
need to pass here is what happens when the vehicle goes out of the range of the
transmitter, or the transmitter is turned off, or the battery in the transmitter dies. If
any of these things happen, it is crucial that the vehicle does not continue on out
of control. Doing so could potentially hurt someone or damage property. Instead
the vehicle must come to a safe stop and remain stationary until control is
regained. The vehicle obviously must respond to normal commands of forward,
reverse, left and right. It is possible for any of these functions to not have been
programmed correctly or for outputs of the receiver to be wired incorrectly
subsequently causing unwanted results. Since the manual activation of the water
gun uses a mechanical setup, with a switch and servo, an additional step will be
required. The throw of the switch will not be very far, yet a servo can move a
great deal in rotation. To keep from tearing the switch apart by torquing down on
it and over-rotating the servo horn, the travel distance of the servo will have to be
limited using the adjustments on the transmitter.

     Complete Drive System
This phase will test how the motors, drivetrain, speed controller, radio equipment,
batteries, and driving functions of the microcontroller all work together to perform
the driving task. To pass this section, the vehicle first must be able to drive itself.
This means first being able to power itself into motion of the vehicles main drive
battery system. That system is designed to be a 12 volt system with two 12 volt
batteries in parallel. It is possible that even though the vehicle was able carry a
the load in its original configuration, that once it was wired up to the speed
controller it might not be able to efficiently drive the vehicle at that low voltage.
This could happen if the controller cannot drop enough current for low speed
travel while remaining at a high enough voltage to function. If this happens the
parallel 12 volt configuration may have to be sacrificed to a 24 volt series
configuration that may not allow for as much runtime. This would not be ideal as
the motors are designed to work at 12 volts, but it may have to happen if low
speed operation does not work properly. If this is needed, the motors will have to
be tested for reliability and efficiency when working at up to 24 volts. They may
work properly at first but after a period of time burn out and need to be replaced.
At the point, the power system would have to be redesigned or 24 volt motors
that fit the original mounts would have to be found. Ideally the plan would be to
use motors rated to handle 24 volts. However if none will fit the application,

                                                                                    111
original motors must be used again and the batteries may have to be replaced
with something like an 18 volt setup or even worse the speed controller would
have to be replaced with a different kind and most systems would have to be
redesigned.

 After it can pass the main battery power tests for function it must be able to
operate under control from the microcontroller and also be switched into manual
mode and accept control from the receiver. The motors must perform identically
so as to drive the vehicle in straight line when asked and turn equally well in both
directions. Any inconsistencies will have to be adjusted either by the trim
functions on the transmitter and/or by the programming of the microcontroller and
speed controller. The vehicle should also be easy to control. It should drive as
one would expect an ordinary RC car would drive. A manual driving mode is
worthless if an average person cannot use it effectively and safely. Early driving
tests will still be done at a team member’s residence as full robotic functions, IR
and ultrasonic obstacle avoidance systems, will not be needed for this test to be
successful. Those systems will be incorporated in final prototype testing.

With the drive system completed and operating properly, runtime will have to be
determined by starting each subsystem with full battery power and running the
vehicle through what hopefully turns out to be a full days worth of usage before a
battery system dies. If any battery system dies prematurely, it will have to be
redesigned to allow for more runtime. The main drive battery system for the
motors can be tested under radio control. This will simultaneously test that
system as well as the batteries for the radio control system. The results will be
measured in time spent driving and in distance the vehicle was able to travel in
that time. Distance is important to measure because the vehicle will likely be
traveling faster under radio control than it will for when it is operating under IR
tracking and the drive batteries will drain faster at this higher speed. During this
test if the transmitter batteries die before the vehicles drive batteries, they will
have to be switched out for fresh ones to complete the test of the drive batteries.
If they die before the vehicles drive batteries, but last long enough to get a
decent amount of RC runtime out for a day of tailgating, they can be left alone.
The vehicle will mostly be operating under IR tracking mode anyway and manual
drive mode will be just an occasional use in comparison. Also the RC
transmitter’s battery system is the one system that is completely designed by the
maker of the transmitter and would be harder to reconfigure for more runtime.
However these batteries typically last a very long time for most RC devices and
should not be a concern.




                                                                                112
     Water Gun
Like many of the other systems, even a system as simple as the water gun will
have to be tested in multiple ways. The first test will be a manually triggered test
that will be done as soon as the reservoir, tank, hose, and nozzle are installed
into the vehicle. The tank will be filled with water and the pump will be directly
wired to the 12 volt drive batteries. This test will ensure the pump is working,
there are no leaks and the nozzle sprays in a correct pattern at the right angle
and at a decent distance. This will also show how great of a volume the pump
can output through one nozzle. If it is not enough water and there is more than
enough distance coming from the nozzle, a second nozzle may be added to
create a configuration like originally intended when the system was used in the
truck it came off of. If after adding the second nozzle, the distance and pattern is
still acceptable for soaking obstacles, the test will be complete.

For the second test, hopefully the more advanced 3-channel RC system will pass
the speed controller communication tests and can be used for radio control. This
is required for manual firing of the water gun through RC. If that test was not
passed, this option will have to be removed and the water gun will only function
off the microcontroller’s obstacle avoidance feature. If 3-channel RC system does
pass the speed controller communication test, the test for using it to fire the water
gun is a very short test. All that is required for this to pass, is when the
transmitter signals for the water gun to fire, the receiver sends the signal to the
servo that toggles a standard toggle switch that sends power to the pump. If it
fires it needs to stay on for as long as the transmitter is sending that signal and
the reservoir has water in it. The third test is similar to the second only it is testing
the microcontroller’s control of the water gun. For it to pass this test, it must fire
the water gun whenever the IR receiver does not have a signal from the user’s
transponder and the ultrasonic detector is showing an obstacle blocking the
vehicles path. To test this, the IR transponder will be used by one team member
while another team member will walk in front of the vehicle and take a soaking for
the team. When the victim moves out of the way, the microcontroller must kill the
output to the water gun. If the water gun fires with only one of the two conditions
being met, it will be considered as failing and will have to be reconfigured to work
properly. Once all the previous tests have been passed, the fourth test is more of
a convenience factor than a function factor. This test will show how long a full
reservoir of water can last before needing to be refilled. The reservoir will be filled
to the top and the water gun will be activated and held on while a stopwatch runs.
When the tank empties and the gun stops firing the time will be stopped. This will
be the maximum amount of time the water gun can be operated for.

The very last test the water gun must pass is how well it can get unsuspecting
people out of the vehicle’s path. This is harder to test than the previous tests as

                                                                                    113
several test subjects will have to be gathered separately and get them to set off
the water gun one at a time. They will likely be curious as to what the vehicle is
and want to approach it. Hopefully they will trigger the water gun. Once they do
their desire to get away from the vehicle will be noted. If the majority of test
subjects run out of the way instantly like they are expected to, the test will be a
success. However if the barely notice the water spray soon enough or the water
blasts don’t hit them well enough, the test may be a failure and this system may
have to be reconfigured. This would be the point where the horn option may
need to be implemented. The combination of the water gun and horn should get
every subject to take notice and get out of the way. If this happens the test will
be considered successful.


  Entire System
The testing procedure for the Tailgate Buddy will be as follows. For environment-
specific testing procedures, please refer to the next section, Testing
Environments. The first set of tests that will be performed on the entire Tailgate
Buddy system is to observe how well the Tailgate Buddy tracks and follows the
infrared transponder while moving in a linear fashion. The user will carry the
transponder in his or her pocket within the specified range of the Tailgate Buddy
and proceed to walk a straight path. The distance or distances at which the
Tailgate Buddy follows will be measured and recorded, and will be compared to
the required distance outlined previously in this document. The next test that will
be performed on the entire Tailgate Buddy system is to observe how well the
Tailgate Buddy tracks and follows the infrared transponder while moving in a
nonlinear fashion. The user will carry the transponder in his or her pocket within
the specified range of the Tailgate Buddy and proceed to walk in a nonlinear
fashion; that is, the user will frequently change the direction of his or her walk,
making the Tailgate Buddy perform turns of varying degree and magnitude. The
distance or distances at which the Tailgate Buddy follows will be measured and
recorded, and will be compared to the required distance outlined previously in
this document. The next following test will involve the user moving away from the
Tailgate Buddy at its top speed (five miles per hour). The purpose of this test is to
measure the time the Tailgate Buddy takes to accelerate to top speed, and to
measure lag distance the Tailgate Buddy will exhibit as the user accelerates. The
user will then gradually slow down and stop.

Once the proper following distance is achieved, the next set of tests to be
performed on the Tailgate Buddy will be to test how well the Tailgate Buddy
stops. The user will carry the infrared transponder in his or her pocket within the
specified range of the Tailgate Buddy, walk in a linear fashion, and then gradually
stop walking. The time the Tailgate Buddy takes to stop, and the distance the
Tailgate Buddy takes to stop will be measured and recorded. This data will be

                                                                                 114
compared to the required distance at which the Tailgate Buddy is supposed to
follow the user. The Tailgate Buddy should not stop closer than or farther away
than the following distance described previously in this document. The time the
Tailgate Buddy takes to stop is important because even though the engine is not
running, the Tailgate Buddy may still roll toward the user for a period of time. If
this time is too large, the stopping algorithm can be adjusted to begin stopping
earlier. The user will then repeat this process, but stop more suddenly to
measure the stopping distance and stopping time of the Tailgate Buddy. This
data will then be compared to the range in which the Tailgate Buddy is supposed
to follow. This data will also be compared to the data from the previous data
when the user stopped less suddenly. Finally, this test will be repeated a third
time. For this test, the user will repeat the same process as the previous two
tests, only this time the user will stop as suddenly as he or she can possibly stop.
This data will then be compared to the range in which the Tailgate Buddy is
supposed to follow. This data will also be compared to the data from the previous
data when the user stopped less suddenly.

The next set of tests to be performed on the Tailgate Buddy will be more
stopping tests. For these new stopping tests, the user will carry the infrared
transponder in his or her pocket within the specified range of the Tailgate Buddy,
and move quickly away (run) from the Tailgate Buddy in a linear fashion. The
Tailgate Buddy is not designed to move faster than 5 miles per hour, so the user
will move away from the Tailgate Buddy faster than this speed. The amount of
time the user takes to leave the range of the Tailgate Buddy will be measured.
The amount of time which the Tailgate Buddy follows the user before the user is
out of range will also be measured. For the next stopping test, the user will move
at approximately the Tailgate Buddy’s top speed (5 miles per hour), and then
stop suddenly. The distance the Tailgate Buddy will take to stop will be
measured, and compared to the desired following range specified earlier in this
document. If the final distance between the user and the Tailgate Buddy falls
outside of this range, the stopping algorithm may be adjusted. This test can be
repeated at various speeds with the user stopping suddenly to varying degrees.

The next set of tests to be performed for the entire Tailgate Buddy system is
loading tests. The Tailgate Buddy is designed to carry a maximum payload of
130 pounds. The first payload test to be performed will be with an empty payload.
The user will carry the infrared transponder in his or her pocket, and walk away
from the Tailgate Buddy. The user will then turn while walking. Some turns the
user will make will be wide and gradual, to observe how the Tailgate Buddy
handles these. The other turns will be sharp, to varying degrees, to see how the
Tailgate Buddy handles these. The purpose of this test is to observe if the
Tailgate Buddy will be too top-heavy to make turns successfully. The next test
will be performed with a solid load of the Tailgate Buddy’s maximum payload of
100 pounds. The user will again carry the infrared transponder in his or her
pocket and move away from the Tailgate Buddy. The user will then turn while
                                                                                115
walking. Some turns the user will make will be wide and gradual, to observe how
the Tailgate Buddy handles these. The other turns will be sharp, to varying
degrees, to see how the Tailgate Buddy handles these. If the Tailgate Buddy
does not make turns successfully (meaning it falls over while turning), the
maximum payload or vehicle design may have to be reconsidered. The third such
test will be with the Tailgate Buddy half-full of water. This should be well under
the Tailgate Buddy’s maximum payload capacity. This test will serve two
purposes. The first purpose this test will serve will be to observe how the Tailgate
Buddy handles a medium payload. The second purpose of this test will be to
observe if there is any effect of fluid motion on the way the Tailgate Buddy drives.
This is a practical test because the Tailgate Buddy is designed to carry drinks
and ice. The worst case scenario for the Tailgate Buddy for fluid motion will be
after there are no more drinks, and after all of the ice inside the cooler has
melted. This test will present more fluid than will most likely ever be in the cargo
hold of the Tailgate Buddy. For this test, the user will again carry the infrared
transponder in his or her pocket and move away from the Tailgate Buddy. The
user will then turn while walking. Some turns the user will make will be wide and
gradual, to observe how the Tailgate Buddy handles these. The other turns will
be sharp, to varying degrees, to see how the Tailgate Buddy handles these. If the
Tailgate Buddy does not make turns successfully (meaning it falls over while
turning), the maximum payload or vehicle design may have to be reconsidered.

The next test will involve the RC control aspect of the Tailgate Buddy. The user
will activate the remote control, and attempt to control the Tailgate Buddy with it.
The user will maneuver the Tailgate Buddy in straight paths and turns. The user
will also navigate the Tailgate Buddy around obstacles and in narrow hallways to
ensure manual control sensitivity. The manual control circuitry will bypass the
obstacle avoidance system. This will put the Tailgate Buddy completely under the
control of the user’s hands. This test will also verify that the infrared tracking
system turns off automatically when the Tailgate Buddy is used via the RC
controller.

The next test will involve the obstacle avoidance system. For this test, the user
will put the transponder in his or her pocket, and proceed to walk around a small
object. The user will walk up to the object, then walk in a semi-circular path
around the object, and continue on the original trajectory (as if the object had not
been there). The Tailgate Buddy should successfully navigate around the small
object and continue following the user as he or she continues to walk. The next
test will involve the obstacle avoidance system and the water gun. The user will
put the transponder in his or her pocket, and walk away from the Tailgate Buddy.
After the Tailgate Buddy is moving, another person will step between the user
and the Tailgate Buddy and remain stationary. The Tailgate Buddy should
successfully activate the water gun, spraying the obstacle person with cold water
from the bottom of the cooler.


                                                                                116
     Testing Environments
The Tailgate Buddy will be tested in several different environments with a few
different variables. In any environment in which movement, torque, and friction
will be observed, the Tailgate Buddy will be tested empty, almost completely full
of water, and with a solid load of seventy pounds. The first environment the
Tailgate buddy will be tested in is an even-terrain, vacant parking lot. This is a
likely environment in which the Tailgate Buddy will be used. This environment is
for very basic tests. Testing the Tailgate buddy in a parking lot will ensure that it
can move by remote control, turning radius, move by itself, track its target,
remain within the specified range of its target, and stop when it is supposed to
stop. The Tailgate Buddy will be tested at various speeds. Speed bumps in the
parking lot will be effective for determining how the Tailgate Buddy will handle
such an obstacle during the course of its use. The Tailgate Buddy will also be
tested when the pavement in the parking lot is wet. This will allow it to be
determined if the Tailgate Buddy can compensate for the lack of friction created
by the water on the pavement. The amount of torque output to the wheels needs
to be observed to make sure that the Tailgate Buddy does not slip when it is
supposed to move, and does not over compensate and injure the user by
colliding with him or her.

A similar environment it will be tested in is a cement wheelchair ramp. This is a
possible environment for the use of the Tailgate Buddy. This will allow it to be
determined whether the Tailgate buddy can produce enough torque to move up
an incline. It will also ensure that it does not produce too much torque up an
incline in an attempt to compensate for the increased resistance to the wheels.
This environment will also ensure that the Tailgate Buddy will move down an
incline under its own power, instead of just rolling down when it is not supposed
to be moving. It will also indicate whether the Tailgate Buddy is producing too
much or not enough torque down the incline, avoiding the user leaving it behind,
or injury to the user. The Tailgate Buddy will be tested at various speeds, both up
and down the ramp. This testing environment will also be wet (after the Tailgate
Buddy is tested on it dry). This will be the worst-case scenario for torque versus
friction. Again, the Tailgate Buddy will be tested both up and down the ramp to
make sure that it properly compensates for the increases and decreases in
friction it will experience, and does not get left behind and does not injure the
user. How the Tailgate Buddy handles a change of incline will also be tested
here, both wet and dry, by driving it onto the wheelchair ramp, and off of the
wheelchair ramp.

Another environment the Tailgate Buddy will be tested in is a flat, grassy area,
such as Memory Mall on the UCF campus. First, the Tailgate Buddy will be
tested on dry grass, because it is a relatively even terrain, but not as even as the

                                                                                 117
parking lot environment. How well the Tailgate Buddy performs in the pits and
grooves of the grass under various speeds will be observed, and adjusted if
necessary. This environment will provide much of the same data as the parking
lot, such as how well it performs when the remote control is used, how well it
tracks its target, how well it stays in the specified range of its target, and whether
it will stop when it is supposed to stop. The grass will provide a variable in the
testing process, and since grass is a likely place for the user to use the Tailgate
Buddy, it is an appropriate testing environment. After the testing on dry grass is
completed, the same grass will be wet with water. This will allow it to be
determined if the Tailgate Buddy can compensate for the lack of friction created
by a wet surface. It must be noted whether the Tailgate Buddy overcompensates
torque, possible injuring the user, or does not compensate enough, which could
cause it to fall out of the specified range of its target and get left behind. How well
the Tailgate Buddy turns on wet grass is also important. It needs to be made sure
of that the Tailgate Buddy does not tip over while turning or slide while turning,
and possible spilling its cargo or injuring the user or a bystander. How well the
Tailgate Buddy handles the transition from the grass to the cement will also be
observed. A similar environment in which to test the Tailgate Buddy is on gravel.
This will, again, make sure the Tailgate Buddy compensates with the proper
amount of torque to make up for lost friction due to the rolling friction caused
under the wheels by the gravel. The gravel will also be wet, as this will most likely
be the worst case scenario for non-incline loss of friction.

A fifth environment the Tailgate Buddy will be tested in is the roof of a building, or
a similar location with many stationary objects of different height and shape. This
will test the obstacle avoidance components with respect to the entire system.
The user will walk around an obstacle very quickly, and the Tailgate Buddy’s
behavior with respect to the object will be observed. This is to make sure that the
Tailgate Buddy does not crash into the stationary object or get stuck behind the
stationary object, but drives around it to find the user as it is intended to do. The
user will also walk between several objects to make sure that the Tailgate Buddy
also does not crash or get left behind in this scenario. A similar environment to
test the Tailgate Buddy in is a narrow alleyway. The user will walk through the
narrow alleyway, and make an abrupt turn, and the Tailgate Buddy’s reaction will
be observed. It needs to be made sure of that the Tailgate Buddy does not crash
into the wall, and that it does not get left behind because the user steps out of
range of the Tailgate Buddy’s IR sensors. Since the terrain tests have already
been performed at this point, there is no need to wet either of these
environments.

Another environment for testing the Tailgate Buddy will be somewhere with many
people, such as a busy sidewalk. This is to test how the Tailgate buddy will react
to many moving objects that are not its target (the user). The intention is that the
Tailgate Buddy will follow the user even as he or she is moving through a crowd

                                                                                  118
of people. If someone steps in front of the Tailgate Buddy, the water gun will
spray water at him or her. In this manner, the water gun can also be tested with
respect to the entire system. It will also be a more complex test for the ultrasonic
obstacle avoidance system.

In the preceding outdoor environments, the temperature may range from
approximately 75 degrees Fahrenheit to 90 degrees Fahrenheit, with humidity
ranging from 60% to 90%. If possible, the Tailgate Buddy will be tested in the rain
in all three environments. If this is not a possibility, rain will be simulated as close
as it can be in these environments. This is to observe how the ultrasonic sensors
will react in inclement weather, due to the ultrasonic waves reflecting back to the
sensor off of the rain drops. The ultrasonic sensors also change sensitivity with
changing heat and humidity. This will allow observation of how much the
sensitivity of the ultrasonic sensors will change, and the effects it will have on the
overall performance of the Tailgate Buddy (although, in theory, this problem can
be corrected by re-calibrating the sensors by powering them off and powering
them back on). This will also make sure that none of the electronic components
will get damaged due to water. The tester will also test indoor environments to
test for changes in light, temperature, and humidity.

The first indoor environment in which the Tailgate Buddy will be tested is in the
atrium of Engineering II building on the UCF campus. This location was chosen
because there will be both stationary objects (tables, chairs) and moving objects
(people) to avoid. This location was also chosen because there will be less
humidity, and a decreased temperature. There will also be a decreased amount
of light, which could simulate cloud cover, or other low-light conditions. This will
allow the Tailgate Buddy to be tested in different conditions than before. The
Engineering II building atrium has polished terrazzo flooring, which will provide
additional data for friction versus torque, even though it may be unnecessary at
this point. The Tailgate Buddy will also be tested in a hallway connecting to the
Engineering II building atrium in a similar manner to the narrow alleyway testing
environment, as previously mentioned. This will allow us to test the Tailgate
Buddy on wall-to-wall carpet. The Tailgate Buddy will also be tested through
glass. One of the doors in the building that contains a large glass pane will be
used to see if the Tailgate Buddy will try to drive through the glass, or recognize
the glass as something to avoid.

The next few environments to be discussed will be for testing the Tailgate Buddy
in realistic circumstances with extreme temperatures. The first such environment
will be outdoors. Since the Tailgate Buddy most likely will not be in constant
motion throughout the duration of its use, the Tailgate Buddy will be tested by
leaving it outside on cement in the sun for a length of time yet to be determined
to see how (or if) it reacts to the heat. Another environment to test extreme heat
will be inside of a car or similar vehicle. The temperature of the inside of a car or

                                                                                   119
similar vehicle will be measured in three different vehicles, and these data will be
cross-referenced with temperature tolerances of the individual components to
ensure that the prototype is not destroyed because of melted or otherwise heat-
damaged internal components.            The final environment to test extreme
temperature is a freezer. The most likely place a freezer big enough for this
purpose will be found is in a grocery store. The expected temperature of the
freezer is 35 degrees Fahrenheit to 45 degrees Fahrenheit. After cross-
referencing the temperatures of the individual electronic components with the
temperature of the freezer, the Tailgate Buddy will be placed in the freezer, and
left to set for a length of time yet to be determined. After the time has passed,
the user will activate the Tailgate Buddy, and attempt to have it follow him or her.
This is a realistic scenario because it can be foreseen that the Tailgate Buddy
can be used in such weather outside.




                                                                                120
Administrative Details

  Budget
The group has decided to finance the entire project on the own. All the group
members will equally share in the cost of the project. This means that none of us
want to waste parts because everything will be coming out of the own
pocketbooks. Hopefully this will make all group members more cautious of what
parts they buy and ensure that they are of high quality to make sure that the
parts last for the duration of the project. It should also eliminate members trying
things without thinking them through first causing parts to break and increasing
the cost of the project.

Each group member will be responsible to keep all their receipts for any
purchases on the project to get reimbursed. Towards the end of the semester
the group will tally up the cost of the vehicle and settle up with each other making
sure that all members have contributed equally to the funding of the project. The
table on the next page Table 10 Expected Budget Cost shows about what is
expected for the entire group to spend on this project. If there are part failures or
other mishaps then the cost for the budget could rise past the total cost.




                                                                                 121
               Expected budget
 Item                              Unit                  Total
Number        Description          Cost     Quantity     Cost
            Power Wheels
  1             Vehicle           $200.00      1       $200.00
  2        Speed Controller       $300.00      1       $300.00
  3          GPS Module            $30.00      1        $30.00
         misc electronic parts
  4              GPS              $10.00       1        $90.00
  5       Ultrasonic Sensors      $30.00       3        $10.00
         misc electronic parts
  6       Ultrasonic Sensors      $15.00       1        $15.00
  7          RC controller        $50.00       1        $50.00
         Misc electronic parts
  8          RC controller        $10.00       1        $10.00
  9      Master Microcontroller   $40.00       1        $40.00
  10       Tracking System        $60.00       1        $60.00
         Printed Circuit Board
  11             Costs            $44.00       6       $264.00
           Misc. Wiring and
  12          Connectors          $40.00       1         $40.00
                   Subtotal                            $1,109.00
                     Tax                                  7%
                  Total Cost                            1186.63
         Table 10 Expected Budget Cost




                                                                   122
                                                                                                                                TIME LINE
 ID            Task Name     Duration         Start     Finish        January                                        February                                March                                        April                                       May
                                                                   MTWT F S SMTWT F S SMTWT F S SMTWT F S SM TWT F S SMTWT F S SMTWT F S SMTWT F S SMTWT F S SMTWT F S SMTWT F S SM TWT F S SM TWT F S SMTWT F S SM TWT F S SMTWT F S SMTWT F S SMTWT F S
  1     Part Procurement      23             Mon        Tue
                             days?          1/5/09     2/3/09



  2    All Parts Initally on 7 days?         Mon         Mon
              Order                         1/5/09     1/12/09



  3     Parts Arriving for    16              Tue       Tue
           Inspection        days?          1/13/09    2/3/09



  4       BreadBoarding       23              Tue        Thu
                             days?          1/13/09    2/12/09



  5         Prototyping       31              Thu        Thu
                             days?          1/15/09    2/26/09



  6    Subsystem Testing      35              Mon        Fri
                             days?          1/26/09    3/13/09



  7          Redesign         56              Fri     Fri 4/3/09
                             days?          1/16/09



  8          Final Build      10              Mon        Sun
                             days?          3/16/09    3/29/09



  9     Complete System       12              Mon        Tue
             Test            days?          3/30/09    4/14/09



 10        Final Testing      10             Wed         Tue
                             days?          4/15/09    4/28/09



 11    PCB Design Period      44             Thu        Mon
                             days?          1/8/09     3/9/09




                                 Critical                             Task                       Baseline                  Milestone                 Project Summary           Deadline
Project: timeline                Critical Split                       Split                      Baseline Split            Summary Progress          External Tasks
Date: Sun 12/7/08
                                 Critical Progress                    Task Progress              Baseline Milestone        Summary                   External Milestone

                                                                                                                                                                                                                                                      123
Appendices
The documents are attached in this order


  Copyright permissions

  Data-Sheets




                                           124
           From       :   AnnDrea Boe <AnnDrea.Boe@sparkfun.com>
                To    :   brit4life@netzero.com
         Subject      :   Re: [Fwd: Request permission to reprint images]
               Date   :   Fri, Dec 05, 2008 07:08 PM



        Yes, you may use our images and text for your school projects. Good luck and have fun!

        AnnDrea Boe

        __
        Director of Marketing Communications
        SparkFun Electronics
        6175 Longbow Drive, Suite 200
        Boulder, CO 80301
        303.284.0979 (ext. 123)
        303.443.0048 (fax)


  From: "Brit4life" <brit4life@netzero.com>
         December 5, 2008 10:07:33 PM MST
     To: customerservice@sparkfun.com
Subject: Request permission to reprint images



        Sir,

        I am writting you to request permission to reprint several images in your website. I am a
        student in Senior Design 1 in the University of Central Florida writing a senior design paper.
        We are designing a vehicle with the capability of following a person over a distance and
        avoiding obsticals. We are planning to use the ultrasonic sensors listed on your website to
        implement our obstical avoidance system. We are requesting permission to reprint images and
        data relating to the ultrasonic sensors. We will footnote your website for any images or data
        reprinted from the website.

        Thank You,
        John Maskasky
       From   :   "Brit4life" <brit4life@netzero.net>
         To   :   support@digilentinc.com
   Subject    :   Request permission to reprint images
       Date   :   Fri, Dec 05, 2008 09:33 PM


Sir,

I am writting you to request permission to reprint an image in your website. I am a student in Senior Design 1 in the University
of Central Florida writing a senior design paper. We are designing a vehicle with the capability of following a person over a
distance and avoiding obsticals. We are planning to use the Digilent Cerebot II microcontroller listed on your website to
implement our obstical avoidance system. We are requesting permission to reprint images and data relating to the Digilent
microcontrollers. We will footnote your website for any images or data reprinted from the website.

Thank You,
John Maskasky
Email #1 (permission for two figures in Research: GPS section)

from Ken K wiredeyesofhorse@gmail.com
to    amb@gedanken.demon.co.uk
date Sat, Dec 6, 2008 at 10:45PM
subject    Reproduction Permission
mailed-by  gmail.com

Mr. Bishop,

My name is Kenneth Kauffman. I am currently an engineering student at the
University of Central Florida working on my senior design project. I would like to
request permission to use two images from your webpage,
http://www.gedanken.demon.co.uk/gps-sd-logger, in my design paper. These
images are the printed circuit board diagram, and the circuit diagram.

Thank you. Sincerely,

Kenneth Kauffman
EMAIL #2 (permission request to use PIC16F819 pin diagram, Figure 4 )

from Ken K wiredeyesofhorse@gmail.com
to    university@microchip.com
date Sat, Dec 6, 2008 at 11:05 PM
subject      Reproduction Permission
mailed-by    gmail.com

Dear Sir or Madam:

My name is Kenneth Kauffman. I am currently a student at the University of
Central Florida working on my senior design project. I would like to request
permission to use an image from a document (39598e.pdf) about the PIC16F819
microcontroller. I would like to use the pin diagram on page 1 of said document.

Thank you. Sincerely,

Kenneth Kauffman
Pls go ahead; we are glad to have you mention or reprint our name and literature in your paper.
Tks
tony
- Show quoted text -

--
Tony Santoni
Partner
Roboteq
8426 E. Shea Blvd.
Scottsdale AZ 85260
e-mail    tony@roboteq.com
cell    602-617-3931
fax     425-955-7847
www.roboteq.com


Quoting &lt;&gt;:

Below is the result of your feedback form. It was submitted by
(john.a.fuoco@gmail.com) on Friday, December 5, 2008 at 20:49:26
---------------------------------------------------------------------------

First_Name: John

Last_Name: Fuoco

City: Orlando

State: FL

learned-from: robotmarketplace.com

textfield: Hello, my name is John Fuoco. I am a student from the University of Central Florida,
and I would like to request permission from your company to use a picture from your website
and a data sheet for use in a technical report. We are planning to use your ax1500 motor
controller in a robotic vehicle we are building. We need to have a picture of it for the report and
it would be nice to have the data sheet to refer to in the report. We would like to use the default
photograph on that product's page. If you could please give me permission to use those, just let
me know.
Thank you for your time,

John Fuoco

spamcode: nospam

submit: Submit Query
from John Fuoco <jfuoco624@gmail.com>
to                    support@futaba-rc.com
date                  Fri, Dec 5, 2008 at 4:13 PM
subject                 Question about terms of use
mailed-by               gmail.com
Hello, my name is John Fuoco. I was not able to find an email address that related to what I am
asking for. If you cannot help with this, could you please forward this to the appropriate
department? I am a student from the University of Central Florida, and I would like to request
permission from your company to use a picture from your website for use in a technical report.
We are planning to use your 3FR 3-channel radio for a robotic vehicle we are building. We need
to have a picture of it for the report. We would like to use the default photograph on that
product's page. If you could please give me permission to use those, just let me know.
Thank you for your time,

John Fuoco




from John Fuoco <jfuoco624@gmail.com>
to                      corporate.communications@mattel.com
date                    Fri, Dec 5, 2008 at 4:26 PM
subject                 Question about terms of use
mailed-by               gmail.com
Hello, my name is John Fuoco. I was not able to find an email address that related to what I am
asking for. If you cannot help with this, could you please forward this to the appropriate
department? I am a student from the University of Central Florida, and I would like to request
permission from your company to use a picture from your website for use in a technical report.
We are planning to use a Power Wheels vehicle for a robotic vehicle we are building. We need to
have a picture of the batteries and chargers for the report. We would like to use the default
photograph for #74777 12 volt battery found at http://www.fisher-
price.com/us/powerwheels/product.aspx?pid=409, and the photograph of the #H7461 12 volt
battery charger found at http://www.fisher-price.com/us/powerwheels/product.aspx?pid=33881.
If you could please give me permission to use those, just let me know.
- Hide quoted text -


Thank you for your time,
John Fuoco

				
DOCUMENT INFO