More than 2 sensors on PX4 ArduCopter

Is it possible to chain 6 rangefinders (Say, the Benewake TF Mini), straight into PX4 ports and have ArduCopter recognize them for 6 way flow control?

I’m working on a drone that will hopefully avoid crashing into things in an enclosed space and I noticed that even though I can add a rangefinder in any direction, I can only add up to 2 hard coded sensors (As read in mission planner and the official documentation).

I don’t mind reading the sensors on an Arduino Teensy and then feeding that into the single i2c port on the drone, but I need to know whether there is a native way to feed my ArduCopter with 6 sensors worth of data simultaneously for 6 way evasion.

Thank you.

Master allows up to 10 rangefinders.

James had the technically correct answer, but Poirier, your project is literally exactly what I am looking for. I am going to try to clone your progress with 5 Benewake TF Minis for 5 way flow control (Every direction except upwards). I’ll make another forum question and ping you if I get stuck. Much MUCH appreciated.

As you probably know already, Benewake has released an I2C version of the TFMINI, and a driver should be ready soon. With these you could interface directly as @james_pattison showed.

Well that would be ideal, but I’m not sure when the new driver would be arriving (or how to find out for that matter).

So if a Teensy driven chain is the best current solution, I’ll roll with that.

It’s worth noting however that I’m not quite certain of your setup (I read a bunch of your other posts regarding this system). Is it:

1 x Attiny85
Multiple TF Minis
Attiny85
?

Also are you using the regular TF Mini or the Qwiic i2c version?

It is 5 TFMINI serial talking to 5 Attiny85 that are outputting to I2C. The I2C bus is scanned by an Arduino Pro Mini that sequentially read each sensors and output as MavLink Avoidance Message on Serial to the PixRacer

Excellent! Thank you very much! :slight_smile: