50m TOF Laser Ranging Sensor

SKU: SEN0648

The dTOF Laser Ranging Sensor is a high-performance device based on direct Time of Flight technology. It has <5cm blind area, up to 50m max range (env reflectivity-dependent), ±3cm typical accuracy, and 100K LUX ambient light resistance (indoor/outdoor use). It supports UART, I2C, I/O interfaces, with compact size (7.5g) and high cost-effectiveness, ideal for consumer electronics, robots, drones, etc.

Overview of Ultra-Compact ToF Laser Ranging Sensor

Downloadable Resources

  • Docs
  • Tech Specs
  • 1. Example Code for Arduino-Serial Active Output

    This article offers comprehensive guidance on using Arduino to implement UART active output mode, featuring a TOF Laser Ranging Sensor and ESP32 setup. It includes hardware and software preparation, a wiring diagram, sample code, and results demonstrating distance and signal information output.

    2. Example Code for Arduino-Serial Query Output

    This project demonstrates how to use the TOF laser ranging sensor in UART query output mode. In this mode, the module does not actively report data; instead, the controller sends a query command containing the module ID to retrieve measurement information. The query frame follows the NLink_TOFSense_Read_Frame0 protocol, and the output frame follows the NLink_TOFSense_Frame0 protocol. Users will learn how to configure the module for UART query output and read data using an Arduino board.

    3. Example Code for Arduino-IIC Output

    This project demonstrates how to use the TOF laser ranging sensor in IIC mode. IIC mode supports both single module and cascade. The controller sends a read frame to the module with a specified slave address to retrieve distance and other information. Users will learn how to configure the module for IIC mode and read data using an Arduino board.

    4. I/O Output Output

    Reference

    Specification

    Parameter Value
    Refresh Rate 100Hz
    Classic Ranging Range 0.05~50m
    Classic Ranging Accuracy ±3cm
    Wavelength 905nm
    Resistance to Ambient Light 100K LUX illuminance
    Field of View (FOV) 1~2°
    Power Supply Voltage 4.3V~5.2V
    Power Consumption 250mW
    Communication Interface UART/IIC/IO
    IIC default slave address 0x80
    Working Temperature -10℃~60℃
    Size 22.7 mm *28.0 mm *13.6mm
    Product Weight 7.5g

    Wire Sequence

    Please check the wire sequence of the product. The previous wire colors and functions did not comply with electrical specifications, so we have updated the wire sequence once. If you have an older version of the wiring, please swap the positions of the red and black wires yourself. This tutorial is based on the new wiring version.


    Wire Color Function
    Red VCC
    Black GND
    Blue RX/SDA
    Green TX/SCL

    Size Parameters

    FAQ

    • Why can't the host computer software recognize the module after switching to IIC or I/O mode? How to switch between different communication modes?

      Currently, the host computer software only supports the recognition of modules in UART mode. In UART mode, you can configure the module to IIC or I/O communication mode by entering the settings page after the host computer successfully recognizes it; In IIC communication mode, you can switch back to UART or I/O mode by sending instructions to the module through IIC communication according to the IIC communication protocol; In addition, without IIC test environment or after switching to I/O mode, you can switch back to UART mode in the following ways:

      1.Users need to prepare a USB to TTL module that supports 921600 baud rate (CP2102 is recommended) and install the corresponding driver program. Connect the TX, RX, and 5V of the USB to TTL module to the corresponding pins of the TOF module, and do not connect the GND pin for the time being, then plug the USB to TTL module into the computer.

      2.Open the host computer software, click to enter the serial port debugging assistant, change the baud rate to the baud rate you set before (if the baud rate has not been modified, it is 921600), select the COM port corresponding to the USB to TTL module and then click to connect to the COM port (in most cases, it will connect automatically). In the single send text box, enter 54 20 00 ff 00 ff ff ff ff 00 ff ff 00 10 0e ff ff ff ff ff ff ff ff ff ff ff 00 ff ff ff ff 7c, in the timed send bar at the bottom right, change the send interval to 20ms, and then check timed send.

      3.At this time, connect the GND of the USB to TTL module to the GND pin of the TOF module, the module will switch to UART mode and start outputting data, at this time uncheck the timed send button, then unplug the USB to TTL module and re-power the module, then click the recognition button on the main page to recognize the module.

      4.If the switch fails, unplug the USB to TTL module and repeat the whole process. Do not plug and unplug the GND pin multiple times when sending commands. If the module can be recognized normally but the serial port output data is abnormal, you can manually switch to UART mode in the settings page.

    • Why can't the host computer software recognize the module after switching to IIC or I/O mode?
      Currently, the host computer software only supports the recognition of modules in UART mode.

    Explore More Related Questions >

    Was this article helpful?

    TOP