I've been testing different sensors for the I²C bus with two host devices: Raspberry Pi 3B (3.3V), and Sitec S4 (5.0V).
Since one of them, namely the Sensirion SCD30, had communication problems every few seconds, I looked at the bus with a scope and found that the voltage both on SDA and SCL drops below ground level to about -0.3V at the beginning of each communication.
Here is what the scope showed:
There is no difference when all devices and cables are diconnected from the I²C bus, except for the obvious fact the the host does not receive an answer when using
The I²C specification allows the low level voltage to drop to -0.5V, so this undervoltage should not be a problem. The SCD30 only accepts a low level voltage above -0.3V, so this is most presumably what is causing trouble.
[EDIT2] The communication problem seems to be caused by clock stretching, not by the undervoltage. This is what a regular transmission looks in detail: When clock stretching has not been enabled as described here, there are communication failures. Undervoltage does not seem to be the cause.
My problem is probably solved, but the original questions are open:
- What causes the undervoltage? (Inductance?)
- Is it possible (though not necessary) the make sure that the I²C bus voltage does not drop below a certain level, e.g. be adding a diode between each bus line and ground with a low enough forward voltage? Such devices seem to be difficult to find...