I need to use the QwiicBus to support two ToF sensors over a few meters. The sensors (VL53L1X) have a fixed address so I need to use the 8 port I2C mux to enable multiple devices. I can put the sensors (and other I2C devices) behind the mux and scan them just fine.
I can also hook up 1 sensor (or another I2C device) to the QwiicBus (connected directly to the I2C bus) and see that just fine.
The issue is that when I put the QwiicBus behind the mux, I can no longer see the devices on the other end.
Has anyone else been able to make this configuration work? If so, did you need to mod the QwiicBus endpoints?
That should work just fine.
What happens if you eliminate the Qwiic Bus alltogether and just connect the MUX and sensors directly to your system?
Thanks for the reply!
Other configuration notes:
-
The VL53 have their pulls-up disconnected
-
The system is a P1AM-GPIO module from automation direct. This is a break out to the MKR zero based P1AM industrial Arduino device
-
I have QwiicBus endpoints both with and without the I2C pull-ups
Experiments/results:
-
VL53 and Mux direct to the I2C bus - scans see both
-
2 VL53s behind the mux - scans see the mux and both sensors on the right port
-
VL53 on Qwiicbus (No PU) on I2C bus connector on Mux - bus hang (expected since no pull ups in system)
-
VL53 on Qwiicbus (PU) on I2C buss direct - scans fine
-
VL53 Qwiicbus (PU) on I2C buss via connector on mux - sees Mux, but not VL53. I think this is expected as the mux is going to grab the bus traffic and send it down a port (correct?)
-
VL53 Qwiicbus (PU) on Mux port (7) - Mux seen (0x70) but not VL53 (0x29)!?!
-
VL53 Qwiicbus (PU) on mux port (7) + VL53 Qwiicbus (NPU) on mux port (4) - bus hang on scan of port 4 (aren’t there PUs on the ports?)
Ok, so I replaced my P1AM with an Adafruit M0 Feather and things seem to work perfectly now. I can see the ToF sensors behind the mux w/o issue.
There must be an issue with the I2C bus on the P1AM system. Off to debug that now
Ok, final follow up FWIW. I connected the I2C bus directly to the P1AM header (instead of the P1AM-GPIO module) and it works fine. It seems the GPIO module is the weak sauce here. Not sure why and don’t care.
I think the conclusion is that if you want to use I2C externally with the P1AM system you should NOT use the GPIO system. I am going to build my final system using the proto board.