Brand: SainSmart

4-channel 5V USB Relay Module

SKU: 101-70-118 Variants ID: 32856609980495
$14.99 $19.99
Save $5.00

🛒 Black Friday 20% OFF Eligible
Code: BFD20
  • 4 SPDT relays SRD-5VDC-SL-C
  • Relay specification: 10A 250VAC/10A 125VAC/10A 30VDC /10A 28VDC
  • Power Supply - 5 VDC
  • Current consumption - 200 mA
  • FT245RL. Datasheet  (
  • Led for each relay output
  • Power Led
  • USb led
  • Size - 101*40*16mm
  • PCB parameters: FR4 / 1.5mm / two layers / metalized holes / HAL / white stamp / solder mask
  • Extra PCB openings for better voltage isolation
  • Doubled high current tracks

Supply Characteristics:

Type     SRD-5VDC-SL-C
Recommend voltage   VDC 5
Voltage limits Including ripple VDC 4...7
Nominal input current Voltage 5VDC mA 300
Power dissipated When all relays are ON W 3.6
Protection Against reverse polarity   None

 Relay output:

Type     12V-T73-USB
Relay type     T73
Relay outputs count     4
Contact type     NO, NC
Current consumption 5VDC mA 30
Switching parameters
125 VAC / 28 VDC
250 VAC



  • When the board is connected to the PC and the PC is restarted, the relays will be toggled several times. This is because of the structure of the FTDI chip.
  • The device must be supplied with 5 VDC or order to work.
  • There is no protection against reversed voltage! If the VCC(+5V) and GND are reversed the board will be damaged!
  • The board can not work without computer


Customer Reviews
4.3 Based on 14 Reviews
5 ★
4 ★
3 ★
2 ★
1 ★
Write a Review Ask a Question

Thank you for submitting a review!

Your input is very much appreciated. Share it with your friends so they can enjoy it too!

Filter Reviews:

once enabled through ftd2xx.setBitMode, VCP works until reset

# pip install {pywin32, ftd2xx, pyserial} import ftd2xx import serial import time relays = relays.setBitMode(255, 1) relays.close() ser = serial.Serial("COM17", 9600, timeout=1000) for x in range(0x10): ser.write(bytes({x})) time.sleep(.5) ser.close()


Works well in VCP

As others have noted, the instructions for the command set are wrong. You can find the correct information by searching on the web, so this review is just here for those that are concerned the relay won't work in virtual com port mode. For VCP mode, only send one byte (= one ASCII character), not followed by any other characters. The lowest four bits in that byte are interpreted as the desired configuration of the four relays: 0 = all relays off, 1 = relay 1 on, the other three off, 2 = relay 2 on, the other three off, 3 = relays one and two on, the other two off, etc. Once the relays have been set accordingly, the board acknowledges by sending one byte back with the status of the four relays that were present BEFORE the changed configuration was implemented.

David G. Pelowitz

Works well; Documentation Wrong; I have free MFC C++ software project.

Works well with their software. Documentation is simply WRONG! I've written an MFC C++ application that talks to this device, sets the bitbang mode by linking to the ftdxx.dll functions and individually turns on and off the relays. If you would like me to send you the Microsoft Visual Studio 2012 project drop me an email.

Amazon C.

Four Stars

Works as expected. Wish the software had more programming options.


SainSmart USB 4 Channel Relay Board is pretty smart

This review is based on the experiences that I had buying/using this product. I am also going to respond to some of the other reviewers that had some "constructive" criticism had of the product.1. First - the price and form factor are perfect. If I had to duplicate this product using other means (i.e. DAQ Board/Relay Board) -- I am going to spend $100+ for the same functionality. This product simplifies everything and its priced at less than $20.2. Second -- the command set is simple. I know it is "interesting" when the product is not well documented (or even provided the wrong information). I was unable to get the VCP mode to work but the Bit Bang mode worked perfectly. The advantage of the Bit Bang DLL is that you can get additional information (part number, serial number). I spent roughly 4 to 6 hours working on my software subroutines which is basically a one time (up front) "cost" of figuring out a new board.3. Finally - there were some reviewers complaining that the board does not include the capability of handle inductive kick (i.e. diodes) in the case where you are hooked up to a motor or something. In my case, I am driving some simple lights so I don't want to have the mfg include parts that I do not require or need.In summary - this is a nice product. I have bought six and used two. This product is now part of my permanent toolkit for projects.

Lincoln L.

Simple linux example in C

Just got a C example for this working on linux. Here are the steps I cobbled together from other reviews:run the following command on the command line to install the required libraries and tools:sudo apt-get install libftdi-dev cmake gccmake a file called CMakeLists.txt with the following contentsadd_executable(relayer relayer.c)target_link_libraries (relayer ftdi)make a file called relayer.c in the same directory with the following contents:#include #include #define RELAYS 0x0Fint main(){ unsigned char c = 0; struct ftdi_context ftdic; /* Initialize context for subsequent function calls */ ftdi_init(&ftdic); /* Open FTDI device based on FT232R vendor & product IDs */ if(ftdi_usb_open(&ftdic, 0x0403, 0x6001) < 0) { puts("Can't open device"); return 1; } /* Enable bitbang mode with a single output line */ ftdi_set_bitmode(&ftdic, RELAYS, BITMODE_BITBANG); /* Endless loop: count from 0 to 15 */ for(;;) { c= c + 1 & RELAYS; ftdi_write_data(&ftdic, &c, 1); sleep(1); }}run the following commands on the terminal to compile and run the example: cmake . && make && ./relayerI hope this helps.

steven c.

Five Stars



Mostly good, hard to get going

The product itself is good. If you insert a jumper to power the relay coils from the USB, you will get chatter each time you first connect the board to your USB port. The problem is that the relay power needs to be connected AFTER the USB chip has had time to come up.The comments here are mostly right on as far as how to operate the device. Use bitbang mode and the D2XX driver. I didn't have any luck with the VCP (virtual comm port). I too spent quite a bit of time figuring out how to get the board to work. I published my code in Java and VB.NET as an aid to anybody who might want to use either of those to programmatically cycle the relays. You can find the writeup and downloadables on my website. Since Amazon doesn't allow URLs other than to their own domain, google node2self and look for engineering diversity.


Poor documentation and some driver annoyances, but works ok, C# sample code in review

Documentation isn't the best, but it does work. C# Code provided below. I implemented the GUI with 4 toggle buttons.using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using FTD2XX_NET;namespace USBRelayApp{ public partial class MainForm : Form { // Create new instance of the FTDI device class FTDI myFtdiDevice; public MainForm() { InitializeComponent(); } private void Crash(string errorMessage) { MessageBox.Show(this, errorMessage, "Crash", MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); } protected override void OnLoad(EventArgs e) { base.OnLoad(e); myFtdiDevice = new FTDI(); UInt32 ftdiDeviceCount = 0; FTDI.FT_STATUS ftStatus = FTDI.FT_STATUS.FT_OK; // Determine the number of FTDI devices connected to the machine ftStatus = myFtdiDevice.GetNumberOfDevices(ref ftdiDeviceCount); // Check status if (ftStatus != FTDI.FT_STATUS.FT_OK) { Crash("Failed to get number of devices (error " + ftStatus.ToString() + ")"); return; } if (ftdiDeviceCount == 0) { Crash("No USB Relay detected!"); return; } if (ftdiDeviceCount != 1) { Crash("Only 1 USB Relay may be connected at a time to this program!"); return; } // Open first device in our list by serial number ftStatus = myFtdiDevice.OpenByIndex(0); if (ftStatus != FTDI.FT_STATUS.FT_OK) { // Wait for a key press Crash("Failed to open device (error " + ftStatus.ToString() + ")"); return; } // Set up device data parameters // Set Baud rate to 9600 ftStatus = myFtdiDevice.SetBaudRate(9600); if (ftStatus != FTDI.FT_STATUS.FT_OK) { // Wait for a key press Crash("Failed to set Baud rate (error " + ftStatus.ToString() + ")"); return; } // Set data characteristics - Data bits, Stop bits, Parity ftStatus = myFtdiDevice.SetDataCharacteristics(FTDI.FT_DATA_BITS.FT_BITS_8, FTDI.FT_STOP_BITS.FT_STOP_BITS_1, FTDI.FT_PARITY.FT_PARITY_NONE); if (ftStatus != FTDI.FT_STATUS.FT_OK) { // Wait for a key press Crash("Failed to set data characteristics (error " + ftStatus.ToString() + ")"); return; } byte pinStates = 0; ftStatus = myFtdiDevice.GetPinStates(ref pinStates); io1.Checked = (pinStates & 1) == 1; io2.Checked = (pinStates & 2) == 2; io3.Checked = (pinStates & 4) == 4; io4.Checked = (pinStates & 8) == 8; ftStatus = myFtdiDevice.SetBitMode(0xFF, FTDI.FT_BIT_MODES.FT_BIT_MODE_SYNC_BITBANG); if (ftStatus != FTDI.FT_STATUS.FT_OK) { // Wait for a key press Crash("Failed to set data characteristics (error " + ftStatus.ToString() + ")"); return; } } protected override void OnFormClosed(FormClosedEventArgs e) { base.OnFormClosed(e); if (myFtdiDevice != null) { // Close our device myFtdiDevice.Close(); myFtdiDevice = null; } } private void io_CheckedChanged(object sender, EventArgs e) { if (myFtdiDevice != null) { uint numWritten = 0; byte controlByte = 0xF0; if (io1.Checked) controlByte |= 1; if (io2.Checked) controlByte |= 2; if (io3.Checked) controlByte |= 4; if (io4.Checked) controlByte |= 8; myFtdiDevice.Write(new byte[] { controlByte }, 1, ref numWritten); } } }}


Great little device!! And Python-able! (see below)

I'm generally not big on writing online reviews, but I felt like I needed to share my experience (and maybe offer some small help to get folks started?). For myself, I was looking for a way to automate control of a fan and a hard drive via program or script (and hopefully in Python!). After some mild growing pains, this device proved extremely useful and super convenient!The device has an FTDI controller as a brain - these chips have been around for years and generally are auto-detected by Windows...mine came up as a "USB Serial Port", and for my purposes, that was all I needed. There *are* special FTD2XX drivers available online for Windows (and documentation available as well - just search "ftd2xx"), but I personally haven't had any need to install them.For Python, I used a publicly available module called "ftd2xx 1.0" (Google [ ftd2xx python ]).Unzip the package, find [ ], open a command prompt there, and run [ python install ].Now, there are many wonderful and glorious ways to control/ping the FTDI, all of which can be read in the FTD2XX documentation discussed above - but I *only* cared about turning the relays on and on off. So here's just a simplified example Python script that I used to get started (Amazon doesn't allow text formatting, apparently - please remove the [indent]s below and replace with actual indents ^_^):================================================import ftd2xx as ftimport timeON = TrueOFF = FalseRELAY_0 = 0x01 # Farthest from the USB connectorRELAY_1 = 0x02RELAY_2 = 0x04RELAY_3 = 0x08 # Closest to the USB Connectordevice = # Opens the device, if it's connecteddevice.setBitMode(0xFF, 0x01) # IMPORTANT TO HAVE: This sets up the FTDI device as "Bit Bang" mode.def setRelay(relay, state):[indent] relayStates = device.getBitMode() # Get the current state of the relays[indent] if state == ON:[indent] device.write( chr(relayStates | relay) ) # Turn on relay(s) (without messing with the others)[indent] # The .write() method requires a CHARACTER, so we[indent] # type-cast our selected state INT to a chr()[indent] elif state == OFF:[indent] device.write( chr(relayStates & ~relay) ) # Turn off relay(s) (again without killing the others)setRelay( RELAY_0, ON ) # Turn Relay 0 ONtime.sleep(.5) # Wait 0.5 secondssetRelay( RELAY_1 | RELAY_3, ON ) # Turn Relays 1 and 3 ONtime.sleep(.5) # Wait 0.5 secondssetRelay( RELAY_1, OFF ) # Turn Relay 1 OFFtime.sleep(.3) # Wait 0.3 secondssetRelay( 0x0F, ON ) # No need to use globals...EVERYTHING ONtime.sleep(.3) # Wait 0.3 secondssetRelay( 0x0A, OFF ) # Turn Relay 0 and 2 OFFtime.sleep(.3) # Wait 0.3 secondssetRelay( 0x05, OFF ) # Turn Relay 1 and 3 OFFHope this helps!!!