Hello,
I bought 3 of your VL53L8CX modules and would like to make them communicate using SPI with an ESP32S3 ETH board.
My wiring is:
- MOSI → GPIO18
- CLK → GPIO15
- MISO → GPIO3
- CS1 → GPIO1
- CS2 → GPIO16
- CS3 → GPIO17
Here is a drawing that summarize this:
I’m trying to test the sensors on a small prototype, so for now everything is plugged on 2 breadboards (one for the ESP32 and another one for the 3 VL53L8CX modules).
When using short cables (around 10 cm, see the image below) it works quite well.
However, with longer cables (around 20 cm), the initialization process fails and the controller is not able to reach any sensor anymore.
If I conduct the same test with only one sensor on the bus, it works fine. With 2 sensors it works 50% of the time and with 3 sensors it doesn’t work at all.
What I noticed is that if I plug my oscilloscope probe on the “MISO” pin of the first sensor, the initialization passes (just for this one sensor though, the other 2 still don’t work). If I unplug it, it fails again. If I plug 2 probes into the “MISO” pins of the first and second sensor then all 3 sensors initiate communication successfully.
Another thing I noticed (but not sure if this is the same issue) is that the CLK signal is interfering with the MISO signal, as you can see here :
This always happens regardless of the cables length, so I don’t think this is directly related to my main issue but it might have an impact…
I have tried to lower the bus speed from 3 MHz to 1 MHz, without success ![]()
After a bit of reading on this forum it looks like the level shifters used on the Polulu modules are quite sensitive and using short cables is recommended.
However for my final application I will need to use longer cables, of at least 20 cm. I was considering making a PCB to get rid of the breadboards to improve the connection quality. Do you think this will resolve my issue ?
Also, do you think using ribbon cable (like IDC connectors for example) with alternated GND signals (e.g. GND - SCK - GND - MOSI - GND - MISO - GND - CS) could fix the issue ?
What else should I try to make this work ?
For now, I will try to split the MISO lines on 3 different GPIOs to see if it works better. I am quite inexperienced with SPI communication, any help is appreciated !
Thank you for your time and have a good day,
BR





