November 23, 2024, 07:47:27 AM

ESP32-POE/ISO I2C ISSUES

Started by Symonn, March 31, 2020, 10:40:58 AM

Previous topic - Next topic

Symonn

Hi, i'm trying to read a simple I2C HTU21D from Adafruit (Breakout Details) temperature and humidity sensor and send data to an mqtt broker.

The circuit is very simple, one HTU21D, five meters of cable cat5e and a ESP32-POE.

The cable has a capacitance of 56pf/m, so five meters are 280pf/m, lower than the maximum I2C limit of 400pf.

When i work with the usb, no problem, it works everything without any problem, but when i plug the Ethernet with PoE (using the USB-ISO interface on the ESP32-POE) the readings becomes fuzzy and the sketch reads many times wrong measurements.

I've used my logic analyzer to investigate and it seems that when i plug the ESP32-POE there are some logic spikes on SDA that produces those wrong measurements, i'll post some screen later.

In any case, this problem is the same when using ESP32-POE-ISO.

I'm using Arduino with the latest Espressif 1.0.4 Library.

Any suggestion?

LubOlimex

Try to lower the I2C speed. Try how it works with 10Khz. You probably don't need 100Khz for such a sensor anyway.

What connector are you using for the I2C? Did you make sure to use pins that have pull-ups on the SDA/SCL lines? Did you try to add extra pull-ups on the sensor board?

Technical support and documentation manager at Olimex

Symonn

Thanks, i've used two external pull-ups resistors of 330 ohms due to the cable lenght, do i need to disable the internal pullups? (i don't know if the ESP32 have those internal pullups resistors)

For connecting the i2c lines i'm using an RJ45 unshielded connector.

I'll try to lower the speed, in any case there is any correlation between the PoE and I2C of ESP32-POE?