TFmini Plus(S) LiDAR Distance Sensor
Overview
A distance measurement sensor based on ToF (Time of Flight) principles. This sensor calculates distance by measuring the time difference for modulated near-infrared light to reflect off an object and return, with a maximum measurement range of 0.3-12 meters. It uses Serial (UART) or I2C interface.


Compatible Modules
- TFMini-Plus
- TFMini-S
Specifications (TFMini-Plus)
- Supply voltage: 5V±0.5V
- Operating Range : 0.1m~12m
- Accuracy : ±5cm@(0.1-6m) , ±1%@(6m-12m)
- Distance resolution: 5mm parameters
- Frame rate: 1-1000Hz(adjustable)2
- Ambient light immunity: 70klux
- Operating temperature: -20°C~60°C
- Enclosure rating: IP65
- Light source: LED Optical parameters
- Central wavelength: 850nm
- FOV: 3.6°
- Average current: ≤110mA Electrical parameters
- Power consumption: 550mW
- Peak current: 500mA
Supported GPIO
- Raspberry Pi 0~4
- Raspberry Pi 5
- BeagleBone Black/Green
- Jetson Nano
- FT232H, FT2232H, FT4232H
- MCP2221
- USB-UART Converter Modules (FT232RL, CP2102, PL2303, CH340…)
Commands
[INIT (UART)]
Enters initial configuration settings.
Item | Type | Description |
---|---|---|
Baud Rate (bps) | WRITE | Selects the baud rate for communication with the module. The module’s default communication speed is 115200 bps. (9600, 14400, 19200, 56000, 115200, 460800, 921600) |
[READ_DATA]
Reads the distance to objects, signal strength, and chipset temperature.
Item | Type | Description |
---|---|---|
Measured Distance (cm) | READ | Measured distance between sensor and object. (0~1200) |
Signal Strength | READ | Strength of the measurement signal. (-1 ~ 32767) |
Chipset Temperature (℃) | READ | Temperature of the chipset. (25°C ~ 125°C) |
[SET_FRAME_RATE]
Sets the data frame rate.
Item | Type | Description |
---|---|---|
Frame Rate (Hz) | WRITE | Selects the number of measurements per second (frame rate). (0,1,2,5,10,20,25,50,100,125,200,250,500,1000) |
[SOFT_RESET]
Resets the module.
[RESTORE_FACTORY_SETTINGS]
Restores factory default settings.
[TRIG_DETECTION]
Manually performs a single measurement. Only available when frame rate is set to 0. After executing this command, values can be read using READ_DATA.
[LOW_POWER_MODE]
Determines whether to enter low power mode.
Item | Type | Description |
---|---|---|
Low Power Mode | WRITE | If true, enters low power mode; if false, returns to normal mode. |
[SET_I2C_MODE (UART)]
Changes the module to I2C mode.
[SET_SERIAL_MODE (I2C)]
Changes the module to Serial (UART) mode.
[GET_FIRMWARE_VERSION]
Reads the firmware version.
Item | Type | Description |
---|---|---|
Version | READ | Reads the firmware version as a byte array. |
[SET_BAUD_RATE (UART)]
Changes the module’s communication speed (baud rate).
Item | Type | Description |
---|---|---|
Baud Rate (bps) | WRITE | Sets the module’s baud rate. Default value is 115200 bps. (9600, 14400, 19200, 56000, 115200, 460800, 921600) |
[SET_I2C_ADDRESS (I2C)]
Changes the module’s I2C address.
Item | Type | Description |
---|---|---|
I2C Address | WRITE | Enter the new I2C address. Default address is 0x10. |
Example
Objective
Display the measured distance on dashboard widgets. Test by adjusting the distance with your hand and verify that the distance changes.
Parts
Part | Quantity |
---|---|
Raspberry Pi 4 * | 1 |
TFMini-S / TFMini-Plus | 1 |
Wiring (UART)
Connect each component to the corresponding connection as listed in each row below.
TFMini-S / TFMini-Plus | GPIO |
---|---|
+5V (Red) | 5V |
RXD/SDA (White) | 14 (UART TX) |
TXD/SCL (Green/Blue) | 15 (UART RX) |
GND (Black) | GND |

Wiring (I2C)
Connect each component to the corresponding connection as listed in each row below.
TFMini-S / TFMini-Plus | GPIO |
---|---|
+5V (Red) | 5V |
RXD/SDA (White) | 2 (I2C1 SDA) |
TXD/SCL (Green/Blue) | 3 (I2C1 SCL) |
GND (Black) | GND |

Project Links