

The TFmini-S is a compact, high-precision LiDAR distance sensor designed for accurate distance measurements in a variety of applications. With a measurement range of up to 12 meters and a small form factor, the TFmini-S is ideal for robotics, drones, and other embedded systems requiring reliable distance sensing. Its simple serial interface ensures easy integration into projects, making it a versatile choice for both hobbyists and professionals.








The TFmini-S offers robust performance in a compact package. Below are its key technical details:
| Parameter | Specification |
|---|---|
| Measurement Range | 0.1 m to 12 m |
| Accuracy | ±6 cm (0.1–6 m), ±1% (>6 m) |
| Resolution | 1 cm |
| Operating Voltage | 5 V DC |
| Average Current | ≤120 mA |
| Communication Interface | UART (default) / I2C (configurable) |
| Operating Temperature | -20°C to 60°C |
| Frame Rate | 1 Hz to 1000 Hz (adjustable) |
| Dimensions | 42 mm × 15 mm × 16 mm |
| Weight | 5 g |
The TFmini-S has a 4-pin interface for power and communication. The pinout is as follows:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply (5 V DC) |
| 2 | GND | Ground |
| 3 | TX | UART Transmit (data output) |
| 4 | RX | UART Receive (data input) |
To use the TFmini-S with an Arduino UNO, follow these steps:
Wiring:
VCC pin of the TFmini-S to the 5V pin on the Arduino.GND pin of the TFmini-S to the GND pin on the Arduino.TX pin of the TFmini-S to the Arduino's D2 pin (for software serial).RX pin of the TFmini-S to the Arduino's D3 pin (for software serial).Install Required Libraries:
SoftwareSerial library (pre-installed with the Arduino IDE).Arduino Code: Use the following example code to read distance data from the TFmini-S:
#include <SoftwareSerial.h>
// Define software serial pins for TFmini-S
SoftwareSerial tfminiSerial(2, 3); // RX, TX
void setup() {
Serial.begin(9600); // Initialize serial monitor
tfminiSerial.begin(115200); // Initialize TFmini-S serial communication
Serial.println("TFmini-S Distance Sensor Initialized");
}
void loop() {
if (tfminiSerial.available()) {
uint8_t data[9];
if (tfminiSerial.read() == 0x59) { // Check for frame header
if (tfminiSerial.read() == 0x59) { // Check for second frame header
for (int i = 0; i < 7; i++) {
data[i] = tfminiSerial.read(); // Read remaining data bytes
}
uint16_t distance = data[0] + (data[1] << 8); // Calculate distance
uint16_t strength = data[2] + (data[3] << 8); // Signal strength
Serial.print("Distance: ");
Serial.print(distance);
Serial.print(" cm, Strength: ");
Serial.println(strength);
}
}
}
}
No Data Output:
Inaccurate Measurements:
Intermittent Data:
Can the TFmini-S be used outdoors?
How do I switch between UART and I2C modes?
What is the maximum frame rate?
By following this documentation, you can effectively integrate the TFmini-S into your projects and troubleshoot common issues.