Servers by jDrones

How to make the TFMINI rangefinder talk I2C


(chris rey) #41

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


(ppoirier) #42

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


(Nicolas Grunbaum) #43

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.


(ppoirier) #44

@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; )
image


TF-Mini-Obstacle Avoidance Issue 3.5.5
Benewake TF mini Setup
(Nicolas Grunbaum) #45

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


(Nicolas Grunbaum) #46

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


(MerkaTony) #47

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


(Nicolas Grunbaum) #48

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


(MerkaTony) #49

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.


(Nicolas Grunbaum) #50

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


(MerkaTony) #51

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


(Nicolas Grunbaum) #52

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


(chris rey) #53

@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


(ppoirier) #54

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


(Nicolas Grunbaum) #55

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


(chris rey) #56

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


(chris rey) #57

thanks will try as soon as I get mine.


(Doug Hank) #58

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


(ppoirier) #59

@DHank01 I am using the TFMINI + Arduino as the rangefinder with a px4flow on various flight controlers
Here a demo of this setup on a Q330 with a PixRacer


(Doug Hank) #60

@ppoirier That looks great. I suppose that’s all the confirmation i need to place my order.

So have you explored flying along (outside maybe) and loose your GPS signal (perhaps trnsitioning indoors)? Will the EKF weight the GPS less and the Optical Flow velocity more until GPS is recovered? I apologize if this is outside the context of this thread but this is the area we are trying to explore.