I'm using an Arduino to communicate with I2C magnetometer sensors. The parts list and a basic block diagram of the wiring is shown below:
TCA9548A I2C Expander:
Standard 4-pin Ribbon Cable:
Standard 6-pin Rectangular Header:
Standard 4-pin Header:
I apologize for the schematic, but I had to simplify it to make it clearer. Essentially, we're using an Arduino Uno to read from six magnetometer sensors by using an I2C multiplexer. The multiplexer is attached to a PCB board made for the Arduino, so it's very close to it, and the sensors are at a distance 1.5 meters away via ribbon cable connected via headers to the PCB board. The schematic only shows one sensor since including all six would make it messy, but the other sensors are also connected the same way.
Now, from what I read about I2C, there are some issues with crosstalk, and according to another question posted, it is recommended that VDD and GND be placed between SDA and SCL in order to reduce and/or prevent crosstalk from occurring. The HMC5883L fails in that regard, so with my ribbon cable, I crossed the wires so VCC and GND are between SDA and SCL. It's not the most elegant solution, but it's the simplest solution. The crossing only occurs at the sensor's end of the cable (less than 1 inch), not in the middle of it, but I was wondering if this would be an issue with I2C communication. To be honest, I tested this with two sensors, so I'm pretty confident that this configuration will work with all 6 sensors, but I wanted to ask just in case that some issue might arise that I never considered.
Also, in case you were wondering, I had to add the 10k pull up resistors on the SDA and SCL lines so that the sensors could be read from 1.5 meters away. Initially when I had it set up on a breadboard, they were unresponsive, and it wasn't until I added the resistors that they could be read from a long distance. The sensors themselves have 10k pull up resistors, but I suppose that decreasing the resistance allowed for longer distance. The resistors are 10k SMD resisors that are on the PCB board itself.