Difference between revisions of "USB Relay PRO"

From Diustou Wiki
Line 41: Line 41:
 
*
 
*
  
 
== Product Description ==
 
*
 
*1.Microcontroller chip
 
*3.DC power jack: used for external power supply.
 
**The output current of the USB interface is limited, so it is recommended to use external power supply when using multiple relays to ensure stable operation of the circuit.
 
*4.Control interface: used for 5V power supply and command control of relays
 
*5.Power indicator light
 
*6.Relay switch indicator light
 
*7.Relay one output terminal (NC1/COM1/NO1):
 
**COM1: Common terminal;
 
**NC1: Normally closed terminal, short-circuited to COM1 before the relay is energized and open after energization;
 
**NO1: Normally open terminal, open before the relay is energized and short-circuited to COM1 after energization.
 
*8.Relay two output terminal (NC2/COM2/NO2):
 
**COM2: Common terminal;
 
**NC2: Normally closed terminal, short-circuited to COM2 before the relay is energized and open after energization;
 
**NO2: Normally open terminal, open before the relay is energized and short-circuited to COM2 after energization.
 
*9.Relay three output terminal (NC3/COM3/NO3):
 
**COM3: Common terminal;
 
**NC3: Normally closed terminal, short-circuited to COM3 before the relay is energized and open after energization;
 
**NO3: Normally open terminal, open before the relay is energized and short-circuited to COM3 after energization.
 
*10.Relay four output terminal (NC4/COM4/NO4):
 
**COM4: Common terminal;
 
**NC4: Normally closed terminal, short-circuited to COM4 before the relay is energized and open after energization;
 
**NO4: Normally open terminal, open before the relay is energized and short-circuited to COM4 after energization.
 
*11.Relay five output terminal (NC5/COM5/NO5):
 
**COM5: Common terminal;
 
**NC5: Normally closed terminal, short-circuited to COM5 before the relay is energized and open after energization;
 
**NO5: Normally open terminal, open before the relay is energized and short-circuited to COM5 after energization.
 
*12.Relay six output terminal (NC6/COM6/NO6):
 
**COM6: Common terminal;
 
**NC6: Normally closed terminal, short-circuited to COM6 before the relay is energized and open after energization;
 
**NO6: Normally open terminal, open before the relay is energized and short-circuited to COM6 after energization.
 
*13.Relay seven output terminal (NC7/COM7/NO7):
 
**COM7: Common terminal;
 
**NC7: Normally closed terminal, short-circuited to COM7 before the relay is energized and open after energization;
 
**NO7: Normally open terminal, open before the relay is energized and short-circuited to COM7 after energization.
 
*14.Relay eight output terminal (NC8/COM8/NO8):
 
**COM8: Common terminal;
 
**NC8: Normally closed terminal, short-circuited to COM8 before the relay is energized and open after energization;
 
**NO8: Normally open terminal, open before the relay is energized and short-circuited to COM8 after energization.
 
  
 
== User Manual ==
 
== User Manual ==

Revision as of 15:26, 21 February 2025

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)
  • Note: For USB Relay modules labeled from "USB Relay (TC, 1, Opto)" to "USB Relay (TC, 8, Opto)", the default serial communication baud rate is set to 115200 bps.

Command Instructions

USB Relay (TC, 1, 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 (TC, 2, 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 (TC, 3, 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 (TC, 4, 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 (TC, 8, 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)