Reference
Last revision 2025/12/20
This article provides comprehensive information on RS485 communication interface and Modbus-RTU protocol for sensors, including library installation in Arduino IDE, detailed register descriptions, and the principles behind ultrasonic sensor detection in various environments.
Communication Protocol Description
The sensor adopts RS485 communication interface and supports standard Modbus-RTU protocol. Below is the register description:
| Register Address | Number | Name | Read/Write | Data Range | Default Value | Data Description |
|---|---|---|---|---|---|---|
| 0x00 | 1 | Module PID Register | R | 0x0000-0xFFFF | 0x0001 | Product check (Detect module type) |
| 0x01 | 1 | Module VID Register | R | 0x0000-0xFFFF | 0x0010 | Version check (0x0010 represents V0.0.1.0) |
| 0x02 | 1 | Module Address Register | R/W | 0x0001-0x00F7 | 0x000B | When the sensor address is unknown, write to the register through the broadcast address 0x00, at this time, the sensor will not have data output |
| 0x03 | 1 | Serial parameter control register 1 | R/W | 0x0000-0xFFFF | 0x0005 | Module Baudrate: 0x0001---2400 0x0003---9600 0x0004---14400 0x0005---19200 0x0006---38400 0x0007---57600 0x0008---115200 Other----115200 |
| 0x04 | 1 | Serial parameter control register 2 | R/W | 0x0000-0xFFFF | 0x0001 | Module check bit H: Stop bit L: 0x00---None 0x00---0.5byte 0x01---Even 0x01---1byte 0x02---Odd 0x02---1.5byte other---none 0x03---2byte Other---1byte |
| 0x05 | 1 | Distance register | R | 0x0000-0xFFFF | 0x0000 | The distance value LSB measured by the module represents 1cm |
| 0x06 | 1 | Onboard temperature data register | R | 0x0000-0xFFFF | 0x0000 | The temperature value measured by the onboard temperature sensor represents 0.1℃ (with unit symbol) |
| 0x07 | 1 | External temperature compensation data register | R/W | 0x0000-0xFFFF | 0x0000 | LSB write ambient temperature data to this register for external temperature compensation represents 0.1℃ (with unit symbol) |
| 0x08 | 1 | Control register | R/W | 0x0000-0xFFFF | 0x0004 | bit 1-0 00-use onboard temperature compensation function 01-use external temperature compensation function(Users need to write temperature data to external temperature compensation data register) 1x-Not use temperature compensation function bit 2: 0-auto detection 1-passive detection bit 3: In passive detection mode, write 1 to this bit, then it will measure distance once. The distance value can be read from distance register 300ms later. This bit is disabled in passive detection mode. |
Principle
Normally, the detection area of an ultrasonic sensor is irregular and hard to define due to its physical characteristics. In actual use, we found that the detection area and sensitivity of this sensor may be larger than other ultrasonic sensors. Therefore, when the sensor is used in a narrow space, a non-target object may be detected.
We used two kinds of reference target obstacles to repeatedly test many sample products. The reference detection area of the corresponding target is as follows:
- Detection area for 7.5cm PVC pipe

- Detection area for 100x30cm plane plate

Was this article helpful?
