Google Chat:---
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
WhatsApp:13424403025
This laser ranging module is based on a D-TOF single-point laser sensor, with a built-in MCU and housed in a compact enclosure. It supports sunlight rejection and dirt compensation algorithms to measure target distance. With optical collimation design, it can measure distances to various targets under ambient light up to 20K Lux.
The TOF MINI Range Sensor series is not authorized for use in critical applications where failure could impact personal safety (e.g., life support). In such applications, failure of the TOF MINI Range Sensor series could cause severe personal injury or death. Customers who use or sell the TOF MINI Range Sensor series in such safety-critical applications do so at their own risk and agree to fully indemnify Waveshare and its representatives against any damages arising from such use.
The TOF MINI Range Sensor series provided by Waveshare has obtained EU laser product certification. Before using or selling these products, verify whether these certifications apply in your region. Products incorporating the TOF MINI Range Sensor series must obtain approval from the relevant authorities in accordance with local laser product regulations before being sold in that region.
TOF is an absolute distance detection technology. The sensor emits modulated near-infrared light, which reflects off objects. The sensor calculates the time difference or phase difference between emission and reflection, converts it into target distance, and generates depth information. TOF is commonly used in people proximity detection, robot obstacle avoidance, camera autofocus, and similar scenarios.
| Parameter | Specification |
|---|---|
| Model | TOF MINI Range Sensor |
| Typical ranging range | 0.02 m - 4 m |
| Accuracy | ± (1% - 3%) |
| Field of view | 25° - 30° |
| Refresh rate | 30 Hz (Batch customization supported, maximum up to 90 Hz) |
| Ambient light immunity | 20K Lux |
| Operating temperature | -20℃ - +70℃ |
| Operating humidity | 35% - 80%RH |
| Laser safety class | LASER CLASS 1 (IEC 60825-1: 2014) |
| Wavelength | 940 nm |
| Communication interface | UART |
| Baud rate | 115200 |
| Data Bits | 8 |
| Stop Bits | 1 |
| Parity | NONE |
| Supply voltage | 4 V - 5.6 V |
| Power consumption | 100 mW - 140 mW |
| Average current / Peak current | 25 mA / 26 mA |
| Product weight | 3 g |
| Housing material | PC |
| Storage temperature | -40℃ - +80℃ |
| Product dimensions | 17.37 × 13.00 × 6.88 (mm) |
| Pin | Label | Description |
|---|---|---|
| 1 | VCC | 5 V power positive |
| 2 | RXD | UART input |
| 3 | TXD | UART output |
| 4 | GND | Power ground |
Use the test software Serial Debug Assistant together with the USB TO TTL (B) for quick viewing of serial output.
Test Preparation
Hardware Connection
Connect as shown in the figure below.

Start Testing
①Send query command
②Obtain real-time data

This chapter includes the following sections:
# Download the Example
wget https://files.waveshare.com/wiki/TOF-MINIF-Range-Sensor/TOF_MINIF_Range_Sensor_Demo.zip
unzip TOF_MINIF_Range_Sensor_Demo.zip
cd TOF_MINIF_Range_Sensor_Demo/
sudo raspi-config nonint do_serial 2.

Connect as shown in the figure below.

cd ~/TOF_MINIF_Range_Sensor_Demo/Raspberry/c/
make
./main
Below is the output of the C program:

cd ~/TOF_MINIF_Range_Sensor_Demo/Raspberry/python/example
python main.py
Below is the output of the Python program:

This chapter includes the following sections:
Connect as shown in the figure below.

Navigate to TOF_MINIF_Range_Sensor_Demo/TOF_MINIF_Range_Sensor_Demo/ESP32S3/Arduino/TOF_UART_Demo and double-click the TOF_UART_Demo.ino file.
Select the development board:

Select the ESP32-S3 port, then compile and upload.
After upload is complete, open the Serial Monitor to view the output.
Navigate to TOF_MINIF_Range_Sensor_Demo/TOF_MINIF_Range_Sensor_Demo/ESP32S3/python and double-click the TOF_UART_Demo.py file.
Set the chip model to ESP32 and select the corresponding port:

Select the ESP32-S3 port, then run the example.
The shell will display the relevant output.

This chapter includes the following sections:
Connect as shown in the figure below.

Navigate to TOF_MINIF_Range_Sensor_Demo/TOF_MINIF_Range_Sensor_Demo/pico/Arduino/TOF_UART_Demo and double-click TOF_UART_Demo.ino to open the project.
Select the chip model and port.

After upload is complete, open the Serial Monitor to view the output.
First flash the MicroPython firmware to the Raspberry Pi Pico.
Navigate to TOF_MINIF_Range_Sensor_Demo/TOF_MINIF_Range_Sensor_Demo/pico/python and double-click TOF_UART_Demo.py to open the project in Thonny.
Select the development board.
Select the Raspberry Pi Pico port, then run the example.
The shell will display the relevant output.

Navigate to TOF_MINIF_Range_Sensor_Demo/Pico/c and open this folder in VS Code.
Import this project in the Pico tools.

After import succeeds, click "Compile" to build. After compilation, put the Pico into BOOT mode and copy the UF2 firmware to the RP2040 disk.
Open a serial debug tool to view the output.

This chapter includes the following sections:
| Image | Description |
|---|---|
| Arduino UNO R3 |
| Arduino UNO R4 |
| Arduino UNO R4 WIFI |
Connect as shown in the figure below.
| Image | Description |
|---|---|
![]() | Arduino UNO R3 |
![]() | Arduino UNO R4 |
Navigate to TOF_MINIF_Range_Sensor_Demo/TOF_MINIF_Range_Sensor_Demo/Arduino/TOF_UART_Demo and double-click the TOF_UART_Demo.ino file.
Select the development board:
| Image | Description |
|---|---|
| Arduino UNO R3 |
| Arduino UNO R4 |
Select the board port, then compile and upload.
After upload is complete, open the Serial Monitor to view the output.

Real-time distance data is output by default. To use other examples, set the corresponding example value to 1.



Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com