Introduction: DIY Relay Module for Arduino

Circuit project files:

Arduino Code: Previous video: Facebook: Twitter:

Websites which were shown during the video:

In this tutorial I will show you how you can make your Own DIY relay module which works with Arduino or any microcontroller. Along the way I will show you that it is actually quite simple nowadays to order PCBs from a professional manufacturing house.

Thanks to JLCPCB for sponsoring this video Visit to get professional PCBs for low prices

For this project I used • 4 X 5v relays • 4 X 3v LEDs • 4 X BC547 Transistor • 4 X 1N4002 Diodes • 8 X 1K Resistors • And 6 Male headers • 4 X 3 combo screw terminals

Step 1: Plug in the Relay's and Solder Them to the PCB

Step 2: Add the 1n4007 Diodes and Solder

Step 3: Add the BC547 and Solder Them

Step 4: Plug in Female Headers to the Relay Module

Step 5: Power the Relay Module Using the Power Pins of the Module to the Power Rails of the Breadboard

Step 6: Power the Total Project Using a Micro USB Breakout Board

Step 7: Plug in the IN Pins of the Relay Module to the Breadboard to D 9,10,11,12 of the Arduino

Step 8: Now the Relay's Would Activate in the Sequence of 1 to 4

Arduino Code:

int IN1=12;
int IN2=11; int IN3=10; int IN4=9;

// the setup function runs once when you press reset or power the board void setup() { pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); }

// the loop function runs over and over again forever void loop() { digitalWrite(IN1, HIGH); delay(1000); digitalWrite(IN1, LOW);

digitalWrite(IN2, HIGH); delay(1000); digitalWrite(IN2, LOW);

digitalWrite(IN3, HIGH); delay(1000); digitalWrite(IN3, LOW);

digitalWrite(IN4, HIGH); delay(1000); digitalWrite(IN4, LOW); }

Step 9: Watch the Video