Design of an Obstacle Design of an Obstacle Avoidance VehicleAvoidance Vehicle
Frank Scanzillo
EECC657
ObjectivesObjectives
Detection and avoidance of obstaclesDetection of and navigation toward light
beacon (final destination of vehicle)
SpecificationsSpecifications Maximum distance from tank to beacon: 7.8 m Accuracy of destination: 25 cm radius Minimum dimensions of obstacles: 23.5 x 23.5 cm, height 9 cm Maximum height of obstacles: 20 cm Minimum height of beacon emitter/detector: 25 cm No objects within 3 cm of vehicle prior to system power-up
Tank
Light detector
stand
Photo light detector
Obstacle
IR beacon (target)
Infrared object
sensors
7 cm
25 cm
18 cm
Optoreflector
1 cm
User InterfaceUser Interface
Power on/off LED status lights
– Normal operation– Target reached– Vehicle stuck
Power Switch
On
Status Lights
Off
L2Failure
L1Success
L0Normal
Microcontroller InterfacesMicrocontroller Interfaces
System block diagram
Microcontroller
Port A Port BPort AD
Sensor outputsDC motor
inputs
FL FR
Status light outputs
LSF RSF
LSR RSR
RL RR
Photo ML1 MR1
ML0 MR0
L2
L1
L0
Opto
Analytical ComponentAnalytical Component
Required type, number, and configuration of sensors
Calculation of sensing distances– Stopping distance– Effective turning radius– Sensor body dimensions/beam widths
Calculation of object size limitsAlgorithm for system (flowchart)
Sensors UsedSensors Used
Sharp GP2Y0A21YK (4)
Sharp GP2Y0D340K (4)
Panasonic PNA4602M 38 kHz IR Photodetector
Optek OPB745 Optoreflector
Sensor ConfigurationSensor Configuration
Photo light
detector
Infrared object
proximity sensors
Infrared sensor beams
L
W
½ W
½ LSS2 SSV2
SSH2
SFV1SFV2
SV
SFH2
SF2
SS1
SF1
SFH1
SSV1
FH
SSH1
SH
FV
WO
Sensor Configuration (cont.)Sensor Configuration (cont.)
R2 = 90
04.0
7.13.52
F
FCC
I
VVR
Calculation of Sensing Calculation of Sensing Distances (front/rear)Distances (front/rear)
Stopping distance: dS = 1.3 + 0.5 cm Virtual turning radius: zero Effective turning radius:
2222 5.375.16 LWd
d = 40.97 cm )5.3797.40()( 2
121 Ldt
t = 1.74 cm Sensor body dimensions:
GP2Y0A21YK: 4.46 x 1.35 cm
Beam width:
58.8
80
6tan2 1
SFV1’ = t + dS + FV + EFV1 + ESFV1 = 1.74 + 1.3 + 1.16 + 1.71 + 1
SFV1’ = 6.91 + 1.00 cm
22222
2222 29.214.19)()( SFVFVSFHFHF ESESS
SF2 > 28.8 cm (upper bound)
22211
2111 94.445.5)()( SFVFVSFHFHF ESESS
SF1 < 7.35 cm (lower bound)
Calculation of Sensing Calculation of Sensing Distances (side)Distances (side)
Sensor body dimensions:GP2Y0D340K: 1.5 x 0.9 cm
Distance of beam vertex from vehicle: 1.5 + 0.5 cm
Photo light
detector
Infrared object
proximity sensors
Infrared sensor beams
L
W
½ W
½ LSS2 SSV2
SSH2
SFV1SFV2
SV
SFH2
SF2
SS1
SF1
SFH1
SSV1
FH
SSH1
SH
FV
WO
SH = 0.39 + 0.39 cm
SSH1 = dSS + SH + SH = 1.5 + 0.39 + 0.39
SSH1 = 2.28 + 1.00 cm
SV = 8.0 + 0.5 cm
SSV2 = L - SV + ESV + ESSV2 = 37.5 – 8 + (0.2 + 0.5) + 1
SSV2 = 31.2 + 2.0 cm222
222
222 95.92.33)()( SSHSHSSVSVS ESESS
SS2 > 34.7 cm (upper bound)
22211
2112 28.115.10)()( SSHSHSSVSVS ESESS
SS1 < 10.23 cm (lower bound)
Object size limitsObject size limits
WO = 23.5 cm (minimum width of each obstacle)
22222
222 29.2195.9)()( SFVFVSSHSHO ESESW
Photo light
detector
Infrared object
proximity sensors
Infrared sensor beams
L
W
½ W
½ LSS2 SSV2
SSH2
SFV1SFV2
SV
SFH2
SF
2
SS1
SF1
SFH1
SSV1
FH
SSH1
SH
FV
WO
System FlowchartSystem Flowchart
Current StatusCurrent Status
Finalized proposal Obtained/purchased tank, logic
gates, LEDs, some sensors and batteries
Modified tank chassis Eliminated excess wiring Tested DC motor inputs/outputs
Obtain voltage regulators, NiMH batteries/charger, HC12 board, a few more sensors
Set up and test voltage regulators
Set up, align, and test sensors Develop device drivers and test
all interfaces System level coding, testing
and verification Prepare final report/demo
Test PlanTest Plan1. Voltage regulators
Verify that supply voltage for motors/sensors and beacon = 5 + 0.25 V Voltage regulator output (adjustable) for microcontroller = 5.3 + 0.2 V
2. Object sensors Position small object (i.e. < 1 cm wide) 5.94 + 0.20 cm from front/rear of
vehicle, aligned with the center of the front/rear bumper; verify that output > 2V for both front/rear sensors, and that voltages are equal.
Position either side of vehicle directly next to wall; verify that output > 1.2 V from closest front/rear sensor.
Follow similar procedure to verify alignment and range of side proximity sensors.
3. DC motors: Write code to sample all five legal functions of motors (i.e. forward, reverse, turn left/right, stop), for 2 seconds each, ensuring that the vehicle moves as instructed. The vehicle should move in a straight line forward or backward, and have no virtual turning radius.
4. Beacon/photodetector: Verify that the frequency of oscillation is 38 + 2 kHz, and that the photodetector can sense the beacon up to 8 meters away.
5. Optoreflector: Verify that a “good” logic high (> 4.3 V) is produced when a reflective strip is 1 cm from the lens, and that a “good” low (< 0.8 V) is produced when there is no reflective strip present. Write some code to test the output of the optoreflector and verify that the correct binary values are stored.
Test plan (cont.)Test plan (cont.)
System level test cases:– Place vehicle in a closed room with several obstacles
scattered, and the beacon placed at the far end of the room. Turn the vehicle so that the photodetector is facing the direction opposite the beacon and turn the power on. Verify that the tank reaches its target before powering down.
– Surround the vehicle with obstacles in an enclosed area. Place the beacon outside the enclosed area and verify that the “stuck” status light is triggered.
Power ConsumptionPower ConsumptionM68HC12: 350 mW expanded mode
DC motors: (500 mA)(5V) = 2.5W each
Object sensors: (40 mA)(5V) = 200 mW each
Beacon (555 Timer): (5V)(15mA) = 75 mW
Optoreflector: 100 mW LED + 100 mW photodarlington
IR Photodetector: 200 mW
Total power dissipation:
0.35 + 2(2.5) + 0.2(8) + 0.075 + 0.2 + 0.2 = 7.425 W
System CostSystem CostVendor Part Quantity Cost CE Dept. (purchased in previous course)
Optek OPB745 Optoreflector
1 N/A
“ “ “ “ “ 74LS04 Hex Inverter 1 N/A “ “ “ “ “ 74LS06 Hex Inverter
w/Open Collector 1 N/A
“ “ “ “ “ 2V Red LED 3 N/A “ “ “ “ “ Trimpot 1K
Potentiometer 1 N/A
“ “ “ “ “ Trimpot 10K Potentiometer
1 N/A
“ “ “ “ “ Jameco Breadboard 2 N/A “ “ “ “ “ LM555 Timer 1 N/A CE Dept. (loaned) Motorola
M68HC12A4EVB Evaluation Board w/interface module
1 N/A
“ “ “ Misc. resistors, capacitors, wires
N/A N/A
Toys R Us GI Joe Motorized Combat Assault Tank
1 $34.95
Radio Shack 5V DC Voltage Regulator 7805A
2 $2.98
“ “ Battery holder (2 C) 3 $4.47 “ “ Adjustable Voltage
Regulator LM317T 1 $1.99
Digikey Panasonic PNA4602M 38khz IR Photodetector
1 $3.00
“ Panasonic LN64PA 950 nm IR LED
10 $7.56
Wal-Mart Rayovac 6V Heavy Duty Lantern Battery (for beacon)
2 $5.27
CheapBatteries.com Global Instruments NiMH Battery Charger
1 $10.00
“ Global Instruments 1.2V NiMH 3800 mAH C Batteries
12 $48.00
Tri-Tech Sharp GP2Y0A21YK IR Analog Proximity Sensor
4 Free evaluation
“ Sharp GP2Y0D340K IR Digital Proximity Sensor
4 Free evaluation
Estimated total cost $118.22
Q&AQ&A