Skip Navigation

Barkhausen Institut

Research on Distance and Proximity Sensors

For our platooning demonstrator, we need a sensor to measure the distance to the front car. In this blog post, we evaluate the performance of common Ultrasonic and ToF sensors according to update rate and accuracy.

In the next section, we empirically evaluate the following sensors:

NameTypeDatasheetField of ViewMinimum DistanceMaximum DistanceAccuracy Below One MeterUpdate RateCurrentInterface
HC-SR04UltrasonicLink15°2 cm4 m+- 3 mm60 ms2 mAGPIO
VL53L0XToF-LaserLink25°50 mm2 m7 %at least 20 ms19 mAI2C
VL53L1XToF-LaserLink27°4 cm4 m+-20mmat least 20 msI2C

Evaluation

Given a ground-truth distance, we evaluate

  • the statistics of the measured distances and
  • the time duration per measurement (t).

The statistics include

  • standard deviation (STD) and
  • difference between minimum/maximum measured distance to the mean (min-mean and max-mean, respecitvely).

The measurement is performed against a conrete wall or a wooden plate. The signal arrival is perpendicular. For calculating the statistical properties, we take 100 measurements.

HC-SR04¶

Results are shown in the following table:

Actual Distance (cm)Measured Distance (cm)STD (cm)t (ms)min-mean (cm)max-mean (cm)
6060.000.143.97-1.001.00
5049.940.283.40-0.941.06
4039.800.411.96-39.800.20
3029.900.302.25-0.900.10
2020.850.361.73-0.850.15
1515.390.511.43-1.390.61
108.940.241.05-0.940.06
54.570.820.81-1.571.43

We receive the following plots:

We can see that the accuracy is very good due to the low standard deviation. Further, we obtain stable measurements because of the linear behavior. Provided a short distance, the time duration to obtain the measurement is low. Therefore, the update rate is high for short distances.

Because of the small field-of-view of 15° however, measurements can be missed if the signal is not perpendicular to the wall. Besides, multiple sensors would interfere with each other as they share the same carrier frequency.

VL53L0X

We obtain the following results:

Actual Distance (cm)Measured Distance (cm)Standard Deviation (cm)Measurement Duration (ms)min-mean (ms)max-mean (ms)
6035.060.3431.33-1.060.94
5039.480.5031.36-0.480.52
4043.931.0531.33-3.931.07
3034.010.1031.33-0.010.99
2025.120.3331.33-0.120.88
1520.910.2931.32-0.910.09
1015.170.5131.25-1.170.83
510.010.1031.19-0.010.99

The update rate is very slow, the measurement duration being approcimately 30ms. The accuarcy is bad, too. Although the driver of the sensor can be improved for better accuracy, this would alleviate the problem of the high measurement duration. Since we require a high update rate, this compromise is not acceptable.

VL53L1X

The results are summarized in the following:

Actual Distance (cm)Measured Distance (cm)Standard Deviation (cm)Measurement Duration (ms)min-mean (ms)max-mean (ms)
6053.320.4718.51-0.320.68
5048.120.3318.56-0.120.88
4039.020.1418.45-0.020.98
3029.110.3118.42-0.110.89
2020.350.4818.55-0.350.65
1515.200.4018.54-0.200.80
1010.600.4918.58-0.600.40
54.110.3118.43-0.110.89

Accuracy and measurement duration are better compared to VL53L0X, but worse than the HC-SR04.

Summary

We compare the results in the following plot:

The HC-SR04 has the lowest update rate. Besides, the measured distances show a linear behavior with the actual distance. Therefore, we choose this sensor. On the downside, interference mitigating technologies need to be investigated.

The code can be found in our GitHub reposity.