Home / Wiki / Sensor / Electric
Relay

Introduction

A Relay is actually a switch, control higher voltage and current via small voltage and current. It can be used to protect people from dangerous circuit. Relay has 6 pins, you can see the IN, VCC and GND pin, this side is called controller, people control circuit via this side, the other three pins are connected to high voltage and current circuit, they are NO, COM and NC. The trig way of relay is low power, when given a low power from IN pin, COM and NC pin will break, NO and COM pin will be connected, therefore, it’s safe for you are control the high voltage and current via just giving a digital single


 

Technical Data

Control Voltage: 5V DC

Triggered with high power lever voltage

LED used to indicate the working status.


 

Usage

Let’s test it:

Power relay and connect IN pin to Arduino’s A5 (analog pin 5)

 

[code]

int a=A5;

void setup() {

  // put your setup code here, to run once:

pinMode(a, OUTPUT);

}

 

void loop() {

  // put your main code here, to run repeatedly:

digitalWrite(a, LOW);      //give a low power to trig the circuit

delay(1000);              //delay 1s

digitalWrite(a, HIGH);   //give a high power to break untrig the circuit

delay(1000);              //delay 1s

}

[/code]

 

You’ll heard a sound sounds like didadida with 1 second cycle.


 

Resource

Program