Projects in Computer Engineering I by qza17959


									Projects in Computer Engineering I
   Preliminary Project Proposal

        Nicholas Hoover
         Matthew Mitrik
        Edward Waxler

      Dr. Roy Czernikowski

     Due Date: May 16, 2010
The goal of this project is to create a robot able to traverse a maze after receiving a set of instructions
from a base station via wireless transmission. Using a digital camera, the base station computer will first
take an aerial photograph of the maze. The photograph will then be processed and used to determine a
path through the maze using a genetic algorithm (or other path finding algorithm). This path will be
transmitted using radio transmission to the robot, which follows the path using optical sensors. In the
event that the robot gets off course, the base station will attempt to help correct the robot. At any time
during the operation, a user may override the commands given at the base station and deliver manual
commands to the robot.

User Interface
The complete maze traversing system is comprised of a path following robot and a base station computer
with a digital camera. These two subsystems will both have radio transceivers used for two-way
communication. An illustration of this system is shown in figure 1.

                                   Figure 1: Maze Traversing System

This system can be divided into three logical subsystems for design purposes: the maze processor (base
station), the path traveler (robot), and the wireless network. Each of these subsystems is described in
detail below, as is their integration.

Base Station
The base station acts as the main hub for the overall system. It consists of a PC capable of
communicating with the webcam and the Motorola HC12. The base station will be responsible for image
processing, maze formatting and path finding, as well as communicating with the HC12 and transceiver.
A set of switches will also be made available for issuing overrides for the robot.

A webcam will be used to take aerial photographs of the maze. It will be positioned approximately 6ft
above the middle of the maze. After each picture has been taken, it will need to be converted from its
original format into an easily understandable format (such as portable gray map).

The standard sizes and paths associated with each of the square tiles will allow for easily distinguishable
paths. The image processing software will produce a scaled version of the maze. From here it is up to
the maze-solving algorithm to find the path from start to finish. The solved maze will be reformatted and
then sent to the Motorola HC12 board and transceiver. The transceiver will then transmit the path to the

The robot is able to traverse a maze after receiving a set of instructions wirelessly from a base station. It
has stepper motor powered tank-treads for movement and several photo-reflector sensors for feedback.
To process commands received from the base station and sensors, a Motorola HC12 board will be used.
Several switches and LEDs will be present for overrides and status display.

Some of the components used to build the robot are listed below:

        Motorola HC12 microprocessor board
        Voltage regulator
        Tank-treads (2)
        Stepper motors (2)
        Shaft encoder (2)
        Photo-reflectors (8)
        Switches (2)
        Buttons (2)
        LEDs (7)
        Radio transceiver
        Misc. electronics

To move through the maze, the robot will have tank-treads on either side of the vehicle, each controlled
by a stepper motor. These will provide the ability move forward, backward, turn left, and turn right. The
motors will be controlled by PWM from the microcontroller. Additionally, the rotating shaft connected to
the motor will have a disk around it acting as a shaft encoder. The disk will have 16 slices, each with a
different 4-bit number represented on it by reflective and non-reflective material. Mounted next to the
shaft encoder is an array of four photo-reflector sensors. These will provide feedback to the
microcontroller on the output of the motors. Using the stepper motors and shaft encoder, the robot will be
able to accurately move forward and turn a specific number of degrees.

The robot will have three additional photo-reflector sensors mounted on the front and two sides. These
will serve to provide some feedback to the robot about its position in the maze. They will be able to
detect the reflective maze path on the ground below. This will give the robot the ability to perform some
error correction if its movement is not perfectly accurate.

The switches and buttons on the robot serve important override functionality. One switch will provide
power, and the other switch will determine if the robot is allowed to receive override instructions from the
base station. Disabling communication will allow for the robot to operate autonomously if desired by the
operator. One of the buttons on the robot will be used to initialize the robot, readying it to begin receiving
and executing commands. The second button will stop all power to the motors and stop the robot from
moving or executing any further commands.

Seven LEDs will be used to display the status of the robot. These LEDs represent: on/off, receiving
instructions, moving through maze, finished with maze, stopped, ignoring base station commands, and in
override state.

Figure 2 contains the recipe commands sent from the base station to move the robot through the maze.
These simple commands will be strung together to represent a complete path through a maze.
             Command               Description
             Fwd                   Move forward one tile
             Left                  Rotate left 90 degrees
             Right                 Rotate right 90 degrees
             NoOp                  Do nothing this step
             Stop                  Stop execution
             Wait                  Wait for a period of time
                                        Figure 2: Recipe Commands

In figure 3 below, a list of override commands are given. These override commands are used by the
base station to place the robot back on the path in the maze.

              Override             Description
              MovF                 Move forward specified number of steps
              MovB                 Move backward specified number of steps
              TurnL                Turn left specified number of steps
              TurnR                Turn right specified number of steps
                                       Figure 3: Override Commands

Also included on the robot is a radio transceiver used to communicate with the base station. The primary
communications will be the receiving of the path data, a periodic heartbeat signal to indicate the robot is
still operational, and a distress signal requesting help from the base station.

Wireless Network
The wireless network is very simple, consisting of only two transceivers, one on the robot and one at the
base station. Each transceiver will be connected to a Motorola HC12 board that processes the data to be
transmitted across the network. The transceivers used will be capable of only medium speed
transmissions (kHz), as the amount of data sent between the devices is quite small. Also, the
transceivers will be fairly low power, as the distance over which they will be sent is small as well. Both
transceivers will communicate via a custom protocol delivered by a Motorola HC12 board.

On the robot side, the transceiver will communicate with the HC12 board handling the robot commands.
As commands are received by the radio, they will be stored in the board’s memory for future retrieval
during the path traversing. This radio is also used to broadcast a heartbeat signal generated by the robot,
notifying the base station of the robot’s health. In the case that the robot goes off course, a distress
signal will be broadcast until the base station delivers help. Also, the robot’s radio will listen for override
commands sent from the base station.

At the base station, the transceiver will communicate through another HC12 board. Through this board,
the radio will send recipe commands entered serially through the HC12 serial interface. The radio will
also listen for heartbeat and distress signals broadcast by the robot. In the event of a user override at the
base station, the command will be transmitted to the robot for immediate execution.

As the communication between the network nodes is fairly simple, the system will only need a few
communication signals. Each command will be sent as a single byte comprised of a 3-bit opcode, 4-bit
parameter, and a parity bit. The parameter is only used by the data and override commands, where a
movement is contained in the parameter. Figure 4 below lists the commands and their descriptions.
              Command             Description
              Heartbeat           Notifies BS that robot is running healthy
              Distress            Sent by robot if help finding the path is needed
              ACK                 Acknowledge a command was received
              RTS                 Request to send data
              CTS                 Clear to send data
              Data                Contains a movement command in the parameter field
              Done                Signals end of data transmission
              Override            Contains an override command in the parameter field
                                     Figure 4: Communication Signals

Maze Construction
The format of the maze is based on several important factors. First, the path that the robot follows must
be recognizable by the optical sensors. The sensors for the robot will be triggered by reflections from the
ground. Therefore, reflective tape will be used to construct the paths. The second design consideration
for the maze is that it must be quickly reconfigurable. For this, the maze will be comprised of
approximately 1ft x 1ft square tiles made of particleboard. The structure of the maze will require only five
types of these tiles (shown in the following figure). The size of the maze is expected to be about 6ft x 6ft.
This should allow for a good deal of flexibility while designing interesting mazes that will show off the
capabilities of the robot.

     a                    b                     c                  d                    e
          Figure 5: The five types of square tiles needed to represent a full spectrum of mazes.

A sample maze is shown below. The thick black lines represent valid paths whereas the thin lines
distinguish between the square tiles.

                                     Figure 6 – Sample maze layout

Control of the robot will be one of the most difficult challenges of the project. There are a lot of
components such as sensors, motors, etc. designed into the robot that need to work together in order to
achieve the project goals. Also, wireless communications and image processing are new areas for the
team, and they will probably present many challenges.

To top