Project tutorial
DIY Relay Module

DIY Relay Module © CERN-OHL

Looking to make a relay board yourself? Then you're in the right place.

  • 11,563 views
  • 2 comments
  • 14 respects

Components and supplies

Relay (generic)
5 volt
×1
A000066 iso both
Arduino UNO & Genuino UNO
×1
Fairchild semiconductor pn2222abu. image
General Purpose Transistor NPN
×1
Mfr 25frf52 100r sml
Resistor 100 ohm
×1
IN4001 Diode (generic)
×1
09590 01
LED (generic)
red or green
×1
Copper Clad
5x3 cm, optional
×1
General Purpose PSB
optional
×1

Necessary tools and machines

09507 01
Soldering iron (generic)
Soldering Wire
Soldering Paste (generic)
optional but recommended
Hook-up Wire

Apps and online services

About this project

Hi guys, how are you? I hope you are fine! If you are looking to make a relay board yourself, then you're in the right place. Today I will show you how to make a DIY relay module that can be used for any purpose. You can even hookup your Arduino or Raspberry Pi, or else use it for any project you needed a relay module. It costed me about 1$ (USD) to make one. The reason I came up with this tutorial is that last week I needed to make a project in a hurry (it was an urgent project for college).

I needed a relay module to finish the last stage of the project, unfortunately I screwed up. There is no relay module left in my garage. So I went to a local store to buy one, but there were no 5 volt or 6 volt relay module. But fortunately they had the relays; I bought so many (hope I can use them in a future situation like this), then made one myself. It's cheap and easy; you can save a little bit money by making this DIY relay module. At the same time, you can use this relay module like an ordinary relay module. I made a single channel, but you can make more on the same PCB. For multiple channels, like 2 or more, make copies of the same circuit in a single PCB. So lets start making guys!

Step 1: Collect the parts

Now we need to collect some parts that are needed to make the DIY relay module.

NOTE: Most of the parts were lying around my home and I used them to save little more ¢. Here is the list of all the parts needed to do this project.

Hardware

  • 5 volt relay (I used 6 volt because I need 6 volt relay)
  • BC548 transistor.
  • 100 ohms resistor
  • IN4001 diode
  • Screw terminals (3 pols, 2 nos)
  • LED (red or green, I used green here)
  • "5x3"cm Copper clad (optional if using general purpose PCB)
  • General purpose PCB (optional if using copper clad)
  • Breadboard and Jumpers
  • Arduino

Software

  • Fritzing

General Tools

  • Soldering iron
  • Soldering wire
  • Soldering paste (optional, but recommended)
  • Hookup wire

If you are unsure about any parts see the pictures above to clear the doubts or comment.

Step 2: Testing on Breadboard

Now we have all the parts to make a DIY relay module. Next we need to test the circuit diagram of the relay module on a breadboard.

Don't skip this step, it is necessary to avoid mistakes when soldering into a PCB and to check that it works.

Take a look the schematic diagram and PCB layouts. Then wire the circuit on a breadboard. Double check the schematics diagrams and breadboard wiring for any wrong connection. I have the image of the pin outs diagram for the BC548 transistor. Careful for misplaced connections.

Now we need to check if it is working:

  • First download the relay.ino file, then open it with your Arduino.
  • Connect the Vcc and GND pins of the relay module to the Arduino's 5 volt pin and GND pin.
  • Then connect the relays input pin (the pin comes from the transistor's base pin) to the Arduino's digital pin 13.
  • Upload the code.
  • Check the relay is turning ON and OFF in 1 second intervals (also the LED of relay module will turn ON and OFF)
If it is not working, suddenly turn OFF the Arduino. Then check for any misplaced connection. Once resolved, re-power the Arduino.

Wow! It works. Now we need to make the circuit on a general purpose PCB or custom PCB.

Step 3: DIY relay module on general purpose PCB (optional)

Now the time for make the circuit on a general PCB or a custom PCB. This step is optional if you have decided to make the module on a custom PCB. I really recommend using a custom PCB, because it is more professional and perfect one.

However, it's your wish which way you need to make.

Here I will explain how to make the module on a general purpose PCB!

  • First take a general purpose PCB and clean it well.
  • After cleaning, then rub some flux on it (optional, but recommended).
  • Then mount the components on the PCB and solder it.
  • After solder everything, complete all traces (connections) using a Hookup wire.

YES! We made the DIY relay module on a general purpose PCB. Now check that the relay works. I explained it before this step (in STEP 2)!

So, if you choose to make a custom PCB, we can go to this next step.

Step 4: DIY relay module on custom PCB(optional)

This step is optional if you make the module using a general purpose PCB!

I really recommend the Custom PCB, because the custom PCB is cleaner and more professional with less chance to short circuit. I did not use a custom PCB, because I didn't have time to make the PCB as I said about the situation previously.

However, lets go and make the PCB first! Watch the below video for how to etch a PCB yourself using the toner transfer method.

After completing the video tutorial:

  • Download the Fritzing project file down below (PCB design)
  • Then open the Fritzing software (if not download and installed click here )

If you don't know how to use Fritzing, click here (complete the tutorial, there are about three parts).

Then do the same things you learned from the PCB ETCHING tutorial. After you etch the PCB, use a 0.8 mm or 1.0 mm drill bits to drill the holes into the PCB. Then mount all the components and solder it.

DONE! We made the custom PCB for DIY relay module. Now test the module.

I explained before in step 2!

Step 5: DONE!

We successfully made our DIY relay module.

It would take me up to 20 minutes to make one. This is easy, inexpensive, and also time saving (when you order one from online it can take, at minimum, a day). If you make one, please click on the "I MADE IT" button and also post the photo of your finished DIY relay module in comment section.

Comments

Similar projects you might like

DIY Relay Outlet Arduino

Project tutorial by Ben Jones

  • 28,030 views
  • 18 comments
  • 37 respects

DIY Retro Look FM Radio with TEA5767 Module

Project tutorial by Mirko Pavleski

  • 10,906 views
  • 6 comments
  • 44 respects

Arduino + GPS Module - Destination Notifier

Project tutorial by Amal Mathew

  • 4,189 views
  • 4 comments
  • 22 respects

Arduino UNO and Vibration Sensor with Relay

Project tutorial by MichDragstar

  • 2,368 views
  • 2 comments
  • 10 respects
Add projectSign up / Login