Warning: Undefined array key "twitterAccount" in /home/wwwroot/chipdatas.com/pc/config/main.php on line 278
Using Ultrasonic Sensors for Accurate Distance Measurement - Chipdatas

Using Ultrasonic Sensors for Accurate Distance Measurement

Jul 24, 2023
 Using Ultrasonic Sensors for Accurate Distance Measurement

The ultrasonic ranging sensors play a significant role in various daily production and life applications. They are primarily utilized for non-contact automatic parking distance control (PDC) in automobiles, obstacle avoidance robots, construction sites, and industrial working environments where measurements such as liquid level, well depth, and pipeline length are essential.

 

Generally, there are two commonly employed methods for ultrasonic distance measurement:

 

- The first method involves using a single chip microcomputer or embedded equipment for the ultrasonic ranging system.

 

- The second method involves using CPLD (complex programmable logic device) for the ultrasonic ranging system.

 

To comprehend the design and application of ultrasonic ranging sensors, it is crucial to have a clear understanding of their working principle.

 

1 What is an ultrasonic sensor?

Figure 1. How ultrasonic sensor ranging works

 

The working principle of ultrasonic sensor ranging is depicted in Figure 1. An ultrasonic sensor is a device that converts ultrasonic signals into another form of energy, typically an electrical signal.

 

Ultrasonic waves refer to mechanical shock waves generated in elastic media with frequencies exceeding 20 kHz. These waves possess several advantageous properties, such as strong directivity, low energy consumption, and the ability to propagate over long distances. Consequently, ultrasonic waves are commonly employed in non-contact ranging applications.

 

Furthermore, ultrasonic waves exhibit excellent penetration capabilities in both liquid and solid mediums, especially in the case of opaque solids exposed to sunlight. When an ultrasonic wave encounters an impurity or an interface, it produces a distinct reflection that manifests as an echo. Additionally, when ultrasonic waves encounter moving objects, they induce a phenomenon known as the Doppler Effect.

 

 

Due to these unique characteristics, ultrasonic ranging sensors demonstrate remarkable adaptability to various environmental conditions. They enable real-time, precise, and cost-effective distance measurements utilizing the Doppler Effect and echo analysis.

 

2 Methods for Ultrasonic Ranging

Currently, there are several methods available for ultrasonic ranging:

 

- Round-trip Time Detection

- Phase Detection

- Acoustic Amplitude Detection

 

The underlying principle involves the emission of ultrasonic waves by the sensor at a specific frequency. These waves propagate through the air medium until they encounter the target object or obstacle, causing them to reflect back. The ultrasonic receiver then detects these reflected pulses, and by measuring the time it takes for them to return, the round-trip time can be determined. This round-trip time is directly related to the distance traveled by the ultrasonic waves.

 

To calculate the distance traveled by the ultrasonic waves, the wave propagation time is measured. Assuming that "s" represents the distance between the measured object and the range finder, "t" represents the measured time, and "v" represents the velocity of ultrasonic propagation, a relationship can be derived:

 

s = vt/2       (1)

 

When high accuracy is required, it is essential to consider the impact of temperature on the ultrasonic propagation speed. As a result, the ultrasonic propagation speed is corrected based on the following relationship to minimize errors:

 

v = 331.4 + 0.607T        (2)

 

Here, "T" represents the actual temperature in degrees Celsius, and "v" signifies the propagation speed of the ultrasonic wave in the medium, measured in meters per second.

Figure 2. Working principle of ultrasonic ranging sensor

 

3 Principles of Ultrasonic Ranging

The principle behind ultrasonic ranging involves the transmission of ultrasonic waves in a specific direction using an ultrasonic transmitter. Simultaneously, the timing begins as the transmission occurs.

 

As the ultrasonic waves propagate through the air and encounter an obstacle, they immediately bounce back and are received by the ultrasonic receiver. The timing ceases at this moment.

 

The ultrasonic ranging sensor utilizes the principle of ultrasonic echo ranging and employs precise time difference measurement technology to detect the distance between the sensor and the target object. This sensor offers various advantages, including a small angle of detection, a small blind area, high measurement accuracy, non-contact ranging, water-resistant and corrosion-resistant properties, and low cost.

 

Typically, ultrasonic ranging sensors operate with a one-to-one correspondence between a transmitter and a receiver. However, there are cases where multiple transmitters correspond to one receiver. By measuring the time it takes for the ultrasonic wave to return and analyzing the return signal, the ultrasonic distance sensor determines the distance to the object.

 

For ultrasonic distance sensing applications, we recommend using the Korean Hagisonic Ultrasonic Distance Sensor Module HG-C40U.

 

Figure 3. Ultrasonic distance sensor module HG-C40U

 

The Ultrasonic Distance Sensor Module HG-C40U, depicted in Figure 3, offers two optional transmission modes:

 

- Free Operation Mode: In this mode, the sensor itself generates trigger and burst signals when provided with power. It is commonly used for basic applications.

 

- External Trigger Mode: In this mode, an external system such as a controller or processor controls the trigger signals, allowing for more advanced applications. Both modes are suitable for various purposes.

 

Furthermore, the sensor module requires a choice of two input power supplies:

 

- Low Voltage (5V): This voltage is suitable for the processor circuit, enabling a maximum measured distance of 3.5m to the obstacle.

 

- High Voltage (12V): This voltage is recommended for the controller circuit, allowing a maximum measured distance of 5m to the obstacle. The data is transmitted via UART (universal asynchronous receiver-transmitter) with a resolution of less than 5mm.

 

Users can also select different setting modes according to their specific environmental requirements, such as free-running, UART triggering, or external trigger settings. Additionally, based on the desired baud rate of UART communication, users can decide whether to set up a circular buffer or not. The output signal from the sensor utilizes a high-performance ASIC chip for stable transmission and sensitive reception. Communication between the sensor and PC is facilitated using an "interface board" (RS232, power regulator). The received ultrasonic wave can be amplified in real-time using the monitor program on the PC, and the distance value can be outputted via UART (in ASCII format, measured in millimeters). Furthermore, the detection signal can be converted into a rectangular TTL level signal (square wave) in real-time.

 

4 Conclusion

ultrasonic sensors offer a reliable, cost-effective, and efficient solution for distance sensing, level measurement, and obstacle detection purposes. By gaining a clear understanding of the working principles behind ultrasonic sensors and selecting the appropriate ultrasonic technology for a given application, individuals can make well-informed decisions regarding the selection of the right sensor system.

 

Ultrasonic sensors provide numerous advantages, including their non-contact measurement capability, high precision, and ability to adapt to various environments. They are widely utilized across different industries and applications, ranging from automotive parking distance control to industrial automation.

 

By leveraging the benefits of ultrasonic sensors, users can enhance the performance and efficiency of their systems, improve safety measures, and optimize overall operational processes.

 

5 FAQ

1. What type of sensor is an ultrasonic sensor?

Ultrasonic sensors, including level sensors, measure the distance to a target by calculating the time between the emission and reception of ultrasonic waves. Unlike optical sensors that have separate transmitters and receivers, ultrasonic sensors utilize a single ultrasonic element for both emission and reception.

 

2. How many types of ultrasonic sensors are there?

There are four types of ultrasonic sensors based on frequency and shape: the drip-proof type, high-frequency type, and open structure type (including lead type and SMD type).

 

3. What is the range of an ultrasonic sensor?

The most commonly used range for ultrasonic sensing is typically between 40 to 70 kHz. The frequency of the sensor directly affects the range and resolution, with lower frequencies providing greater sensing range. For example, at 58 kHz, a frequently used frequency, the measurement resolution is one centimeter (cm) and the range can reach up to 11 meters.

 

4. Can an ultrasonic sensor detect humans?

Ultrasonic sensors can assist in detecting humans for applications such as autonomous robot navigation. They can be utilized to set multiple tripwire distances to navigate around people. Additionally, their high read rate enables quick detection when a person may enter the path of a robot.

 

5. Is an ultrasonic sensor harmful?

Exposure to ultrasound exceeding 120 dB in occupational settings may lead to hearing loss. Exposure above 155 dB can produce harmful heating effects on the human body. Calculations suggest that exposures above 180 dB may result in death.

 

6. How do ultrasonic sensors work?

Ultrasonic sensors operate by emitting sound waves at a frequency too high for humans to hear. They then wait for the sound waves to be reflected back, and based on the time required for the reflection, they calculate the distance to the target. This concept is similar to how radar measures the time it takes for a radio wave to return after hitting an object.

 

7. Why are ultrasonic sensors used?

Ultrasonic sensors are primarily used as proximity sensors and can be found in various applications. They are employed in automobile self-parking technology, anti-collision safety systems, and as level sensors to detect, monitor, and regulate liquid levels in closed containers, such as vats in chemical factories.

 

8. Where are ultrasonic sensors used?

Ultrasonic sensors find applications in numerous industries and sectors. They are used in the food and beverage industry to measure liquid levels in bottles and are employed in manufacturing processes for automation and control to enhance efficiency. Additionally, they are utilized in areas such as car reversing sensors, security alarms, and industrial inspection.

 

9. Are ultrasonic sensors waterproof?

Most ultrasonic distance sensors are not waterproof, which may pose a challenge when requiring outdoor durability. However, there are sensors specifically designed for outdoor applications, such as car reversing sensors, security alarms, and industrial inspections.

 

10. Are ultrasonic sensors analog or digital?

Ultrasonic sensors typically integrate an Analog-to-Digital Converter (ADC) to convert the analog ultrasonic signals into digital data for processing and analysis.

 

11. How do Ultrasonic Sensors Measure Distance?

Ultrasonic sensors are devices that utilize ultrasonic waves to measure distance. The sensor head emits an ultrasonic wave, which then travels towards a target object. When the wave hits the object, it reflects back towards the sensor, and the sensor calculates the time it took for the wave to return. By measuring the time between emission and reception, the sensor can determine the distance to the target.

 

12. What is the Accuracy of Ultrasonic Sensors?

Under controlled conditions, the more accurate ultrasonic sensors can achieve a range of accuracy between 0.1% and 0.2% of the detected range. However, in practical applications, most good ultrasonic sensors typically have an accuracy ranging from 1% to 3%.

 

13. What Can Ultrasonic Sensors Detect?

Ultrasonic sensors have the ability to measure the distance to a wide range of objects, regardless of their shape, color, or surface texture. These sensors are versatile and can detect both stationary and moving objects. Whether the object is approaching or receding, the ultrasonic sensor can accurately measure its distance.

 

14. Are Ultrasonic Sensors Affected by Smoke?

One advantage of ultrasonic sensors over infrared sensors is that they are not affected by smoke or black materials. However, soft materials that do not reflect the ultrasonic waves well may pose some challenges for these sensors.

 

15. Ultrasonic vs IR Sensors: Which is Better?

When it comes to obstacle detection, ultrasonic sensors have several advantages over infrared (IR) sensors. Ultrasonic sensors work by detecting sound waves, which means they are not affected by as many external factors. They provide more reliable measurements and are suitable for applications where reliability is crucial.

 

On the other hand, if cost is a significant consideration and you are willing to compromise on reliability, infrared sensors might be more suitable for your specific application.

Watt Smith

Collaborator & Editor

Hello! My name is Watt Smith working on Chipdatas. I write and share relevant articles on electronic components category.

The tension in logistics has eased and normal shipping has resumed. All orders shipments will be sent out within 1-2 days.
Upload

Uploaded file detected, select the action you want:

Upload file

Click Bom button for BOM cost budget、Compare price and stock、send RFQ or place order.
Send RFQ button will submit your document to us,and feedback to you within 24 hours.