Component guide · Intermediate · 3 min read
TFmini, TFmini-S and TFmini Plus LiDAR

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The Benewake TFmini family are single-point LiDAR sensors that measure 0.1 to 12 m. The TFmini-S and TFmini Plus run from 5 V and send distance over 3.3 V UART at 115200 baud, with I2C as an option. The Plus adds an IP65 housing and higher frame rate. They suit drone altitude hold, robot obstacle detection and level measuring.
Key specs at a glance
- Range
- 0.1 to 12 m (TFmini-S and Plus); 0.3 to 12 m (original TFmini)
- Accuracy
- ±6 cm up to 6 m, ±1% beyond (TFmini-S and Plus)
- Frame rate
- Up to 1000 Hz (100 Hz default)
- Supply
- 5 V ±0.5 V, about 140 mA peak
- Interface
- UART 115200 baud (3.3 V), I2C optional on S and Plus
- Protection
- IP65 on TFmini Plus
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Benewake TFMini Plus LiDAR Distance Sensor (Range: 0.1-12m) – UART Interface₹4,379
Option 2Benewake TFMini-S Micro LiDAR Distance Sensor Module, Range: 0.1-12m, I2C/UART₹4,119
Option 3Benewake TFMini-S Micro LiDAR Sensor UART, Range: 0.1m~12m₹3,579
Option 4Benewake TFMini Micro LiDAR Distance Sensor 0.3–12m – UART Interface₹3,149
What the TFmini LiDAR is
All three models use the same time-of-flight method and the same 9-byte UART frame as the TF-Luna, so code moves between them. The TFmini-S is the compact standard version; the TFmini Plus adds a sealed housing for outdoor use and a higher frame rate. The original TFmini has a shorter minimum range.
ArduPilot and PX4 flight controllers support them as rangefinders on a serial port.
TFmini LiDAR pinout
The pins on the TFmini LiDAR and what each one does.
| Pin | Function |
|---|---|
| Red | +5 V supply |
| Black | GND |
| Green | TX (sensor transmits) |
| White | RX (sensor receives) |
- Red
- +5 V supply
- Black
- GND
- Green
- TX (sensor transmits)
- White
- RX (sensor receives)
Wiring the TFmini LiDAR
Check the cable colours in your model's manual before powering it; they are the usual Benewake colours but cables vary. The UART is 3.3 V, so use a divider on the Uno's TX line. On a Mega or ESP32 use a hardware serial port.
| TFmini LiDAR pin | Arduino Uno | ESP32 |
|---|---|---|
| Red +5V | 5V | 5V (VIN) |
| Black GND | GND | GND |
| Green TX | D2 (SoftwareSerial RX) | GPIO 16 (RX2) |
| White RX | D3 (SoftwareSerial TX) | GPIO 17 (TX2) |
- Red +5V
- Arduino Uno:
- 5V
- ESP32:
- 5V (VIN)
- Black GND
- Arduino Uno:
- GND
- ESP32:
- GND
- Green TX
- Arduino Uno:
- D2 (SoftwareSerial RX)
- ESP32:
- GPIO 16 (RX2)
- White RX
- Arduino Uno:
- D3 (SoftwareSerial TX)
- ESP32:
- GPIO 17 (TX2)
Example code
Readings with low strength are unreliable; 65535 strength means the receiver is saturated (target too close or too reflective).
// TFmini TX (green) -> GPIO 16, RX (white) -> GPIO 17
void setup() {
Serial.begin(115200);
Serial2.begin(115200, SERIAL_8N1, 16, 17);
}
void loop() {
static uint8_t f[9];
if (Serial2.available() >= 9 && Serial2.read() == 0x59 && Serial2.peek() == 0x59) {
f[0] = 0x59;
for (int i = 1; i < 9; i++) f[i] = Serial2.read();
uint8_t sum = 0;
for (int i = 0; i < 8; i++) sum += f[i];
if (sum == f[8]) {
int dist = f[2] | f[3] << 8; // cm
int strength = f[4] | f[5] << 8;
if (strength > 100 && strength != 65535) Serial.printf("%d cm\n", dist);
}
}
}Setup and tuning
connect to a free serial port and set the rangefinder type to Benewake TFmini in ArduPilot (or the matching driver in PX4).
default 100 Hz; change it with Benewake's commands if you need more.
the Plus is sealed; the S needs a cover that does not block the lens.
readings under 10 cm are not valid.
What you need
Shop this list5 of 7 found in our store · ₹10,315
Benewake TFmini Plus LiDAR: sealed version for outdoor useBenewake TFMini Micro LiDAR Distance Sensor 0.3–12m – UART Interface₹3,149Closest match, check the specs- Benewake TFmini-S LiDAR: compact standard versionFind this part
Benewake TFMini-S Micro LiDAR Sensor UART, Range: 0.1m~12m: another version this guide coversBenewake TFMini-S Micro LiDAR Sensor UART, Range: 0.1m~12m₹3,579
Benewake TFMini Micro LiDAR Distance Sensor 0.3–12m – UART Interface: another version this guide coversBenewake TFMini Micro LiDAR Distance Sensor 0.3–12m – UART Interface₹3,149
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389- Mega 2560 board: hardware serial portsFind this part
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Alternatives and when to choose them
- TF-Luna: smaller, cheaper, up to 8 m.
- VL53L1X: up to 4 m, I2C, very small.
- LiDAR distance sensors: when to use a scanning LiDAR instead.
Try it: Uart baud rate error calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Swapping TX and RX, so nothing arrives.
- Connecting the white RX wire to a 5 V TX pin without a divider.
- Trusting readings with low signal strength.
- Blocking the lens with a dusty or tinted window.
Frequently asked questions
What is the difference between TFmini-S and TFmini Plus?
The Plus has an IP65 sealed housing and a higher maximum frame rate; range and accuracy are similar.
Does it work with ArduPilot?
Yes, as a serial rangefinder.
What baud rate does it use?
115200 by default.
Can it measure through glass?
Clear glass reduces range and can cause false readings; test it first.
What is the minimum distance?
About 10 cm for the S and Plus, 30 cm for the original TFmini.
Parts for this guide
Calculators
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

