USB-RLY16L - Low Power 8 channel relay outputs at 16A
Technical Documentation 

A low power version of the USB-RLY16 module, the USB-RLY16L is powered solely from the USB bus and provides eight volt free contact relay outputs with a current rating of up to 16Amp each.  The relays are SPCO (Single Pole Change Over) types and provide position 0, position 1 and common pins (latching relays and have no "normally open" or "normally closed" contacts) on the screw terminals labeled as 0, C and 1 accordingly. The relays will also retain their state in the absence of power. 

Operating Temperature
-40C to +70C

LED indication
The USB-RLY16L provides a red LED mounted immediately next to each relay to indicate whether it is in a position 1 state (LED on) or position 0 state (LED off).  

Relay power rating
If the relay is used at a voltage or current exceeding
this specification, the life of the contacts may be significantly shortened.

A full datasheet for the relays used on the USB-RLY16L is here: HFE20 datasheet

First Step - Install the Driver
The USB-RLY16L module uses the Microchip PIC18F14K50 to handle all the USB protocols. Before using the USB-RLY16L you will need to download the Devantech inf files and unzip them into a temporary folder. Connect the USB-RLY16L and windows will detect it and ask for the drivers. Point windows to the inf folder and it will install the driver. The USB-RLY16L will now appear as a com port.

Which COM port?
After installing the drivers, and plugging in the USB-RLY16L module to a spare USB port, you will want to know which COM port it has been assigned to. This will vary from system to system depending on how many COM ports you currently have installed. To find out where it is, right click on your "My Computer" desktop icon and select the "Device Manager" tab. Now scroll down and open the "Ports (COM & LPT)" tab. You should see the USB serial port listed - COM2 in the example below. If you want to change the COM port number - just right click on it, select properties, select advanced and select the COM port number from the available list. The COM port may be left at the default baud rate etc, because they are not actually used - there is a direct USB connection into the processor.


The USB-RLY16L operates with an easy to use command set as described in the table below. Most commands are only a single byte and if applicable the USB-RLY16L will automatically send its response. The only exception to this being the "Set relay states" command which requires an additional desired states byte to be sent immediately after the command byte. 



dec hex
90 5A Get software version - returns 2 bytes, the first being the Module ID which is 15, followed by the software version
91 5B

Get relay states - sends a single byte back to the controller, bit high meaning the corresponding relay is in position 1

92 5C Set relay states - the next single byte will set all relays states, All in position 1 = 255 (11111111) All in position 0 = 0
93 5D Get DC input voltage - returns the supply voltage as byte, this is fixed at 50 meaning 5.0V DC
100 64 All relays to position 1
101 65 Relay 1 to position 1
102 66 Relay 2 to position 1
103 67 Relay 3 to position 1
104 68 Relay 4 to position 1
105 69 Relay 5 to position 1
106 6A Relay 6 to position 1
107 6B Relay 7 to position 1
108 6C Relay 8 to position 1
110 6E All relays to position 0
111 6F Relay 1 to position 0
112 70 Relay 2 to position 0
113 71 Relay 3 to position 0
114 72 Relay 4 to position 0
115 73 Relay 5 to position 0
116 74 Relay 6 to position 0
117 75 Relay 7 to position 0
118 76 Relay 8 to position 0


Board dimensions

Test program and example source code
To get the USB-RLY16L up and running in the minimum amount of time we have put together an example program to demonstrate the functionality of the module.  

Visual studio express examples

Visual C# express
The test program is available as a visual c# express built exe file here or as visual c# express project here

Visual studio express is provided free from Microsoft here: