Make a Relay Modul With Optocoupler

Introduction: Make a Relay Modul With Optocoupler

About: Electronics Engineering Student , Who fall in love with electronics and coding ,i wasted a lot time in my childhood i didn't think electronics will be so important to me , but i am not giving up now nad the…

Introductions :

Relays are mechanical switches ,compare to semi-conductor there switching time are very slow , but it switch in relatively high voltage,One example use of relays are in the Car or bike as electric ignition they increase relatively low current from the battery to high thereby igniting the engine.

Descriptions :

we will be making a relay modul to be use with an optocoupler , the optocoupler is the main component of our circuit it separate between the micro controller and the the circuit with higher voltage (using light ) .

Step 1: Components Needed :


1. 5 volt relay(That's depending on the voltage of power supply used)

2. BC547 transistor.(or any other npn but you need to take a look in the datasheet)

3. resistor ( 1k x 2) (220 ohm x 1).

4. IN4001diode.

5. Screw terminals(3 pols , and 2 pols)

6. LED

7.optocoupler (any will do the job) male header

9. General purpose PCB

10. Breadboard and Jumpers.

Step 2: Additional Step

I get my optocoupler from an old psu power supply , but after searching down on google with the name of ic i didn't find anything .

Step 3: Always Check the Datasheet !!

Be aware to check the foreword voltage of the optocoupler , it's generally about 1.4v ( luckily with no datasheet mine work fine with 5v and 1 k resistor) .

always use a resistor to cut down the voltage so it does not over power the led inside the optocoupler and burn it out .

Step 4: Schematic :

You can use any schematic you want , in the scond schematic you can replace the relay with a motor or a fan in conditions that the transistor support the max voltage and the max current by the device .

the diode is used across the relay because off the reverse voltage spike that can be generated by the relay coil. The diode would be forward biased to this spike and this short safely the coil.


Be the First to Share


    • Stick It Challenge

      Stick It Challenge
    • Origami Speed Challenge

      Origami Speed Challenge
    • Make It Modular: Student Design Challenge

      Make It Modular: Student Design Challenge



    Question 8 months ago on Step 3

    Confused when you say 1Kohm with 5V should be good for the optocoupler. If the voltage in is 5V and the forward voltage is 1.4 and the forward current is 60mA, then you should be using a 60ohm resistor. Can you help me understand why you chose 1Kohm?


    Question 2 years ago

    Hi Muhammed can I use the same arduino voltage and ground for powering both the octocoupler and arduino?


    3 years ago

    I think as a relay uses a lot of power to hold on in the smaller electronics applications a MOSFET is now being preferred as a switch that will stay on just by holding a voltage on its gate. The ability to pass 100 Amps through its source to drain channel is common for 50 cents or less cost and no breakdown diode needed.

    Here is an example

    Addi mohammed said
    Addi mohammed said

    Reply 3 years ago

    I totally agree ,plus MOSFET have a lot much faster switching on/off,and relay have a much shorter life because of it's mechanical contact ,but MOSFET have a forward voltage drop that wastes power ,and they heat up , they have a leakage current that can affect the circuit ,plus it's not completely isolated from it's drain gate and source , I would recommande using TRIAC or THYRISTOR .