Servers by jDrones

Benewake TFmini LIDAR works on Ardupilot

(ppoirier) #46

You can use the serial interface then ?

(David ) #47

me for now I’ve connected the lidar on the i2c of the pixhawk… after I have done the connection the parameter of the sensor is 4.21 variable and the voltage is 1.32 variable… this is what mission planner show me

(Siya Liu) #48

Hi, David. I have invited engineer to pay attention to this topic. Would you pls check some tutorials for Arduino and also ppoirier’s blog first and tell your specific questions, or send email to Benewake support :blush:

(David ) #49

hi Siya, ive already sent an email to benewake but didn’t help, ive also placed an order of the arduino mini pro so i can wire the sonar, but i need help or the steps for configure the board like ppoirier’s blog and maybe ive solved the problem

(Mincy Zhao) #50


This is a simple diagram.
If you have any question you could send email to me.

(David ) #51

hi mincy, thanks… for what kind of lidar is this scheme, after i have soldered all the wiring how i can set up the arduino boar and the parameters.
My email is dchaim84@gmail. com… yours?

(David ) #52

Good pm, after few time of trials maybe my lidar is working but i don’t know if the parameters are corrects

(Justin R Bates) #53

I have tested the tfmini on the TF software, changed the Device command to 47 57 02 00 00 00 04 06 and confirmed the serial output was getting readings through Tera Term. However, after changing my mission planner parameters to be configured with the serial 4/5 port I still see no reading through mission planner. Do i need an update on the lidar firmware? Any other suggestions? Also I tried modifying the ‘LightWare’ serial driver but that was locally through my computer. Would I have to flash settings onto the pixhawk with an SD card to change the Lightware serial driver?
Thank you

(Siya Liu) #54

Hi, Justin. As you hope to use TFmini with your Pixhawk, I’d like to suggest below:

After you connected TFmini with PC and entered the display software, please select “Pixmode”, then the TFmini will be changed to pixmode. Then connect TFmini with TELEM 2port, please make sure you connect the cables correctly and configure rightly as the TFmini operation manual I sent by email and configure the data. (Pls refer to Attachment 3: Application of TFmini in Pixhawk)

(chris rey) #55

Hi @ppoirier, just get my Tfmini that I want to use first with Serial (telem2). Working great on the PC interface via my FTDI232, seems very accurate. Just to be sure of my config before installing it to my Pixhawk:

  1. Activate Pix mode in PC interface (no need to save?)
  2. Apply the parameters described in the Benewake doc:
    SERIAL2_PROTOCOL = 9 (Lidar)
    SERIAL2_BAUD = 115
    RNGFND_TYPE = 8 (LightWareSerial)
    RNGFND_MAX_CM = 600

I put 600 for RNGFND_MAX_CM in order to not have bad surprises…
Seems working like this, but if you have any other recommendation, you’re welcome!

(ppoirier) #56

@chris661 Yes that looks good for serial. I would change minimum to 30 cm because of the TFMINI issue on short distance error.
Please note that the TFMINI goes to “0” when out of range you can have it ‘‘push’’ 12 Meter instead ==Send command 42 57 02 00 00 00 00 20,
TFmini will output 12m range data for distance greater than max range (6 Meter outdoor)

(chris rey) #57

For me setting this RNGFND_MAX_CM = 600 means that if lidar distance measured is 601 the baro is on and lidar off, Am I wrong?
So If it distance from lidar is 0 it’s still under MIN_CM so, I’m confused…

(ppoirier) #58

Yes thats a range so ts not using sensor below 5 CM and above 600 CM

(chris rey) #59

this point I do not understand, why is it useful to push it 12 meters instead of 0? because both values are out of the defined range

(ppoirier) #60

With altitude it does not seem to have a negative impact but when you change orientation as for avoidance it makes the vekicle stop . Look here TF-Mini-Obstacle Avoidance Issue 3.5.5

(Siya Liu) #61

Hi, friends from Ardupilot. If you have any questions regarding to Benewake LiDAR TFmini, TF02, Solid-state LiDAR CE30, welcome to contact bw(at) benewake(dot)com for instant help, engineers are ready for support. : )

(George Cloud) #62

@ppoirier I have a question about implementing the tfmini if you have the time:

I am currently trying to test if the tfmini is functioning properly, using the benewake app but unfortunately I am not getting any readout in standard or pix mode. Connecting to the correct serial port via Tera Term isn’t giving any readout either. I wonder if this is because I am using an sparkfun redboard instead of a ttl to usb converter. Could this be the issue? I can see the red light on the transmitting lens of the tfmini indicating it is receiving power, and the right voltage too.

Anything helps, thanks

(micaelkarlsson) #63


I bought two Benewake Lidar Lite which I received yesterday.
I connect one of them to Telemetry1 port on a Pixracer (not Pixhawk).
I adjusted all the parameters as described in the documentation.

When I connect Pixracer to Mission Planner I have the message “Bad Lidar” flashing and some times I get som random meassure readings like 599 4 39 but often it is 0.
I have only 0 for volt.

What to do?

I have not test it with computer and the application but I assume it would work without any changes.

I have not change Lidar Lite to “pixmode”, I thought it was default from factory.

Should it tell me volt when I connected to Telemetry port?

I’m a bit confused because I have some measurement from the Lidar but It is not correct and not consistent. Do someone know If it is because Lidar is NOT in Pixmode?

I use Telemetry 1 instead of 2, but I think they are the same, or?

(Siya Liu) #64

Hi. Regarding to your questions, pls contact bw (at) benewake (dot) com for TFmini connected to Pixhawk operation manual or download from the Benewake website. As you mentioned bad LiDAR health, pls check whether you’ve selected Pix mode, check the picture. And double check whether the TFmini cable connection is right. also, check whether it’s caused by lack of power supply, if yes, pls provide separate power supply to the TFmini.

(Boom_Boom) #65

Micaelkarlsson, Default the Benewake TFmini is not in pix mode, you need to change it (and the change needs to stay).
With a serial adapter you should see some output, in either mode. Also in the benewake software you should see an output. If you do not please check all connections and the serial adapter.

Telem 1 or 2 doesn’t matter, as long as you change the settings in arducopter.