Objective:
To Control (ON/ OFF) the devices connected in the AC supplies (230 V)
Components Required
- Arduino Uno
- Relay Module
Connection Diagram
Program
int RelayPin=13;
void setup()
{
pinMode(RelayPin, OUTPUT);
}
void loop()
{
digitalWrite(RelayPin, HIGH);
delay(1000);
digitalWrite(RelayPin, LOW);
delay(1000);
}
Working
The Relay operates as Electrical Controlled switch. It has input side and output side. The input side works in 0-5V DC that can be controlled by the Arduino and the Output works in very high voltages. When we supply HIGH to the input side of relay the switch in the output side closes and the appliance gets ON. Similarly, when we supply LOW to the input side of relay the switch in the output side opens and the appliance gets OFF.
Output
The Device in the output side ON (for HIGH input)
The Device in the output side OFF (for LOW input)