• sales

    +86-0755-88291180

Modbus RTU DC Monitor User Guide

Product Parameters

ParameterDescription
Communication InterfaceRS485
Communication Baud Rate4800, 9600, 19200, 38400, 57600, 115200, 128000, 256000
Default Communication Format9600, N, 8, 1
Modbus ProtocolStandard Modbus RTU protocol
Supply VoltageDC 7~36 V
Sampling Resistor0.002 Ω 1%
Voltage Measurement Range0 ~ 36 V
Current Measurement Range± 8 A
Resolution0.8 mA

Indicator Light Description

IndicatorStatus Description
Status LEDStatus indicator, flashes when the MCU is operating normally
TXD LEDTransmit indicator, lights up when transmitting data
RXD LEDReceive indicator, lights up when receiving data

Hardware Interface Description

The module can measure current and voltage on four channels, each of which can operate independently. The four channels correspond to (IN1+ IN1-), (IN2+ IN2-), (IN3+ IN3-), and (IN4+ IN4-), respectively.


INx+ and INx- represent the current input and output, respectively. The module measures the differential voltage across the sampling resistor connected in series between INx+ and INx- to determine the current flowing through. The module can measure bidirectional current; reversing all inputs and outputs is also acceptable.

Special note: When measuring different power supplies, a common GND connection is required; otherwise, the bus voltage cannot be measured, and only the differential voltage and current can be measured.

Hardware Connection Description

Connect the USB TO 485 converter to the target board using jumper wires, connecting A-->A and B-->B as shown in the figure below:


Software Test

SSCOM Serial Debug Assistant

Basic Query Commands

  • Download the SSCOM Serial Debug Assistant and open it on your computer. Open the corresponding port number, set the baud rate to 9600, select SendHex and Receive, and choose ModbusCRC16 check for the checksum.

    Send the following command; under normal conditions, it will return the 8-channel pulse input data.

    01 04 00 00 00 0C F0 0F

Other Commands

  • If you need to send other commands, select SendHEX, choose ModbusCRC16 check for the checksum, enter the first six bytes of the command, and click SEND, it will automatically add the CRC check code. For example, send the following command to read Channel 2 voltage:
    01 04 00 03 00 01 C1 CA

For more detailed control commands, please refer to the Development Protocol.

Modbus Poll Software

  • The serial software is not convenient for data observation. You can use the Modbus Poll Software to read data. Download and install the Modbus Poll software.

  • Open the software, select Setup -> Read/Write Definition. Set Slave ID to the actual device address, select Function 04, change Quantity to 12 channels. Click OK to confirm.


  • Select Connection -> Connect..., choose the corresponding serial port, set baud rate to 9600, 8 data bits, no parity, 1 stop bit. Click OK to connect.


  • Once connected successfully, the 4-channel monitoring data will be displayed.


Secondary Development Protocol

Function Code Introduction

Function CodeDescription
03Read Holding Registers
04Read Input Registers
06Write Single Holding Register

Register Address Description

Address (HEX)Address Storage ContentRegister ValueAccessModbus Function Code
3x0000Channel 1 VoltageUnsigned, unit: mVRead0x04
3x0001Channel 1 CurrentSigned, unit: mARead0x04
3x0002Channel 1 PowerUnsigned, unit: 10 mWRead0x04
3x0003Channel 2 VoltageUnsigned, unit: mVRead0x04
3x0005Channel 2 CurrentSigned, unit: mARead0x04
3x0006Channel 2 PowerUnsigned, unit: 10 mWRead0x04
3x0007Channel 3 VoltageUnsigned, unit: mVRead0x04
3x0008Channel 3 CurrentSigned, unit: mARead0x04
3x0009Channel 3 PowerUnsigned, unit: 10 mWRead0x04
3x000AChannel 4 VoltageUnsigned, unit: mVRead0x04
3x000BChannel 4 CurrentSigned, unit: mARead0x04
3x000CChannel 4 PowerUnsigned, unit: 10 mWRead0x04
4x2000Serial Port ParametersHigh byte: Parity (0x00~0x02)
Low byte: Baud Rate (0x00~0x07)
Read/Write0x03, 0x06
4x4000Device AddressStores Modbus address directly
Device address: 0x0001-0x00FF
Read/Write0x03,0x06
4x8000Software VersionConvert to decimal, then shift decimal point two places left for version
0x0064 = 100 = V1.00
Read0x03

Operation Command Description

Read Input Register Command

Transmission Code: 01 04 00 00 00 0C F0 0F

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0404 CommandRead Input Registers
00 00Register Start Address0x0000 - 0x0007 correspond to input channels 1~8
00 0CNumber of RegistersNumber of registers to read, up to 8 channels
F0 0FCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 04 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 8B

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0404 CommandRead Input Registers
18Byte CountData length
00 00
……
00 00
Register DataRepresents voltage, current, power values for the 4 channels
82 8BCRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Read Channel 1 Voltage: 01 04 00 00 00 01 31 CA
Read Channel 1 Current: 01 04 00 01 00 01 60 0A
Read Channel 2 Voltage, Current and Power data: 01 04 00 03 00 03 40 0B

Set Baud Rate Command

Transmission Code: 00 06 20 00 00 05 43 D8

FieldDescriptionNotes
00Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandSet baud rate, set device address
20 00Command Register0x2000 for setting baud rate, 0x4000 for setting device address
00Parity Mode0x00 for no parity, 0x01 for odd parity, 0x02 for even parity
05Baud Rate ValueBaud rate value mapping:
0x00: 4800
0x01: 9600
0x02: 19200
0x03: 38400
0x04: 57600
0x05: 115200
0x06: 128000
0x07: 256000
43 D8CRC16CRC16 checksum of the first 6 bytes of data

Return Code: 00 06 20 00 00 05 43 D8

FieldDescriptionNotes
00Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandSet baud rate, set device address
20 00Command Register0x2000 for setting baud rate, 0x4000 for setting device address
00Parity Mode0x00 for no parity, 0x01 for odd parity, 0x02 for even parity
05Baud RateBaud rate value mapping:
0x00: 4800
0x01: 9600
0x02: 19200
0x03: 38400
0x04: 57600
0x05: 115200
0x06: 128000
0x07: 256000
43 D8CRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set baud rate 4800 : 00 06 20 00 00 00 83 DB
Set baud rate 9600 : 00 06 20 00 00 01 42 1B
Set baud rate 115200 : 00 06 20 00 00 05 43 D8

Set Device Address Command

Transmission Code: 00 06 40 00 00 01 5C 1B

FieldDescriptionNotes
00Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandSet baud rate, set device address
40 00Command Register0x2000 for setting baud rate, 0x4000 for setting device address
00 01Device AddressDevice address set, 0x0001-0x00FF
5C 1BCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 00 06 40 00 00 01 5C 1B

FieldDescriptionNotes
00Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0606 CommandSet baud rate, set device address
40 00Command Register0x2000 for setting baud rate, 0x4000 for setting device address
00 01Device AddressDevice address set, 0x0001-0x00FF
5C 1BCRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Set device address to 0x01 : 00 06 40 00 00 01 5C 1B
Set device address to 0x02 : 00 06 40 00 00 02 1C 1A
Set device address to 0x03 : 00 06 40 00 00 03 DD DA

Read Device Address Command

Transmission code: 00 03 40 00 00 01 90 1B

FieldDescriptionNotes
00Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead device address command
40 00Command Register0x4000 for reading device address, 0x8000 for reading software version
00 01Byte CountFixed 0x0001
90 1BCRC16CRC16 checksum of the first 6 bytes of data

Return code: 01 03 02 00 01 79 84

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead software version, read device address command
02Byte CountReturned byte count
00 01Device AddressDevice address set, 0x0001-0x00FF
79 84CRC16CRC16 checksum of the first 6 bytes of data

For example:

Transmission Code: 00 03 40 00 00 01 90 1B
Return Code: 01 03 02 00 01 79 84 // Address 0x01

Transmission Code: 00 03 40 00 00 01 90 1B
Return Code : 02 03 02 00 02 7D 85 //Address 0x02

Transmission Code: 00 03 40 00 00 01 90 1B
Return Code: 03 03 02 00 03 81 85 // Address 0x03

Read Software Version Command

Transmission Code: 00 03 80 00 00 01 AC 1B

FieldDescriptionNotes
00Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead software version, read device address command
80 00Command Register0x4000 for reading device address, 0x8000 for reading software version
00 01Byte CountFixed 0x0001
AC 1BCRC16CRC16 checksum of the first 6 bytes of data

Return Code: 01 03 02 00 64 B9 AF

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
0303 CommandRead software version, read device address command
02Byte CountReturned byte count
00 64Software VersionConvert to decimal, then shift decimal point two places left for version
0x0064 = 100 = V1.00
B9 AFCRC16CRC16 checksum of the first 6 bytes of data

Example: Device with address 1

Transmission Code: 00 03 80 00 00 01 AC 1B
Return Code: 01 03 02 00 64 B9 AF //0x0064 = 100 =V1.00

Exception Function Codes

If the received command is incorrect or an exception occurs, the device will return an exception response. The exception response format is as follows:

Return Code: 01 85 03 02 91

FieldDescriptionNotes
01Device Address0x00 indicates broadcast address; 0x01-0xFF indicate device address
85Exception Function CodeException function code = Request function code + 0x80
03Byte CountException code
02 91CRC16CRC16 checksum of the first 6 bytes of data

The exception code is a single-byte value indicating the type of error. Several common exception codes defined by the Modbus protocol:

Exception CodeNameDescription
0x01Illegal FunctionThe requested function code is not supported
0x02Illegal Data AddressThe requested data address is incorrect
0x03Illegal Data ValueThe requested data value or operation cannot be performed
0x04Server FailureServer device failure
0x05AcknowledgeRequest received and processing
0x06Device BusyDevice is busy and cannot execute the requested operation

Resources

1. Technical Manuals

2. Software Development Resources

Support

Monday-Friday (9:30-6:30) Saturday (9:30-5:30)

Email: services01@spotpear.com


TAG: Raspberry Pi Zero 2W Dual Ethernet Expansion Board USB Hub Expansion RJ45 NV3030B Raspberry Pi Screen AI Board 3.5inch RPi LCD (A) Manual Configuration Raspberry Pi ESP32 C3 ST7735 DeepSeek XiaoZhi AI Voice Chat Robot BOX ESP32-S3 Development Board 3.5 inch LCD N16R8 Touchscreen Display 6-Axis /Camera /SD Raspberry Pi USB Camera 2MP OV2735 Distortion-Free USB 2.0 For Jeston RDK ESP32 C3 LCD X1200 Raspberry Pi 5 UPS Board Uninterruptible Power Supply For 18650-Li-Battery (NOT includ) Raspberry Pi Transparent LCD Raspberry Pi Raspberry Pi 5 Official Original PCIe to M.2 NVMe SSD Raspberry Pi M.2 HAT+ Board For Pi5 CAN FD Analyzer D-Robotics RDK X3 MD Carrier Board For RDK X3 Module Horizon Sunrise Pi ARM Cortex-A53 5Tops Rockchip X1300 X1300-A2 Raspberry Pi 5 HDMI to CSI-2 Shield 1080P@60fps & Audio & Video Also Pi5 Raspberry Pi PCM5122 I2S DAC HIFI Sound Card DAC Audio expansion Board Free-Driver For PI5/PI4/Zero