Multiple TF-Luna rangefinders intermittently dropping from I2C on Pixhawk 6C

Hi everyone,

I am facing an intermittent issue with 4 × Benewake TF-Luna rangefinders connected to a Pixhawk 6C via I2C.

Setup:

  • Pixhawk 6C running ArduPilot
  • 4 × TF-Luna in I2C mode
  • Different I2C addresses assigned to each Luna
  • ~30–40 cm I2C cable from Pixhawk to a distribution/matrix board
  • Short connections from the matrix board to each Luna
  • 5V for the Lunas supplied from the 5V output of a Matek HFC 12S V2
  • Pixhawk and Luna power supply grounds are common
  • Motors/ESCs are operating near the sensor wiring

The system initially works normally. After around 10 minutes, rangefinders begin to intermittently disappear.

For example:

Luna 1 → OK
Luna 2 → OK
Luna 3 → Not Found
Luna 4 → OK

Later, a different Luna may disappear. It is not consistently the same sensor.

Sometimes multiple Lunas disappear, but one or more can still continue providing valid range data.

The failure can occur while the battery remains powered, so it is not dependent on a power cycle.

I have also tested the same TF-Luna and cable on another Pixhawk on the bench, where it worked normally.

I have tried adding ceramic capacitors between 5V and GND near the Lunas, and I have also powered the Lunas externally from the Matek HFC 12S V2 rather than from the Pixhawk. The issue still occurs.

My current suspicion is an I2C bus integrity/electrical-noise issue due to the 30–40 cm cable, multiple devices, distribution topology, and the electrically noisy motor/ESC environment.

Questions:

  1. Is this I2C topology and cable length likely to cause intermittent communication problems with four TF-Lunas?
  2. Could one TF-Luna temporarily holding SDA/SCL low cause other rangefinders to disappear?
  3. Could motor/ESC EMI or ground noise cause this behavior?
  4. Is there a recommended pull-up configuration or wiring topology for multiple TF-Lunas on Pixhawk 6C?
  5. What is the best way to diagnose whether this is an I2C electrical/bus problem or an ArduPilot driver issue?

I am considering using a Matek CAN-L431 as a local sensor node and using CAN for the longer connection, but I would first like to understand and diagnose the current I2C failure.

I can provide wiring photos, ArduPilot version, parameters, and logs if needed.

Maybe, I have seen one I2C device blocking signal from another with long wire runs.

I think doing a CAN node thing is a good idea as I2C is not robust to interference, though you will have to check how many rangefinders are supported on one node.

You would need to probe the I2C bus with oscilloscope near each sensor (can be one at a time) and the Autopilot.

One thing to check is pull up resistance, especially if each Luna has its own pull up the bus pull up may be too strong.