VL53L8CX ULD Driver Performance Issues with Gesture Recognition
- May 28, 2024
- 2 replies
- 1609 views
I ported the gesture recognition example (STSW-IMG035_F401) from the STM32F401RE to the NUCLEO-U575ZI-Q with the X-NUCLEO-53L8A1 and the gesture library (STSW-IMG035_M33). If I used the VL53LMZ_ULD_API driver included with the GestureKit it seemed to work fine; all gestures were recognized. If I used the VL53L8CX_ULD_API driver (STSW-IMG040), it worked poorly; only the TAP gesture was recognized (and even that was inconsistent). This was repeatable on the same hardware; I could load and calibrate the MZ based project and it worked fine, then I could load and calibrate the 8CX based project and it would only recognize the TAP gesture. I was surprised that the driver intended for the specific part performed worse than the generic one.
I've attached the two ported projects (one using the MZ driver and one using the 8CX driver) for comparison.
Have I missed something?
Note: One significant difference I just found was that If I held a book at about 20cm over the sensor with the MZ firmware, it displayed values like:
LC 32, Z = 198.7, Polar: r = 40.9, Theta = 99.6
The same test with the 8CX firmware displayed values like:
LC 0, Z = 50.5, Polar: r = 2.5, Theta = 187.1
My test setup:
=======================
Build environment:
STM32CubeIDE
Version: 1.15.1
Build: 21094_20240412_1041 (UTC)
Hardware and physical setup:
NUCLEO-U575ZI-Q with X-NUCLEO-53L8A1 attached using the included 1.0mm spacer and cover, lying flat on my bench with the sensor facing the ceiling about 1.3m above.
If I held my hand in view of the sensor within about 0.5m, the LC messages would start printing.
115200-8-1-n serial communication over the default USART1 Virtual Com Port
I entered the following commands:
calibrate xtalk
to calibrate the cross-talk due to the cover
enable
to start the gesture recognition
I performed the 6 gestures at about 20cm above the sensor:
TAP, Double TAP, LEFT Swipe, RIGHT Swipe, UP Swipe, DOWN Swipe
