Range Finder Greyed out

While being really interesting and informative, I do not think that connecting on a UAVCAN gateway is helpfull on the actual problem of @rickyg32 with a TFMINI on I2C… or dod I miss something here ?

Good day on the node you have three I2C options, … on the pads and 2 on top of the boards.
i don’t know which version of tf mini they have,my test is done with the TF mini-S.

I am not lacking in any ports so there is no need for me to use the UAVCAN port and adapter. However it is interesting to see that it can be done. After doing some reading I found that I had set the Rangefinder type to the serial version. I corrected that to the TFMini I2C and now get the message that the rangerfinder is not detected. So this is a positive step I am now getting an error…But the down side is…Now I am getting an error. I suspect its an addressing issue…but I am unsure what to set it too.

In another document I just found this statement…hmmmm. However in the product manual it makes no statement of TTL only that its I2C.

The default communication of TFmini Plus is TTL,IIC and TTL are same cable,so please set TFmini
Plus to IIC communication first,see detail commands in product manual.

Also when I connect my USB to TTL adapter as I did for the UART TFMini there is no data received from the Lidar making me think its really talking I2C.
I connected it direct to the pixhawk bypassing any I2C hubs just to make sure power from the Pix wasn’t a problem…no change.
I really think it’s an address issue but I am at a loss to understand what.
I read in one document to set RNGFND1_ADDR=16 [Address of #1 TFmini Plus in decimal]
But I have no idea if this is correct as the document speaks to using it as a proximity detector for avoidance.
I also confirmed its not a power issue by running the TF on it’s own bec. Pain to setup but I did it…no change.
his is the address which i believe is 16 if I convert it from hex to decimal.

image

If it is speaking I2C you won’t be able to use the TTL converter.

However check out https://github.com/budryerson/TFMini-Plus-I2C He has done a lot of work with the TFmini’s and arduino. If you have a spare arduino laying around you could load up his INO and scan the bus to see if you can see the mini along with the distance scanning it is doing

Hey Smart Dave.
I knew that if it was running I2c as the data format that the TTL converter wouldn’t work. However one document indicated I needed to set it from TTL to I2C. However this doesn’t’ appear to be the case. Also I know about the Arduino work as I pestered the crap out of @ppoirier to get a working version in the past.
However TfMini I2C is now listed as a standard Rangefinder…so I should not need something in between. However I have yet to get it to work in it’s native format.
I have posted my questions in the forum section specific to I2C and the TF Mini but as yet there has been no response.

Yep, just tried my TFMINI PLUS in I2C with Bud Ryerson library and it works fine

To switch to I2C I send this command 5A 05 0A 01 from the BENEWAKE GUI

Question about sending commands in the GUI. Do you get a return code? In the docs it shows that if you send it this command you should get that command back. I have never seen a return. How do you know that the command was received successfully?

This is what I am referring to. I tried sending 5A 04 01 5F for a firmware rev but never got anything back after sending the command

Patrick I ahve the I2C version but when I connect it to the gui there is no data. I find nothing in any documentation that indicates it is in TTL to begin wtth. That said I can’t help but think that this must be the issue. But I am not sure how to prove it if there is no data on the gui when I make the connection.

This is the unit I have.

I am trying to make it work as I2C with my PIXHAWK, so far no reading

The GUI does not read status back
If you want to see it you can use Realterm and send Hex string and then freeze display (or set filter) to read back the TFMINI reply

OK I is working fine, here is my config

2 Likes

I will triple check the connections tomorrow…but my config matches yours.
I assume thats address 16
direction down
type tfmini i2c
Can yo expand the variable column so I can see them easier.

@rickyg32 I just looked in the code and I can’t see any I2C handling for the TFMINI like yours unfortunately. May I suggest that you contact your supplier and ask for an exchange for the TFMINI PLUS ?

Well thats just poo-pie. OK will see what I can do. Any idea what the difference is. How you tell what type it is in comparison to the Tfmini Plus.

If you look at https://github.com/budryerson/TFMini-Plus-I2C

you can read:
The Benewake TFMini-Plus is a unique product, and it is not an enhanced version of the Benewake TFMini. It has its own command and data structures. This library is not compatible with the TFMini product.

If you bought from RobotShop, just give them a call

Thanks @ppoirier
I pulled it off the frame and replaced it with the IP65 version of the mini. It took 40 minutes to create the damn cable to test it and it worked fine. Connected it to the flight controller, configed it…that took 2 minutes and works great. Took longer to get the cabling sorted.

Thanks again for all your help…be safe.
Hopefully down the road the I2c version will be fully implemented.

cheers

I also ran into this rangefinder type greyed out problem when I tried to connect an old MB1200 (https://www.maxbotix.com/Ultrasonic_Sensors/MB1200.htm) to my Pixhawk on the ADC port (as per this topic - https://ardupilot.org/copter/docs/common-rangefinder-maxbotix-analog.html) but I couldn’t get a reading from it.

Patrick is this the sensor your using.


@ppoirier

@rickyg32 No the TFMini PLUS

Ok thanks . I have the UART version of this one. Before it went I2C and its great. I will add this to my shopping list then. Need another for a quad I have. Thanks very much Patrick. Happy Mommies day

1 Like