+

DC 7 -30V 8 Channel Modbus RTU Relay Module Switch RS485 TTL Communication 8 Way Relay Input Output for Arduino Power Control

USD 8.15USD 9.59

DC 7 -30V 8 Channel Modbus RTU Relay Module Switch RS485 TTL Communication 8 Way Relay Input Output for Arduino Power Control

Description

DC 7 -30V 8 Channel Modbus RTU Relay Module Switch RS485 TTL Communication 8 Way Relay Input Output for Arduino Power Control

Description:

8-channel Modbus relay module

The 8-channel Modbus relay module is equipped with a mature and stable 8-bit MCU and RS485 level communication chip. Using standard MODBUS RTU format RS485 communication protocol, it can realize 8 input signal detection and 8 relay output, which can be used for digital quantity detection or power control occasions.
 
Product Parameter:
 
1. Onboard mature and stable STM8S103K3T6 MCU and MAX485 level conversion chip
2. Communication protocol: support standard Modbus RTU protocol
3. Communication interface: TTL UART interface supporting RS485/5V level
4. Communication baud rate: 4800/9600/19200, default 9600bps, support power-off save
5. Optocoupler input signal range: DC3.3-30V (this input cannot be used for relay control)
6. Output signal: relay switch signal, support manual, flash word, flash mode, flash off/flash
The base number of the interruption delay is 0.1S, and the maximum flash word/flash time can be set to OxFFFF*0.1S=6553.5S
7. Device address: range 1-255, default 255, support power-off save
8. Baud rate, input signal, relay status, device address can be read by software/command
9.There are 8 5V, 10A/250V AC 10A/30V DC relays onboard, which can be continuously closed for 10 times, with diode effusion protection, and short response time
10. On-board relay switch indicator
11. Reserve the STM8 SWIM program programming port to support customers' secondary development and download their own firmware
12. Power supply voltage: DC7-30V, using 5.08mm terminal power supply
 

Board size

Interface introduction

1: VCC, GND: DC7-30V 5.08mm power input terminal;
2: DC3.3-30V optocoupler signal input:
IN1-IN8: channel 1-8 positive;
GND_IN: The negative pole of the common terminal of channels 1-8.
3: A+, B-: RS485 communication interface, A+, B- are respectively connected to A+, B- of the external control terminal;
4: 5v, SWIM, GND, NRST: STM8 SWIM program download port
5: TXD, RXD, GND: TTL level UART communication interface, TXD, RXD, GND
Connect to RXD, TXD, GND of the external control terminal respectively, and only support 5V level TTL module/MCU. Recommended wiring sequence: Power on the Modbus module → Connect the Modbus module to the TTL module → Power on the TTL module;
6: RST: MCU reset button
7: Relay switch signal output:
NO: Normally open end, the relay is suspended before being closed, and shorted to COM after being closed;
COM: public end;
NC: Normally closed terminal, the relay is short-connected with COM before it is closed, and it is suspended after being closed.
Introduction to Modbus RTU instruction
Modbus devices perform related operations by receiving Modbus RTU instructions from an external control terminal (such as host computer/MCU). A frame of instructions generally consists of device address, function code, register address, register data, and check code. The frame length and Function code is related. Generally, the first byte of each frame of data is the device address, the range of which can be set is 1-255, the default is 255 (that is, OxFF), and the last 2 bytes are the CRC check code.
Assuming the device address is 255, the commonly used Modbus RTU commands are as follows: 1. Turn on relay No. 1 (manual mode)
Send: FF 05 00 00 FF 00 99 E4
Return as it is: FF 05 00 00 FF 00 99 E4
Remarks: (1) The 3-4 bytes of the sending frame represent the relay address. The addresses of relay 1-relay 8 are Ox0000, 0x0001,0x0002, 0x0003, 0x0004,0x0005, 0x0006, 0x0007
(2) The 5-6 bytes of the sending frame represent data, 0xFF0O means opening the relay, and 0x0000 means closing the relay.
2. Turn off the No. 1 relay (manual mode)
Send: FF 05 00 00 00 00 D8 14
Return as it is: FF 05 00 00 00 00 D8 14
3. Turn on the No. 2 relay (manual mode)
Send: FF 05 00 01 FF 00 C8 24
Return as it is: FF 05 00 01 FF O0 C8 24
4. Turn off the No. 2 relay (manual mode)
Send: FF 05 00 01 00 00 89 D4
Return as it is: FF 05 00 01 00 00 89 D4
5. Turn on all relays
Send: FF OF 00 00 00 08 01 FF 30 1D
Return: FF OF 00 00 00 08 41 D3
6. Turn off all relays
Send: FF OF 00 00 00 08 01 00 70 5D
Return: FF OF 00 00 00 08 41 D3
7. Set the device address to 1
Send: 00 10 00 00 00 01 02 00 01 6A 00
Return as it is: 00 10 00 00 00 01 02 00 01 6A 00
Remarks: The 9th byte 0x01 of the sending frame is the written device address
8. Set the device address to 255
Send: 00 10 00 00 00 01 02 00 FF EB 80
Return as it is: 00 10 00 00 00 01 02 00 FF EB 80
Remarks: The 9th byte of the sending frame, 0xFF, is the written device address
9. Read the device address
Send: 00 03 00 00 00 01 85 DB
Return: 00 03 02 00 FF C5 C4
Remarks: The 5th byte of the return frame, 0xFF, is the device address read
10. Read the relay status
Send: FF 01 00 00 00 08 28 12
Returns: FF 01 01 01 A1 AO
Remarks: BitO--Bit7 of the 4th byte of the return frame, 0x01, represent relay 1--relay 8, 0 means off, 1 means on
11. Read optocoupler input status
Send: FF 02 00 00 00 08 6C 12
Returns: FF 02 01 01 51 AO
Remarks: IN1--IN8 of the 4th byte of the return frame 0x01 represents the input signal of optocoupler 1--optocoupler 8, 0 represents low level, and 1 represents high level
12. Set the baud rate to 4800
Send: FF 10 03 E9 00 01 02 00 02 4A 0C
Return: FF 10 03 E9 00 01 C5 A7
Remarks:The 9th byte of the sent frame is the baud rate setting value, Ox02, 0x03, and x04 represent 4800, 9600, 19200 respectively
13. Set the baud rate to 9600
Send: FF 10 03 E9 00 01 02 00 03 8B cc
Return: FF 10 03 E9 00 01 C5 A7
14. Set the baud rate to 19200
Send: FF 10 03 E9 00 01 02 00 04 CA OE
Return: FF 10 03 E9 00 01 C5 A7
15, read the baud rate
Send: FF 03 03 E8 00 01 11 A4
Returns: FF 03 02 00 04 90 53
Remark:The 5th byte of the return frame represents the baud rate read, 0x02, 0x03, and x04 represent 4800, 9600, 19200 respectively 16, open the No. 1 relay (flash close mode 2S)
Send: FF 10 00 03 00 02 04 00 04 00 14 C5 9F
Return: FF 10 00 03 00 02 A4 16
Remarks: (1) The 3-4 bytes of the sending frame represent the relay address, the addresses of relay 1-relay 8 are respectively Ox0003, 0x0008, 0x00OD, 0x0012, 0x0017, 0x001C, 0x0021,0x0026
(2)The 10th-11th byte of the sending frame represents the delay setting value, the delay base is 0.1S, so the delay time is 0x0014*0.1=20*0.1S=2S, and the relay will be turned off automatically after opening 2S
17, Close the No. 1 relay (flash mode 3S)
Send: FF 10 00 03 00 02 04 00 02 00 1E A5 99
Return: FF 10 00 03 00 02 A4 16
Remarks: (1) The 3-4 bytes of the sending frame represent the relay address, the addresses of relay 1-relay 8 are respectively Ox0003, 0x0008, 0x00OD, 0x0012, 0x0017, 0x001C, 0x0021,0x0026
(3) The 10th-11th byte of the sending frame represents the delay setting value, the delay base is 0.1S, so the delay time is 0x001E*0.1=30*0.1S=3S, and the relay is turned off automatically after 3S.
 
Simple instructions
 
The Modbus relay module can receive ModbusRTU commands from the host computer/MCU via the RS485/TTL UART interface to perform related operations. The following is an example of using the host computer software to open relays 1 and 8 (manual mode) through the RS485 interface. Assuming the device address is 255 and the baud rate is 9600,
the steps are as follows:
1. Connect the VCC and GND of 5.08mm terminal to the power supply;
2. A+ and B-respectively USB to A+ and B- of the output of RS485 module;
3.Open the host computer software "ModbusRTU configuration tool", select the correct port number, select 9600 for the baud rate, set the address to 255, and click "open serial port";
4. Then click "JD1 open" and "JD8 open" to open relays 1 and 8, and the relay indicator lights at the same time.
 
As shown below:

How to generate verification code
 
When the Modbus RTU instruction is sent through the ready-made host computer software (such as: Modbus RTU configuration tool), the CRC check code is automatically generated. If you want to use the serial port debugging software (such as SSCOM) to test the Modbus relay module, you need to generate it manually The CRC check code is placed at the end of the sending frame, such as opening the first relay (manual mode):
 
1. The composition of the sending frame for opening/closing the relay (manual mode) is:
Device address (1Byte) + function code (1Byte) + register address (2Byte) + register data (2Byte) + CRC check code (2Byte)
2. Assuming the device address is OxFF, the first 6 bytes of the sending frame are: FF 05 00 00 FF 00
3. Use the CRC check tool to find the check code for these 6 bytes: http://www.ip33.com/crc.html

4.After exchanging the high and low byte positions of the check calculation result E499, the CRC check code 99E4 is obtained, and the complete transmission frame: FF 05 00 00 FF 00 99 E4
5.Send the sending frame to the Modbus relay module through the serial debugging software SSCOM V5.13.1 to open the first relay (manual mode), as follows:

Specification

Model Number : 8 Channel Modbus RTU Relay Module

is_customized : Yes

Protect Feature : Sealed

Voltage : DC 7 -30V

Certification : NONE

Brand Name : Aideepen

Power Source : DC

Contact Load : High Power

Origin : CN(Origin)

Theory : Voltage Relay

Usage : General Purpose

+