Benewake TF mini Setup

Hi,the connector type used in the 4 pin socket on the Benewake is GH1.25-4p.

Hi,the connector type used in the 4 pin socket on the Benewake is GH1.25-4p.

@Asterion_Daedalus Hello, hope you see this. If you need to make a cable for TFmini by yourself, you could check this picture with the connector wire order. The connector model number is GH1.25-4p, pin spacing is 1.25mm. It’s easy to make a cable by yourself or weld wires to the connector.

Hello David and thank you for your post.
I have a tf mini installed also as a forward sensor, only in my case so far i had taken power from the GPS cable hack.
In this post TF-Mini-Obstacle Avoidance Issue 3.5.5 i have described an issue i have had with it in GPS navigated mode.
Have you come across anything like that?
Dear Siya, i hope you can look into my post also.

Thanx in advance for your time!

Hi, MerkaTony, excuse me but I’m afraid we are only able to support for TFmini questions. For GPS issues, it’s really not our familiar part.

Hello @Siya,

a. My issue is not with the GPS but with the Lidar giving 1m signal when its over its limit. This means that it measures ok and when its limit its exceeded it goes down to 1m and UAV instantly stays in place.
b. In this Thread How to make the TFMINI rangefinder talk I2C @ppoirier tested and with an arduino mod on I2C managed to give proper signal. My issue was that i was going for a serial connection and not I2C.
c. Can Benewake verify what is the signal output when the Sensor its over its limit?

1 Like

Hi,
I’ve been trying to get the TF Mini working with a PixRacer, but without success so far.
If I use a FTDI connector and plug it into a PC it works fine in the GUI program, but not with the PixRacer.

This are the parameters I’ve set to connect it to the TELEM2 port

SERIAL2_BAUD 115 (for 115200)
SERIAL2_PROTOCOL 9 (Lidar)
RNGFND_TYPE 8 (LightWareSerial)
RNGFND_SCALING 1
RNGFND_MIN_CM 30
RNGFND_MAX_CM 1000

With QGroundcontrol I don’t see any values in Rangefinder.distance except 0.0.

I have also checked the “Pix Mode” in the GUI, but I’m not sure if it sticks. If I unplug the FTDI adapter and plug it back in, the TFmini seems to be in regular mode again.

What am I missing?

Thanks

I think the pix mode on the TF mini is the problem here, there are multiple versions of the tf-mini software I’ve had to try a couple before everything worked.

Hm,
so today I used the GUI tool from the website, and with the command

42 57 02 00 00 00 04 06

and directly unplugging (not pressing the disconnect button) it is working now.
Before that I also added an external power supply, which didn’t change anything initially, but might also have helped in the end.

¯_(ツ)_/¯

Hi,

I just found this thread, also found thread where it explains how to use pro mini board to produce I2C signal from this Lidar.
Could anybody explain - where does this unit stand in regard of the current 3.6 RC1 code? Is it still needed to compile a custom build in order for this sensor to work or is there some plan to include it into a standard build?

There seems to be several threads on this device topic and they somewhat contradict one another. I see a way to use dedicated serial port for this device - it is not the intent, i want that connected to I2C next to mro SAM GPS. I cannot find any indication of what should be done where on ardupilot side in order for that to work, and what, if anything, needs to be done to the TFMini unit. If anybody got it all working - could you pls elaborate step by step what the process should be?

Also, do i understand correctly that even 3.6 RC1 build still does not allow to use GPS concurrently with Lidar? I think i saw it was no longer the issue, but some other thread stated that GPS had to be disabled - and it is quite confusing.

Hello Paul,

The new drivers allow to use the TFMINI natively on ArduPilot using Serial Port.
If you need I2C , you can look at my blog, but you need some knowledge of Arduino.

1 Like

Awesome news, thx for the confirmation.
Is it required to alter lidar’s firmware or configuration with gui or
serial interface commands?

Depends the release of TFMINI , original were ship in the standard output, but I think some releases wr=ere in the pix format (clear text). Anyhow you can set the moses with gui by sending these commands:

The command of standard output is 42 57 02 00 00 00 01 06

The command of pix format output is 42 57 02 00 00 00 04 06

What format is needed for I2C?

Standard, with mm just like with the new ArduPilot driver

Hi, i got it working fine on the serial port for now, as i realized i do not need regular telemetry radio as i can pass data via r-xsr. oddly it also does not work as expected - only passes 12 variables instead of full telemetry 22-23 vars, but it is a different struggle.

on the lidar - it works awesome as long as there is some distance from it to the surface, starting from 1.5-2 inches somewhat it sends correct info. but if landed all the way into the ground it sends out ‘12’. can it be altered to be ‘0’? is there a command for that?

realistically, as ardupilot is instructed to ignore values above 6m i think it should not screw anything up, but, still i find it odd, why does it do that? is it a bug or a feature? :slight_smile:

First you have to check your range finder parameters , making sure its within the sensor limits.
Then you can change the way TFMINI reports the out of range values, it can either be 0 or 12 Meters.

check here: TF-Mini-Obstacle Avoidance Issue 3.5.5

Can i use the TFMini lidar in Auto Flight mode. If there is any way please tell me its emergency.

Hi,

I’ve recently bought a TF mini for low level terrain following with a small quadcopter (Pixhawk 2.1 Cube - APM Copter 3.6.0-rc11) and I’m having a few issues using the new TFmini driver (using the settings on the setup page - http://ardupilot.org/copter/docs/common-benewake-tfmini-lidar.html)

I’ve set the TF mini to standard output using the ‘42 57 02 00 00 00 01 06’ command but consistently get a ‘Bad Lidar Health’ warning and get ‘sonarrange’ readings of 0.01 to 0.11 between 0 centimetres and about 1.5 metres. After about 1.5 metres the reading jumps straight to 65.42.

I am able to get sensible reading if I set the TF mini to pix format output and RNGFND_TYPE = 8. Is there a down side to using the Lightware Serial driver instead?

Cheers,
Luke

Luke,

I used the TFMini in ArduPlane 3.8.5 with the Lightware Serial Driver. I know it’s not ArduCopter but I think the same basic driver should work also with these parameter settings:

RNGFND_TYPE=8
SERIAL_PROTOCOL=9 (for lidar. I used SERIAL2 as I was already using SERIAL1 for telemetry)
SERIAL_BAUD=115 (for 115,200 baud rate)

Got good readings from about one-half a meter to about 6 meters outside over grass.

Paul