# Crosstalk through I2C

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:

HMC5883L Magnetometer:

TCA9548A I2C Expander:

Standard 4-pin Ribbon Cable:

https://www.digikey.com/product-detail/en/3m/8125-04-100/ML04G-100-ND/1107830

https://www.digikey.com/product-detail/en/sullins-connector-solutions/PPTC061LFBN-RC/S7004-ND/810145

https://www.digikey.com/products/en?keywords=3M9449-ND

simulate this circuit – Schematic created using CircuitLab

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.

• 10k seems very weak for I2C pullups unless your SCL rate is extremely slow. Also I don't see how there can be lots of crosstalk considering the SCL rate is generally between 100 and 400kHz. In my experience it's the SCL and SDA rise/fall times that cause most communication problems. – Adam Lawrence Jul 11 '17 at 13:32
• Note that HMC5883 data sheet shows 2.2K I2C pullup resistors. Another thing: since these chips apply a large, short pulse current during a measurement, it is possible that a marginal reservoir capacitor (next to the chip) will cause some pulse currents on your long supply path. Pulse currents could corrupt I2C transactions, or could reduce noise immunity. – glen_geek Jul 11 '17 at 13:57
• (a) I've read this a few times, but although I see lots of background info and a misconception or two, I can't see a specific question. What is the specific question? (b) If I had to guess what your question is, the answer would be "the best way to be sure is to use an oscilloscope", so I'll ask you: Do you have access to a 'scope and have experience in using it (or have access to someone who does)? – SamGibson Jul 11 '17 at 14:07
• Also, there seems to be lots of overlap between this question and your earlier one "Design Considerations for Arduino board with TCA9548A multiplexer and HMC5883L sensors". That was again too broad for me to want to try answering it, and probably wrongly guessing everything you were trying to ask. If you don't get answer to a question improve the question, rather than asking another very similar one or offer a bounty. – SamGibson Jul 11 '17 at 14:49
• Sam, thanks for your suggestion. I never thought to use an oscilloscope to look at the signal, but in this case, I will use it and have a look at it. I didn't take into account the chip's internal pull-ups. I was just looking at the breakout board schematics. – user101402 Jul 11 '17 at 15:48

What is your I2C speed? Depending on the speed and distance, I2C can go as low as 1k for high-speed low-impedance bus. See http://www.ti.com/lit/an/slva689/slva689.pdf

What do you exactly mean by:

The crossing only occurs at the sensor's end of the cable (less than 1 inch), not in the middle of it

By "crossing" the wires, the good practice consists in not having the two I2C lines running side by side. For example, this is bad practice for a long ribbon cable:

1. VCC
2. GND
3. SDA
4. SDL

A "better" way of doing things:

1. VCC
2. SDA
3. GND
4. SDL

This way, GND shields SDA from SDL. However, GND itself can generate noise if the bypassing isn't sufficient on either side of the cable.

The best way would be to have additional wires, for the sole purpose of shielding the signals:

1. VCC
2. GND
3. SDA
4. GND
5. SDL
6. GND

This is used on all IDE ribbon cables for example.

• Thanks for your comment. That's what I meant by crossing the wires. I tried to follow the good practice, though I had SDA and SCL at the ends, with VCC and GND in the middle. I never thought to put SDA in between VCC and GND, but it's too late for that now. – user101402 Jul 11 '17 at 15:56

I don't have an opinion regarding the main topic of your question, which is the potential cross-talk, since I don't have experience with it.

But I have a comment regarding the pull-up resistors.

From the part's datasheet, I think it is implied that you need pull-up resistors on both sides of the TCA9548A. There is also a relevant question on TI's official support channel, where TI says that you do need to have resistors on both sides, on the upstream and the downstream channels.

Nevertheless, you are correct when you say

I suppose that decreasing the resistance allowed for longer distance

It does not apply here but it is generally true. As you can see in the part's datasheet, section 9.2.2, the maximum allowed pull-up resistance value is defined by

$$R_{p(max)}=\frac{t_r}{0.8473 \cdot C_b}$$

The longer the wires the higher the bus capacitance $C_b$ and so the lower the maximum resistance that you can use.

• thanks for your reply. I tried putting pull-up resistors with the TCA9548A, but it made the unit unresponsive. It worked when I removed the resistors. – user101402 Jul 11 '17 at 15:54