1. Introduction
This 64×8 matrix solid-state DTOF lidar features simultaneous distance measurement across all 512 points. Utilizing the Direct Time-of-Flight (DTOF) principle, it effectively rejects interference from ambient light and temperature variations, ensuring stable performance in common indoor and outdoor environments. With an ultra-wide 120° horizontal and 20° vertical field of view, it achieves a maximum range of 5 meters. Its area-array detection provides robots with broad and dense environmental data.
Designed specifically for robot navigation, this sensor effectively tackles two core challenges: forward obstacle avoidance and local blind-spot detection. It can be flexibly mounted on the front of a robot or on robotic arms to accurately identify low-lying obstacles, furniture corners, and narrow passages, enabling timely collision avoidance. Additionally, it offers dual communication interfaces (UART and Type-C) and supports data output in single-point, single-line, or full-matrix modes. Paired with dedicated GUI software, it can display real-time measurement data, depth maps, and grayscale images, presenting a clear and immediate visualization of the surrounding environment.
2. Technical Specifications
Sensor Parameters
| Measurement Range | 100~5000mm@90% Reflector/Indoor, 750lux |
|---|---|
| Detection Field of View | 120°(H)×20°(V)>50cm;160°(H)×20°(V)<50cm |
| Range resolution | 14mm |
| Ranging accuracy | Close range: ±10cm (0.1m~5m, for conventional objects such as khaki cardboard boxes); ±4cm (0.1m~0.5m, with 90% reflective panel / indoor, 750lux). Long range: ±3cm (0.5m~5m, with 90% reflective panel / indoor, 750lux). |
| Ranging Frame Rate | 8fps (64×8 matrix surface measurement);64fps (1×8 single-row measurement) |
| Ranging Mode | Continuous Ranging |
| Number of matrices | 64*8, a total of 512 ranging points |
| Laser Wavelength | 905nm |
Power Supply Parameters
| Supply Voltage | 5V |
|---|---|
| Level Voltage | 3.3V |
| Operating Current | 80mA |
Interface Parameters
| Data Interface | UART/USB |
|---|---|
| Interface form | PH2.0-4P/Type-C |
| Serial port default baud rate | 921600bps |
Physical Dimensions
| Sensor Module Dimensions | 62×26×24mm |
|---|---|
| Mounting hole dimensions | 3.0mm diameter |
| Weight | 19.6g |
3. Function Indicator Diagram

| Number | Name | Function Description |
|---|---|---|
| ① | USB interface | Power supply and data transmission |
| ② | URAT Interface | Power supply and data transmission, wire sequence: 5V, GND, RX, TX |
| ③ | Power Indicator | Red LED light, stays on when powered |
4. Getting Started
Hardware Preparation
- 64×8 Matrix DTOF LiDAR (SKU: SEN0682) × 1
- Rainbow V2(SKU: TEL0190) ×1
- Double-ended Type-C data cable ×1
- Gravity-4P Connection Cable ×1
Software Preparation
This product comes with the host computer software wy3DViewer. After installing and opening it on the PC, you can view real-time measurement data and imaging results.
- Click here to download and install the host computer software.Download link
Wiring Diagram
The sensor has two connection methods. One is to directly connect the sensor's USB-C interface to the USB-C interface of the PC. The other is to connect the sensor's Gravity-UART interface to a TTL-to-USB tool(Rainbow V2) via a PH2.0-4P cable, and then connect the tool to the PC.
-
PC Direct Connection

-
Through Serial Port Tool

PC Operation
- After connecting the sensor to the PC via any of the above methods, open the host computer software wy3DViewer.exe and click Run.
- Enter the point cloud map interface of the device, where the interface will display the sensor's measurement data and imaging results in real time, as shown in the figure below.

Explanation of the Real-time Data Function Area:
| Real-time Data Function Area | Functional Description |
|---|---|
| AVG Clear Button | Clear the accumulated frame count and calculated values. |
| Current | Distance average at key points of the current frame (assuming the center of the current frame is the average of 9 points, excluding the maximum and minimum values, and taking the average of 7 values). |
| Statistics | Cumulative frame average, using the Current value to calculate the average cumulatively. |
| AVG frames | Accumulated frame count. |
| Center | Actual distance of the center point of the current frame. |
| Closest | Actual distance of the nearest point in the current frame. |
For more function descriptions, please refer to the SEN0682_ Upper computer usage tutorial
5. Example Code for Arduino-Get single point data
Hardware Preparation
- 64×8 Matrix DTOF LiDAR (SKU: SEN0682) × 1
- FireBeetle 2 ESP32-E (SKU: DFR0654) ×1
- Gravity-4P Connection Cable ×1
- USB-C Data Cable ×1
Software Preparation
- Download Arduino IDE: Click here to download Arduino IDE
- Download Arduino library: Click here to download DFRobot_64x8DTOF library.
- For Arduino IDE V1.8.19 (or earlier), install the library manually: How to Add a Library?
Wiring Diagram

Pin Connection Description
- Sensor: 5V Pin —- (Connect to) —- Controller: VIN(5V)
- Sensor: GND Pin —- (Connect to) —- Controller: GND
- Sensor: RX Pin —- (Connect to) —- Controller: 26/TX
- Sensor: TX Pin —- (Connect to) —- Controller: 25/RX
Sample Code
Configure 64x8 DTOF sensor to read XYZ coordinates & intensity of specified point and output via serial.
#include "DFRobot_64x8DTOF.h"
#define LINE_NUM 4
#define POINT_NUM 32
// Instantiate the sensor object
// Use Serial1 for communication, change pins 25/26 to your actual RX/TX pins
DFRobot_64x8DTOF dtof64x8(Serial1, SERIAL_8N1, 25, 26);
void setup()
{
Serial.begin(115200);
while (!Serial);
while (!dtof64x8.begin());
Serial.println("DFRobot 64x8DTOF Single Point Demo");
// Retry configuring frame mode until success
Serial.println("Configuring frame mode: Single Frame...");
while (!dtof64x8.configFrameMode(DFRobot_64x8DTOF::eFrameSingle)) {
Serial.println("Error: configFrameMode failed, retrying...");
delay(200);
}
Serial.println("Configuration Single Frame Successful!");
// 2. Configure Single Point Mode (retry until success)
// Example: Line 4, Point 32 (Center of the sensor roughly)
// Line range: 1-8
// Point range: 1-64
Serial.print("Configuring Single Point Mode (Line ");
Serial.print(LINE_NUM);
Serial.print(", Point ");
Serial.print(POINT_NUM);
Serial.println(")...");
while (!dtof64x8.configMeasureMode(LINE_NUM, POINT_NUM)) {
Serial.println("Configuration Failed, retrying...");
delay(200);
}
Serial.println("Configuration Successful!");
delay(300);
}
void loop()
{
int parsed = dtof64x8.getData(300);
if (parsed > 0) {
char numbuf[16];
Serial.print("Point Data -> ");
Serial.print("X: "); sprintf(numbuf, "%04d", dtof64x8.point.xBuf[0]); Serial.print(numbuf); Serial.print(" mm, ");
Serial.print("Y: "); sprintf(numbuf, "%04d", dtof64x8.point.yBuf[0]); Serial.print(numbuf); Serial.print(" mm, ");
Serial.print("Z: "); sprintf(numbuf, "%04d", dtof64x8.point.zBuf[0]); Serial.print(numbuf); Serial.print(" mm, ");
Serial.print("I: "); Serial.println(dtof64x8.point.iBuf[0]);
} else {
Serial.println("getData timeout or error");
}
delay(500);
}
Result
Serial port cyclically outputs X/Y/Z 3D coordinates (mm) and intensity of the specified point.

- I represents the intensity of reflected light received by the sensor, with a typical value range of 0-255.
- A higher value indicates better reflectivity of the target surface, and the ranging result is usually more stable.
- A value of 0 may mean the target is beyond the detection range or has excessively poor reflectivity.
6. Example Code for Arduino-Get single line data
Hardware Preparation
- 64×8 Matrix DTOF LiDAR (SKU: SEN0682) × 1
- FireBeetle 2 ESP32-E (SKU: DFR0654) ×1
- Gravity-4P Connection Cable ×1
- USB-C Data Cable ×1
Software Preparation
- Download Arduino IDE: Click here to download Arduino IDE
- Download Arduino library: Click here to download DFRobot_64x8DTOF library.
- For Arduino IDE V1.8.19 (or earlier), install the library manually: How to Add a Library?
Wiring Diagram

Pin Connection Description
- Sensor: 5V Pin —- (Connect to) —- Controller: VIN(5V)
- Sensor: GND Pin —- (Connect to) —- Controller: GND
- Sensor: RX Pin —- (Connect to) —- Controller: 26/TX
- Sensor: TX Pin —- (Connect to) —- Controller: 25/RX
Sample Code
Configures the 64x8DTOF sensor to single-line mode, acquires Line 4 data (X/Y/Z/I) and outputs via serial with error prompts.
#include "DFRobot_64x8DTOF.h"
DFRobot_64x8DTOF dtof64x8(Serial1, SERIAL_8N1, 25, 26);
#define LINE_NUM 4
void setup()
{
Serial.begin(115200);
while (!Serial);
while (!dtof64x8.begin());
Serial.println("Configuring frame mode: Single Frame...");
while (!dtof64x8.configFrameMode(DFRobot_64x8DTOF::eFrameSingle)) {
Serial.println("configFrameMode failed, retrying...");
delay(200);
}
Serial.println("Configuration Single Frame Successful!");
// Configure single line mode (retry until success)
Serial.print("Configured multi-point mode: line=");
Serial.print(LINE_NUM);
Serial.println(")");
while (!dtof64x8.configMeasureMode(LINE_NUM)) {
Serial.println("Configuration failed, retrying...");
delay(200);
}
Serial.println("Configuration successful.");
delay(300);
}
void loop()
{
Serial.println("12345");
int cnt = dtof64x8.getData(300);
Serial.print("Got points: ");
Serial.println(cnt);
if (cnt > 0) {
for (int i = 0; i < cnt; i++) {
char numbuf[16];
Serial.print(1 + i);
Serial.print(": X="); sprintf(numbuf, "%04d", dtof64x8.point.xBuf[i]); Serial.print(numbuf); Serial.print(" mm ");
Serial.print("Y="); sprintf(numbuf, "%04d", dtof64x8.point.yBuf[i]); Serial.print(numbuf); Serial.print(" mm ");
Serial.print("Z="); sprintf(numbuf, "%04d", dtof64x8.point.zBuf[i]); Serial.print(numbuf); Serial.print(" mm ");
Serial.print("I="); Serial.println(dtof64x8.point.iBuf[i]);
}
}else {
Serial.println("getData timeout or error");
}
delay(500);
}
Result
The serial port continuously outputs data of 64 measured points in Line 4.

7. Example Code for Raspberry Pi-Get data
Hardware Preparation
- 64×8 Matrix DTOF LiDAR (SKU: SEN0682) × 1
- Raspberry Pi 4B (SKU: DFR0619) ×1
- Gravity-4P Connection Cable ×1
- USB-C Data Cable ×1
Software Preparation
- Download Arduino library: Click here to download DFRobot_64x8DTOF library.
- Tool preparation: MobaXterm_Personal_23.4 (for remote connection to Raspberry Pi, optional).
Please check the Raspberry Pi system configuration to ensure successful activation of serial communication.
Wiring Diagram

| Sensor Pin | Raspberry Pi 4B Pin |
|---|---|
| 5V | 5V (Pin 2) |
| GND | GND (Pin 6) |
| TX | RXD (Pin 10, GPIO15) |
| RX | TXD (Pin 8, GPIO14) |
Disconnect the Raspberry Pi power supply before wiring to avoid short circuits and hardware damage; the sensor must be powered by 5V, do not connect it to 3.3V.
Operation Steps
-
Power on the Raspberry Pi and obtain its IP address.Confirm whether the following configurations (SSH, Serial Port) of the Raspberry Pi are enabled.

-
Use the MobaXterm_Personal_23.4 software to remotely connect to the Raspberry Pi.
-
After successful connection, run the following command line to obtain the Python library for this sensor. Press the Enter key after inputting.
git clone https://github.com/DFRobot/DFRobot_64x8DTOF
- After successful execution, run the following command line to get the demo file
demox.py. Press the Enter key after inputting.
cd DFRobot_64x8DTOF/python/raspberrypi/example/
- Then run the following command line. You will then see 4 demo files as shown in the figure below.
ls

- For example, to run the
01. full_output_demo.pydemo, first input the following command line and press the Enter key.
python 01.full_output_demo.py
-
Wait for the command to execute, and you will be able to view the detection results of the sensor as shown in the figure below.

-
For other Python demos, repeat the above steps. No further elaboration is provided here.
8. Serial Communication
- Configure serial port settings: baud rate 921600, data bits 8, stop bits 1, parity NONE.
- Send settings: Check “Escape character auto-parsing”.
- A newline character must be added at the end of the AT command. For example: AT+STREAM_CONTROL=1\n

Example: Query/Set Specific Output Range Data
Query Specified Output Line and Range
| Close Radar Frame Data Output | Send AT+STREAM_CONTROL=0\n | Returns OK |
|---|---|---|
| Query Specified Output Line and Range | Send AT+SPAD_OUTPUT_LINE_DATA? \n | Returns SPAD_OUTPUT_LINE_DATA=1,1,64 |
| Open Radar Frame Data Output | Send AT+STREAM_CONTROL=1\n | Returns OK |
Set Specified Line and Its Start and End Points
| Close Radar Frame Data Output | Send AT+STREAM_CONTROL=0\n | Returns OK |
|---|---|---|
| Set Specified Line and Its Start and End Points | ||
| Output data from points 5-15 of the first line | Send AT+SPAD_OUTPUT_LINE_DATA=1,5,15 \n | Returns OK |
| Output data from point 32 of the first line | Send AT+SPAD_OUTPUT_LINE_DATA=1,32,32 \n | Returns OK |
| Output all eight lines of data | Send AT+SPAD_OUTPUT_LINE_DATA=0,1,64 \n | Returns OK |
| Save Parameters | Send AT+SAVE_CONFIG\n | Returns OK |
| Open Radar Frame Data Output | Send AT+STREAM_CONTROL=1\n | Returns OK |
When Parameter 1 is 0, it will always output the full 64*8 data. In this case, parameters 2 and 3 are ignored.
For more communication commands, please refer to SEN0682_Configuration Command List Document-V1.0.docx
9. API Library
/**
@fn DFRobot_64x8DTOF
@brief Constructor, passing in serial port and configuration
@param serial Hardware serial port reference
@param config Serial port configuration (e.g., SERIAL_8N1)
@param rxPin RX pin number (optional for platforms that support remapping)
@param txPin TX pin number (optional for platforms that support remapping)
*/
DFRobot_64x8DTOF(HardwareSerial &serial, uint32_t config, int8_t rxPin, int8_t txPin);
/**
@fn begin
@brief Initialize the sensor serial port and enable data stream
@param baudRate Serial communication baud rate (must be 921600)
@return bool True if initialization succeeded (serial started and stream enabled), false otherwise
@note ESP8266 and AVR platforms are not supported by this library's current implementation.
*/
bool begin(uint32_t baudRate = 921600);
/**
@fn getData
@brief Trigger one frame and read raw x/y/z values (no filtering)
@param timeoutMs Timeout in milliseconds to wait for a complete frame
@return Number of points parsed, or -1 on error/timeout
*/
int getData(uint32_t timeoutMs = 300);
/**
@fn configMeasureMode
@brief Configure measurement output mode — Full output (all points).
@return bool True if configuration succeeded and stream control restored,
false on communication error or device rejection.
*/
bool configMeasureMode(void);
/**
@fn configMeasureMode
@brief Configure measurement output mode — Single line.
@param lineNum Line index to output (1..8).
@return bool True if configuration succeeded and stream control restored,
false on communication error or invalid arguments.
*/
bool configMeasureMode(uint8_t lineNum);
/**
@fn configMeasureMode
@brief Configure measurement output mode — Single point.
@param lineNum Line index containing the point (1..8).
@param pointNum Point index within the line (0..64).
@return bool True if configuration succeeded and stream control restored,
false on communication error or invalid arguments.
*/
bool configMeasureMode(uint8_t lineNum, uint8_t pointNum);
/**
@fn configMeasureMode
@brief Configure measurement output mode — Multi-point.
@param lineNum Line index (1..8)
@param startPoint Start point index within the line (1..64)
@param endPoint End point index within the line (1..64), must be >= startPoint
@return bool True if configuration succeeded and stream control restored,
false on communication error or invalid arguments.
*/
bool configMeasureMode(uint8_t lineNum, uint8_t startPoint, uint8_t endPoint);
/**
@fn configFrameMode
@brief Configure whether sensor runs in single-frame or continuous frame mode
@param mode Frame mode (eFrameSingle or eFrameContinuous)
@return bool type, indicates the configuration status
@retval true Configuration successful
@retval false Configuration failed
*/
bool configFrameMode(eFrameMode_t mode);
10. Compatibility
| Platform | Work Well | Work Wrong | Untested | Remarks |
|---|---|---|---|---|
| Arduino UNO | √ | |||
| Arduino MEGA2560 | √ | |||
| Arduino Leonardo | √ | |||
| FireBeetle M0 | √ | |||
| FireBeetl 2 ESP32-E | √ | |||
| ESP8266 | √ |
11. Material Download
- SEN0682_3D file.stp
- SEN0682_2D file.dxf
- SEN0682_Dimension Drawing.pdf
- SEN0682_Data_format.doc
- SEN0682_Configuration Command List.docx
- SEN0682_USB Serial Driver.zip
- SEN0682_Host Computer Usage Tutorial.pdf
- SEN0682_Host Computer Software.zip
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.
