USB Relay PRO

From Diustou Wiki
USB Relay PRO
USB Relay PRO 示意图1.png

USB Relay PRO (TC, 1, CB, Opto)


USB Relay PRO 示意图2.png USB Relay PRO (TC, 2, CB, Opto)


USB Relay PRO 示意图3.png USB Relay PRO (TC, 3, CB, Opto)


USB Relay PRO 示意图4.png USB Relay PRO (TC, 4, CB, Opto)


USB Relay PRO 示意图5.png USB Relay PRO (TC, 8, CB, Opto)

Information

Categories: USB CH340

Brand: Diustou

Description
Features
  • USB Relay

Interfaces

USB

Related products

Product Overview

  • The USB relay module integrates a high-performance USB-to-serial converter chip and a robust microcontroller. This design enables users to easily control the on/off state of the relays by sending serial commands from a computer via serial port debugging software. The module is ideal for applications requiring reliable and convenient relay control, such as automation systems, laboratory equipment testing, and DIY projects.

Product Specifications


User Manual

Communication Protocol for Switch Control

  • Data 1 — Start Flag (Default: 0xA0)
  • Data 2 — Switch Address Code (0x01 represents the first switch channel)
  • Data 3 — Operation Data (0x00 indicates OFF, 0x01 indicates ON)
  • Data 4 — Checksum (Calculated as Data1 + Data2 + Data3)

Command Instructions

​ USB Relay PRO (TC, 1, CB, Opto)

  • Switch Control Command Instructions (sent in HEX format):
    • Open the first USB switch: A0 01 01 A2;
    • Close the first USB switch: A0 01 00 A1;
    • Open all USB switches: A0 0F 01 B0;
    • Close all USB switches: A0 0F 00 AF;
  • Query Switch Status (sent in HEX format):
    • Status of the first channel: A0 01 02 A3;
    • Query all relay statuses: A0 0F 02 B1;

​ USB Relay PRO (TC, 2, CB, Opto)

  • Switch Control Command Instructions (sent in HEX format):
    • Open the first USB switch: A0 01 01 A2;
    • Close the first USB switch: A0 01 00 A1;
    • Open the second USB switch: A0 02 01 A3;
    • Close the second USB switch: A0 02 00 A2;
    • Open all USB switches: A0 0F 01 B0;
    • Close all USB switches: A0 0F 00 AF;
  • Query Switch Status (sent in HEX format):
    • Status of the first channel: A0 01 02 A3;
    • Status of the second channel: A0 02 02 A4;
    • Query all relay statuses: A0 0F 02 B1;

​ USB Relay PRO (TC, 3, CB, Opto)

  • Switch Control Command Instructions (sent in HEX format):
    • Open the first USB switch: A0 01 01 A2;
    • Close the first USB switch: A0 01 00 A1;
    • Open the second USB switch: A0 02 01 A3;
    • Close the second USB switch: A0 02 00 A2;
    • Open the third USB switch: A0 03 01 A4;
    • Close the third USB switch: A0 03 00 A3;
    • Open all USB switches: A0 0F 01 B0;
    • Close all USB switches: A0 0F 00 AF;
  • Query Switch Status (sent in HEX format):
    • Status of the first channel: A0 01 02 A3;
    • Status of the second channel: A0 02 02 A4;
    • Status of the third channel: A0 03 02 A5;
    • Query all relay statuses: A0 0F 02 B1;

​ USB Relay PRO (TC, 4, CB, Opto)

  • Switch Control Command Instructions (sent in HEX format):
    • Open the first USB switch: A0 01 01 A2;
    • Close the first USB switch: A0 01 00 A1;
    • Open the second USB switch: A0 02 01 A3;
    • Close the second USB switch: A0 02 00 A2;
    • Open the third USB switch: A0 03 01 A4;
    • Close the third USB switch: A0 03 00 A3;
    • Open the fourth USB switch: A0 04 01 A5;
    • Close the fourth USB switch: A0 04 00 A4;
    • Open all USB switches: A0 0F 01 B0;
    • Close all USB switches: A0 0F 00 AF;
  • Query Switch Status (sent in HEX format):
    • Status of the first channel: A0 01 02 A3;
    • Status of the second channel: A0 02 02 A4;
    • Status of the third channel: A0 03 02 A5;
    • Status of the fourth channel: A0 04 02 A6;
    • Query all relay statuses: A0 0F 02 B1;

​ USB Relay PRO (TC, 8, CB, Opto)

  • Switch Control Command Instructions (sent in HEX format):
    • Open the first USB switch: A0 01 01 A2;
    • Close the first USB switch: A0 01 00 A1;
    • Open the second USB switch: A0 02 01 A3;
    • Close the second USB switch: A0 02 00 A2;
    • Open the third USB switch: A0 03 01 A4;
    • Close the third USB switch: A0 03 00 A3;
    • Open the fourth USB switch: A0 04 01 A5;
    • Close the fourth USB switch: A0 04 00 A4;
    • Open the fifth USB switch: A0 05 01 A6;
    • Close the fifth USB switch: A0 05 00 A5;
    • Open the sixth USB switch: A0 06 01 A7;
    • Close the sixth USB switch: A0 06 00 A6;
    • Open the seventh USB switch: A0 07 01 A8;
    • Close the seventh USB switch: A0 07 00 A7;
    • Open the eighth USB switch: A0 08 01 A9;
    • Close the eighth USB switch: A0 08 00 A8;
    • Open all USB switches: A0 0F 01 B0;
    • Close all USB switches: A0 0F 00 AF;
  • Query Switch Status (sent in HEX format):
    • Status of the first channel: A0 01 02 A3;
    • Status of the second channel: A0 02 02 A4;
    • Status of the third channel: A0 03 02 A5;
    • Status of the fourth channel: A0 04 02 A6;
    • Query all relay statuses: A0 0F 02 B1;

Usage Instructions

Relay Control

  • Connect the USB relay module to your computer and install the driver for the CH340 USB-to-serial chip.
  • Open serial port debugging software such as STC-ISP or SSCOM32, select a baud rate of 9600, and send commands in hexadecimal (hex) format to control the relays. For example, sending `A0 01 01 A2` will turn on the relay, while sending `A0 01 00 A1` will turn it off. You can choose between manual and automatic sending methods. The following examples are based on the SSCOM32 serial port debugging software:
  • Manual Sending
    • Set Parameters: Choose a baud rate of 115200 and check the "Hex Send" option.
    • Send Commands:
      • Enter the command `A0 01 01 A2` to turn on the relay.
      • Enter the command `A0 01 00 A1` to turn off the relay.
    • Execute: After entering the command, click "Send" to manually open or close the relay.

USB串口控制继电器 手动发送.png


  • Automatic Sending
    • Set Parameters: Again, choose a baud rate of 115200, click on "Extend" in the SSCOM32 interface, input the commands `A0 01 01 A2` and `A0 01 00 A1`, and check the "Hex Send" option.
    • Configure Automatic Loop**: Input the interval time for automatic loop sending and check the "Automatic Loop Send" option to automatically cycle through opening and closing the relay.

USB串口控制继电器 自动发送.png

Querying Relay Status

  • For a three-channel relay module, assuming channels 1 and 2 are open while others are closed, querying the status of each channel will return the following responses:
Query Channel 1
 Send (Hex): A0 01 02 A3
 Receive (ASCII): CH1:ON
 Receive (Hex): 43 48 31 3A 4F 4E 0D 0A
Query Channel 2
 Send (Hex): A0 02 02 A4
 Receive (ASCII): CH2:ON
 Receive (Hex): 43 48 32 3A 4F 4E 0D 0A
Query Channel 3
 Send (Hex): A0 03 02 A5
 Receive (ASCII): CH3:OFF
 Receive (Hex): 43 48 33 3A 4F 46 46 0D 0A
Query All Relays
 Send (Hex): A0 0F 02 B1
 Receive (ASCII):
  CH1:ON
  CH2:ON
  CH3:OFF
 Receive (Hex): 43 48 31 3A 4F 4E 0D 0A 43 48 32 3A 4F 4E 0D 0A 43 48 33 3A 4F 46 46 0D 0A

USB串口控制继电器 使用步骤.pngUSB串口控制继电器 使用步骤5.png

Software

FAQ

Icon-mail.png Contact Diustou

Our working hours are: 09:00-18:00 (UTC+8 Monday to Saturday)