VL53L5CX ToF sensor not returning data

Hello,

I recently bought a VL53L5CX on Amazon which does not seem to be returning data. I’ve reached out for support via Amazon and Joelle asked me to post here so these are the details of my setup…

I have the VL53L5CX connected to a Raspberry Pi with a JST cable. When the Pi is powered on the sensor shows a red light. When I run the i2cdetect command the result shows the device on the bus. However, when I run a basic script to collect data I always get No Data back. I have tried various scripts to explicitly load firmware, amongst other troubleshooting steps to try to get a reading but have not been successful. I’m attaching a script that I’ve tried using for debugging for reference. I have a different ToF sensor that I’ve connected to the Pi via the same cable/pin config and it works fine. I suspect that the sensor might be defective but wanted to reach out to make sure I’m not missing anything. For full disclosure my background is software and I’m a novice w/ working w/ hardware so a lot of the things I do are AI assisted but I’m also just trying to do some basic stuff so I dont imagine I’m too far off base especially w/ other hardware working in this setup. Any help would be greatly appreciated. TIA.

poller.txt (3.0 KB)

How long are the wires?

The wire is 2.5-3 inches.

Odd that the other ToF works with the same setup - maybe share a photo of the setup/wiring?

Hello,

An update on this… I took another shot at trying to get the device to work and was successful, but some context. I think one of the issues I had was attaching to a 5V pin instead of a 3.3V pin, but that aside even when on the 3V pin… I have two scrips attached the test_bus4… script using the qwiick python library which did not work and timed out after 30 seconds when trying to download the firmware. The test script, using the ST python library did finally work. I have attached the two scripts for reference. As a note, the scripts may reference different I2C busses because I have multiple enabled, but I did test the two scripts w/ the device on the exact same bus/wiring setup so that should not be looked at as a factor of the device functionality. In any case, I think I’m good in terms of getting the device to work and just providing this info in case you wanted to follow up on why the sparkfun library did not work. If you wish to send your own script or have me do whatever kind of troubleshooting let me know and I can help with the debugging.

test_bus4_vl53l5cx.txt (16.8 KB)

test.txt (1.3 KB)

1 Like