VL53L0X vs HC-SR04 range sensor(Part 1)


VL53L0X is an optical range sensor from STMicroelectronics

This is the first part of experiment with optical range sensor from STMicroelectronics VL53L0X. I used popular ultrasonic sensor HC-SR04 to compare basic properties.


Communication is done over I2C


Since sensor needs 2.8V power and logic,
breakout board voltage regulator and level shifter.
Let's compare VL53L0X to HC-SR04 ultrasonic range sensor:


VL53L0X
Type: Time-of-Flight - 940nm Laser
Range:
 default:      2-125cm
 long-range: 2-210cm
Size: 10x25x2mm
Measuring Angle: 25 degrees


HC-SR04
Type: Ultrasonic
Range:  2-400cm
Size:  45x20x15mm
Measuring Angle: 30 degrees


Test bench is based on Arduino Mega 2560


For VL53L0X I used Adafruit_VL53L0X library, for HC-SR04 HC_SR04 library


Wiring is rather simple


Laser beam can be seen in IR range better
In IR spectrum it is possible to see how beam looks like
If you expected to see thin laser, then... Surprise!


Beam has ~30 degree slant angle  and light intensity
decreases quickly with range


VL53L0X in default mode has max range 1200mm
In my experiment maximum range was 1272mm


I've stopped experiment on 2300mm
Ultrasonic sensor can measure ranges up to 4m


Measurements were done with step 100mm (10cm)
Main purpose is to see precision of sensors on different ranges


Noise of VL53L0X increases starting from 380mm
But VL53L0X API returns values in mm, while HC-SR04 in cm


Also can be seen that measurement error for VL53L0X
Is rather big even on 900mm  - discrepancy is 30-40mm!


While HC-SR04 showed stable measurements
during all 1000mm


This is where VL53L0X is the best!
Time-of-Flight technology does not critically depend on angle of obstacle


HC-SR04 start failing on 30 degrees from perpendicular to the sensor

Links:
Arduino sketch: https://gist.github.com/WinKILLER/19e0bd651af51ed51a89f65fa6423256
VL53L0X library: https://github.com/adafruit/Adafruit_VL53L0X
HC-SR04 library: https://github.com/jazzycamel/arduino
VL53L0X datasheet: http://www.st.com/content/ccc/resource/technical/document/datasheet/group3/b2/1e/33/77/c6/92/47/6b/DM00279086/files/DM00279086.pdf/jcr:content/translations/en.DM00279086.pdf
HC-SR04 datasheet: http://www.micropik.com/PDF/HCSR04.pdf

Комментариев нет:

Отправить комментарий