Avoidance experiments with the new POC and Benewake TFmini-S

Hi, I’ve bought a TFmini S Lidar. Trying to interface it via I2C. Uart is working well commands are received. I am Using a Navio2 as Flight Controller with Raspberry Pi 4. I Have successfully change the mode to I2C leaving the sensor in Standard mode. I can see the i2c address in the raspberry Pi as 0x10. However, in the configuration on autopilot it does not receive the range finder data. All the ommands I write via i2c from the pi come with a write error. I’ve configured with address 16 and mode 25. Do I have to use it in Pixhawk mode? Has anyone experienced this issue? I’ am using the commands recommended in Benewake TFmini-S: How to issue commands to change from UART to I2C?

and the settings given at the star of this blog.

Thanks

Eduardo

What is the firmware release of Ardupilot you are running on?

Hi ppoirier, Thanks so much for the quick response. I am running Arducopter version V4.0.3
image

hi @ppoirier congratulation for the project!
I had tryed to replicate you process for create 360 obstacle avoidance in mission planner.
But i had found a problem becouse when i add more than one tf mini-s lidar sensor to the RNGFNDx mission planner stops to see all the sensor and nothing works, could you please give to me an advice for fix it? thank you

the sensor are exactly the same of you, with the same i2c address.
the FC is a pixhawk 4 with the last version of ardupilot installed

You mean that you see all proximity on radar screen and when you set on of them looking down (RNGFND1_ORIENT,25) all the signals disappears from radar screen?

@ppoirier exactly, when i set up one of them in RNGFND1, i see it on radar screen and all works, when i set up also for example the RNGFND2 and RNGFND3, they disappear and the don’t work like your project

not only when i set up one of them looking down, but the i set up one looking front and also one looking right they stops work.
When i put much more than one range finder, they stop works

Looks like you have a conflict somewhere, I suggest you do a simple I2C scanner with arduino and check iff you can see all the different addresses

We are using the TFmini+ on our aircraft. Do you know if you can switch it between serial and I2C? We are using one on serial right now.

hello friend.
do you mean the luna module work directly with the cube i2c port (after the firmware upgrade) ? without the arduino board?
im curious to know.
thanks in advance

Hi,
I really appreciate all the efforts you have put in to make this topic understandable. I just have a request. Can you please share a small video or screen shots of the commands you use to scan the i2c addresses using arduino using this (TFMPI2C_changeI2C) code? I am quite new to arduino and some steps regarding this will be really helpful. Also, can you share the same on how to convert i2c back to uart using this code (TFMPI2C_example). Your help is deeply appreciated.
Regards,
Raj Patel.

Hello,
I have spent way too much time trying to get a TF Luna Lidar to work with my Navio2+Raspberry pi setup.
From this thread, it seems the TF Luna should be compatible with Ardupilot 4.3.6 (Latest FW), using a USB-TTL Adaptor. Because, it is connected serially, instead of I2C (which requires a fw update).
Yet, regardless of what settings I use, the Arducopter never sees the TF Luna range data, although I know for a fact, it is working, and sending data, since I can see it coming into the Raspberry pi, using a simple python program to output the range data…
Can someone please point me in the right direction, I’m at my wit’s end…

Hello,
This thread is not related to Luna, I suggest you dearch within the forum as there some discussion related with your issue.

Good Luck

You could have a look here:

1 Like