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. ›Waveshare TOF Laser Range Sensors

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

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the Waveshare and DFRobot TOF laser range sensors isWaveshare and DFRobot TOF laser range sensors pinoutWiring the Waveshare and DFRobot TOF laser range sensorsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

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
01

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.

02

Waveshare and DFRobot TOF laser range sensors pinout

The pins on the Waveshare and DFRobot TOF laser range sensors and what each one does.

PinFunction
VCC5 V
GNDGround
TX / RXUART
SDA / SCL or A / BI2C or RS485 by model
PinFunction
VCC
5 V
GND
Ground
TX / RX
UART
SDA / SCL or A / B
I2C or RS485 by model
03

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 pinArduino UnoESP32
Red (VCC)5 V5 V (VIN)
Black (GND)GNDGND
Sensor TXD10 (SoftwareSerial RX)GPIO 16 (RX2)
Sensor RXD11GPIO 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)
04

Example code

Frame layout differs on DFRobot sensors; use the maker's library or manual.

Read a Waveshare TOF sensor from a PC (active output mode) · MicroPython
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")
05

Setup and tuning

Interface

choose UART, I2C or CAN mode as the module supports.

Library

use Waveshare's example code to parse readings.

Multiple sensors

set unique IDs for CAN or UART cascading.

Range

check range for your target; dark targets reduce range.

Cover

keep the lens clean.

06

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
07

Alternatives and when to choose them

  • ✓Benewake TF02 and TF03: longer range, rugged.
  • ✓VL53L1X: cheaper I2C, 4 m.
  • ✓PONO and Hypersen sensors: industrial ToF.
08

Common mistakes to avoid

  • !Duplicate IDs.
  • !Dirty lens.
  • !Out-of-range targets.
  • !Wrong interface mode.
09

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

  • Waveshare TOF Laser Range Sensor Module – UART Communication, 0.02m to 20m Range
    ₹2,199View
  • Waveshare TOF Laser Range Sensor, Long Range, 50 m
    ₹3,150View
  • Waveshare TOF MINIF Laser Range Sensor, UART
    ₹2,250View
  • Waveshare TOF MINIS Laser Range Sensor, RS485
    ₹1,950View
  • Waveshare TOF Mini Laser Range Sensor, UART/I2C, Up to 7.8m Range
    ₹1,089View
  • DFRobot Ultra-Compact ToF Laser Ranging Sensor (7.8m, 1g, Coin-Sized) – UART/I2C/IO Interface
    ₹1,889View
  • DFRobot 50m TOF Laser Ranging Sensor (±3cm Accuracy, 100Hz, 100K LUX Resistant)
    ₹3,779View
  • DFRobot Mini Laser I2C Distance Range Sensor Module (2 to 400 cm)
    ₹1,583View
  • Waveshare Laser Distance Measurement Sensor Module – Digital Output
    ₹949View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • USB to TTL Serial Converter (CH340G / CP2102 / FT232RL / PL2303)
    ₹85View
  • USB to RS485 Converter Adapter
    ₹74View
  • Benewake TF-LUNA Micro LiDAR Distance Sensor (Range: 0.2m~8m) – UART/I2C Interface
    ₹2,329View
Shop Infrared, ToF & LiDAR Distance Sensors

Keep learning

Component guideIntermediateBenewake Single-Point LiDARBenewake single-point LiDARs measure one distance many times a second with an infrared laser.6 min read · SensorsComponent guideIntermediateVL53L1X ToF sensorThe VL53L1X is a laser time-of-flight distance sensor that measures up to about 4 m with millimetre resolution over I2C (address 0x29).3 min read · SensorsComparisonIntermediateLiDAR 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 · 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 Fundamentals

Sources

  • Waveshare TOF Laser Range Sensor wiki

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 Waveshare and DFRobot TOF laser range sensors isWaveshare and DFRobot TOF laser range sensors pinoutWiring the Waveshare and DFRobot TOF laser range sensorsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon 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 guide8 items · ₹16,888

Waveshare TOF Laser Range Sensor Module – UART Communication, 0.02m to 20m Range · Waveshare TOF Laser Range Sensor, Long Range, 50 m · Waveshare TOF MINIF Laser Range Sensor, UART · Waveshare TOF Mini Laser Range Sensor, UART/I2C, Up to 7.8m Range · DFRobot Ultra-Compact ToF Laser Ranging Sensor (7.8m, 1g, Coin-Sized) – UART/I2C/IO Interface · DFRobot 50m TOF Laser Ranging Sensor (±3cm Accuracy, 100Hz, 100K LUX Resistant) · DFRobot Mini Laser I2C Distance Range Sensor Module (2 to 400 cm) · Waveshare Laser Distance Measurement Sensor Module – Digital Output

Run itChange the inputs and watch the output

16-byte frames start with 0x57; the distance sits in bytes 8 to 10 and the last byte is a checksum.

Shell
859 mm

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