Relay is a switch which is operated electrically. Relays are work on the electromagnetic principle to mechanically operate a switch but there are also other relays that operate on other principles such as solid-state relays.
Relays are used to control a circuit by a separate low power signal or, controlled several circuits by one signal.
Relay is an electrically operated switch that can be turned on by a circuit or device or current can be turned on.
The relay can be controlled through Arduino in a very simple way, like controlling an LED.
A relay module is a hardware PCB board with relay cubes, input-output pins, LEDs and trigger pins which are in a connected circuit.
In the above image, there is a two-channel relay module and the two blue cubes in it are relays. There are other varieties of relay modules with one, four and eight channels.
Pin Connection With Arduino
- GND:- It connects to the ground pin of Arduino.
- IN1:- It connects to the digital pin of Arduino to control the first relay.
- IN2:- It connects to Arduino digital pin to controls the second relay (if we using the second relay).
- VCC:- connects to 5V of Arduino.
Main Voltage Connections
The relay has 3 possible connections with the main voltage are:
- COM:- This is a common pin.
- NO (Normally Open):- According to the name Normally Open (NO) pin has no direct connection with Common pin. If we trigger the relay, NO connects with COM pin and provided power supply. We connect the lamp or the appliance wire with it.
- NC (Normally Closed):- There is a direct connection between the common pin and the normally closed pin, even the relay is off. If we trigger the relay, NC disconnects with COM pin and no supply provided to load.
If you want to control a bulb, then it's better to connect the bulb +ve wire to a normally-open (NO) pin because we just want to control the bulb.