Long cable I2C sensor


I'm using an Arduino Mega 2560 to read temperature from a temperature sensor (TSYS01):

I use a I2C level converter as well:

The sensor will be 3m away from the Arduino when I use it in the field. I'm aware that I2C is not designed for long distances. I've tried the PCA9615 differential I2C from Sparkfun to allow communication over such a distance using a straight through cat6 cable, however, using I2C scanner, the sensor cannot be found.

Connecting the sensor and I2C level converter to the Mega directly works perfectly fine (see two photos of setup attached).

Does anyone have any suggestion what the problem might be? Both the SDA and SCL read slightly under 5V.

3m of I2C between level converter and Mega should not be a problem.
Did you try?

As I remember default I2C speed on arduino is 100KHz. It probably OK for 3 meters cable. In case of problem you can try to set lower speed using Wire.setClock(clockFrequency)

I have two I2C slaves running on a Mega master, with about 5metres of Cat-6 in between.
Error-free 24/7

Clock and data must be on different twisted pairs.
They can be paired with ground or VCC.

You could check that cable you have connected between the RJ45 sockets. Some cables are straight, some cross over.

From: What are Ethernet Crossover Cables? | Computer Cable Store

bidirectional I2C amplifier.

research that to determine what range it has.

Looking at the sensor you shouldn’t need any level converter as the arduino will respond to 3.3v level over i2c and the sensor will tolerate 5v. Suggest using twin twisted shield and drain wire, usb cable works well. Connect drain to ground at Arduino end only. 3m unlikely to be a problem, but as others have noted, I2C not really designed for it! We actually recommend you don’t go beyond about 1.8m, as volt drop, stability, EMI, all become more likely, and you should be using other methodologies to get further. A straightforward NTC would operate over a longer wire run.

Thanks all for comments and suggestions, much appreciated. Perhaps I was too pessimistic about I2C communication over a few meters of wire. I just tried with a 5m cat6 cable and works fine indeed. I'll also have a look whether I actually need a level converter here. Thanks again!