Input devices
This week, I delved into input devices, opting to experiment with the laser distance sensor VL53LOX, a new tool for me. After gathering data using the sensor, I displayed it to better understand the variations.
Components
For this week assignment I use the sensor VL53L0X module, this particulary sensor its a ToF (Time of flight),
wich the way Its operation consists of sending a laser pulse of infrared light and measuring the time required
for the beam to return to the sensor.
The integrated device incorporates a 940nm VCSEL (Vertical Cavity Surface-Emitting Laser) laser emitter, a SPAD
(Single Photon Avalanche Diodes) detector and the internal electronics (called FlightSenseTM) that perform the
necessary calculations.
The measurement angle or FOV (Field of View) is 25º. This translates to a measurement area of 0.44m in diameter
at a distance of 1m.
The measurement range depends on the environmental conditions (indoor or outdoor), the characteristics of the
lens and the operating mode. Generally, we have two modes. The standard is 50 to 1200mm, and an extended mode
up to 2000mm.
As for precision, again it depends on the environment, objective, and mode of operation. The following table
shows typical range and accuracy values according to the different operating modes of the VL53L0X.
Mode | Timing | Range | Precision |
---|---|---|---|
Default | 30ms | 1.2m | +/-3% |
High precision | 200ms | 1.2m | +/-3% |
Long range | 33ms | 2m | +/-4% |
High speed | 20ms | 1.2m | +/-5% |
To display the measurements, I utilized an OLED display, which I covered in previous weeks if you want to check it out.
Progrming and assembly
This code is straightforward, aimed at displaying the data from the sensor. It's well-commented for clarity,
and proper wiring is essential to ensure it functions correctly.
Connecting the sensor involves using I2C communication, which is relatively simple, requiring only 4 pins,
similar to the OLED display.
Testing
With the connections properly established and the code successfully uploaded to the board, it's time to
proceed with testing.
The precision of the sensor might seem off, mainly due to the lighting conditions in the environment and the
surface of the object being measured. In the video, I used my hand, which has uneven surfaces and creates shadows,
affecting how the laser interacts with it. These factors contribute to the less-than-ideal accuracy observed.
There's definitely room for improvement in future projects.