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 100K Lux.
The TOF MINIS Range Sensor series is not authorized for use in safety-critical applications where failure could impact personal safety (e.g., life support). In such applications, failure of the TOF MINIS Range Sensor series could cause severe personal injury or death. The Customers who use or sell the TOF MINIS Range Sensor series products in such a manner do so entirely at their risk and agree to fully indemnify Waveshare and its representatives against any damages arising out of the use of TOF MINIS Range Sensor series products in such safety-critical applications.
The TOF MINIS 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 MINIS 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 | TOF MINIS Range Sensor |
|---|---|
| Typical ranging range | 0.02 m - 5 m |
| Field of view (FOV) | 1.48° |
| Refresh rate | 30 Hz (Batch customization supported, maximum up to 90 Hz) |
| Ambient light immunity | 100K Lux |
| Operating temperature | -20°C - +70°C |
| Operating humidity | 35% - 80%RH |
| Laser safety class | LASER CLASS 1 (IEC 60825-1: 2014) |
| Protection rating | IP68 |
| Wavelength | 940 nm |
| Communication Interface | RS485 |
| Baud rate | 115200 |
| Supply voltage | 4 V - 5.6 V |
| Power consumption | 100 mW - 140 mW |
| Average current / Peak current | 25 mA / 26 mA |
| Product weight | Approx. 15.8 g |
| Housing material | PC |
| Storage temperature | -40℃ - +80℃ |
| Product dimensions | Diameter 29.5 mm, Height 18.00 mm, Cable length 60 cm |
| Pin | ID | Description |
|---|---|---|
| 1 | VCC | Power positive |
| 2 | GND | Power ground |
| 3 | B- | RS485 B |
| 4 | A+ | RS485 A |
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

8: TX (Raspberry Pi transmit)10: RX (Raspberry Pi receive)GND: → TTL-to-RS485 module GND (ground must be common)A → Device A+B → Device B-If no data is read, try swapping A/B first (A/B labeling may differ between modules/devices).

sudo raspi-config
Navigate to:
Interface Options → Serial PortNoYes


Then reboot:
sudo reboot
sudo apt update
sudo apt install -y python3-pip
pip3 install pyserial
Copy the entire pi5_minis2_rs485_example/ folder to any directory on the new Raspberry Pi (e.g., Desktop or home directory).
The header UART device name may vary across different Raspberry Pi models or system configurations. List them:
ls -l /dev/ttyAMA* /dev/ttyS* /dev/serial*
Common order (from most common to alternatives):
/dev/ttyAMA0/dev/serial0/dev/ttyAMA* entriesFor example, if the port is /dev/ttyAMA0:
python3 pi5_minis2_rs485_example.py --port /dev/ttyAMA0
Normal output looks like:
Distance: 100 mm, Confidence: 100

--port /dev/ttyAMA0 ↔ --port /dev/serial0 ↔ other ttyAMA*A/B8 -> DI, 10 -> ROThis chapter includes the following sections:
Connect as shown in the figure below.

Navigate to TOF-MINIS-Range-Sensor/example/ESP32/esp32s3-arduino_example and double-click the esp32s3-arduino_example.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-MINIS-Range-Sensor/example/ESP32/esp32s3-python_example and double-click the esp32s3-python_example.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-MINIS-Range-Sensor/example/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-MINIS-Range-Sensor/example/pico/pico-pico_micropython_example and double-click main.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-MINIS-Range-Sensor/example/pico/pico_sdk_example 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-MINIS-Range-Sensor/example/Arduino/uno_r3_arduino_example and double-click the uno_r3_arduino_example.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