We are puzzled by a surprise communication failure between our controller PCB and sensor PCB.
The communication fails unless we do one or more of the following. Then it works fine:
- Disconnect the shield from ground (1), leaving shield floating
- Put a resistor between the shield and ground (1)
- Remove the capacitor (2) going into the 5V to 3V voltage regulator
- Touch ground anywhere on the sensor (3)
We can't explain why these fixes work. Leaving the shield (1) floating (disconnected) means its not providing a path to ground for noise. The 1µF capacitor (2) should provide a path to ground for noise, and make the voltage more stable. Touching the sensor can should only change its capacitance.
We tried removing the ferrite bead (FB) in case there was some LC oscillation happening but that didn't affect the behavior. The capacitors to on the sensor board are all connected to a ground plane by vias.
Could disposing of noise by grounding the shield or having a capacitor actually make communication worse?
Why would touching the sensor ground fix the problem? Does adding capacitance change the path of noise?
Edit: here is an o-scope image of the SDA data signal on the sensor side. It's a little slow on the rise time. However I can't see any difference in the waveform when I do the 4 fixes above :/
Edit 2: here are part numbers and datasheets.
- PIC Microcontroller PIC16F1718-E/SS
- 10k pull up resistors
- I2C Level Translator PCA9306GM,125
- 5V to 3.3V LDO Voltage Regulator MIC5365-3.3YMT-TZ
- Infrared Thermopile Sensor Calipile TPiS1T 1086L5.5/7452
- TVS Steering Diode for 5V, SCL, (not shown) SDADRTR5V0U2SR-7
- Sensor power Ferrite Bead (not shown) BLM15PD121SN1D
- Capacitors are all ceramic 16V X7R
I had thought that the grounding issue was leading to communication failure. However, stepping through the code in the controller, I found that the sensor is still able to "acknowledge" the address/write byte sent by the controller. It just doesn't "acknowledge" the address/read byte, and then sends all 1s back instead of sensor data. I think this means that the communication part is working fine, but somehow the grounding issue is disturbing the sensor's internal processing to where it can't get a stable reading.