Phone

    00852-6915 1330

How to Use Ultrasonic Sensors for Distance Measurement?

  • Contents

 

In daily production and life, ultrasonic ranging sensors are mainly used for non-contact automatic parking distance control (PDC) of automobiles, obstacle avoidance robots, construction sites and industrial working environments that require liquid level, well depth, pipeline length, etc.

In general, there are two commonly used ultrasonic distance measurement methods:

  - The ultrasonic ranging system based on single chip microcomputer or embedded equipment;

  -  An ultrasonic ranging system based on CPLD (complex programmable logic device).

In order to understand the design and application of ultrasonic ranging sensor, let us first understand the working principle of ultrasonic sensor.

Introducing ultrasonic sensor & taking HC-SR04 as an example

 


Catalog

 

I What is ultrasonic sensor?

II Methods for ultrasonic ranging

III Principles for ultrasonic ranging

IV Conclusion

FAQ

 


I What is ultrasonic sensor? 

 

 

Working principle of ultrasonic sensor ranging

Figure 1. Working principle of ultrasonic sensor ranging

An ultrasonic sensor is a sensor that converts an ultrasonic signal into another energy signal (usually an electrical signal). 

Ultrasonic is a mechanical shock wave generated in elastic media with a frequency greater than 20 kHz. Because of its strong directivity, slow energy consumption and relatively long propagation distance, it is often used in non-contact ranging. 

In addition, ultrasonic has the big ability to penetrate liquid and solid, especially in the sunshine opaque solid. When an ultrasonic hits an impurity or an interface, itwill produce a significant reflection to form an echo,  and when it hits a moving object will cause a phenomenon called Doppler Effect. 

Therefore, ultrasonic ranging has a good adaptability to the environment, and ultrasonic distance measurement can be well compromised in real time, precision, and price.

II Methods for ultrasonic ranging

At present, there are various methods for ultrasonic ranging: 

  -  round-trip time detection;

  -  phase detection;

  -  acoustic amplitude detection.

The principle is that the ultrasonic sensor emits ultrasonic waves of a certain frequency, propagates through the air medium, and is reflected back after reaching the measurement target or the obstacle. After being reflected, the ultrasonic receiver receives the pulses, and the time it takes, is the round-trip time, which is related to the distance traveled by ultrasonic waves.

Measuring the wave propagation time to get the wave propagation distance:

Assuming that s is the distance between the measured object and the range finder, the time measured is t / s, and the velocity of ultrasonic propagation is expressed as v/m·s-1, then there is a relation (1):

s=vt/2       (1)

When the accuracy is required, the influence of temperature on the ultrasonic propagation speed needs to be considered, therefore the ultrasonic propagation speed is corrected according to relation (2) to reduce the error.

v=331.4+0.607T        (2)

Where T is the actual temperature, the unit is °C; v is the propagation speed of ultrasonic wave in the medium, and the unit is m/s.

Working principle of ultrasonic ranging sensor

Figure 2. Working principle of ultrasonic ranging sensor

 

III Principles for ultrasonic ranging

 

The principle of ultrasonic ranging is to transmit ultrasonic waves in a specific direction through an ultrasonic transmitter, and start timing at the same time as the transmission.

When ultrasonic waves propagate in the air and hit an obstacle, they will immediately return and be received by the ultrasonic receiver, and stop timing immediately.

The ultrasonic ranging sensor uses the principle of ultrasonic echo ranging and uses precise time difference measurement technology to detect the distance between the sensor and the target. It has the advantages of small angle, small blind area, high measurement accuracy, non-contact ranging, waterproof, anti-corrosion, and low cost.

Ultrasonic ranging sensors are usually used in a way that one transmitter corresponds to one receiver, but there are also multiple transmitters corresponding to one receiver. Therefore, the ultrasonic distance sensor can measure the return and return time of the ultrasonic wave to determine the distance of the object. This is how the ultrasonic distance sensor works.

For the ultrasonic distance sensor, we recommend to use the Korean Hagisonic ultrasonic distance sensor module HG-C40U.

 

Ultrasonic distance sensor module HG-C40U

Figure 3. Ultrasonic distance sensor module HG-C40U

 

Ultrasonic distance sensor module has two optional transmission modes:

  -  Free operation mode: when there is power supply, the sensor itself can send trigger and burst signals and it is usually for basic applications;

  -  External trigger mode: the external system (controller or processor) controls trigger signals for advanced applications. These two modes are suitable for a variety of purposes.

 

In addition, the sensors also involve the choice of two input power supplies:

  -  Low voltage (5V) for the processor circuit, the distance to the obstacle can be measured is 3.5m;

  -  High voltage (12V) for the controller circuit, the distance to the obstacle can be measured is 5m. The data is transmitted by UART (universal asynchronous receiver-transmitter) with a resolution of less than 5mm.

On the other hand, users can select different setting modes according to their own environment needs. Such as free-running / UART triggering / external trigger settings, etc. 

At the same time, on the basis of baud rate of UART communication, the user can also decide whether to set up the circular buffer or not. The output signal uses high performance ASIC (application-specific integrated circuit) chip to ensure stable transmission and sensitive reception, and the communication between sensor and PC uses "interface board" (RS232, power regulator). The data show that the real received ultrasonic wave can be amplified in real time by using the monitor program on PC, the distance value can be output by UART (ASCII, mm), and then the detection signal can be converted into the rectangular TTL level signal (square wave) in real time.

IV Conclusion

Ultrasonic sensors are reliable, cost-effective and efficient solutions for distance sensing, level and obstacle detection.

Once you understand how ultrasonic sensors work and which ultrasonic technology is most suitable rather than excellent, you can make more informed decisions about the correct sensor system for your application.

 


FAQ

 

1. What type of sensor is ultrasonic sensor?

ultrasonic / level sensors measure the distance to the target by measuring the time between the emission and reception. An optical sensor has a transmitter and receiver, whereas an ultrasonic / level sensor uses a single ultrasonic element for both emission and reception.

 

2. How many types of ultrasonic sensors are there?

four types. All together there are four types of ultrasonic sensors, classified by frequency and shape: the drip-proof type, high-frequency type, and open structure type (lead type and SMD type).

 

3. What is the range of ultrasonic sensor?

For ultrasonic sensing, the most widely used range is 40 to 70 kHz. The frequency determines range and resolution; the lower frequencies produce the greatest sensing range. At 58 kHz, a commonly used frequency, the measurement resolution is one centimeter (cm), and range is up to 11 meters.

 

4. Can ultrasonic sensor detect human?

Finally, ultrasonic sensors assist in detecting people for autonomous navigation of robots. Ultrasonic sensors can be used to set multiple tripwire distances to help navigate around people. Additionally, the high read rate allows you to quickly detect when a person may enter your robot's path.

 

5. Is ultrasonic sensor harmful?

Occupational exposure to ultrasound in excess of 120 dB may lead to hearing loss. Exposure in excess of 155 dB may produce heating effects that are harmful to the human body, and it has been calculated that exposures above 180 dB may lead to death.

 

6. How do ultrasonic sensors work?

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

 

7. Why is ultrasonic sensor used?

Ultrasonic sensors are used primarily as proximity sensors. They can be found in automobile self-parking technology and anti-collision safety systems. ... Ultrasonic sensors are also used 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 have been used throughout many applications and industries. They are used within food and beverage to measure liquid level in bottles, they can be used within manufacturing for an automated process and control maximising efficiency on the factory floor.

 

9. Is ultrasonic sensor waterproof?

Most ultrasonic distance sensors aren't waterproof which can be a problem if you need your project to withstand the elements outdoors. ... This sensor is suitable for outdoor applications such as car reversing sensors, security alarms, industrial inspection, etc.

 

10. Is ultrasonic sensor analog or digital?

Usually, ultrasonic sensors are integrated with an Analog-to-Digital converter (ADC).

 

11. How do ultrasonic sensors measure distance?

As the name indicates, ultrasonic sensors measure distance by using ultrasonic waves. The sensor head emits an ultrasonic wave and receives the wave reflected back from the target. Ultrasonic Sensors measure the distance to the target by measuring the time between the emission and reception.

 

12. How accurate is the ultrasonic sensor?

The more accurate ultrasonic sensors can achieve 0.1 – 0.2% of the detected range under perfectly controlled conditions, and most good ultrasonic sensors can generally achieve between 1% and 3% accuracy.

 

13. What can ultrasonic sensors detect?

Ultrasonic sensors can measure the distance to a wide range of objects regardless of shape, color or surface texture. They are also able to measure an approaching or receding object.

 

14. Are ultrasonic sensors affected by smoke?

Ultrasonic sensors are superior to infrared sensors because they aren't affected by smoke or black materials, however, soft materials which don't reflect the sonar (ultrasonic) waves very well may cause issues.

 

15. Which is better ultrasonic or IR sensor?

Ultrasonic sensors work using sound waves, detecting obstacles is not affected by as many factors. If reliability is an important factor in your sensor selection, ultrasonic sensors are more reliable than IR sensors. If you're willing to compromise reliability for cost, infrared sensors are ideal for your application.

 

Kynix

Kynix was founded in 2008, specializing in the electronic components distribution business. We adhere to honesty and ethics as our business philosophy and have gradually established an excellent reputation and credibility in our international business. With the accurate quotation, excellent credit, reasonable price, reliable quality, fast delivery, and authentic service, we have won the praise of the majority of customers.

Join our mailing list!

Be the first to know about new products, special offers, and more.

Leave a Reply

We'd love to hear from you! Feel free to share your thoughts and comments below. Rest assured, your email address will remain private.

Name *
Email *
Captcha *
Rating:

Kynix

  • How to purchase

  • Order
  • Search & Inquiry
  • Shipping & Tracking
  • Payment Methods
  • Contact Us

  • Tel: 00852-6915 1330
  • Email: info@kynix.com
  • Follow Us

authentication

Kynix

© 2008-2026 kynix.com all rights reserved.