ALFA PROCOMMUNICATION INFRASTRUCTURE Request a Quote

How to control the optocoupler relay module

An optocoupler relay module allows you to safely control high-voltage or high-current loads using low-voltage signals while electrically isolating the control circuit from the load.Powering the Module
  • Control Side: Connect the VCC and GND pins to the power supply of your control circuit (e.g., 5V from an Arduino or microcontroller) to power the optocoupler input circuit .
  • Relay Side: Connect the JD-VCC (or relay power) and GND to the appropriate voltage for the relay coils. For modules with jumper-based isolation, opening the jumper separates the relay power from the control circuit, enhancing safety .
Connecting the Control Signal
  • Attach the IN pins to GPIO pins of your microcontroller. Most optocoupler relay modules are active-low, meaning the relay activates when the input pin is pulled LOW .
  • For multi-channel modules, each relay has a separate IN pin (e.g., IN1, IN2, etc.) for independent control .
Wiring the Load
  • Normally Open (NO) Connection: Connect the device you want to turn ON when the relay is activated between the NO and COM terminals.
  • Normally Closed (NC) Connection: Connect the device you want to turn OFF when the relay is activated between the NC and COM terminals .
  • Ensure the load voltage and current do not exceed the relay's rated specifications (e.g., 250V AC 10A or 30V DC 10A for typical 5V modules), .
Safety and Isolation
  • The optocoupler provides electrical isolation between the control and load sides, protecting sensitive microcontroller circuits from voltage spikes and noise .
  • For inductive loads like motors or solenoids, add a flyback diode across the load to suppress voltage spikes .
  • Verify the relay coil resistance is sufficient if connecting directly to the optocoupler; most optocouplers cannot handle more than 50 mA, so the coil should typically be above 300 ohms .
Status Indicators
  • Many modules include LED indicators for power and relay status, allowing you to monitor operation visually .
Example Arduino Control

#define RELAY_PIN 7void setup() { pinMode(RELAY_PIN, OUTPUT); // Set relay pin as output digitalWrite(RELAY_PIN, HIGH); // Ensure relay is OFF initially}void loop() { digitalWrite(RELAY_PIN, LOW); // Activate relay delay(1000); digitalWrite(RELAY_PIN, HIGH); // Deactivate relay delay(1000);}

This example demonstrates active-low triggering, where setting the pin LOW activates the relay .

Additional Tips
  • Use current-limiting resistors (typically 220–330 ohms) when driving the optocoupler LED from a microcontroller .
  • For 3.3V microcontrollers, consider a logic level converter to ensure reliable activation of 5V relay modules .
  • Always double-check wiring and isolation before connecting high-voltage loads to prevent damage or hazards .
How to control the optocoupler relay module

How to Use Relay with optocoupler: Examples, Pinouts,

Learn how to use the Relay with optocoupler with detailed documentation, including pinouts, usage guides,

User''s Guide: 12V 4-Channel Relay Module with Optocoupler

This module allows microcontrollers to control high-voltage devices (AC or DC) using opto-isolated relays. Each

How to Connect a Relay through an Opto-Coupler

The following concepts show how a relay driver can be configured with an optocoupler using transistors. As shown in the following

Relay Module Optocoupler: Schematic and Working Explained

This article shares the Relay Module Optocoupler Schematic and Working principle. Cheap DIY relay module project

How to Use One Channel Relay with Optocoupler: Pinouts, Specs,

Learn how to use the One Channel Relay with Optocoupler with detailed documentation, including pinouts, usage guides, and

Arduino Tutorial: 2-Channel Optocoupler Relay Module

Instructables is a community for people who are passionate about making. We are supported by Autodesk,

User''s Guide: 12V 1-Channel Relay Module (High/Low Trigger,

This module allows microcontrollers to safely control high-voltage devices using a relay with optocoupler isolation. It

How to Design Relay Module using Optocoupler || Relay Module

"In this video, you''ll learn how to design a relay module using an optocoupler, perfect for isolating control circuits from

Tutorial: How to Control LED by Using Arduino and Relay

Today we''re going to make project that use SIngle Channel 5V Optocoupler Relay module. This project objective is to control LED by

How to Control a Relay Module Using Optocoupler & Transistor

This video demonstrates a relay module circuit using an optocoupler (PC817) and transistor (2N2222) in Proteus

How to control optocoupler and relay by using microcontroller

I have a question about controlling relays by using optocoupler. I have some optocouplers to isolate MCU''s power and

The Basics of Optocoupler Relay

1.5) Solid-State relay- A solid-state relay is another type of relay. It uses thyristor and a

How Optocouplers Work

Learn about optocouplers. In this article we''ll look at how they are used to control circuits, how they work and also how

How to Use 2 Channel 5V 10A Relay Module with Optocoupler:

The 2 Channel 5V 10A Relay Module with Optocoupler is a versatile electronic component designed to control high-voltage devices

opto isolator

Moreover, the relay itself will provide isolation. The relay will also need more coil current than the optocoupler can

DIY Relay Module Optocoupler Based || LOW Triggered 1 Channel Relay

This 1-channel Relay module comes with Optocoupler protection is an active low relay

How to make the connections to the 1 channel optocoupler relay module?

I want to light a bulb connected to the socket by using an 1 Channel Optocoupler Relay Module which accepts an input of 5V. From

5V 2/4/8 Channel Relay Modules with Optocoupler

Relay Maximum Current: 10A Trigger Mode: Active Low Indicator LEDs: Power supply

User''s Guide: 12V 4-Channel Relay Module with Optocoupler

Overview This module allows microcontrollers to control high-voltage devices (AC or DC) using opto-isolated relays.

Everything You Need to Know About Optocouplers in Electronics

Relay Modules - Here, the optocoupler PC817 is widely used for isolating the relay side from the main control

Optocoupler Tutorial for Beginners

An optocoupler uses light to transfer signals from one circuit over to another. This guide shows you how they work

Help understanding optocoupler wiring

Hi all I have a project with a 4 module optocoupler relay, controlled by an esp32 Arduino. I wired the project following

How Does It Work: DIY Relay Modules

How Does It Work: DIY Relay Modules: After looking through many instructables it''s clear that many makers love to use the pre

How to Use 1 Channel Relay module with Optocoupler: Examples,

The 1 Channel Relay Module with Optocoupler, manufactured by Songle (Part ID: SRD-05VDC-SL-C), is a versatile electronic

The Basics of Optocoupler Relay

Understanding Optocoupler Relays: A Comprehensive Guide Relays play a crucial role in electrical circuits, offering a

Opto-Isolated Relay Switching Module

Circuit : Andy Collinson Email : Description A very simple dual channel optical isolated relay module. The input can be driven from

How to Use an Optocoupler to Pass Signals Between Controllers at

How to Use an Optocoupler to Pass Signals Between Controllers at Different Voltages: This tutorial makes use of the 4N25

What''s the point of optocouplers on relay boards?

As you can see, there is a jumper to allow the Arduino 5V to be the power source for the relay, but it isn''t necessary to power the

Relay 12V with Optocupler, how to?

I haven''t used this relay module and haven''t been able to find a diagram for it, but let me offer a suggestion that might

How to control optocoupler and relay by using microcontroller

I have a question about controlling relays by using optocoupler. I have some optocouplers to isolate MCU''s power and

The Basics of Optocoupler Relay

1.5) Solid-State relay- A solid-state relay is another type of relay. It uses thyristor and a

How Optocouplers Work

Learn about optocouplers. In this article we''ll look at how they are used to control circuits, how they work and also how

How to Use 2 Channel 5V 10A Relay Module with Optocoupler:

The 2 Channel 5V 10A Relay Module with Optocoupler is a versatile electronic component designed to control high-voltage devices

opto isolator

Moreover, the relay itself will provide isolation. The relay will also need more coil current than the optocoupler can

DIY Relay Module Optocoupler Based || LOW Triggered 1 Channel Relay

This 1-channel Relay module comes with Optocoupler protection is an active low relay

How Optocouplers work

In this video we learn how optocouplers work and also look at some simple electron

Relay Module | How to make a Relay module with Optocoupler

Relay is an electro-mechanical switch that allow low-voltage circuit to control high-voltage circuit.How to make a

Optocoupler Isolation in Relay Modules: the Key to Protecting Your

The Future of Optocoupler Isolation in Relay Modules As technology continues to advance, the role of optocoupler

Circuit for 12V relay with an optocoupler using 3V3 GPIO

I am trying to design a circuit to control a G6S-2 12V relay that powers on/off a 12V device using a GPIO from an

How to make the connections to the 1 channel optocoupler relay module?

I want to light a bulb connected to the socket by using an 1 Channel Optocoupler Relay Module which accepts an input of 5V. From

5V 2/4/8 Channel Relay Modules with Optocoupler User''s Guide

Relay Maximum Current: 10A Trigger Mode: Active Low Indicator LEDs: Power supply indicator and relay status

User''s Guide: 12V 4-Channel Relay Module with Optocoupler

Overview This module allows microcontrollers to control high-voltage devices (AC or DC) using opto-isolated relays.

Everything You Need to Know About Optocouplers in Electronics

Relay Modules - Here, the optocoupler PC817 is widely used for isolating the relay side from the main control

How to Use Relay with optocoupler: Examples, Pinouts,

Learn how to use the Relay with optocoupler with detailed documentation, including pinouts, usage guides,

User''s Guide: 12V 4-Channel Relay Module with Optocoupler

This module allows microcontrollers to control high-voltage devices (AC or DC) using opto-isolated relays. Each

How to Connect a Relay through an Opto-Coupler

The following concepts show how a relay driver can be configured with an optocoupler using transistors. As shown in the following

Relay Module Optocoupler: Schematic and Working Explained

This article shares the Relay Module Optocoupler Schematic and Working principle. Cheap DIY relay module project

How to Use One Channel Relay with Optocoupler: Pinouts, Specs,

Learn how to use the One Channel Relay with Optocoupler with detailed documentation, including pinouts, usage guides, and

Arduino Tutorial: 2-Channel Optocoupler Relay Module

Instructables is a community for people who are passionate about making. We are supported by Autodesk,

User''s Guide: 12V 1-Channel Relay Module (High/Low Trigger,

This module allows microcontrollers to safely control high-voltage devices using a relay with optocoupler isolation. It

How to Design Relay Module using Optocoupler || Relay Module

"In this video, you''ll learn how to design a relay module using an optocoupler, perfect for isolating control circuits from

Tutorial: How to Control LED by Using Arduino and Relay

Today we''re going to make project that use SIngle Channel 5V Optocoupler Relay module. This project objective is to control LED by

How to Control a Relay Module Using Optocoupler & Transistor

This video demonstrates a relay module circuit using an optocoupler (PC817) and transistor (2N2222) in Proteus

How to Use Relay with optocoupler: Examples, Pinouts,

Learn how to use the Relay with optocoupler with detailed documentation, including pinouts, usage guides,

User''s Guide: 12V 4-Channel Relay Module with Optocoupler

This module allows microcontrollers to control high-voltage devices (AC or DC) using opto-isolated relays. Each

How to Connect a Relay through an Opto-Coupler

The following concepts show how a relay driver can be configured with an optocoupler using transistors. As shown in the following

Relay Module Optocoupler: Schematic and Working Explained

This article shares the Relay Module Optocoupler Schematic and Working principle. Cheap DIY relay module project

How to Use One Channel Relay with Optocoupler: Pinouts, Specs,

Learn how to use the One Channel Relay with Optocoupler with detailed documentation, including pinouts, usage guides, and

Arduino Tutorial: 2-Channel Optocoupler Relay Module

Instructables is a community for people who are passionate about making. We are supported by Autodesk,

User''s Guide: 12V 1-Channel Relay Module (High/Low Trigger,

This module allows microcontrollers to safely control high-voltage devices using a relay with optocoupler isolation. It

How to Design Relay Module using Optocoupler || Relay Module

"In this video, you''ll learn how to design a relay module using an optocoupler, perfect for isolating control circuits from

Tutorial: How to Control LED by Using Arduino and Relay

Today we''re going to make project that use SIngle Channel 5V Optocoupler Relay module. This project objective is to control LED by

How to Control a Relay Module Using Optocoupler & Transistor

This video demonstrates a relay module circuit using an optocoupler (PC817) and transistor (2N2222) in Proteus

Related Video Reference

This video was associated with the source search result. Verify technical details against current product documentation and project requirements.

Technical note

This reference is intended for preliminary fiber and communications infrastructure research. Optical interface, fiber type, port or core capacity, electrical input and output, enclosure protection, cooling, installation limits and applicable standards must be verified for the specific project.

Still Have a Technical Question?

Use the inquiry form to describe the product category, application, interfaces, capacity and installation environment.

Start a Project Inquiry