Speed Calculation via Timer/Counter

advertisement
PADS
Paraplegic Assisted Driving System
Aaron Broome
Robert Graham
Lamar Turnbull
Tylor Palumbo
Erick Moton
Georgia Institute of Technology
ECE 4007 Moore
Fall 2010
Project Overview

Autonomous speed control system
 Provide paraplegics with an alternative
means of transportation through the use of
the following:
○ Linear Actuator controlled acceleration/braking
○ Updated speed and related information display
○ LED display
○ Accurate speed calculation
○ 4-color recognition (Red, green, blue, black)
○ Manual override switch for emergency shutdown and
reset

Equipment Cost: $654
Technical Objectives
Autonomous Speed Control

Use object recognition to detect 3 speed zones
and stop sign
○ Matlab RGB color detection
 Calculate speed and compare with latest
detected sign
○ Measure revolutions/sec from PIC timer and counter
○ Compare with RGB values obtained from Matlab
 Control gas/brake pedal to adjust to desired
speed
○ High/low output logic from PIC sent to H-bridge based
on color and speed
Project Goals
Goals
Response Time for Matlab to
recognize signs
Refresh rate of speed
calculation
Time required to completely
stop vehicle from maximum
speed
Time required to adjust speed
for new speed zone
Achieve accurate speed for
speed zone
Accurate reading of zone colors
(Red (STOP), Blue (5 mph),
Black (10 mph) Yellow (13mph))
Proposed
Specifications
Actual
Units
Specifications
<1
<1
sec
<1
0.5
sec
<7
<7
sec
≤5
≤5
sec
±2
±2
mph
± 20
N/A
RGB
Prototype Design Overview
Golf Cart
Laptop w/ USB camera
& Matlab
Hall Effect
Speed Sensor
Qwikflash (PIC18F452)
Development Board
4” and 6” Linear
Actuators
Prototype Design Overview
Qwikflash
Development Board
H-Bridge
Linear Actuators
Hall Effect Speed
Sensor
Hardware Block Diagram
Laptop with
USB Camera
Serial Connection
Qwikflash Board
Dual H-Bridge
Hall Effect Speed Sensor
4/6” Linear Actuators
12V Sealed Lead
Acid Battery
Linear Actuator Installation
Dimensions: 20”x16”16.5”
Prototype Design & Description

Prototype currently works as desired in each speed
zone. Desired specifications hit or miss

Tests:
 Color Recognition Time: Matlab Timing Function
 Zone Reaction Times: Real-time road tests
Testing Results
Goals
Response Time for USB cam to
recognize signs
Time required to completely
stop vehicle from different
speeds
Desired
Specifications
Tested Values
Units
<1
0.22
Sec
<7
5mph - 5.86
10mph - 6.70
13mph - 7.82
Sec
5mph-10mph – 14.4
Time required to adjust speed
for new speed zone
≤5
Achieve accurate speed for
speed zone
±2
5mph-13mph – 17.83
10mph-13mph – 8.94
10mph-5mph – 17.67
13mph-5mph – 15.09
13mph-10mph – 8.52
5mph – 5.35mph
10mph – 9.99mph
13mph – 12.84mph
Sec
Mph
Procedure Flow Diagram
PIC18F452 Operations
Counter/Timer0
Speed
Calculator
Matlab Operations
Speed Sensor Pulse
(Input Port Signal)
LCD Display
Speed/Color
Combined Response
Subroutine
H-Bridge (Output
Port Signal)
Webcam Color
Detection
RS232 Send/Receive
Subroutine
RS232 Send/Receive
Subroutine
Pushbutton
(Reset)
Hall Effect Speed Sensor

Speed Calculation
1Rotation = 7.93*10 -4 miles
# of Mounted Magnets = 1Rotation
1 Rotation
7.93*10-4 miles y magnets 3600sec
miles
(
)((
)(
)(
)= #
x / 2 magnets
1 Rotation
sec
1hr
hr
Matlab Object Recognition
Problems & Solutions
Speed Calculation via Timer/Counter
Refresh rate for reading input
pulses/sec
.5 seconds used as refresh in
order to keep speed updated at
a regular rate
Color Sensing and Object Recognition
RGB threshold for various lighting
conditions
RGB value threshold was
eliminated due to lack of time
Number of Magnets Mounted to Wheel
Quality of sample used to calculate
speed
8 strips of magnets were
attached to wheel to increase
accuracy of speed calculation
Linear Actuator Response Timing
Linear actuator set to extend
and/or retract for one second
every response period
Budget Analysis
Part Name
Cost

CMUcam2
$109
Actuators
$180
Magnetic
Sensor
$20
Microcontroller
$205
Actuator
Housing
$60
Power Supply
$80
Total
$654


Project Budget:
$440
Amount spent to
date: $439.79
Microcontroller
provided by Georgia
Tech Savannah
Future Work

The PADS prototype
system can be
continued by future
ECE students with
additional work that
could consist of the
following:
 Implementation of
LIDAR for object
avoidance
 Autonomous control of
the steering wheel
 GPS-assisted route
navigation
Questions
Additional information located on project website:
http://www.tinyurl.com/gtsavseniordesign
Download