• Trill
  • Trill has i2c timeouts after some time of interaction

We are using two Trill Flex sensors in a rather complex setup: there is a brushless DC motor and a slip ring involved. The motor may have a magnetic field (although it should be shielded by its metal housing) and the i2c signal runs through the slip ring. The Trill sensors are mounted on a rotating part near the motor. We get unexpected timeouts (error 263) after some time of user interaction. The error remains when we remove the slip ring. We can reproduce it, but cannot understand what the original cause of the error is.

We have a feeling that moving the Trill sensors is a problem. Can we somehow make the i2c data transfer more robust or handle the error?

The I2C bus may be picking up some electromagnetic noise from the motor or from one of the power lines going to the motor. How are you wiring the thing up? Can you wire the 4 cables for the trill separately from everything else and minimise capacitive coupling between those and the motor's power lines? You can also try reducing the pullup resistor from each of SDA and SCL to 3.3V to a value close to 1k.