Ultrasonic Sensor Examination
By Vinh-Khoa Ton, Control and Image Processing
The purpose of this ultrasonic sensor examination was to determine the range and angle of the sensor detection. The ultrasonic sensor will be used as the eyes of ROFI and ROFIA for the purpose of avoiding obstacles. The Seeed Studio Ultrasonic Ranger v1.0 was the device chosen for this examination.
Examination Setup:
An Arduino ATMega328 was used to test the sensor. The connections between the ultrasonic sensor and Arduino are shown below.
The sensor was set at approximately 30 cm, the height of the robot. The sensor was placed on a hard and flat surface to ensure stability during the test. A black binder was used as an obstacle for easy angle adjustment (1 side is fixed and 1 side is adjusted).
The code used for the tests can be found in the dropbox link at the end of this post. The serial monitor, shown below, was used to record the distances at which the sensor detected an obstacle. The LED was programmed to light up if an object was within 30 cm of the sensor.
Detection Angle Testing:
A question that the test was designed to answer was: would ROFI and ROFIA be able to detect an object at their feet? To answer this question, the angle of the adjustable side of the binder with respect with the table was varied from being parallel with the table to being perpendicular with the table.
The highest distance value that the sensor detected for an angled surface was approximately 42 cm and any angle closer to being parallel with the ground resulted in the sensor being unable to detect the binder side.
The highest angle that the sensor could detect was approximately 36 degrees.
Detection Distance and Error Testing:
The sensor was tested with an upright object, as shown in the picture below, placed at different distances. The error between the sensor’s calculated distance and the actual distance was approximately
1 cm.
Conclusion:
The ultrasonic sensor is able to detect objects that are equal to and less than 36 degrees vertically away
from directly in front of it, given that the object is about 27.7 cm as shown in the angle testing section.
The ultrasonic sensor has about an error of 1 cm when detecting objects directly in front of it. The angle
detection brings up an interesting scenario. The ultrasonic sensor would have issues detecting objects
below it following any turning movements. The ultrasonic sensor also has problems detecting flat and
upright objects parallel to its line of sight. For the purpose of the biped project, however, we will be
avoiding these complications and will use it to simply avoid upright objects directly in front of it.
References:
Sensor specifications, background information, and Arduino code can be found here:
http://www.seeedstudio.com/wiki/Ultra_Sonic_range_measurement_module#Introduction
The Arduino code used to test the ultrasonic sensor can be found here:
https://dl.dropboxusercontent.com/u/20231161/Ultrasonic_Sensor_Testing.ino