SPEED SENSOR AKA ROBO-COP James Derrickson

advertisement
SPEED SENSOR
AKA
ROBO-COP
James Derrickson
Eduardo Urquidi Junior
THE IDEA
Speed Sensing Robot
 Our project is a robot that detects and records the speed of an object
moving away from the robot
 If the object is moving too fast, speeding, then the car initiates chase!!
VEHICLE SPECIFICATIONS







9 volt battery
LCD display
Two wheeled motors
Sonar
LED lights
Speaker
SSMI Board
SONAR SPECIFICATIONS
Minimum Distance Measured: 0.03 m
Maximum Distance Measured: 3.103 m
10 milliseconds from end of echo to next pulse
HARDWARE SETUP (OFF CHASSIS)
ACTUAL CAR
PSEUDO CODE FOR TRACKING SPEED
loop;
if flag is set;
capture distance;
put it in distance array at location e;
increment e;
if e is greater than 3, set e to zero;
put average distance vector into avg1;
speed equals (avg1-avg2)*100/25;
print speed to LCD;
if speed is greater than constant and less than 3*constant, set off criminal function;
avg2 = avg1;
flag = 0;
PSEUDO CODE FOR CHASING
criminal function with two integer inputs a and b;
turn on motors;
loop five times;
loop for half of a second;
make a square wave with period of int a for siren on PTM 4;
turn on blue LED;
turn off blue LED;
loop for half of a second;
make a square wave with period of int b for siren on PTM 4;
turn on red LED;
turn off red LED;
turn off motors;
TIMING DIAGRAM NOT CHASING
TIMING DIAGRAM WHEN CHASING
CHALLENGES AND IMPROVEMENTS

LCD initializes to port t




DC motor connections, J7, PT0-PT3
Motors might trip breaker on board, might not
Outside of our project to recode
Sonar is not accurate

Sends out a signal in several directions
QUESTIONS?
Download