Notecard i2c failure with other devices on bus

Run into an issue where i2c comms with the notecard fails when I attach too many other devices on the bus.

Using Notecarrier F, with a Feather ESP32-S2 and circuitpython.
I’ve hooked up 8 other devices (sensors, motor drivers and a display) with Qwiic connectors.
These devices all still work after connecting the notecard. However the notecard will fail to respond either intermittently or not at all depending on how many of the devices I have connected.

There are several different exceptions, but most common is

Traceback (most recent call last):
  File "/", line 128, in <module>
  File "/lib/notecard/", line 36, in wrap_validator
  File "/lib/notecard/", line 103, in syncStatus
  File "/lib/notecard/", line 368, in Transaction
OSError: [Errno 116] ETIMEDOUT

Also have seen
RuntimeError: No pull up found on SDA or SCL; check your wiring
[Errno 19] No such device

It seems the notecard’s i2c interface is quite sensitive, and unable to deal with the non-idealities introduced by these other devices on the bus.

I don’t have a proper root cause, but I’ve tried various combinations of pullup resistors and bus frequency. I’ve determined that the best workaround for me is to use a 2nd independent i2c bus for most of my devices.

Posting this here in case there is some way to improve the robustness via notecard firmware.

Hey @calcut, thanks for reaching out. Without knowing which exact I2C peripherals you are using, I suspect that the issue is that each of your peripherals has its own pull-ups on the I2C line and when chained together (putting the resistors in parallel), is reducing the overall pull-up resistance on the bus, which is affecting Notecard comms.

If you’re only seeing this with the Notecard, one option would be to move the Notecard to TX/RX. If you want to keep the Notecard on I2C, you have a couple of options:

  1. Cut the Pull-up traces on one or more of your I2C peripherals. Again, I don’t know what you are using, but if it’s a Qwiic/StemmaQT breakout from SparkFun or Adafruit there should be a jumper pad you can cut with an exacto knife. See here for more info.

  2. You can grab an I2C Extender/Active Terminator like this one from Adafruit and add it at the front of the chain.

I hope that helps!


Thanks for the tips @bsatrom

I think you’re right about the pullups.
I had removed some of them but looks like not enough. With everthing connected together pullup resistance was not much more than 1Kohm.

The active terminator looks interesting, but for now I’ve decided to stick with the 2nd i2c bus.
TX/RX could also work but I’m using my host’s primary uart for something else.

Nice to have lots of options though :slight_smile:

1 Like