Hello,
I have quite a problem. I have one Thing ESP32 plus with multiple QWIIC boards connected (Zio current meter, pin expander, two buttons, accelerometer, led stick, Mp3 trigger) and after ESP stops comunicating with all boards and when I enabled verbose debug I see this message on terminal:
[W][esp32-hal-i2c.c:1419] i2cCheckLineState(): invalid state sda(23)=1, scl(22)=0
[D][esp32-hal-i2c.c:1427] i2cCheckLineState(): Recovered after 1 Cycles
[E][esp32-hal-i2c.c:1434] i2cCheckLineState(): Bus Invalid State, TwoWire() Can’t init sda=1, scl=0
I have tried adding two 100uF capacitors on power supply lines and I have tried to leave one or two boards with I2C pullups connected.
And after suggestion from TS-Chris I have tried to disconnect the LIS2DH12 accelerometer and now even the ledstick and it seems much more stable. (it has been working for whole night). I can imagine the ledstick powerdraw could mangle the I2C) but what about the accelerometer?
Is there any thing that I should try next to make this work more reliably? And what steps should I take so I can connect led stick and accelerometer back again? Thanks
That error happens whenever Wire() can’t re-init…read through these, each of which has a couple potential cause/fixes:
Deep sleep - use resistors to more accurately control i2c resistance https://github.com/espressif/arduino-esp32/issues/3079
Something holding SCL low - change which pins i2c is using https://github.com/espressif/arduino-esp32/issues/2720
Various soldering/wiring issues https://community.platformio.org/t/esp3 … 1/18018/14
Hopefully following some of those suggestions will yield something positive!
Thank you Russell.
-
I do have the right resistance (as long as I know) on both lines around 2K2 measured by multimeter when no power was connected to the board.
-
I quite cannot change the I2C pins asi I am using all modules with QWIIC connectors. I would have to cut some cable and solder it to the Thing directly which I would rather not.
-
I have checked all connections and soldering on those boards under mantis loupe and it looks good.
Today I will try to test if it is the accelerometer or the LED stick. When I have diconnected those two it worked from last night through today flawlessly.
So, I have disconnected the ledstick only and it worked all night. Resistance looks good so it could be some power issue. I will try to support the VCC on ledstick directly from my power source and we will see.
I have tried to support the power input from a strong stable lab poewr supply in three points of the circuit with 3.3V and there was no improvement in stability. I am running out of ideas what to test next.