Component guide · Intermediate · 3 min read
Waveshare TOF Laser Range Sensors

Mini, MiniF, MiniS, 20 m, 50 m) and DFRobot Coin-Sized, 50 m and Mini Laser Sensors
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
These compact time-of-flight laser sensors measure up to 7.8 m (Mini and the DFRobot coin-sized sensor), 20 m (MiniF) or 50 m (long range) with millimetre resolution. They talk UART, and many also I2C, RS485 or a simple IO output, so several can share one bus by ID. They are used for robots, drone landing, level measurement and people detection.
Key specs at a glance
- Range
- 0.02 to 7.8 m (Mini), 0.02 to 20 m (MiniF), up to 50 m (long range)
- Accuracy
- About plus or minus 1 to 3 cm
- Interface
- UART (default 921600 on Waveshare), I2C, CAN, RS485 (MiniS) or IO
- Rate
- Up to about 100 Hz
- Supply
- 3.7 to 5.2 V (most)
- Weight
- About 1 to 10 g
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Waveshare TOF Laser Range Sensor Module – UART Communication, 0.02m to 20m Range₹2,199
Option 2Waveshare TOF Laser Range Sensor, Long Range, 50 m₹3,150
Option 3Waveshare TOF MINIF Laser Range Sensor, UART₹2,250
Option 4Waveshare TOF MINIS Laser Range Sensor, RS485₹1,950
Option 5Waveshare TOF Mini Laser Range Sensor, UART/I2C, Up to 7.8m Range₹1,089
Option 6DFRobot Ultra-Compact ToF Laser Ranging Sensor (7.8m, 1g, Coin-Sized) – UART/I2C/IO Interface₹1,889
What the Waveshare and DFRobot TOF laser range sensors is
Waveshare ToF laser range sensors are single-point distance modules measuring up to several metres with UART, I2C or CAN output for robots and level sensing.
Waveshare TOF sensors can be cascaded: give each a different ID with the PC tool and read them in turn on one UART or RS485 bus.
The default UART speed is high (921600 on many Waveshare units). Lower it with the configuration tool for an Uno.
Waveshare and DFRobot TOF laser range sensors pinout
The pins on the Waveshare and DFRobot TOF laser range sensors and what each one does.
| Pin | Function |
|---|---|
| VCC | 5 V |
| GND | Ground |
| TX / RX | UART |
| SDA / SCL or A / B | I2C or RS485 by model |
- VCC
- 5 V
- GND
- Ground
- TX / RX
- UART
- SDA / SCL or A / B
- I2C or RS485 by model
Wiring the Waveshare and DFRobot TOF laser range sensors
Connect the Waveshare and DFRobot TOF laser range sensors like this.
| Waveshare and DFRobot TOF laser range sensors pin | Arduino Uno | ESP32 |
|---|---|---|
| Red (VCC) | 5 V | 5 V (VIN) |
| Black (GND) | GND | GND |
| Sensor TX | D10 (SoftwareSerial RX) | GPIO 16 (RX2) |
| Sensor RX | D11 | GPIO 17 (TX2) |
- Red (VCC)
- Arduino Uno:
- 5 V
- ESP32:
- 5 V (VIN)
- Black (GND)
- Arduino Uno:
- GND
- ESP32:
- GND
- Sensor TX
- Arduino Uno:
- D10 (SoftwareSerial RX)
- ESP32:
- GPIO 16 (RX2)
- Sensor RX
- Arduino Uno:
- D11
- ESP32:
- GPIO 17 (TX2)
Example code
Frame layout differs on DFRobot sensors; use the maker's library or manual.
import serial
s = serial.Serial("/dev/ttyUSB0", 921600, timeout=1)
while True:
if s.read(1) != b"\x57":
continue
rest = s.read(15) # 16-byte frame: 0x57 0x00 ...
frame = b"\x57" + rest
if len(frame) == 16 and (sum(frame[:15]) & 0xFF) == frame[15]:
dist_mm = frame[8] | frame[9] << 8 | frame[10] << 16
print(dist_mm, "mm")Setup and tuning
choose UART, I2C or CAN mode as the module supports.
use Waveshare's example code to parse readings.
set unique IDs for CAN or UART cascading.
check range for your target; dark targets reduce range.
keep the lens clean.
What you need
Shop this list13 of 13 found in our store · ₹21,715
Waveshare TOF Laser Range Sensor Module – UART Communication, 0.02m to 20m Range: the part this guide coversWaveshare TOF Laser Range Sensor Module – UART Communication, 0.02m to 20m Range₹2,199
Waveshare TOF Laser Range Sensor, Long Range, 50 m: another version this guide coversWaveshare TOF Laser Range Sensor, Long Range, 50 m₹3,150
Waveshare TOF MINIF Laser Range Sensor, UART: another version this guide coversWaveshare TOF MINIF Laser Range Sensor, UART₹2,250
Waveshare TOF MINIS Laser Range Sensor, RS485: another version this guide coversWaveshare TOF MINIS Laser Range Sensor, RS485₹1,950
Waveshare TOF Mini Laser Range Sensor, UART/I2C, Up to 7.8m Range: another version this guide coversWaveshare TOF Mini Laser Range Sensor, UART/I2C, Up to 7.8m Range₹1,089
DFRobot Ultra-Compact ToF Laser Ranging Sensor (7.8m, 1g, Coin-Sized) – UART/I2C/IO Interface: another version this guide coversDFRobot Ultra-Compact ToF Laser Ranging Sensor (7.8m, 1g, Coin-Sized) – UART/I2C/IO Interface₹1,889
DFRobot 50m TOF Laser Ranging Sensor (±3cm Accuracy, 100Hz, 100K LUX Resistant): another version this guide coversDFRobot 50m TOF Laser Ranging Sensor (±3cm Accuracy, 100Hz, 100K LUX Resistant)₹3,779
DFRobot Mini Laser I2C Distance Range Sensor Module (2 to 400 cm): another version this guide coversDFRobot Mini Laser I2C Distance Range Sensor Module (2 to 400 cm)₹1,583
Waveshare Laser Distance Measurement Sensor Module – Digital Output: another version this guide coversWaveshare Laser Distance Measurement Sensor Module – Digital Output₹949
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
USB to TTL serial converter: to talk to the module from a PCUSB to TTL Serial Converter (CH340G / CP2102 / FT232RL / PL2303)₹85Closest match, check the specs
USB to RS485 converter adapter: to test RS485 versions from a PCUSB to RS485 Converter Adapter₹74
Benewake TF-Luna micro LiDAR (0.2 to 8 m): a low-cost LiDAR alternativeBenewake TF-LUNA Micro LiDAR Distance Sensor (Range: 0.2m~8m) – UART/I2C Interface₹2,329Closest match, check the specs
Alternatives and when to choose them
- Benewake TF02 and TF03: longer range, rugged.
- VL53L1X: cheaper I2C, 4 m.
- PONO and Hypersen sensors: industrial ToF.
Common mistakes to avoid
- Duplicate IDs.
- Dirty lens.
- Out-of-range targets.
- Wrong interface mode.
Frequently asked questions
How far can the Waveshare ToF sensor measure?
Several metres, depending on the model and how bright the target is.
Can I use several sensors together?
Yes. Give each sensor a unique ID on a shared UART or CAN bus.
Why does it read zero?
The target is out of range or too dark.
Is it eye-safe?
Yes. It uses a Class 1 laser that is eye-safe under normal use.
Can I read it with Arduino?
Yes, over UART or I2C with the example code.
Parts for 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.
