Today I want to test a shield for my STM32F401RE board. It's the X-NUCLEO-53L4A2, a "Time-of-Flight sensor with extended range measurement expansion board based on the VL53L4CX for STM32 Nucleo".
I've often used ultrasonic sensors for distance measurements so I was very interested in testing a tof sensor. The most important features of X-NUCLEO-53L4A2 expansion board are:
- Distance measurement from 0 mm up to 6 m;
- Multiobject detection capability;
- Equipped with Arduino UNO R3 connectors.
I've used Arduino IDE to test this sensor. The first step is to install the necessary libraries VL53L4CX and X-NUCLEO-53L4A2.
Then I've looked for examples and I've tested "X_NUCLEO_53L4A2_HelloWorld".
As I want only to test this board and to measure distance, I've simplified the code and the code is really simple.
Once the code is uploaded, the system begins working and writes the detected distances to the serial port. If objects such as chairs, obstacles, bottles, etc. are present, two or more readings will appear on the serial port, one for each detected obstacle. This also makes it possible to recognize objects that are separated from the background or walls. For example, if I point the sensor at the ceiling, I will measure the distance between the sensor and the ceiling (around 2000 mm), but if I bring a finger or an object close to the sensor, I will get two different readings, one relative to the ceiling and the other to the distance of the object I placed between it.
ConclusionIn this simple project, we tested the X_NUCLEO-53L4A2 board produced by STM and saw how easy it is to use. Obviously, we only used a small subset of the board's capabilities, which in reality allows for much more complex applications. The overall assessment is extremely positive for its ease of use and the precision achieved.











Comments