Skip to main content

ArduPilot · configuration

TFmini-S with ArduPilot I²C / CAN / UART / TTL: integration and configuration guide

Setup, connection, configuration and code guidance for TFmini-S with ArduPilot. The original files are available in Materials and downloads. Documented interface: I²C, CAN, UART / TTL.

Interfaces
I²C, CAN, UART / TTL
Organized
2026-08-31
Source note
Source material date: 2026-08-31.

Applicable setup

TFmini-S · ArduPilot · I²C, CAN, UART / TTL

Technical instructions and steps

Application of TFmini-S IIC in PixHawk (ArduPilot Firmware)

TFmini-S can be used with PixHawk for the purpose of obstacle avoidance.

1. TFmini-S Settings:

Note: Frame rate should be set to 250Hz, see the details in chapter 7.4 “frame rate” and changing the communication interface.

The default communication of TFmini-S is TTL, IIC and TTL uses the same cable, so please set
TFmini-S to IIC communication first, see detail commands in product manual.

We take two TFmini-S as an example in this passage and set the address 0x10 and 0x11 separately.

2. PixHawk Connection:

See the connection details in PixHawk manual and TFmini-S manual, we take example for connecting

PixHawk flight controller:

Figure 1: Schematic Diagram of Connecting TFmini-S to I2C Interface of PixHawk

Note:

1. Default cable sequence of TFmini-S and PixHawk are different, please change it accordingly

(SDA and SCL wires need to be interchanged). Look at the pinout of controller, pin configurations are starting from left to right:

Page2

2. IIC connector should be purchased by user

3. If TFmini-S faces down, please take care the distance between lens and ground should be larger

than TFmini-S’s blind zone (10cm)

4. If more TFmini-S need to be connected (10 LiDARs can be connected), the method is same.

5. Power source should meet the product manual demands:5V±0.5V, larger than 140mA*number of
TFmini-S

3. Parameters settings:

Common settings:

AVOID_ENABLE= 2 [if 3 = UseFence and UseProximitySensor doesn’t work in IIC then choose 2 =
UseProximitySensor]
AVOID_MARGIN=4
PRX_TYPE=4

Settings for first TFmini-S:

RNGFND1_ADDR=16 [Address of #1 TFmini-S in decimal]
RNGFND1_GNDCLEAR=15 [Unit: cm, depending upon mounting height of the module and should be
larger LiDAR than non-detection zone]
RNGFND1_MAX_CM=400 [It could be changed according to real demands but should be smaller than
effective measure range of LiDAR, unit is cm]
RNGFND1_MIN_CM=30 [It could be changed according to real demands and should be larger than
LiDAR non-detection zone, unit is cm]
RNGFND1_ORIENT=0 [#1 TFmini-S real orientation]
RNGFND1_TYPE = 25 [TFmini-S IIC same as TFmini-Plus IIC]

Page3

Settings for second TFmini-S:

RNGFND2_ADDR=17 [Address of #2 TFmini-S in decimal]
RNGFND2_GNDCLEAR=15
RNGFND2_MAX_CM=400
RNGFND2_MIN_CM=30
RNGFND2_ORIENT=25 [#2 TFmini-S real orientation]
RNGFND2_TYPE=25 [TFmini-S IIC same as TFmini-Plus IIC]

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

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 target distance from the LiDAR: press Ctrl+F button in keyboard, the following window will pop out:

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 only refresh when this window opens, closes, zooms in or zooms out, it doesn’t mean the real time distance from LiDAR and will not be influenced in Mission Planner version under v1.3.48, the problem could be solved by updating Mission Planner

Page5

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.