Comparison · Intermediate · 3 min read
LiDAR Distance Sensors
TF-Luna, TFmini, LD06 and Scanning LiDAR for Robots
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
LiDAR sensors measure distance by timing a pulse of light. Single-point modules such as the Benewake TFmini and TF-Luna give a distance reading over UART or I2C and suit drones, level and obstacle sensing. 2D scanning LiDAR (RPLIDAR, YDLIDAR) spins to map a room for robots, and 3D LiDAR builds point clouds.
Key specs at a glance
- Single-point
- 0.1 to 12 m (TFmini-S, TF-Luna), up to hundreds of metres on drone types
- 2D scanner
- 360 degrees, a few metres to tens of metres, USB or UART
- 3D LiDAR
- Multi-line or solid-state units for mapping and vehicles
- Interface
- UART, I2C, USB or Ethernet
- Supply
- 5 V for most small modules
- Weak points
- Dark or glossy surfaces, glass and very bright sunlight
Which type of LiDAR
Pick by what you need to map.
| Type | Output | Good for | Notes |
|---|---|---|---|
| Single-point (TFmini, TF-Luna, TF-Nova) | One distance value | Altitude hold, level, obstacle stop | Narrow beam, simple UART |
| Short-range ToF (VL53L0X, VL53L1X) | One distance value | Close range robots | See the VL53L0X guide |
| 2D scanner (RPLIDAR, YDLIDAR) | 360° distance list | SLAM and mapping with ROS | Needs USB or UART and a computer |
| 3D LiDAR | Point cloud | Autonomous vehicles, mapping | Expensive; Ethernet output |
- Single-point (TFmini, TF-Luna, TF-Nova)
- Output:
- One distance value
- Good for:
- Altitude hold, level, obstacle stop
- Notes:
- Narrow beam, simple UART
- Short-range ToF (VL53L0X, VL53L1X)
- Output:
- One distance value
- Good for:
- Close range robots
- Notes:
- See the VL53L0X guide
- 2D scanner (RPLIDAR, YDLIDAR)
- Output:
- 360° distance list
- Good for:
- SLAM and mapping with ROS
- Notes:
- Needs USB or UART and a computer
- 3D LiDAR
- Output:
- Point cloud
- Good for:
- Autonomous vehicles, mapping
- Notes:
- Expensive; Ethernet output
Reading a TFmini or TF-Luna over UART
These sensors stream 9-byte frames at 115200 baud. The frame starts with two 0x59 bytes, then distance in centimetres (low byte first), signal strength and a checksum.
// Sensor TX -> GPIO16 (RX2), sensor RX -> GPIO17, 5 V and GND
void setup() {
Serial.begin(115200);
Serial2.begin(115200, SERIAL_8N1, 16, 17);
}
void loop() {
static uint8_t f[9];
if (Serial2.available() >= 9) {
if (Serial2.read() == 0x59 && Serial2.peek() == 0x59) {
f[0] = 0x59; f[1] = Serial2.read();
for (int i = 2; 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 cm = f[2] + (f[3] << 8);
int strength = f[4] + (f[5] << 8);
Serial.print(cm); Serial.print(" cm strength "); Serial.println(strength);
}
}
}
}Limits to know
black, glossy and mirror-like surfaces and glass can return weak or wrong readings. Check the signal strength value.
strong sun can reduce range; outdoor-rated models help.
a narrow beam can miss thin objects such as wires.
small LiDAR modules are normally Class 1, but check the label and never look into the aperture of a higher-class unit.
rolling scanners need a stable 5 V supply.
Choosing for a project
For a drone or rover altitude and stop distance, a TF-Luna or TFmini-S is a straightforward fit. For indoor mapping with ROS, a 2D scanner is the usual starting point. If you need only a few centimetres to a few metres, ultrasonic sensors are much cheaper and a ToF chip may be enough.
Try it: Ultrasonic distance calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Reading raw values without checking the signal strength.
- Expecting reliable readings on black or glass surfaces.
- Powering a scanner from a weak USB port.
- Using the wrong baud rate or frame format.
- Mounting a single-point sensor where the beam is blocked by a prop or frame.
Frequently asked questions
What is the difference between LiDAR and ultrasonic?
LiDAR uses light and has a narrow beam, long range and fast updates. Ultrasonic uses sound, is cheaper but has a wide beam.
Can LiDAR measure through glass?
Usually not reliably. Glass can reflect or pass the beam and give false readings.
Do I need ROS for a 2D scanner?
Not required, but ROS has ready drivers and SLAM tools, which is why scanners are popular there.
Is LiDAR eye safe?
Small hobby modules are designed to be eye safe (Class 1). Check the product label.
What range do I need?
Pick a sensor with about double the longest distance you expect, since dark surfaces cut real range.
Parts for this guide
Calculators
Terms in this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.




