Benewake TFmini LIDAR works on Ardupilot

Hi ppoirier, im David new member of this community, i just need of help just in case my tf mini is not working on i2c of pixhawk 1 how i can wire it on arduino mini pro and how i must configure it on arduino and after this on mission planner.
Hope in a your positive help

Have you read my blog above?

hiā€¦ ppoirier, yes but i cannot understand very well coz i dont have enough experience on thisā€¦ im beginner

There are excellent tutorials on the web for Arduino, gain some experience and get back to this project whe you feel ready :slight_smile:

i knowā€¦ only i need of a drone for my work, thatā€™s whwi need to set a lidar

You can use the serial interface then ?

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

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:

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

Hi,David.


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

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?

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

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

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)

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_SCALING = 1
    RNGFND_MIN_CM = 5
    RNGFND_MAX_CM = 600
    RNGFND_GNDCLEAR = 5

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!

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

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ā€¦

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

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

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