Differential I2C Bench Test
This page outlines some bench testing that was performed on the differential i2c communication between the solar master and solar slave boards (the PCA9615 differential i2c IC). In this test, one solar master board was connected to one solar slave board (with another solar master board connected on the other end without power or a controller board, acting as a termination resistor) with a /TODO: measure length of wire/ cm differential i2c connection between them. This cable/connector setup was harnessed in-house and without shielding.
A walkie talkie was placed on the cable between the master and slave boards, and 4 different pairs of points were probed and captured while the solar master was collecting voltage readings from the ADC on the i2c bus. Captures were taken with and without noise (i.e. broadcasting and not broadcasting from walkie talkie) for each probing setup.
Signal Without Noise | Signal With Noise |
---|---|
Positive differential i2c line to ground: | |
V_min: 840 mV V_max: 1.72 V | V_min: 720 mV V_max: 1.80 V Approximately 90 mVpp of noise has been introduced to this signal. |
Inverted differential i2c to ground: | |
V_min: 1.32 V V_max: 2.16 V | V_min: 1.24 V V_max: 2.28 V Approximately 100 mVpp of noise has been introduced to this signal. |
Positive diff i2c to inverted diff i2c: | |
V_min: -360 mV V_max: 1.28 V | V_min: -400 mV V_max: 1.40 V Approximately 80 mVpp of noise is observed in this signal. |
i2c data line to ground (on solar master board i.e. destination): | |
V_min: -120 mV V_max: 3.16 V | V_min: -80 mV V_max: 3.12 V Noise is negligible. |
We can see from the scope readings of the differential i2c lines that there is some substantial noise introduced by the walkie talkies, which is not observed at the destination. One concern is that the noise is present when measuring between the two differential i2c lines. This is likely explained by the probing wires used picking up additional noise. When probing the i2c data line using test points on the solar master pcb, the probing wires were extremely short, and no substantial noise was observed. If this is the case (that the probing wires are picking up significant noise), then these measurements have even more noise than should be expected in regular operation. We should consider devising a better setup to minimize the noise introduced by the probing wires, and repeating these tests.
Throughout these tests, voltage readings from the ADC were properly communicated from the solar slave to solar master board without being distorted. There were two instances where it briefly timed out, both of which occurred when probing wires were connected. This timeout was not consistently replicated when the lines were not being probed, regardless of how close the walkie-talkies were to the wires.
Another Note: The current revision of the solar master/slave boards supply the PCA9615 Vdda and Vddb (i2c bus and differential bus supply voltages respectively) with 3.3 V. Increasing Vddb - the differential bus power supply - would improve the noise rejection (the datasheet suggests 5 V for best performance).
In conclusion, differential i2c is quite effective in attenuating noise (at least, on a bench test with one slave board, using reasonably long /TODO: insert measurement/ wires). In theory, differential i2c's noise rejection should similar to that of CAN (both serialized data transmitted on differential lines). However, this test should be repeated 1. in the car under expected operating conditions, and 2. with a setup devised to minimize noise introduced by the probing wires.