View
223
Download
0
Tags:
Embed Size (px)
Citation preview
Autonomous RoverA Path Following and Obstacle Avoidance Vehicle
RIT Computer Engineering Senior Design Project
Bryan Allen and Jonathan WyantThursday, February 10, 2005
Inspiration: This project is a prototype for a naval autopilot system. The proposed system would guide naval vessels in and out of harbors avoiding traffic and shallow areas.
Description: The autonomous rover is a self-contained path following and obstacle avoidance vehicle. It will traverse a path defined by red and green tape and avoid obstacles within the path without going outside path boundaries. No input is required from the user other than turning the system on or off.
Implementation: •The system utilizes an Infra-red Sensor Network to view the environment around it. The sensor network can cover roughly a 180 degree arc 6-10 inches away from the vehicle.•The sensor arc is divided into sectors. Each sector represents a different path that the rover can take when it needs to avoid an obstacle.•As long as one sector is free, the rover will continue to operate.
Figure 1: Autonomous Rover on Path Figure 2: Autonomous Rover – Front View
•Light-to-Voltage sensors are used for path boundary detection.•If a path boundary was encountered, it will not be possible for the rover to move back in the direction of the boundary for the next 3 seconds.
Sector 1 Sector 3
Sector 5
Sec
tor 2
Rover
Sec
tor
4
IR1 IR2IR3 IR4
IR6 IR5
IR8 IR7
In this situation we assume we just hit the Green Path Edge, meaning we cannot go to the right. This blocks Sector 3 and Sector 5. There is an obstacle in front of us that we have to avoid. This blocks Sector 1. There is an obstacle blocking Sector 4. The only free sector we can turn to is Sector 2. So the rover will turn so that it is facing Sector 2 and proceed forward.
Sector 1
Sector 3
Sector 5
Sec
tor
2
Rover
Sec
tor
4
IR1
IR2
IR3
IR4
IR6
IR5
IR8
IR7
Obstacle
Obstacle
Cost BreakdownDescription Vendor Unit Cost Units Our Cost Total Cost
Acroname Brainstem GP 1.0 Acroname 79.00 1 79.00 79.00
TAOS TSLX257 LTV Sensors TAOS, Inc. 6.74 4 Free Samples
26.96
Sharp GP2D15 IR Sensors w/ Cable Acroname 11.50 8 92.00 92.00
Sheet of Material (Lexan) Niagara Hobby & Craft Mart 17.59 1 17.59 17.59
Battery Pack w/ Connector Acroname 3.50 2 7.00 7.00
Colored Duct Tape Jo-Ann Ect. 4.29 4 17.16 17.16
4Pk AAA Battery Case Radio Shack 1.89 1 1.89 1.89
ICB86 PC Boards Radio Shack 1.79 3 5.37 5.37
LM341T-0.5 Voltage Regulator (+5V) DigiKey 0.82 1 0.82 0.82
4Pk AAA Batteries (Energizer E2 Lithium) BestBuy 11.99 1 11.99 11.99
4Pk AA Batteries (Energizer E2 Lithium) BestBuy 12.99 2 25.98 25.98
Serial Interface Connector Acroname 10.00 1 10.00 10.00
Black Wheels with Black Bands Acroname 2.50 4 10.00 10.00
Standard Servo w/cont, BB Acroname 21.00 4 84.00 84.00
IC Socket (16pin) Radio Shack 1.29 1 1.29 1.29
Wiring (22 Guage) Radio Shack 4.29 1 4.29 4.29
35 Crimps and Housings Acroname 11.00 2 22.00 22.00
Servo Motor Mount Brackets Reynolds Electronics 5.75 2 11.50 11.50
Heat Sink Radio Shack 1.69 1 1.69 1.69
Heat Sink Mounting Hardware Radio Shack 1.69 1 1.69 1.69
Servo Encoder Acroname 32.95 1 32.95 32.95
PermaMount Tape Radio Shack 1.99 2 3.98 3.98
Two-Way Toggle Switch Radio Shack 2.99 1 2.99 2.99
SN74LS257BN Multiplexer DigiKey 0.72 1 On Hand 0.72
Lego Blocks Various Kits N/A N/A N/A N/A
DM74LS02N NOR Gates DigiKey 0.53 2 On Hand 1.06
Red LEDs DigiKey 0.07 5 On Hand 0.35
100 Flat Lego 2x2 Squares Lego@Home 6.99 1 6.99 6.99
Grand Total (less tax, s/h) $452.27 $481.46
-All aspects of Navigation are handled at the Reflex Level.-The TEA VM Level includes two programs, one to view IRSensor data and make a decision on where to turn, and theother to count revolutions from the Shaft Encoder.
IR Sensors
LTV S
enso
rs
Brainstem
Servo Motors
Logic Code
(TE
A V
M)
LTV S
enso
rs tr
igger
Ref
lexes
to h
andle
Pat
h Foll
owing
.
Servo Motors respond to
comm
ands from the Reflexes.
The S
haft
Encod
er p
asse
s its
infor
mat
ion
to a
TEA V
M p
rogr
am.
The T
EA VM
then
pass
es th
e inf
orm
ation
to th
e Ref
lexes
,
which
cont
rol th
e Ser
vo M
otor
s.
IR Sensors communicate with the
Logic Code at the TEA VM level.
The code then passes information on
to the Reflexes to handle Navigation.Reflex Code(EEPROM)
Shaft
Encod
er
Figure 3: System Block Diagram illustrating the relationship between different layers of processing and control.
Bryan Allen
Jonathan Wyant
6V (Servos)
U1
74LS257
151
47912
25
1114
36
1013
GA/B
1Y2Y3Y4Y
1A2A3A4A
1B2B3B4B
A-
+
MG1
MOTOR SERVO
12
U2C
74LS02
8
910
D5
LED
SW1
SW 3PDT
LTVGR
TSLG257
GNDPWR
Output
BT121.5V AA
BT61.5V AA
BT91.5V AA
U4
LM341/TO (5V)
13INOUT
A-
+
MG0
MOTOR SERVO
12
R3750
D1
LED
BT11.5V AAA
R1750
BT111.5V AA
U2B
74LS02
5
64
Shaft Encoder
WW01
ChA
ChBGND
VCC
DirGNDClkVCC
6V (Sensor)
Sensor_1
GP2D15
Output
PWRGND
LTVRR
TSLR257
GNDPWR
Output
BT31.5V AAA
U3A
74LS02
2
31
U2A
74LS02
2
31
R2750
Sensor_4
GP2D15
Output
PWRGND
Sensor_5
GP2D15
Output
PWRGND
BT101.5V AA
A-
+
MG2
MOTOR SERVO
12
LTVGL
TSLG257
GNDPWR
Output
Sensor_3
GP2D15
Output
PWRGND
U2D
74LS02
11
1213
Sensor_6
GP2D15
Output
PWRGND
LTVRL
TSLR257
GNDPWR
Output
BT51.5V AA
BT41.5V AAA
BT81.5V AA
D2
LED
Sensor_8
GP2D15
Output
PWRGND
R5750
D4
LED
Sensor_7
GP2D15
Output
PWRGND
D3
LED
Brainstem GP 1.0
I2C[0..12]
Serial[0..4]
Servo-PWRServo-GND
Logic-PWRLogic-GND
Serv
o3Se
rvo2
Serv
o1Se
rvo0
Digit
al0Di
gital1
Digit
al2Di
gital3
Digit
al4
Analo
g0An
alog1
Analo
g2An
alog3
Analo
g4
A-
+
MG3
MOTOR SERVO
12
BT21.5V AAA
Sensor_2
GP2D15
Output
PWRGND
6V (Logic)
BT71.5V AA
R4750
Figure 4: Sector Definitions and IR Sensor Placements
Figure 6: Algorithm Example
Figure 5: LTV Mounting Housings
Figure 7:Hardware Schematic
IR Sensor NetworkInitialize Variables
-Turn Direction-Turn Amount-Hit Path Code
-IR Sensor Data(0-7)
-WaitCode=1
Main Loop
Select Left IRSensors
Read IR SensorValues
Select Right IRSensors
Read IR SensorValues
Hit Path CodeOverride Sensors
3, 6, 8Get HitPathCode
Override Sensors4,5,7
Right
Left
Sensor 1 or 2Detect Obstacle
We hit the left side of thepath less than 3 seconds
ago and are not allowed togo left yet.
We hit the right side of thepath less than 3 seconds
ago and are not allowed togo right yet.
STOP
True
Sensor 4 and 5 donot Detect Obstacle
-Save Left TurnCode
-Save Soft TurnCode
True
Sensor 3 and 6 donot Detect Obstacle
False
-Save RightTurn Code
-Save Soft TurnCode
True
Sensor 5 and 7 donot Detect Obstacle
-Save Left TurnCode
-Save HardTurn Code
True
Sensor 6 and 8 donot Detect Obstacle
False
-Save RightTurn Code-Save HardTurn Code
True
False
Save Data toScratchPad
TURN
False
Shaft Encoder
Initialize Variables-Current Value-Previous Value
-Counter-TurnAmount
Read A2D Portand save as Prev.
Value
Counting Loop
Read A2D Portand save as Cur.
Value
Cur. > (Prev. + 512)
Prev. Value = Cur. Value
Will detect only Low-to-Hightransitions on the A2D Port
Note: This code runs significantly fasterthan the maximum speed of the servomotor. (otherwise it will miss transitioncounts)
Max servo rotation period with no friction =1 transition per 30ms
True
A
GetTurnAmount
from theScratchPad
Assign counterbased on how farwe are turning.
ValidTurnAmount
Code?
DecrementCounter
ENABLERS
GO
False
Counter = 0
Counter > 0
Write WaitCodeto ScratchPad
Configure Digital I/OPorts
Wait Loop
Read WaitCodefrom ScratchPad
-WriteWaitCode=1 to
ScratchPad-Set WaitCode=1
This loop keeps another instance of this code fromrunning until we have completed the chosen turnaction. Without it we will chose and attempt to enact aturn every time we read new data values, which is fartoo fast for the first action to have been completed.WaitCode is cleared by ENABLERS which is called atthe completion of a TURN event by Shaft Encoder.
WaitCode != 0
Figure 8: TEA VM Software Flowcharts
Figure 8: Project Cost Breakdown
Acroname’s Brainstem GP 1.0
Texas Advanced OptoElectronic’s LTV Sensors
Sharp’s GP2D15 Digital IR Sensors
Acroname’s Continuous Rotation Servo Motors
Special Thanks to Mark Whitney from Acroname, Inc.