1. Introduction
This manual provides essential information for the proper use and operation of the Waveshare TOF (Time of Flight) Mini Laser Range Sensor. This sensor is designed for accurate distance measurement, supporting both UART and I2C communication interfaces. It features a compact design, long-range capability, and high light interference tolerance, making it suitable for various indoor and outdoor applications.
2. Package Contents

Figure 2.1: TOF Mini Laser Range Sensor with GH1.25 4PIN wire and GH1.25 4PIN squid wire.
The package typically includes the following items:
- 1x TOF Laser Range Sensor Mini
- 1x GH1.25 4PIN wire
- 1x GH1.25 4PIN squid wire
3. Product Features

Figure 3.1: Overview of the TOF Mini Laser Range Sensor's key features.
The Waveshare TOF Mini Laser Range Sensor offers the following key features:
- Time of Flight (TOF) Technology: Utilizes laser pulses to measure distance with high precision.
- Embedded MCU and Ranging Algorithm: Integrated microcontroller for efficient processing and accurate distance calculation.
- Measuring Range: Up to 7.8 meters.
- Accuracy: Up to ±4 cm.
- Communication Interfaces: Supports UART and I2C communication buses.
- Ultra Narrow FOV: Provides longer measuring distance and higher light interference tolerance.
- Ambient Light Tolerance: Operates effectively in conditions up to 100K LUX, suitable for both indoor and outdoor use.
- Compact Size: Miniaturized design for easy integration into various projects.
4. Specifications

Figure 4.1: Detailed technical specifications of the sensor.
| Parameter | Value |
|---|---|
| Typical Measuring Range | 0.02m ~ 7.8m |
| Typical Measuring Accuracy | ±4cm (0.02m ~ 7.8m) |
| Wavelength | 940nm |
| Field of View (FOV) | 2° ~ 3° |
| Communication Interface | Default: UART (3.3V TTL signal level) I2C (cascading support, slave address is 0x08+module ID) Complementary I/O level output (distance parameter not available in this mode) |
| Baudrate | UART: 4.8Kbps ~ 3000Kbps (921.6Kbps by default) I2C: up to 400Kbps |
| Power Supply | 4.3 ~ 5.2V |
| Power Consumption | 100mW (UART active output, 5.0V power supply, 20mA current) |
| Weight | 1g |
| Operating Temperature | -10°C ~ 60°C |
| Dimensions (L x W x H) | 18.8mm × 12mm × 10.3mm |
5. Setup and Hardware Connection
5.1 Connecting to a Microcontroller (e.g., Raspberry Pi)

Figure 5.1: Connection diagrams for Raspberry Pi using I2C, UART, and I/O modes.
The sensor can be connected to various microcontrollers using either UART or I2C communication. Ensure correct pin connections to avoid damage.
UART Connection:
- VCC: Connect to 5V power supply.
- GND: Connect to ground.
- TXD: Connect to the microcontroller's RX pin.
- RXD: Connect to the microcontroller's TX pin.
I2C Connection:
- VCC: Connect to 5V power supply.
- GND: Connect to ground.
- SCL: Connect to the microcontroller's SCL pin.
- SDA: Connect to the microcontroller's SDA pin.
I/O Connection:
- VCC: Connect to 5V power supply.
- GND: Connect to ground.
- I/O_L: Connect to a digital input pin for low-level output.
- I/O_H: Connect to a digital input pin for high-level output.
Note: The Raspberry Pi board is not included with the sensor and is shown for reference only.
5.2 Outline Dimensions

Figure 5.2: Outline dimensions of the TOF Mini Laser Range Sensor (Unit: mm).
The sensor features two M1.6 mounting holes for secure installation. Refer to Figure 5.2 for detailed dimensions to aid in integration into your projects.
6. Operating Instructions
6.1 Communication Modes

Figure 6.1: Communication interface options.
The TOF Mini Laser Range Sensor supports three primary communication modes:
- UART Mode: This is the default communication mode. It supports active query output, meaning the sensor can continuously send distance data. The default baud rate is 921.6Kbps, but it can be configured from 4.8Kbps up to 3000Kbps.
- I2C Mode: This mode supports cascading up to 8 sensors. The slave address is 0x08 + module ID. The I2C communication speed can go up to 400Kbps.
- I/O Mode: In this mode, the sensor provides complementary I/O level output. The direct distance parameter is not available in this mode; instead, it provides a digital signal based on proximity.
6.2 Baud Rate Configuration (UART)
For UART communication, the default baud rate is 921.6Kbps. If your microcontroller cannot support this speed, you will need to configure the sensor to a lower baud rate. This typically involves sending specific commands to the sensor via UART or I2C to change its settings. Refer to the Waveshare product documentation or example code for detailed instructions on changing the baud rate.
7. Applications

Figure 7.1: Common applications of the TOF Mini Laser Range Sensor.
The Waveshare TOF Mini Laser Range Sensor is versatile and can be used in a wide range of applications, including but not limited to:
- Common Distance Measuring: General purpose distance sensing for various projects.
- Robot Obstacle Avoidance: Enabling robots to detect and navigate around obstacles.
- Robot Route Planning: Assisting robots in mapping and planning their movement paths.
- Height Testing: Measuring heights or levels in industrial or hobbyist settings.
- Drone Altitude Setting: Providing accurate altitude data for drone control.
- Ceiling Detection: Detecting ceilings or overhead objects.
- Hydraulic Stacking Detection: Monitoring fill levels in silos or containers.
8. Troubleshooting
If you encounter issues with your TOF Mini Laser Range Sensor, consider the following common troubleshooting steps:
- No Data Output (UART):
- Verify the baud rate setting. The default is 921.6Kbps. If your microcontroller cannot handle this, adjust the sensor's baud rate or use a microcontroller that supports it.
- Check wiring: Ensure TXD is connected to RX and RXD to TX between the sensor and microcontroller.
- Confirm power supply: Ensure the sensor receives 4.3V-5.2V.
- Incorrect Distance Readings:
- Ensure the sensor's optical path is clear and unobstructed.
- Avoid highly reflective or transparent surfaces directly in front of the sensor if possible, as they can affect accuracy.
- Check for strong ambient light sources directly interfering with the sensor, although it has high tolerance.
- I2C Communication Failure:
- Verify the I2C address. The default is 0x08 + module ID.
- Check SCL and SDA wiring.
- Ensure pull-up resistors are correctly configured for the I2C bus if necessary.
- Sensor Not Powering On:
- Double-check VCC and GND connections. Incorrect polarity can damage the sensor.
- Ensure the power supply provides sufficient current (20mA for UART active output).
9. Warranty and Support
Waveshare products are designed for reliability and performance. For specific warranty information, please refer to the Waveshare official website or contact your point of purchase. Technical support and additional resources, including example code and detailed datasheets, are typically available on the Waveshare product page for the TOF Mini Laser Range Sensor.