Ks0251 keyestudio 4-channel Relay Shield: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
[[image:Ks0251 4-relay.png|thumb|800px|right|Keyestudio 4-channel Relay Shield]]
[[image:Ks0251 4-relay.png|thumb|800px|right|Keyestudio 4-channel Relay Shield]]


<br>
==Introduction==
==Introduction==
The keyestudio relay shield has integrated a 4-channel 5V relay module, which is fully compatible with [http://wiki.keyestudio.com/index.php/Ks0001_keyestudio_UNO_R3_BOARD 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.  <br>
The keyestudio relay shield has integrated a 4-channel 5V relay module, which is fully compatible with [http://wiki.keyestudio.com/index.php/Ks0001_keyestudio_UNO_R3_BOARD 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.  <br>


<br>
==Features==
==Features==
* The relay shield is 5V active HIGH  
* The relay shield is 5V active HIGH  
Line 17: Line 19:
* PCB Color: Black  
* PCB Color: Black  


 
<br>
==Details==
==Details==
* Size: 69mm*54mm*26mm
* '''Size:''' 69mm*54mm*26mm
* Weight: 39.4g
* '''Weight:''' 39.4g
[[Image:ks0251 dimensions.png|600px|frameless]]
[[Image:ks0251 dimensions.png|600px|frameless]]
<br>
<br>
Line 27: Line 29:
[[Image:ks0251 pinouts.jpg|800px|frameless]]
[[Image:ks0251 pinouts.jpg|800px|frameless]]
<br>
<br>
 
'''Relay Terminals:''' <br>
 
==Relay Terminals==
Terminal high-power, high-current high voltage can be connected to the device.<br>
Terminal high-power, high-current high voltage can be connected to the device.<br>
When D4 is High, RELAY 4 turns on, LED4 lights up, COM4 and NO4 connected, COM4 and NC4 disconnected.<br>
When D4 is High, RELAY 4 turns on, LED4 lights up, COM4 and NO4 connected, COM4 and NC4 disconnected.<br>
Line 48: Line 48:
<br>
<br>
==Sample Code==
==Sample Code==
* How to download and install [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and [http://wiki.keyestudio.com/index.php/How_to_Install_Arduino_Driver driver].<br>
*How to download and install [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and [http://wiki.keyestudio.com/index.php/How_to_Install_Arduino_Driver driver].<br>
* [https://drive.google.com/open?id=1CR31iSw5coJIWzdxIYO2381jesIuTm__ Click here to download the code] or directly copy the code below to IDE.
*[https://drive.google.com/open?id=1CR31iSw5coJIWzdxIYO2381jesIuTm__ Click here to download the code] or directly copy the code below to IDE.


<pre>
<pre>
Line 87: Line 87:
<br>
<br>
==Resources ==
==Resources ==
'''Download the PDF file here:''' <br>
'''Download the PDF file here:''' <br>
https://drive.google.com/open?id=1FBLIFgXd7wRvzuVlM2V55MFBmosgZbxg
https://drive.google.com/open?id=1FBLIFgXd7wRvzuVlM2V55MFBmosgZbxg
Line 97: Line 96:
http://www.keyestudio.com/wp/ks0251/
http://www.keyestudio.com/wp/ks0251/


<br>
==Get One Now ==
==Get One Now ==
'''Official Website''' <br>
'''Official Website:''' <br> http://www.keyestudio.com/ks0251.html
http://www.keyestudio.com/ks0251.html






[[Category: Shield]]
  [[Category: Shield]]

Revision as of 09:35, 5 September 2018

Keyestudio 4-channel Relay Shield


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.


Features

  • The relay shield is 5V active HIGH
  • Contact capacity: AC120V / 3A ; DC24V/3A
  • Onboard LED indicator for relay output status
  • Indicator: 4 LEDs are red when the relay is driven high, the corresponding indicator will light up.
  • Standard interface can be directly connected with microcontrollers.
  • Fully compatible with UNO R3 board
  • Be able to control various appliances and other equipment with large current.
  • 3 M3 screw positioning holes for easy installation
  • Power Interface: 5V DC power interface
  • Channel: 4 channel
  • PCB Color: Black


Details

  • Size: 69mm*54mm*26mm
  • Weight: 39.4g

Ks0251 dimensions.png

PINOUTS

Ks0251 pinouts.jpg
Relay Terminals:
Terminal high-power, high-current high voltage can be connected to the device.
When D4 is High, RELAY 4 turns on, LED4 lights up, COM4 and NO4 connected, COM4 and NC4 disconnected.
If D4 is LOW, RELAY 4 turns off, LED4 not light, COM4 and NO4 disconnected, COM4 and NC4 connected.
When D5 is High, RELAY 3 turns on, LED3 lights up, COM3 and NO3 connected, COM3 and NC3 disconnected.
If D5 is LOW, RELAY 3 turns off, LED3 not light, COM3 and NO3 disconnected, COM3 and NC3 connected.
When D6 is High, RELAY 2 turns on, LED2 lights up, COM2 and NO2 connected, COM2 and NC2 disconnected.
If D6 is LOW, RELAY 2 turns off, LED2 not light, COM2 and NO2 disconnected, COM2 and NC2 connected.
When D7 is High, RELAY 1 turns on, LED1 lights up, COM1 and NO1 connected, COM1 and NC1 disconnected.
If D7 is LOW, RELAY 1 turns off, LED1 not light, COM1 and NO1 disconnected, COM1 and NC1 connected.


Hookup Guide

Simply stack the shield on the UNO board.
Ks0251 Connect.png


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 turn on relay.
     delay(200);        //delay 0.2S
   }  
}

Ks0251 upload.png


Test Result

Done uploading the above code, you should see the 4-channel relay is first connected, and then disconnected one after another, repeatedly.
Ks0251 Result.png


Resources

Download the PDF file here:
https://drive.google.com/open?id=1FBLIFgXd7wRvzuVlM2V55MFBmosgZbxg

Download the code:
https://drive.google.com/open?id=1CR31iSw5coJIWzdxIYO2381jesIuTm__

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


Get One Now

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