Reference
Last revision 2025/12/18
Library
- Library name: DFRobot_RTU
- Applicable environments: Arduino
- Installation instructions: Open Library Manager(Ctrl+Shift+I) in Arduino IDE, find and install DFRobot_RTU library.
- Usage examples: Included in the sample codes for range finding, temperature measurement, address modification, and baud rate modification.
Communication Protocol Description
DFRobot URM15 uses the RS485 interface that follows the standard Modbus-RTU protocol for data communication. The register description is as follows:
| Address | Number | Name | Read/Write | Data Range | Default | Data Description |
|---|---|---|---|---|---|---|
| 0x00 | 1 | Module PID register | R | 0x0000-0xFFFF | 0x0005 | 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 | 0x000F | 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 Save when powered off, take effect after restarting |
| 0x03 | 1 | Serial parameter control register 1 | R/W | 0x0000-0xFFFF | 0x0005 | Module Baud Rate: 0x0001---2400 0x0003---9600 0x0004---14400 0x0005---19200 0x0006---38400 0x0007---57600 0x0008---115200 Other----115200 Save when powered off, take effect after restarting |
| 0x04 | 1 | Serial parameter control register 2 | R/W | 0x0000-0xFFFF | 0x0001 | Reserved (serial data format is fixed at: no parity bit, 1 stop bit, 8 data bits) Save when powered off, take effect after restarting |
| 0x05 | 1 | Distance register | R | 0x0000-0xFFFF | 0xFFFF | The distance value LSB measured by the module represents 0.1cm |
| 0x06 | 1 | Onboard temperature data Register | R | 0x0000-0xFFFF | 0x0000 | The temperature value LSB measured by the onboard temperature sensor represents 0.1℃ (with unit symbol) |
| 0x07 | 1 | External temperature compensation data register | R/W | 0x0000-0xFFFF | 0x0000 | Write ambient temperature data to this register for external temperature compensation, LSB represents 0.1℃ (with unit symbol) |
| 0x08 | 1 | Control register | R/W | 0x0000-0xFFFF | 0x0004 | bit0: 0-use onboard temperature compensation function 1-use external temperature compensation function (users need to write temperature data to external temperature compensation data register) bit1: 1-enable temperature compensation function 0-disable temperature compensation function bit2: 0-auto detection 1-passive detection bit3: In passive detection mode, write 1 to this bit, then it will measure distance once, and the distance value can be read from distance register about 65ms later. In auto detection mode, this bit is reserved. This bit will be auto cleared when set to 1. Save when powered off, take effect after restarting |
Other Supplementary Information
The detection area of an ultrasonic sensor is irregular and hard to define due to its physical characteristics. 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:


Was this article helpful?
