Using An Ultrasonic Sensor to Find An Object
Using An Ultrasonic Sensor to Find An Object on a Coordinate Grid By William H. Kusewich William Hamlet
Background u u u Global positioning systems use sensors to locate many different objects (cars, planes, people, etc. ) Position of objects is commonly taught in algebra using x-y coordinate grid The trigonometric functions sine and cosine can also be used to determine an object position if the angle is known and the distance from the origin is known
Background Ping Ultrasonic Sensor Distance =elapse time * speed of sound u Emits high frequency (40 k. Hz) sound wave to an objects and measures the time it takes for the wave to return u
x-y Coordinate Grid u Object Testing
Using Sin and Cosine e c an st i D y-point=(sine (Θ)*distance) x-point=(cosine (Θ)*distance) Ultrasonic sensor stand
Using Sin and Cosine Angles in p. BASIC are determine by using the unit brad u 128 brads = 180 degrees u Sin (64 brads) = 1 u Cos (64 brads) = 0 u
Ultrasonic Sensor Stand u As the servo motor rotates, the angle of rotation is determine Ping Sensor BOE Servo Motor
Component Connection u Pin Selection Servo Motor P 0 BOE P 1 Ping Ultrasonic Sensor P 2 Distance=40 cm X=4 Y=3 LCD
Problems With Ping Sensor False-positive reading Fix -Fence u Ping not giving the correct distance Fix-Change the types of objects u Totally missing the object Fix – Reduce the number of brads rotated for each reading u
Results u u u Dark Circle – completely accurate Gray Circle – Accurate to within one unit Clear Circle- Missed or no reading Y=8 Y=7 Y=6 Y=5 Y=4 Y=3 Y=2 Y=1 Y=0 X=1 X=2 X=3 X=4 X=5 X= 6 X=7 X=8
Future Works Create another unit, and have both units move along their respective axes until the object is located. u Place sensors at end of x-y coordinates respectively. Solve two equations using the distance formula simultaneously for x and y. u Have locators find a moving object. u
- Slides: 11