How to make the TFMINI rangefinder talk I2C

Yes , they claim 2 Meter but in effectively it is 1,70M , but as you can see in this blog, I used them succesfully in an avoidance system:

hi, to be sure to understand what you say, with one Arduino mini pro I can connect 2 sensors? or you say this is a way to use 2 couples of Arduino + sensor?

For your outside test, what was the max reliable altitude, 6 meters?

Will resume external tests in a few weeks and report my results back

i did some tests outside with the TFMINI as front obstacle avoidance rangefinder and i get some results as long as 8 meters at least. I will try to relocate the log of the flight to get the actual distance measured by the TFMINI if it is interesting.

@nicodh ok I did some test and I confirm the “0” distance when reading over 6 Meter outdoor.
An easy work around can be implemented using the Arduino , we output 7 Meter when the distance and the signal strength is below a certain level.

I uploaded an example on my github

The outputs reads like this ( I can be adjusted with : strLimit = 10; distLow = 46; )

@ppoirier take a look at my log, i get 12meters all the time without any problem,

and this is the flight path:

i’m getting 12m without issue.
I dont know why. :slight_smile:

Just fyi, i’m using the 1.53 firmware for the TFmini.

Dear @nicodh, is your TF Mini Connected i2C as @ppoirier has done with an arduino or is it serial direct?

For now is just serial, I’m using serial 4 for this…

Thank you for your reply @nicodh,

Do you happen to have the FW? because i am trying to make sense with Siya from Benewake and have their latest in order to test and hopefully fix my issue.

I don’t have it with me… I will get it on Wednesday. Or I can ask someone
if you want it before that.

Dont like to push. as soon as you can is fine by me! Thank you

Hey Tony here is the firmware and the uploader.
1.5.3BootLoader_TFMmini(pix).zip (542.7 KB)

@ppoirier @nicodh, hi,
as you surely know there is an issue about fly away in terrain mode if RNGFND_MAX is set ower his real capacity,
so my question is what would be the “secure” value for this sensor, in order not to risk for a fly away or not working RTL, 6 meters? 8 meters? Anyway, thanks for your precious investigations. Chris

That issue is dependant of a particular type of RangeFinder that has been set with the wrong distance values. Lets keep this thread related to the TFMINI on I2C please

Hi chris, if the problem appear when is lower than real life, you should
use 12m since is the very high end value that you can achieve with this
rangefinder. You will never see more than that.

Nicolas Grunbaum

? sorry but this is related to TFMINI on I2C. I think it is important to define this MAX value.

thanks will try as soon as I get mine.

@ppoirier I have read this thread and others you were involved in regarding the implementation and use of the tfmini. I am in an undergraduate design group where we are developing a drone and our budget is tight. I just want to clarify this range finder with the arduino pro mini can be used with our PX4FLOW and PIXHAWK 2.4.8? We currently have the PX4FLOW mounted and calibrated but were running into the issues related to not having a good alternative range finder.