Ks0251 keyestudio 4-channel Relay Shield

From Keyestudio Wiki
Jump to navigation Jump to search

Introduction

The keyestudio relay shield has integrated a 4-channel 5V relay module, which is fully compatible with UNO R3 control board. The 4-channel relay on the shield is active at HIGH level. Separately connect the 4-channel relay to the digital port 4, 5, 6, 7 on the UNO R3 board, then through controlling output HIGH or LOW to control the relay on and off.

thumb

Specification


1.Working Style: high level is effective.

2.Contact Capacity: AC120V /3A 
                    DC24V/3A
3.Weight: 39.4g

4.Size:69*53*27mm

5.Fully compatible with UNO R3 board

6.Indicator LED onboard for Relay output status

Package Included

1 x 4 Channel Relay Module

Sample Code


int BASE = 4 ;  //The first relay is connected to the I / O port
int NUM = 4;   //Total number of relays
void setup()
{
   for (int i = BASE; i < BASE + NUM; i ++) 
   {
     pinMode(i, OUTPUT);   //Set the number I/O port to outputs
   }
}
void loop()
{
   for (int i = BASE; i < BASE + NUM; i ++) 
   {
     digitalWrite(i, LOW);    //Set the number I/O port outputs to "low", that is, gradually turn off the relay.
     delay(200);        //delay 0.2S
   }
   for (int i = BASE; i < BASE + NUM; i ++) 
   {
     digitalWrite(i, HIGH);    //Set the number I/O port outputs to "high", that is, gradually open relay.
     delay(200);        //delay 0.2S
   }  
}

Test Result

Stacking the keyestudio 4-channel relay shield on the keyestudio UNO R3 control board, burning the program, after connecting the electricity, the 4-channel relay is first connected, and then disconnected one after another, cycle alternately.

Resources

PDF:
https://drive.google.com/open?id=1yQsuD_PZcua1JsZxNUtyzAr6BCOev5Q7

VIDEO:
http://www.keyestudio.com/wp/ks0251/

Get One Now

Official Website
http://www.keyestudio.com/ks0251.html