Anda di halaman 1dari 6

The 2004 University of Evansville Fire Fighting Robot

Chris Miller and Dirk Van Vorst


Department of Electrical Engineering and Computer Science
University of Evansville

ABSTRACT

This year, the University of Evansville has undertaken the task of building a robot that
will compete in next year's Trinity College fire fighting robot contest. The idea behind
the contest is to build an autonomous robot that can navigate a simulated house, find a lit
candle, and return to the starting position. The rules of the competition required that the
robot meet very specific criteria and perform many tasks. The robots main functions were
broken down into three main elements: 1) navigating the simulated home, 2) detecting the
lit candle, and 3) extinguishing the candle. In order to perform these tasks a motorized
base needed to be constructed, various sensors needed to be added, and software to
integrate all the hardware needed to be written. The overall goals of this project were to
gain a better understanding of basic robot control and sensing techniques and applying
these techniques in a real world situation.

INTRODUCTION

The robot was designed to compete in the Trinity Colleges annual fire fighting robot
competition. The contest requires an autonomous robot to navigate a simulated house in
search of a lit candle. Once the robot detects the candle, it extinguishes the flame and
returns to its starting point. This is intended to be a simulation of a real-world application
of using a robot in the fire protection of a home. The robot must locate a fire, represented
by the candle, and extinguish it. The model floor plan consists of four rooms and
interconnecting hallways. The candle is placed in a random room and in random positions
within each room during each trial run. A home circle will be defined in one location in
the hallway. The robot will begin in the home circle, and return to the home circle after
completion of its mission. The robot should navigate through the home without making
contact with any walls or other obstructions. The robot may not use markers, beacons or
reflectors that are placed on the walls or floor to aid in navigation, but it may use any
type of sensory devices desired. The robot should be fully autonomous, and not require
any assistance after startup. Any means may be used to extinguish the candle, as long as
they may not potentially damage the model home.

CONSTRUCTION

The two-wheeled, bi-level robot was fabricated from aluminum. All parts were designed
using a computer aided drafting and machining program called Bobcad. Bobcad enables
the user to not only design a part, but will also generate the G-code necessary for running
a computer numerically controlled machine tool to produce the part. By utilizing CNC
machinery, the base of the robot would exactly mirror the intended design. To maneuver
the robot, a two wheel drive system was developed employing gear head dc motors and
wheels from in-line skates. The two wheels are driven in such a manner that when they
are at the same speed the robot moves forward in a straight line. By varying the speed of
one wheel in relation to the other, the robot will turn either to the left or right. If one
wheel is stopped while the other is rotated, the robot can turn in a very tight radius. This
added maneuverability is the reason the two wheeled approach was taken. The in-line
skate wheels are a perfect match for the two wheel steering. The thin area of the wheels
which contact the ground allow for a very precise point of rotation when the robot is
turning and do not offer much resistance for the turn. With the base completed, attention
was then turned to the control of the robot.
The main criteria for the contest is that the robot must be autonomous and as such,
the robot needed a way to control the motors, interpret readings from the sensors, make
decisions concerning navigation, and perform all the tasks in a specific sequence. The
natural choice to perform these functions is a microcontroller, and the controller used for
this project was the Phillips 89C51RD2. This controller has 64K of program memory, 2
external interrupt sources, three timers, and four eight bit input/output ports. These
features are more than adequate for the intended purpose. The University of Evansville
uses this chip in its introductory engineering class and has produced a board that was a
perfect fit for this project. The Lego board has the microcontroller already integrated
with a 5 volt voltage regulator, h-drivers for motor control, an easy and convenient
manner to hook up all sensors and peripherals, and most other necessary hardware. By
controlling the robot with a well designed and tested board, many potential problems can
be avoided and the build time substantially shortened.
With the brains of the robot in place, how that brain would interact with its
environment would need to be addressed. In order to complete its intended purpose, the
robot is equipped with seven sensory devices. One ultrasonic range detector was
positioned in front of the robot to assist with long hallways beyond the range of the IR
sensors. Two digital IR range finders are at the front corners of the robot, and two more
are facing toward each side of the robot. A line detector is mounted underneath the robot
to read the white lines designating the home circle, room entrances, and candle location.
A Hamamatsu flame detector is positioned on a servo on the top level of the robot.
Mounting these sensors to the robot completed the construction phase of the project. With
construction completed, the three main elements of the competition could be performed.

NAVIGATION

The robot must be able to navigate the simulated house. As discussed earlier, the steering
of the robot is implemented through varying the speed of the motors in relation to one
another. Pulse width modulation is used to control motor speed. By controlling the pulse
duty cycle we control average voltage. Higher voltage will translate into a higher speed
and the lower voltage translates into a slower speed. In this type of control the motor is
sent no voltage for a set period of time and then sent a fixed dc voltage for another certain
amount of time. The time for both the low and high cycles is fixed; the only thing that
varies is the proportion of the high and low time. The motor will see the average voltage
that is present and therefore can be sped up or slowed down. The Phillips microcontroller
we used for this project has a special feature that makes implementing this control
scheme very easy. The chip has a programmable counter array that can be used in pulse
width modulation mode. By simply setting an eight bit number for the high time, a pulse
width modulated output is presented to one of the output pins. This output can be applied
to H-drivers turn on and off the power applied to each motor and subsequently control its
speed. Speed control is important, but so is the direction of the robot. It must be able to
go both forward and backward. The direction that current flows through the motor
determines the wheels direction. On board H-drivers allow the user to control the
direction of current by setting two bits in the processor. The programmable counter array
and the on board h-driver allow for easy control of the speed and direction of the robot.
The robot is now capable of going at varying speeds in both forward and reverse,
but navigation of the contest area requires knowing where to go, where the robot is in the
simulated house, and how to get back to the starting point. In order to go down the
hallways, the robot utilizes two infra-red distance detectors to stay a pre-determined
distance from the wall. These sensors are used to look either to the left or right side of the
robot. If the distance is exactly right, both motors are run at the same speed to maintain a
straight path. If the robot gets too close to a wall, one motor is slowed which causes the
robot to turn away from the wall. If the distance gets too far, the opposite wheel is slowed
and the robot is turned toward the wall. The complexity in this process is to determine by
how much the wheel should be slowed. The robot will not turn quickly enough to get
back to the desired distance if the wheel is not slowed enough, and will drive erratically if
slowed too much. The way to compensate for this is to use proportional control. If there
is a slight amount of error, the wheel will only be slowed by a small amount. As the error
gets larger, the wheel will be slowed by an increasing amount. To determine if the robot
needs to make a turn, there are two more infra-red sensors at the front of the robot that
look at an angle in front of the robot. When these sensors detect a large change in the
distance to the wall the robot can determine that there is a possibility to turn. In order to
navigate the simulated house, the robot takes a pre-determined course and makes
decisions about when and where to turn based on where it is in the house.

DETECTING THE CANDLE

In order to determine if a certain room contains a lit candle, the Hamatsu flame detector
is employed. The detector works by sensing the ultra violet radiation emitted by a flame.
If a flame is present, the detector produces a 10 millisecond pulse. To determine the
direction of a flame, a photo resistor is mounted on a servo motor that is capable of
rotating to any position. In order to filter out as much external light as possible, the photo
resistor is placed at the end of a long black tube, allowing us to focus on a specific
position. The photo resistor is connected to an amplification circuit which will send an
analog signal to the AtoD converter located on the Lego board. This signal will be
highest when the photo resistor is aimed at the flame. By scanning across the room with
the photo resistor, using the servo, we can determine the angle at which the analog signal
is the greatest. The robot can then turn to this angle and approach the flame in order to
extinguish it.
EXTINGUISHING THE CANDLE

The contest allows for many different ways to extinguish the candle. For this robot, a
very simple method was selected. The robot is fitted with an electric motor with a
propeller that we constructed. Once the robot has found the candle and moved into
position, the motor is turned on for a brief period and the candle is extinguished. Since
the fan motor only requires an on/off state, and demands more current than the h-drivers
are capable of, a MOSFET was used to drive the fan motor.

THE SOFTWARE

In order to navigate through the house without using dead reckoning, and still be able to
recognize the current position, a point-mapping system is used. The plan of the house is
divided into points that define positions within the home. For instance, a corner at the
end of the hall could be a point, and the entrance to a room could define another point.
With these points defined, the navigation software can be divided into sections that are
specific for each position in the house. As the robot is navigating through the home, it
will also be searching for input which will signify the beginning of a new point, such as
an out-of-range reading from the front-left IR sensor, which may signify that a left turn is
approaching. This will cause the program to branch to the proceeding navigation routine.
This navigation approach will also allow us to know what the current position within the
home is at the time the candle is extinguished. This will make it fairly easy to determine
the best route to return to the home position.
The IR sensors used to navigate through the halls are activated using a low pulse,
followed by eight short pulses, which clock the bits that are output serially by the IR
device. To accomplish this, the input to the IR sensor is set low, at which point the
output of the IR will go low while the distance is being detected. When the IR has
completed its calculation, it will set the output high. The program will be polling this
output to wait for this state change. Once the output high signal has been received, the
input is set high to signify that we want to begin clocking the input, and then eight short
pulses follow. At the falling edge of each pulse the next bit of the result will be output by
the IR sensor, beginning with the most significant bit. The program will read this output
at the rising edge of each pulse to ensure that it is capturing the data in the middle of its
active window.
The following code segment is an example of how one IR can be read:

vin = 0; // set input of IR low


delay(100); // delay 1ms before polling output
while(!vout); // wait for output to go high
delay(1);
for(i = 0; i < 8; i++)
{
vin = 1; // send high state of clock pulse
delay(15);
vin = 0; // send low state of clock pulse
delay(15);
reading = reading << 1;
reading = reading | vout; // capture output bit
}
vin = 1; // set input of IR back to high

The flame detector is sensitive enough that a reading can be taken from a room
without having to even enter the room. This allows us to navigate the robot to a position
in front of the rooms doorway, aim the flame detector at the room using the servo, and
check for an active pulse to determine whether the candle is located in this room. If not,
the robot can continue through the house plan without the delay of searching the room. If
a flame is detected, a routine can be invoked to enter the room and then determine the
position of the candle.
The flame detector will verify the presence of a flame, but a photo resistor is
needed to determine the position of the flame. A photo resistor and servo can be used to
pinpoint the angle at which the candle is located once inside the room. The servo can be
set to make a steady 180 turn by sending it a pulse modulated signal with a steadily
increasing high time. The photo resistor circuit can then be used to measure the intensity
of light at each 5 interval. The highest value will be saved, along with the
corresponding servo position. Once the angle of the servo position where the highest
reading captured is determined, the robot can be angled to that direction and move
directly towards the candle until within extinguishing range. Once within range, the
robot can activate the fan motor in the same manner that the driving motors are run.
When the flame is extinguished, the current point-map value is passed to a return home
routine, to determine the most efficient path to navigate home.
Positioned at Simple flowchart of execution. Full flowchart would
HOME include multiple map-points per room navigation,
with IR sensor readings determining future branches.

Navigate to
Room 1

Flame yes
detected

no
Navigate to Enter
Room 2 room

Flame yes Scan room for


detected candle

no
Navigate to Approach
Room 3 candle

Flame yes Extinguish


detected candle

no
Return to
Navigate to HOME
Room 4

CONCLUSION

Designing and constructing a robot to compete in the Trinity firefighting robot


competition has been a very educational and worthwhile project. There are still many
hours of testing and refining the design ahead, but the construction and tests are
proceeding according to schedule. Although this contest is not strictly a real world
application, the lessons learned can be applied to problem solving in a variety of real
world situations. We are looking forward to the chance to compete in the national contest.
We would also like to express our gratitude to the University of Evansville for the
opportunity to be involved in the project.

Anda mungkin juga menyukai