Skip to main content

ArduPilot · configuration

TF03 with ArduPilot CAN / UART · Pixhawk 1: integration and configuration guide

Setup, connection, configuration and code guidance for TF03 with ArduPilot. The original files are available in Materials and downloads. Documented interface: CAN, UART.

Interfaces
CAN, UART
Hardware targets
Pixhawk 1
Organized
2026-08-31
Source note
Source material date: 2026-08-31.

Applicable setup

TF03 · ArduPilot · CAN, UART · Pixhawk 1

Technical instructions and steps

Application of TF03 UART in PixHawk (ArduPilot Firmware)

TF03 can directly be connected with the serial port of PixHawk. TF03 can be interfaced with flight controller for the purpose of altitude holding or obstacle avoidance. the guide is suitable for PixHawk adopting ArduCopter V3.6.2 or higher firmware (or any other board flashed with ArduCopter).

Note: The default mode of LiDAR is Standard output mode and it needs to be used instead of PIX mode for firmware V3.6.2 or above, if PIX mode is chosen by mistake please switch it back to standard mode by sending command (refer to manual for command).

1. TF03 Settings:

The default communication of TF03 is UART. So you don’t need to make any changes in the interface settings.

2. PixHawk Connection:

See the wiring details in PixHawk manual and TF03 manual; we take the example of PixHawk1 for connecting LiDAR.

Obstacle Avoidance:

Figure 1: Schematic Diagram of Connecting TF03 to TELEM2 Interface (Serial Port2) of PixHawk

Some key hints about TF03 connector and supply voltage:

1. The default connector of TF03 is Molex (JST) with 1.25mm pitch. If your flight controller needs

Page2

some other connector like GH 1.25 then you will need to replace Molex connector with GH 1.25 connector in order to match it with your flight controller’s connector.

2. If TF03 faces down, please take care the distance between lens and ground, it should be larger

than TF03’s blind zone (10cm)

3. Power source should meet the product manual requirements: 5V±0.5V and peak current of

180mA (for LiDAR V1), while 5V~24V and peak current of 150mA (for LiDAR V2). It is advised to power the LiDAR separately rather than powering through flight controller.

3. Parameters Settings for Obstacle Avoidance:

Connect the flight controller to MP. Select [Full Parameter List] in the left from the below bar- [CONFIG/TUNING].

Find and modify the following parameters:

Common settings for obstacle avoidance:

AVOID_ENABLE= 3 [if 3 = UseFence and UseProximitySensor doesn’t work then try with 2 =
UseProximitySensor]
AVOID_MARGIN = 4 [can be increased according to user’s requirement]
PRX_TYPE = 4

Settings for TF03:

SERIAL2_PROTOCOL = 9 [Rangefinder option]
SERIAL2_BAUD = 115 [Choose the current LiDAR baud rate, if haven’t been changed, the default
baud rate 115200 should be selected, that is 115]
RNGFND1_TYPE = 19 [Same option with TF02] (ArduCopter V4.0.0, choose the 27 [Benewake
TF03])
RNGFND1_MIN_CM = 20 [It can be changed according to real demands and should be bigger
LiDAR than non-detection zone, unit is cm]
RNGFND1_MAX_CM = 5000 [It can be changed according to real demands but should be smaller
than effective measure range of LiDAR, unit is cm]
RNGFND1_GNDCLEAR = 20 [expressed in cm, depending upon mounting height of the module and
should be bigger LiDAR than non-detection zone]
RNGFND1_ORIENT=25 [TF03 real orientation]

Page3

Upon setting of these parameters, click [Write Params] on the right of MP to write parameters.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct and the power supply is normal. Please turn-off completely the flight controller after configuring the parameters, otherwise changes will not take place. If your battery is connected to your flight controller, please disconnect it as well.

How to see the target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:

See next page.

Page4

Click button Proximity, the following window will appear:

The number in green color means the distance from LiDAR in obstacle avoidance mode, the number refreshes when the distance changes or window opens, closes, zooms in or zooms out, and this distance will not be influenced in Mission Planner, the version available at the time writing this tutorial is v1.3.72.

 Attach: If TELEM 2 port has been used, SERIAL4/5 interface can be used, the other setting are same.

4. Configuration Descriptions of Mission Planner:

Connect flight controller to MP, Select [Full Parameter List] in the left from the below bar [CONFIG/TUNING]. Find and modify following parameters:

SERIAL4_PROTOCOL = 9
SERIAL4_BAUD = 115

Upon setting of these parameters, the other parameters are same as Mission Planner configuration description of TF03 for the purpose of Obstacle Avoidance or Altitude Holding, then click [Write Params] on the right hand side of the software.

Page5

Figure 2: Schematic Diagram of Connecting TF03 with SERIAL4/5 Interface (Serial Port 4/5) of Pixhawk

5. Mission Planner Configuration Description of TF03 for the Purpose of

Altitude Hold:

Connect the flight controller to MP. Note: the installation height should be greater than non-detection zone. Select [Full Parameter List] in the left from the below bar- [CONFIG/TUNING]. Find and modify the following parameters:

SERIAL2_PROTOCOL = 9 [Rangefinder option]
SERIAL2_BAUD = 115 [Choose the current LiDAR baud rate, if haven’t been changed, the default
baud rate 115200 should be selected, that is 115]
RNGFND1_TYPE = 19 [Same option with TF02] (ArduCopter V4.0.0, choose the 27 [Benewake
TF03])
PRX_TYPE = 0 [on equal to 4 also gives the value if RNGFND1_ORIENT = 25]
RNGFND1_MIN_CM = 20 [It can be changed according to real demands and should be bigger
LiDAR than non-detection zone, unit is cm]
RNGFND1_MAX_CM = 7000 [It can be changed according to real demands but should be smaller
than effective measure range of LiDAR, unit is cm]
RNGFND1_GNDCLEAR = 20 [expressed in cm, depending upon mounting height of the module and
should be bigger LiDAR than non-detection zone]

Page6

RNGFND1_ORIENT = 25 [Facing downward]

Upon setting of these parameters, click [Write Params] on the right of the software.

If the error message “Bad LiDAR Health” appears, please check if the connection is correct and the power supply is normal.

How to see the altitude value from LiDAR sensor: double click the area of the Mission Planner, see the following picture:

Select option sonarrange, see following picture:

Page7

The altitude distance from the LiDAR will be displayed in Sonar Range (meters), see the following picture:

Page8

Use and verification

The technical content follows the readable source material. Confirm the product hardware revision, flight-stack or software version, and field safety boundary against the original material and current platform documentation.

Materials and downloads

Product inquiry

Talk to a product specialist

Tell us what you need and our team will get back to you.

Product inquiry

Inquiry sent

Your inquiry has been received. We will be in touch soon.