Error reading several vl6180x

nacheitor
Posts: 6
Joined: Fri Oct 09, 2020 8:13 am

Error reading several vl6180x

Postby nacheitor » Fri Oct 09, 2020 9:02 am

I am trying to read several vl6180x laser sensors from an ESP32. When connecting a single sensor to the i2c bus everything works perfectly, but when I connect more than 3, I can no longer read the sensors. I have tried removing all pullup resistors (vl6180x integrates a 10k pullup resistor in SDA and SCL inputs), all but one and none. In fact, just joining the SCL lines to the bus as shown in the picture, it no longer works (It is impossible for there to be an address conflict if I have not connected the sda lines of the other sensors). Of course the microcontroller is an ESP32-WROOM-32.
sketch.jpg
sketch.jpg (863.41 KiB) Viewed 2716 times
I think the problem is with the resistors or the sensors. But it is my first time working with an ESP32. The sensors work correctly on an Arduino UNO.

Does anyone know a solution?

Thanks in advance.

becorey
Posts: 92
Joined: Sat Mar 28, 2020 4:18 pm

Re: Error reading several vl6180x

Postby becorey » Fri Oct 09, 2020 11:40 pm

Does it work when you connect 2, or 3? You said it happens "when I connect more than 3"
Do they have different i2c addresses? Can you share the code?

Who is online

Users browsing this forum: No registered users and 79 guests