Ultrasonic sensors have been available for decades, and yet they continue to own a large portion of the sensing market due to their capabilities, flexibility, and low cost. As more products have become autonomous, demand has increased even further with their inclusion in robots, autonomous vehicles, and drones. Understanding how an ultrasonic sensor works, how it can be utilized, the pros and cons of using one, and their common applications will show how they are just as pertinent now as when they were first introduced.
Ultrasonic sensors emit a chirp usually between 23 kHz and 40 kHz, much higher than the typical audible range of human hearing at 20 kHz, hence the term ultrasonic. Using this chirp, they measure the amount of time it takes for the sound to bounce off an object. This is based on the same basic principles of echolocation used by bats to find their prey. As the speed of sound in air at room temperature is 343 meters per second, that time can be easily converted to distance, remembering that the ultrasonic chirp travels both to and from the object being sensed.
Distance (meters) = (time elapsed [seconds] * 343 [meters/second]) / 2
The units can be changed in this equation to fit the needs of a specific application, but the simplicity of the equation shows the relatively straightforward operation of an ultrasonic sensor.
Moving from theory to reality, an ultrasonic sensor requires two parts, both a transmitter and a receiver. In the most standard configuration, these are placed side-by-side as close together as reasonably possible. With the receiver close to the transmitter, sound travels in a straighter line from the transmitter to the detected object and back to the receiver, yielding smaller errors in the measurements. There are also ultrasonic transceivers where the transmitter and receiver functions are integrated into a single unit, minimizing error as much as physically possible while also significantly reducing the PCB footprint.
The acoustic waves that leave the transmitter are more similar in shape to light leaving a flashlight than a laser, so spread and beam angle must be considered. As the sound waves travel farther from the transmitter, the area of detection grows laterally and vertically. This changing area is why ultrasonic sensors give their coverage specification in either beam width or beam angle instead of a standard detection area. When comparing this beam angle between manufacturers, it is recommended to verify that the beam angle is either the full angle of the beam or the angle of variation from the straight line from a transducer.
A secondary effect of the beam angle is the range of the device. In general, a narrow beam yields a greater detection range as the energy of the ultrasonic pulse is more focused and can go farther before dissipating to unusable levels. Inversely, a wider beam spreads that energy in a wider arc, reducing the expected detection range. Choosing the ideal beam width is highly dependent on the application, with wide beams better at covering larger areas and general detection, while more narrow beams avoid false positives by limiting the detection area.
When searching for individual components, ultrasonic sensors can be acquired as independent transmitters and receivers or as a combination of the two in a single unit, known as an ultrasonic transceiver. Most analog ultrasonic sensor options are actuated by sending a trigger signal to the transmitter with the receiver sending back a signal when the echo is detected. The length of the pulse and any encoding can be customized by the designer as needed. This process ultimately leaves the time calculation between trigger and echo, as well as the decoding, to a host controller. There are digital ultrasonic sensor modules that calculate the distance onboard and then transmit the distance to the host through the communication bus. Although ultrasonic transmitters, receivers, or transceivers are often purchased separately and assembled with custom circuitry and firmware, they are also sometimes available as a single unit, pre-mounted on a PCB in the standard range finding configuration and a simple logic board. While simpler to use, designers do give up a great deal of flexibility and customization by using these modules.
As with any technology, ultrasonic sensors are best utilized in certain situations or applications over others. A few of their strengths include the following:
Although a versatile technology, ultrasonic sensors due have several limitations to consider before making a final sensor selection:
The first of the two most common ultrasonic sensor applications is liquid level sensing, as they can detect liquids of any color or opacity yet are also non-contact. The second is general object detection due to their low cost and simplicity. Specific object detection applications include anti-collision detection for vehicles, people detection, presence detection, box sorting, pallet detection with forklifts, bottle counting on drink filling machines, and many more.
An example of a more creative usage for ultrasonic sensors would be to use the one-way functionality of ultrasonic transmitters and receivers separately. While the ultrasonic pulses are outside of human audible ranges, they are within the hearing ranges of various animals. An ultrasonic transmitter could conceivably use its emitters to scare off animals, such as birds, while an ultrasonic receiver could be used for noise detection.
Ultrasonic sensors are a well-known technology that continues to be extremely relevant in many industrial and consumer applications. Their simplicity, low cost, and robust build make them an excellent choice for many new products requiring presence detection or distance measurement. Yet the ability to change both the hardware and software configurations make them extremely versatile for even more demanding situations.