Connecting multiple VL53L1X

Hello everyone,

I am trying to connect 8 pololu VL53L1X sensors to one I2C. The previous version where I had connected 4 sensors worked fine, but right now when I’m trying to connect them I only got printed zeros and I don’t know why.

Here is the code:
Pololu_8_sensors_test.ino (5.6 KB)

Hello.

How are you powering the 8 sensors? Have you tried starting with 4 (since that worked fine) and adding one at a time until something doesn’t work? Could you post some pictures of your setup that show all of your connections? A wiring diagram might be helpful too.

By the way, from your code, it looks like you might be using a Portenta board. I am not very familiar with that board, but I noticed that the documentation seems to indicate that the ANALOG_A4 pin you are using for xshut4 is read only, so that might be causing some problems.

Brandon

The sensors are powered each by 3,3V. I think the problem might be with I2C, because all the senors are connected to one I2C bus(maybe I got some kind of noises ore bus is overload but I can’t figure it out). I don’t why but sometimes I manage to get data from 7 of 8 sensors and sometimes I don’t get data from any of them. About the portenta, I can use every PWM and ANALOG output as GPIO and so I don’t think the problem will be with it(also I tested each sensors and it worked fine). Unfortunately i don’t have any wiring diagram, but as I wrote before all of the sensors are connected to one I2C. I can only add photo of platform

Can you clarify what your 3.3V power source is? It looks like there is a lot going on in your system in addition to the sensors. Have you tried the sensors separately from the rest of your system?

Unfortunately, I cannot verify the connections from that picture; if you can get higher resolution pictures from better angles, then I could try to do that. Otherwise, I suggest trying to iterative approach I described in my previous post. Also, you could look at the signals with a scope (both the I2C and XSHUT signals).

Brandon

I tried the sensors separately from the rest of system and it also not worked. The sensors are powered by 16.7V lipo battery. Of course the voltage is lower thanks to voltage converter. I checked the signals with the scope and it also look ok for me. Is it possible that the length of cables is to big and it may cause the problem. Tomorrow I will send you the better photos of connections.

Thank you for the additional information. Have you tried the iterative test I recommended before (adding on sensor at a time until you start having problems)?

In general, I2C is intended for short distances; how long are your wires? If it’s practical with your setup, you could try swapping to shorter wires to see if that makes a difference. Otherwise, I suggest looking at the signals with your scope at the end of the wires to see how they are being affected. Could you post those scope captures here along with the updated pictures of the connections?

Brandon

I found the problem. It was a different potential on my microcontroller and my power supply board and also my voltage converter was broke. That why I had got a problem with receiving the data from the sensors. Anyway thanks for the help.

Adam

1 Like