Relay_Module__Arduino_Compatible___SKU__DFR0017_-DFRobot

Digital 5A Relay Module

Introduction

The DFRobot Single Relay blocks is a easy to use relay module. It can be used in interactive projects and IoT systems to control the flow of electricity. This relay shield uses Omron G5LA high-quality relay. It can also be used to control the lighting, electrical and other equipment, the only constraints are your imagination!

The modular design makes it easy to expand with the Arduino board (not included). The Relay output state is shown by a light-emitting diode for ease of use. The relay is plug and play ready too.

In the end, the easy to use relay can be controlled through an Arduinos digital IO port so you can progromatrically control things such as solenoid valves, lamps, motors and other high current or high voltage devices.

Specification

Tutorial

Connection Diagram

Sample Code

//Arduino Sample Code
//www.DFRobot.com
//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 on relay
          delay(2000);
          digitalWrite(Relay, LOW);    //Turn off relay
          delay(2000);
}

Result

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

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documentation