Benewake TF-Mini-I DroneCAN LIDAR not working - Resolved

I’ve just connected a Benewake TF-Mini-I CAN LIDAR to my Zealot H743. I know this port works because I was running an airspeed sensor on it yesterday. I set
CAN_P2_DRIVER=1 (its connected to CAN2)
RNGFND1_TYPE = 24

The docs say

The RNGFNDx_ADDR ArduPilot parameter must be set above 0 and be equal to the number set on the DroneCAN adapter node.

Does anyone know what RNGFND1_ADDR should be set to for the Benewake TF-Mini-I. I tried setting it to 1 because for the UART option it says the slave ID is 1 in the manual, but it doesn’t seem to say anything about the CAN address required.

There is a copy of the manual here: Dropbox - TFmini-i A01 Manual.pdf - Simplify your life

Also, CAN_P2_BITRATE is defaulting to 1000000, while the docs say that the default baud rate is 250k, I tried changing CAN_P2_BITRATE to 250000 but it didn’t seem to make a difference.

Oh the device seems to be working - when I first power up the FC, I see the red light from the lidar for a few seconds (if I look directly in it - bad idea?), but it stops as soon as the FC comes up.

@Siya can you get us more information on the CAN protocol used ?
If You have any technical document or get an engineer coming here would be fine.

Hello,
The parameter RNGFND1_TYPE is 34 not 24.
Please go through this document for help.
https://drive.google.com/file/d/1ZRFMyGcrpQP94GKY7Ga7aLdYn4xGBIKv/view?usp=sharing

2 Likes

Oh thanks so much for this. I could not find this on the Benewake website - it’s explained so clearly, I’ll try it in the next few days.

OK, I received the Sensors and I did the following:

  • First they are too bulky for my taste, so I removed them from their IP67 type enclosures, and as you can see on the pictures, it is made of a standard TF-Mini I2c and a STM based Can Node board.
  • I used thes small jst type connectors and the leftover cables of the standard TF-Mini so I can connect to a JST-GH type distribution board
  • Injected 12 volts on the distribution board
    -Connected to Orange cube making sure we disconnect the VCC on the cable
  • Set parameters of CAN to 250000 bps and use the CAN Protocol to 11 (Benewake)
  • Set first Rangefinder address to 3 and type 34
  • Set second Rangefinder address to 4 and type 34

Next, I modified a cable to connect TX-RX (instead of CANH-CANL) and plugged in the distribution board, removed the CAN connector and connected a FTDI USB to Serial using a DuPont to JST-GH connector and again making sure we dont connect the VCC

Then using REALTERM, set speed at 115200 bps and send the hex sequence to change one of the sensors to address 4.
NOTE: RealTerm need 0x added to the numbers in order to send hex type, so the resulting sequence is like this:

0x5A 0x0E 0x51 0x00 0x08 0x03 0x00 0x00 0x00 0x04 0x00 0x00 0x00 0xC8 [CHANGE SEND ID TO 04]
0x5A 0x04 0x11 0x6F [SAVE SETTINGS]

Here is the result:

Conclusion: I still prefer the TFMini-I2C & MATEK Cannode L431 at is is standard a DRONECAN at 1000000 bps configuration making the other devices compatible on the same bus. With the TF-Mini-I you have to dedicate a CAN bus to this family of sensor making the integration less attractive.

1 Like

What would be the advantage of using the i2c-CAN board vs just connecting the TFMini to an i2c port?

At the moment, I dont see advantage to install IP67 type of sensors with a dedicated CAN bus and a specific voltage on a small UAV.
Can you please hit the solution button ? as it might be useful for other users as well.

1 Like

I would if I knew how. Where is this button of which you speak?

Lol I cant find it either :smiley:
I guess this feature is not available now
Anyway I changed title

@ppoirier which stm32 did they use? maybe it could run AP_Periph?

@tridge. Here it is, the “bluepill” type 32F103TBU6

thanks, it is a GD32, not a STM32. That has 128k flash, so this could likely run AP_Periph, but we’d first have to add support for GD32F103. That will be close to (but not identical to) STM32F103.

Thanks for this, maybe @ibrahimqazi could be interested ?

1 Like