Ultrasonic Field of View Test
By: Jordan Smallwood (Project Manager and Electronics & Control)
Approved By: Miguel Garcia (Quality Assurance)
Table of Contents
Introduction
In order to develop an object avoidance routine we needed to verify that the ultrasonic sensors would work for detecting objects. To verify the field of view a simple experiment was constructed that would determine the distance to an object. The experiment is as follows.
Parts Required:
- HC-SR04 Ultrasonic Sensor
- Arduino (Any will do)
- Serial Monitor
- Ruler or other measuring device
- 2 LED’s with CLR’s
Figure 1: Fritzing Diagram for FOV test
Setup:
The ultrasonic sensor has 4 pins: VCC, GND, Trig and Echo. Vcc and GND are for powering the device where as Trig and Echo are the signal pins. Trig is short for trigger, applying a pulse to this pin will emit an ultrasonic ping that travels from the transmitter. The echo pin is where you receive the ping coming off the object of interest. The time delay that takes place between these steps will determine how far away an object is. For our setup, Trig was hooked up to pin 13 and Echo was hooked up to pin 12 but any digital pins will work.
Next upload the code provided to get an output from the Serial Monitor showing the distance to the object.
Determining Field of View:
In order to determine the field of view of the object two rulers were set up to determine when we lost sight of the object. The object was recognized directly in front of the sensors at x = 16 cm and then moved up and down in the z-direction. The sensor lost sight of the object at about 6 cm above or below. The same situation took place when the object was moved along the y-direction. From this we can gather that the field of view is about 18 degrees.
Figure 3: Determining Safe Object Detection Distance
The distance L is the safe object detection distance. If we detect anything closer than that is when we lose overlap between the sensors which means that we could run into trouble if anything gets closer than that. The distance can easily be found as:
Figure 4: Determining Safe Distance L
Conclusion:
The Ultrasonic sensors are actually pretty impressive. I’ve never uploaded code and received immediate results, this was a first for me. I would put my hand in front of the sensor and compare the actual distance to find they were very comparable. With these sensors we can easily detect if an object is too close and from that we can implement some kind of avoidance strategy.
References
http://www.instructables.com/id/Simple-Arduino-and-HC-SR04-Example/