The DFRobot Single Relay blocks the number of electronic modules. It can be used in interactive projects. This relay shield uses Omron G5LA high-quality relay. It can also be used to control the lighting, electrical and other equipments. The modular design makes it easy to expand with the Arduino board (not included). The Relay output state by a light-emitting diode. It can be controlled through the digital IO port, such as solenoid valves, lamps, motors and other high current or high voltage devices.



Connection Diagram

Sample Code

//Arduino Sample Code
//Last modified on 14th March 2012 by HJS
//This code has been updated to work with the sample code provided in the Wiki

int Relay = 3;

void setup()
  pinMode(13, OUTPUT);         //Set Pin13 as output
  digitalWrite(13, HIGH);     //Set Pin13 High
  pinMode(Relay, OUTPUT);     //Set Pin3 as output
void loop()
          digitalWrite(Relay, HIGH);   //Turn off relay
          digitalWrite(Relay, LOW);    //Turn on relay


Every two seconds, LED will be turned on and off.


DFshopping_car1.png Get Relay Module Arduino Compatible SKU:DFR0017_ from DFRobot Store or DFRobot Distributor.

Category: DFRobot > Sensors & Modules > Motors & Actuators & Drivers

category: Product Manual category: DFR Series category: Modules

category: source category: Diagram