Updated: Apr 30, 2022
In this topic, we are going to learn about how to control a relay module with Arduino. Here we will be controlling two devices by using them. It can be used to control the devices with a voltage 5V or less as Input. But if we want to control more than 5V or A.C devices then we need to use the relay module which can control this capacity.
List of Components:
Arduino Uno: It is an open-source microcontroller board. It is based on the Microchip named ATmega328P microcontroller. The circuit board is having a set of digital and analogue input/output pins. They will be interfaced with different expansion boards.
Relay Module: It is an electrical switch in a circuit. It will on/off the circuit. Also, it can be controlled by fewer voltages like 5V from #Arduino.
LED: It is used to find the circuit is on/off by blinking.
Resistor: The #resistor plays one of the major roles in the relay module. It will protect other elements in the circuit from voltage spikes.
In the above diagram pin of Arduino is connected to the relay module and then further it is connected with #LED. The relay is connected with LED in open state i.e, NO pin which goes to the LED, and the common pin is connected to the breadboard. Also, the relay is receiving supply from Arduino.
The circuit looks like below one after turning on.
If we increase the relay pin high then relay #module will be turned on.
If we decrease the relay pin it then it will off.
Video explanation of Interfacing relay module with aurdino for better understanding