
Distance Sensors: How to Choose the Right Technology?
Date Publié
Introduction
In the field of distance sensors, the main objective is to determine how far away a given target is.
The desired precision varies according to needs: do we want an exact measurement to the millimeter, or simply information about the object's proximity, such as determining if it is near or far?
In some cases, it may suffice to know if the distance to an object exceeds a specific threshold. It is also necessary to consider the constraints associated with each type of sensor. For example, some cannot detect objects located closer than 5 cm or further than 1 meter. This consideration is essential for precisely defining our requirements.

Why Do Different Types of Distance Sensors Exist?
In the use cases we encounter, it is common to have to measure distances to deduce information.
Here are some design examples where BLUEGRioT integrates distance sensors:
- To measure tank filling levels with Lesaffre,
- To detect the presence of a garment under the connected hanger,
- To help the Enchanted Tools robot approach an object it needs to grasp.
Just for these three examples, we didn't use the same technology—so how do you choose the right one? We detail this a bit more in the rest of the article.
What Are the Advantages of Using Infrared for Distance Sensors?
At BLUEGRioT, the use of infrared technology is common, particularly with a component from STMicroelectronics frequently referred to by the abbreviation TOF (Time of Flight), to keep it simple. These components, part of the VL53L series, stand out for their efficiency and economic advantage, with a price tag under 5 dollars.
Advantages of VL53L Sensors:
- Flexibility and Precision: They stand out for their ability to adjust the detection angle (Field of View), offering great flexibility: they can be configured to target very precisely or, conversely, cover a wider area.
- Zone Selection: These components allow for specifically selecting zones of interest to monitor while excluding other irrelevant zones (Region of Interest).
- Reduced Footprint: Another major asset of these components is their minimal size, with dimensions of only 5mm x 2.5mm. This makes them particularly advantageous compared to ultrasonic ToF measurement systems, which are generally bulkier.
- Integrated Communication: They also integrate a digital communication interface, facilitating connection with a microcontroller via I2C, for example. Conversely, an ultrasonic system would require specific processing and external electronics to communicate.
- Practical Applications: Used in our smartphones to manage camera autofocus, or in drones to measure distance to the ground during landing, VL53Ls have proven themselves and sold in the billions.

The Use of Ultrasound
It is when facing the constraints of infrared that it becomes interesting to explore ultrasonic sensors.
Some ready-to-use ultrasonic sensors are available on the market. If you are interested in using ultrasound to measure distance, you have probably already encountered the famous HC-SR04 ultrasonic sensor, widely used in many Arduino projects. However, this module is far from meeting the requirements of an industrial project.
That said, it can serve as a starting point to approach the subject. Here is what we can observe:
The ultrasonic sensor consists of two major components, named "ultrasonic ceramic transducers." The first must be stimulated at a frequency of 40 kHz to generate an ultrasonic signal, while the role of the second is to receive the echo of this signal.
It is essential to mention a notable difference between this HC-SR04 ultrasonic module and the VL53L infrared sensor, particularly regarding their interaction with physical obstacles. To illustrate, imagine installing a protective glass in front of the sensor. In the case of ultrasound, this obstacle would totally block the sound signal, thus preventing the sensor from functioning properly. On the other hand, the infrared sensor would be capable of functioning despite the presence of the glass.
However, the ultrasonic sensor presents interesting alternatives; specific transducers are designed to overcome these challenges, thus offering increased flexibility in certain applications.
Conclusion
The choice of a distance sensor relies primarily on a precise analysis of the project's needs and constraints. Infrared solutions of the ToF type offer an interesting combination of compactness, precision, and simplicity of integration, while ultrasonic systems provide a pertinent alternative in particular environments or conditions. Each approach has its strengths and limitations, which imposes a prior reflection on the expected range, potential obstacles, footprint, or communication requirements.
The diversity of available options thus allows addressing a wide variety of industrial uses, whether it is detection, robotic assistance, or fill-level measurement. A fine understanding of the operating principles and associated constraints naturally leads to the most adapted solution to guarantee reliability and performance.