Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›TFmini, TFmini-S and TFmini Plus LiDAR

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

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the TFmini LiDAR isTFmini LiDAR pinoutWiring the TFmini LiDARExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Short answer

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
01

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.

02

TFmini LiDAR pinout

The pins on the TFmini LiDAR and what each one does.

PinFunction
Red+5 V supply
BlackGND
GreenTX (sensor transmits)
WhiteRX (sensor receives)
PinFunction
Red
+5 V supply
Black
GND
Green
TX (sensor transmits)
White
RX (sensor receives)
03

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 pinArduino UnoESP32
Red +5V5V5V (VIN)
Black GNDGNDGND
Green TXD2 (SoftwareSerial RX)GPIO 16 (RX2)
White RXD3 (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)
04

Example code

Readings with low strength are unreliable; 65535 strength means the receiver is saturated (target too close or too reflective).

Read distance over UART (ESP32) · Arduino C++Verify & upload in Electrolark
// 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);
    }
  }
}
05

Setup and tuning

Flight controllers

connect to a free serial port and set the rangefinder type to Benewake TFmini in ArduPilot (or the matching driver in PX4).

Frame rate

default 100 Hz; change it with Benewake's commands if you need more.

Outdoors

the Plus is sealed; the S needs a cover that does not block the lens.

Minimum range

readings under 10 cm are not valid.

06

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
07

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.
08

Try it: Uart baud rate error calculator

Change the values and the diagram and results update as you type.

09

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.
10

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

  • Benewake TFMini Plus LiDAR Distance Sensor (Range: 0.1-12m) – UART Interface
    ₹4,379View
  • Benewake TFMini-S Micro LiDAR Distance Sensor Module, Range: 0.1-12m, I2C/UART
    ₹4,119View
  • Benewake TFMini-S Micro LiDAR Sensor UART, Range: 0.1m~12m
    ₹3,579View
  • Benewake TFMini Micro LiDAR Distance Sensor 0.3–12m – UART Interface
    ₹3,149View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • Arduino Mega 2560 ATmega2560-16U2 Dev Board
    ₹1,039View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop Infrared, ToF & LiDAR Distance Sensors

Calculators

Uart baud rate error calculator

Keep learning

ComparisonIntermediateLiDAR Distance SensorsCompare LiDAR distance sensors: single-point TFmini and TF-Luna, 2D scanners for SLAM and 3D LiDAR. Range, interfaces, sunlight limits and Arduino code.3 min read · SensorsComponent guideIntermediateTF-Luna LiDAR SensorThe TF-Luna from Benewake is a small single-point LiDAR that measures distance from 0.2 to 8 m using time of flight.3 min read · SensorsConcept explainerBeginnerUART and Serial CommunicationA UART sends data one bit at a time over one wire with no shared clock, so both ends must agree on the speed, called the baud rate (9600 and 115200 are common).4 min read · Electronics FundamentalsComparisonIntermediateFlight ControllersA flight controller reads its gyro thousands of times a second and adjusts each motor to keep the craft stable and follow your sticks.3 min read · Drones & FPV

Sources

  • TFmini-S and TFmini Plus product manuals (Benewake)

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the TFmini LiDAR isTFmini LiDAR pinoutWiring the TFmini LiDARExample codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)4 items · ₹11,311

Benewake TFMini Plus LiDAR Distance Sensor (Range: 0.1-12m) – UART Interface · Benewake TFMini-S Micro LiDAR Sensor UART, Range: 0.1m~12m · Benewake TFMini Micro LiDAR Distance Sensor 0.3–12m – UART Interface · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

Readings with strength under 100 (or 65535, saturated) are skipped, so a dark target prints nothing.

Serial monitor115200 baud
240 cm

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question