i'm trying to read a I2C HTU21D from this breakout (schematics below) temperature and humidity sensor and send data to an mqtt broker.
I'm using PCA9306 in order to use 5V and go "far" (30m) from the main MCU PCB using CAT5E cable and RJ45 connectors.
The MCU circuit is very simple, one HTU21D, a PCA9306, 30 meters of cable cat5e and a ESP32-POE-ISO with another PCA9306.
The two PCA are used in order to go with 5V in SCL and SDA bus lines.
The cable has a capacitance of 56pf/m, so five meters are 1680pf in total, higher than the maximum I2C limit of 400pf.
I've used my logic analyzer to investigate and it seems that when i plug LAN to the ESP32-POE-ISO there are some logic spikes on I2C lines that produces those wrong measurements, tomorrow i'll post some screen of my oscilloscope
I'm using Arduino with the latest Espressif 1.0.4 Library.
The I2C bus speed is 10khz and there are external pull-up resistor of 10k on I2C bus (ESP32 side) and 330ohm pull-up resistors on the PCA9306 bus side.
Here is the schematic:
EDIT: 27/07/2020 - changed pull up resistors and added oscilloscope traces
I've replaced the pull-up resistors from 330ohm (as suggested) to 2k2ohm, here is the result:
Scope trace of 330ohm pull up resistors (SCL - CH1): As you can see, the clock waveform is really sharpen, and has around 340mV of delta from 0V (i think that this could be a problem) - In this scenario, data reading works but it's unstable: like 10 measurements wrong every 100,
Scope trace of 2k2ohm pull up resistors (SCL - CH1): As you can see, the clock waveform is a nice square looking signal and there isn't any delta from 0V, in this scenario the data reading works very unstable: 40 measurements wrong every 100
Any suggestion to solve that issue?