TFmini plus I2c LiDAR not detected on one Flight controller, works on another identical one?

Hi All,

I am having some issues with a set of TFmini plus, i2c LiDARs. I have one complete airframe, on which the lidars are working. On another quad i am building as a replica of the first, the LiDARs are not detected. I am using CUAV x7s with the same version of firmware and the parameters are copied over from the first so everything should be the same.

The Lidars are powered from a BEC, all have the correct addresses and the type is set to 25. i know that they are working and are wired correctly because i can read the distance values by connecting an Arduino to the input to the flight controller.

I cannot figure out why one set works, but the other doesnt! could the I2c bus be disabled, lack drivers or perhaps need a pullup resistor?

Any shared wisdom would be much appreciated

Do both FCs run the same firmware version? So that the params copy function works correctly.

Second, where do you power the lidar from? If you power it directly from the flight controler, you could run into issues. I have before.

Try to swap the lidars and see if the issues follows the lidar or the flight controler.

Check wiring maybe, if there is a faulty connector somewhere.

Hi, both of the FCs run the same firmware and the lidars are powered from a BEC not the flight controller. I have tested the old Lidars on the new system and that works. However the new Lidars dont work on the old FC.

Im thinking its something to do with the LiDAR setup, like frame or baud rate?

What protocols do this lidar support,

I’ve seen lidars that support both I2c and Serial.

On those, you can chose which one to use with some computer software I think.

Could be that. If the issues follows the lidar unit and not the FC it’s probably a setting on the lidar or something like that.

I am no expert on TF Mini’s but I did write up some directions to get it to work if this helps.
So here is how to get the TF Mini Plus working on Pixhawk I2C.
Connect your TF Mini via the supplied cables to a TTL to USB adapter.

Connect via the USB cable to your PC.
If you have not already downloaded the TFMini Gui…do so from 北醒
Open the Gui

Set the product type to TFMini Plus

Select the correct Com Port

Click connect.

You should start seeing distance information on the graph in the gui.
image

Using the command line function issue the following two commands by pasting each in the command line and pressing send

5A 05 0A 01 6A
5A 04 11 6F
The first sets the device to I2C and the second forces a save.
Nothing should appear on the graph from this point on.
Next you need to connect it to your Pixhawk or I2C hub.
Please note that the pinout on the supplied connector has the SCL and SDA reversed. You need to pull out the pins and swap them.

Please note the SCL and SDA are reversed.
image

You need to configure a few settings in Arducopter.
RNGFND1_ADDR,16 This is the I2C address for the Lidar
RNGFND1_GNDCLEAR,34 This the distance from the Lidar to the ground…easiest way to set it is to have the drone report the distance to the ground when sitting on your workbench and then enter that distance.
RNGFND1_MAX_CM,600 Set this as the max distance the device will be used.
RNGFND1_MIN_CM,30 This is the minimum distance for the lidar.
RNGFND1_ORIENT,25 This is telling Arducopter that the lidar is pointing down
RNGFND1_TYPE,25 This sets the lidar type to TFMini I2C
It should be working now.
Good luck

Hi Ricky, Thanks for your input, i looked over your previous posts on this topic before posting myself. My Lidars were supplied set to I2c from the manufacturer, although they do support serial. i am able to read them and change the addresses with bud ryerson’s arduino library for TFmini i2c however the FC still does not pick them up. I have already tried SDA and SCL both ways although i fear i may have got them muddled up during the swap!

Am i right in thinking that the tfmini plus has a “pix mode” which is an option in benewake’s software? it could be that the standard i2c mode is not readable by the FC?

I also have a downward looking radar which is operating on a CAN bus as rngfnd1, and i think that the compass imbedded in the GPS operates on I2c. could these be causing a conflict?

I think it is probably an issue with the LiDAR not the flight controller too. the refresh rate or something perhaps? they were all supplied as I2c but it supports both.

Check how you change the signal type and make sure it’s set to i2c.

I’ve got products delivered with the wrong firmware and stuff, so checking yourself is good to do.

Update: for a reason i do not fully understand most of the LiDARs now work.

I think perhaps that there were too many connected to the single BEC although before today i was still unable to read even a single lidar. Anyway i will now make a new connection for the two other lidars from a separate BEC and i2c port and hopefully this will work.

Thanks everyone for the help

Hi Ricky,

I had posted a message earlier to you regarding my failure to configure TFmini +. Glad to report that following your instructions I was able to get it to work.
TFMiniPlus