Title: Efficient Path Determining Robot
1Efficient Path Determining Robot
- Jamie Greenberg
- Jason Torre
2General Description
- Maze is set up as shown
- PC Analyzes maze through webcam
- PC Determines best path for robot to get from
start position to end using Dijkstra's Least Cost
Path Algorithm
3General Description (continued)
- PC translates path into a set of commands and
sends them to the HCS12 through the serial port - Robot follows commands to travel the best path to
the finish
4Image Processing
- Laptec Webcam connected to PC through USB port
- Image is captured through Java Media Framework
- Pixel information is pulled from the image using
Java PixelGrabber class - Pixel data for areas of interest is analyzed to
determine if color best represents a wall (white)
or a blank space (black) - Use this data to determine what grid positions
have a blank space (no wall) and designate them
as nodes
5Dijkstras Algorithm
- Start with a cost of zero for the start node
and infinity at every other node. - Iterate through every node and determine its
distance from the start node (if directly
connected) - Mark the node with the least cost and determine
the costs of all unmarked nodes to this node - Repeat for every node until least cost node is
the finishing node. - Once this is determined, the shortest path is the
reverse order of the nodes previously marked
6Getting the data to the robot
- Once the best path is found, the path is
converted on the PC to a set of binary commands - This data is sent to the Motorola 68HCS12 through
the serial port on the PC and the SCI port on the
HCS12. - When a FINISHED command has been received by
the robot a command will be sent back to the PC
that will notify the user to remove the serial
cable and press the Go button on the robot. When
GO is pressed, the robot should begin its path
towards the finish.
7Commands
- The following commands will be used to guide the
robot through the maze
Commands Bit Setup Description
LEFT 001 xxxxx Move the robot left xxxxx grid coordinates. This location will never be larger than 7, as the grid has only 8 coordinates.
RIGHT 010 xxxxx Move the robot right xxxxx grid coordinates. This location will never be larger than 7, as the grid has only 8 coordinates.
FORWARD 011 00000 Move the robot forward 1 row.
FINISHED 100 00000 Notify robot that it has reached its destination and adjust status LEDs.
8Communications Test
- At the beginning of the program (before web
capture), the serial connection will be tested - A binary test sequence will be sent to the
robot and it will be echoed back to the PC. - If the echo is not received in 5 seconds an error
message will be displayed
9PC User Interface
- The PC will be used to guide the user through the
process - Instruct the user to attach the serial cable and
reset the robot - Notify user if communications test was successful
- Notify user that image analysis is in progress
- Notify user if path does not exist
- Notify user that commands are being sent to the
HCS12 - Ask user to remove serial connection and press
the GO button
10Robot Design
- Tamiya Robot kit
- The DC motor is FA-130 by Tamiya
- The whole kit measured 6.5 X 4.25 X 3.75
height, available surface area after the bottom
deck is covered is 4.5 X 2.5
11Chassis and Actuators
Robot Tank by Budget Robotics Two gear ratio to
choose from 581 , 2031
12Hardware Utilized
- Proximity Sensors
- Opto-reflectors
- Chasis and DC motors
- H bridges
- Batteries
13Proximity sensors
Sharp GP2D15 IR Proximity Sensor Range between 0
cm and 80 cm Beam width of 45-50
This model can be adjusted to yield a digital
output when the robot comes to close to the wall
( 2 cm) No external circuitry is needed
14Opto-reflector
Optek OPB745 opto reflector Responsible for
informing that the vehicle has arrived reached a
mrker
The sensor will yield a digital input value when
the robot crosses a piece of reflective tape, and
modifications are done on the signal handling
circuit that was completed previously (IDE).
15Battery and power
- 4 AA sized battery for the vehicle (in the kit)
- Additional D Cell battery cells used to drive all
the sensors and HCS12 board
16Block Diagram
HCS12
DC Motor
PWM 0-2
H bridges
PT 0-5
DC Motor
Opto-reflectors
Proxy Sensors
17Overhead view
Hole for wires
Top Level
Bottom Level
Proxy sensor
Sensor Circuitry
Opto-reflector and circuitry
H Bridges, DC Motors and voltage regulator
Batteries
HCS12
User Interface
Proxy sensor
18User interface
Error
Moving
Finished
On/Off
GO
Download Complete complete
19Difficulties
- The camera must be nearly perfectly calibrated so
that the rectangular arrays of pixels sampled are
always the correct ones - Calibrating the opto reflector correctly because
it has been known to be unreliable - Calibrating the proxy sensors so as not to give
too large a range
20Webcam Alignment Utility
- A small utility will be created to assist in
positioning of the webcam - The utility will display a snapshot of the grid
with boxes around the areas that should contain
the edges of each grid position (either a wall or
an opening) - If the camera needs to be moved, the user can
retry the calibration until it is satisfactorily
lined up
21Cost
Item Cost
Labtec Webcam 19.80 from staples
Java API Free from java.sun.com
Motorolla 68HCS12 Microcontroller 180.00 from CE department
Remote Control Tank 35.95 from budgetrobotics.com
LM298 H bridges (2) 10.90 from digikey.com
Optek OPB745 Opto-Isolators(2) 12.00 from CE department
Various other power circuitry and batteries 30.00
Maze for Robot 20.00 Approx
22Questions?