How to make the TFMINI rangefinder talk I2C

ok… as i have understood i must first set the sonar for arduino and after this i can wire it on it… right

Correct. Chances are it came the right way but be safe

@ppoirier very interesting, thanks. One question: is this a better option than the ultrasonic modules? If I ask this, this is because now we can find such modules for 8 USD on AE. Reference: GY-US42V2 Replace MB1242 / SRF02

@chris661 Wow … this is what we call a clone :slight_smile:

The major problem with sonar = the signal get ‘‘washed’’ when installed on a quadcopter.
And the infamous problems with EMI; I recommand everyone to read Maxbotix integration guide, it is an honest description of all the problems you might experience when dealing with sonar.

yes, the clone war…
and the VL53L0X, the problem is the short range?( 2 meters).

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:
https://discuss.ardupilot.org/t/avoidance-experiments-with-the-poc-and-benewake-tfmini/25277

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:
image

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, https://github.com/ArduPilot/ardupilot_wiki/issues/1097#event-1495573910
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