I2C Error Compendium: Difference between revisions

From STorM32-BGC Wiki V1
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
* induced signal disturbances due to capacitive coupling to outside fields
* induced signal disturbances due to capacitive coupling to outside fields


Importantly, all error sources add up. One hence can't give decisive threshold values, such as that e.g. the length of the I2C wires should be shorter than 40 cm. Without any further error sources one might be able to use even much longer wires, while if motor wires are nearby only shorter wires might be acceptable. It's like a glass of wine: When it's full, it's full. It doesn't matter if it had been filled with Bordeaux, Chianti, or any mixture. When the glass is filled only a tiny bit with Bordeaux, one can add a lot of Chianti before it overflows, but when the glass is nearly filled with Bordeaux, only a tiny drop of Chianti is acceptable.
Importantly, all error sources add up. One hence can't give decisive threshold values, such as, for instance, that the length of the I2C wires should be shorter than 40 cm. Without any further error sources one might be able to use even much longer wires, while if motor wires are nearby only shorter wires might be acceptable. It's like a glass of wine: When it's full, it's full. It doesn't matter if it had been filled with Bordeaux, Chianti, or any mixture. When the glass is filled only a tiny bit with Bordeaux, one can add a lot of Chianti before it overflows, but when the glass is nearly filled with Bordeaux, only a tiny drop of Chianti is acceptable.


== Methods to Reduce I2C Error Rate ==
== Methods to Reduce I2C Error Rate ==

Revision as of 11:33, 11 January 2015

by OlliW

I2C errors are probably the most annoying side effect of the technology we are using in our brushless gimbals. Many discussions, and advices on how to avoid them, are found on the web, and also some myths.

I2C errors occur then the signals on the I2C clock and data lines are disturbed beyond certain limits, and this happens due to two main reason:

  • capacitive load on the I2C clock and/or data lines
  • induced signal disturbances due to capacitive coupling to outside fields

Importantly, all error sources add up. One hence can't give decisive threshold values, such as, for instance, that the length of the I2C wires should be shorter than 40 cm. Without any further error sources one might be able to use even much longer wires, while if motor wires are nearby only shorter wires might be acceptable. It's like a glass of wine: When it's full, it's full. It doesn't matter if it had been filled with Bordeaux, Chianti, or any mixture. When the glass is filled only a tiny bit with Bordeaux, one can add a lot of Chianti before it overflows, but when the glass is nearly filled with Bordeaux, only a tiny drop of Chianti is acceptable.

Methods to Reduce I2C Error Rate

Before we look at the I2C errors in more detail, the methods shall be briefly summarized which can help to reduce the error-proneness of the I2C connection to the IMU module:

  • reduce length of cable
  • twist wires of the cable; this comes in many variants such as twisting all four, just twisting SCL and SDL, twisting SCL with GND and SDA with VCC, and so on
  • shield the wires; using e.g. a coax cable or wrapping the wires with (self adhesive) conductive cloth EMI shielding
  • add ferrite rings; this comes in many variants such as to put it to the I2C wires and/or the motor wires, or to the left and/or right ends of the wires, and so on
  • reduce the I2C pullup resistors on e.g. the IMU module
  • lower the (motor) voltage
  • increase spacing between I2C cables and motor wires




Capacitive Load

Capacitive load decreases the slew rate of the signal, and eventually prevents the electronics to detect it correctly, and an I2C error occurs.

Capacitive load arises from the cables itself. Thus, the longer the cables the larger the capacitive load, and eventually the I2C communication breaks down.

Capacitive load however also arises from anything conducting in the surrounding. Drilling cables



Induced Signal Disturbances

Practical Implications