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?
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?
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.
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.
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.
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.
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.