+

DC 7-24V Power Supply Four Channel Relay Module 8Bit MCU MAX3232 RS232/TTL UART Support Modbus RTU 4 Way Input 4 Way Output

CNY 40.44CNY 44.93

DC 7-24V Power Supply Four Channel Relay Module 8Bit MCU MAX3232 RS232/TTL UART Support Modbus RTU 4 Way Input 4 Way Output

Description

 

Product Description

The four-way Modbus relay module is equipped with a mature and stable 8-bit MCU and RS232 level communication chip. Using standard MODBUS RTU format RS232 communication protocol, it can realize 4 input signal detection and 4 relay output, which can be used for digital quantity detection or power control occasions.

Functional Features

1. Onboard mature and stable 8bit MCU and MAX3232 level conversion chip;

2. Communication protocol: support standard Modbus RTU protocol;

3. Communication interface: support RS232/TTL UART interface;

4. Communication baud rate: 4800/9600/19200, the default is 9600bps, and it supports power-off save;

5. Optocoupler input signal range: DC3.3-24V (this input cannot be used for relay control);

6. Output signal: relay switch signal, support manual, flash off, flash off mode, flash off/flash off delay base is 0.1S, the maximum flash off/flash off time can be set to OxFFFF*0.1S=6553.5S;

7. Device address: range 1-255, default 255, support power-off save;

8. The baud rate, input signal, relay status, and device address can be read using software/commands;

9. There are 4 5V, 10A/250V AC 10A30V DC relays onboard, which can be activated continuously for 100,000 times, with diode effusion protection, and short response time;

10. On-board relay switch indicator;

11. Supply voltage: DC7-24V;

12. Board size: 93*87mm Board weight: 92g;

Interface Description  

1. Power input: DC7-24V power input terminal;

2. Indicator light: four way relay indicator light and power indicator light;

3,DC3. 3-24V optocoupler signal input:

IN1: positive pole of channel 1

IN2: Channel 2 positive

IN3: Channel 3 positive

IN4: Channel 4 positive

GND_ IN: common terminal negative pole

4. RS232 communication interface;

5. GND, RXD, TXD: TTL level UART communication port. GND, RXD and TXD are respectively connected to GND, TXD and RXD of external control terminal, and support the connection of 3.3v/5v external t serial port;

6. RS232 and til serial port selection. When RS232 communication is used, t is connected to TXD and RO is connected to RXD; When TTL communication is used, Ti and RO are connected to NC terminal

7. 4-way independent relay switch signal output:

NC: normally closed end, short circuited with com before the relay is pulled in, and suspended after the relay is pulled in;

COM: public end;

No: normally open, the relay is suspended before closing, and is short circuited with com after closing. Introduction to Modbus RTU instruction Modbus equipment performs relevant operations by receiving Modbus RTU instructions from external control terminal (such as upper computer/MCU). A frame instruction is generally composed of equipment address, function code, register address, register data and check code. The frame length is related to the function code. Generally, the first byte of each frame of data is the device address, which can be set in the range of 1-255, the default is 255 (i.e. 0xFF), and the last two bytes are CRC check code. Assuming that the device address is 255, the commonly used Modbus RTU commands are as follows:

1. Turn on relay 1 (manual mode)

Send: FF 05 00 00 00 FF 00 99 E4

Return as is: FF 05 00 00 00 FF 00 99 E4

Remarks: (1) the 3rd-4th byte of the transmission frame represents the relay address, and the addresses of relay 1-relay 8 are 0x0000,0x0001,0x0002,0x0003,0X0004,0x0005,0x0006,0x0007 

(2) The 5th-6th bytes of the transmitted frame represent data, 0xff00 represents open relay and 0x0000 represents close relay

2. Close relay 1 (manual mode)

Send: FF 05 00 00 D8 14

Return as is: FF 05 00 00 D8 14

3. Turn on relay 2 (manual mode)

Send: FF 05 00 01 FF 00 C8 24

Return as is: FF 05 00 01 FF 00 C8 24

4. Turn off relay 2 (manual mode)

Send: FF 05 00 01 00 89 D4

Return as is: FF 05 00 01 00 89 D4

5. Turn on all relays

Send: FF 0F 00 08 01 FF 30 1D

Return: FF 0F 00 08 41 D3

6. Close all relays

Send: FF 0F 00 00 08 01 00 70 5D

Return: FF 0F 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 is: 00 10 00 00 00 01 02 00 01 6A 00

Note: the 9th byte 0x01 of the transmission frame is the written device address.

8. Set the device address to 255

Send: 00 10 00 00 01 02 00 FF EB 80

Return as is: 00 10 00 00 00 01 02 00 FF EB 80

Note: the 9th byte 0xff of the transmission frame is the device address written

9. Read the device address

Send: 00 03 00 01 85 DB

Return: 00 03 02 00 FF C5 C4

Note: the 5th byte 0xFF of the returned frame is the read device address

10. Read relay status

Sent: FF 01 00 08 28 12

Return: FF 01 A1 A0

Note: bit0-bit7 of the fourth byte 0x01 of the returned frame represent relay 1 - relay 8 respectively, 0 is off and 1 is on

11. Read the input state of Optocoupler

Send: FF 02 00 08 6C 12

Return: FF 02 01 51 A0

Note: in1-in8 of the 4th byte 0x01 of the returned frame respectively represent the input signal of optocoupler 1-optocoupler 8, 0 represents the low level and 1 represents the 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

Note: the 9th byte of the transmission frame is the baud rate setting value. 0x02, 0x03 and x04 represent 4800, 9600 and 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

Sent: FF 10 03 E9 00 01 02 00 04 CA 0E

Return: FF 10 03 E9 00 01 C5 A7

15. Read baud rate

Send: FF 03 03 E8 00 01 11 A4

Return: FF 03 02 00 04 90 53

Note: the fifth byte of the returned frame represents the baud rate read, and 0x02, 0x03 and x04 represent 4800, 9600 and 19200 respectively

16. Open No. 1 relay (flashing 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 3rd-4th byte of the transmission frame represents the relay address. The addresses of relay 1-relay 8 are 0x0003,0x0008,0x000D,0x0012,0x0017,0x001C,0x0021 and 0x0026 respectively

(2) The 10th-11th bytes of the transmitted frame represent the delay setting value. The delay base is 0.1S, so the delay time is 0x0014*0.1=20*0.1S=2S, The relay will close automatically after opening 2S

17. Close No. 1 relay (flash off 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 3rd-4th byte of the transmission frame represents the relay address. The addresses of relay 1 and relay 8 are 0x0003, 0x0008, 0x000d, 0x0012, 0x0017, 0x001C, 0x0021 and 0x0026 respectively

(2) The 10th-11th bytes of the transmitted frame represent the delay setting value. The delay base is 01S, so the delay time is 0x001E*0.1=30*0.1S=3S, The relay will open automatically after 3S is closed

Instruction For Use

Modbus relay module can receive Modbus RTU commands from upper computer/MCU via RS232/TTL UART interface to perform relevant operations. Next, take using the upper computer software to open relays 1 and 2 (manual mode) through RS232 interface as an example. Assuming that the device address is 255 and the baud rate is 9600, the use steps are as follows:

1. VCC and GND are connected to 7-24V power supply;

2. Connect the serial port cable to the serial port base;

3. Open the upper computer software "ModbusRTU configuration tool", select the correct port number, select 9600 baud rate, set the address to 255, and click "open serial port";

4. Click "JD1 on" again to open relay 1, and the indicator light of relay 1 is on at the same time. As shown below: How to generate check code

When the Modbus RTU command is sent through the ready-made upper computer software (such as ModbusRTU 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 manually generate the CRC check code and put it at the end of the transmission frame, such as opening the first relay (manual mode):

1. The transmission frame group of on/off relay (manual mode) becomes:

Device address (1Byte) + function code (1Byte) + register address (2Byte) + register data (2Byte) + CRC check code (2Byte)

2. Assuming that the device address is 0xff, the first 6 bytes of the transmitted frame are:

FF 05 00 00 FF 00

3. Use CRC verification tool to calculate the verification 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, get the CRC check code 99E4 and the complete transmission frame: FF 05 00 00 FF 00 99 E4

5. Send the frame through the serial port debugging software SSCOM V5.13.1 send it to Modbus relay module to open the first relay (manual mode), as follows: For more details of Modbus RTU instructions and the method of using the upper computer to control MODBUS relay, please refer to our materials, thank you!

Specification

Brand Name : quason

Supply Voltage : -

Type : Voltage Regulator

Model Number : DC 7-24V Power Supply Four Channel Relay Module

Dissipation Power : -

Operating Temperature : -

Origin : CN(Origin)

Condition : New

+