Benewake TFmini LIDAR works on Ardupilot

Ok so still no luck.

I connected the app and it appears the unit is working.

However if I select Pixmode the display stops. Not sure if thats right
or not.

I just bought the unit a week ago and the numbers are as follows

N030049

7020687

I have changed the wiring harness, changed the port its on and still no
luck.

I still get Bad Lidar Health and sonar range and Sonar voltage are both 0

Open a terminal (TeraTerm or any) and connect @ 115200
Do you read distance?

Ok I again connected it to the app.

Seems to work fine. I notice that when ever I start the app the pix mode
is not checked and when I connect to the com port it remains unchecked.
If I put it into Pixmode the graph stops working.

If Pixmode is a setting that it should retain I have no clue how to get
it to save, there is no write function and the send command has no
effect that I can see.

I am not sure what else to check

1 Like

Yes it seems to work well in the app. I have noticed a setting called
pix mode which sort of sounds like Pixhawk. However checking that box
stops the display.

I am not sure what to check now

1 Like

When you set pixmode, the output should be readable characters.
This is why I ask to check on a serial terminal program to confirm that this is the case.
If you can read distances, then its just a matter of gettingTX data to RX of the Pixhawk

1 Like

Its weird it works great on teh app.

But connected to the Pixhawk and I get bad Lidar health. I am missing
something just not sure what

1 Like

By default , the TFMINI is outputting Binary format, in order to make it work with Pixhawk as a Lightware emulation you have to change mode to pix.

To change mode, you need to send this string = 42 57 02 00 00 00 04 06
You do a ctrl-c and ctrl-v in the app send box and hit send.
Its now in pix mode and you should confirm by reading from a serial terminal emulator.
Note:
Once mode has changed, it is permanent (until you send another command to revert).

Do these steps and you will have a functioning Lidar with pixhawk

1 Like

I see

I just need to find a serial terminal then.

Right now if I select Pixmode the screen stops so I assume thats becuase
its outputting to text.

1 Like

I am using Tera Term on windows 10

In teh app itself Pix mode gives nothing

If I open a hyper terminal I get a series of Y’s and other such information.

I am not sure what to config Hyper terminal to do

1 Like

1 Like

See now that was what I was missing. I now get a sonarrange. However no
sonar voltage, or at least I did. It seems to now be stuck on one range
and not updating.

However I am much closer now.

Thank you

1 Like

This is why you need to look at tera term to configm what you see = You need to have a screen like I showed above (message 6)

2 Likes

Yes makes sense.
It appears to be working now. I see two problems I need to resolve. First I think the cable I made up isn’t working so need to make up a new one and second no sonarvoltage. However it seems to work. Going to make a new cable and see how accurate the range is after that

1 Like

Sorry, we are updating APP and firmware in the near future. Some information is not consistent. You can modify your TFmini to fit your flight control with the following instructions;
Input at the command window:42 57 02 00 00 00 04 06
don’t forget to click ENTER after the input is finished.
TFmini Internal Serial Port Debug Command.pdf (619.1 KB)

Thank you all for your help. The Benewake is working. I think the documentation needs to be updated to include a statement about Pixmode. I am seriously impressed with the accuracy. I have measured the physical distance its reporting on and its dead on. Thats awesome. I dont’ understand the Sonarvoltage reading zero but I suspect thats due to it being serial and not analog…

One last question, the pixhawk and other such devices have limited serial ports, can these be daisy chained or can I use an SPI to I2C converter and use the I2C port instead.

Cool :slight_smile:

I agree, I2C would be really fine !!

I found a cheap SIP to I2C converter so when it arrives I am going to see if it gives me lidar over I2c. Then I can have my second GPS back. Damn pixhawks don’t have enough serial ports

For that you would have to write a new driver, or ‘‘spoof’’ an existing one, that can be done but its more difficult.

You can use uart 5 now , or mavlink the lidar == I am working on a new project base on this, I will write a blog soon , stay tuned :wink: