EME-MOTIONAL OPTICSCONNECTIVITY & PHOTONICS Request a Quote

How to use an optocoupler input module

An optocoupler input module allows you to safely transfer signals between circuits of different voltage levels while electrically isolating them.

Understanding the Module

An optocoupler module, such as the PC817-based HY-M154, contains an infrared LED on the input side and a phototransistor on the output side. When the input signal is applied, the LED emits light, which activates the phototransistor, allowing current to flow on the output side without a direct electrical connection between the circuits . This isolation protects sensitive devices like microcontrollers from high-voltage spikes .

Wiring the Module

  1. Connect Input Signal: Attach the voltage signal you want to monitor to the module's input pin. Ensure the input voltage is within the module's specified range.
  2. Set Jumper for Isolation: Most modules have a jumper that connects or separates the input and output grounds. Remove the jumper for full isolation between input and output circuits .
  3. Connect Output: The output side can be connected to a microcontroller or other logic device. The output is typically open-collector, meaning it requires a pull-up resistor to the output voltage rail if not already included on the module .
  4. Power Supply: Ensure the input and output sides have their respective power supplies if full isolation is used. Do not connect the VCC/GND of input and output together, as this defeats isolation .

Using with a Microcontroller

For example, with an Arduino:

pinMode(OPTO_OUTPUT_PIN, OUTPUT);digitalWrite(OPTO_OUTPUT_PIN, HIGH); // LED off initiallySerial.begin(9600);digitalWrite(OPTO_OUTPUT_PIN, LOW); // LED on, output activeSerial.println("Signal: ON");delay(2000);digitalWrite(OPTO_OUTPUT_PIN, HIGH); // LED off, output inactiveSerial.println("Signal: OFF");delay(2000);

  • LOW on the input pin turns the LED on, activating the output.
  • HIGH on the input pin turns the LED off, deactivating the output .

Important Considerations

  • Current Limiting: Ensure the input current is limited by a resistor to prevent damage to the LED inside the optocoupler .
  • Output Load: Keep the output current within the phototransistor's rating (typically 50 mA for PC817) and voltage below the maximum collector-emitter voltage (35V) to avoid damage .
  • Signal Compatibility: Optocouplers can interface different logic levels, e.g., 12V input to 5V microcontroller logic .
  • CTR (Current Transfer Ratio): The output current depends on the input current and the optocoupler's CTR, which varies by type and temperature .

Applications

  • Voltage Level Shifting: Reading high-voltage signals with low-voltage microcontrollers.
  • Circuit Isolation: Protecting sensitive electronics from noisy or high-voltage circuits.
  • Digital Input Monitoring: Detecting the on/off state of external devices like relays or switches. By following these steps, you can safely and effectively use an optocoupler input module to interface and isolate circuits while maintaining signal integrity.
How to use an optocoupler input module - E-Motional Optics & Connectivity

ANO007 | Understanding Phototransistor Optocouplers

The output resistor R2 as well as the bias voltage Vdd are both set as in the end application circuit where the optocoupler is used,

ANO007 | Understanding Phototransistor Optocouplers

In order to design a functionally robust and reliable application with optocouplers, it is essential to understand not only the device''s

Isolated inputs and outputs with Arduino and optocoupler

We use an optocoupler to galvanically isolate the inputs or outputs of Arduino and be able to connect them safely to higher power

How to Use Optocoupler: Examples, Pinouts, and Specs

Learn how to use the Optocoupler with detailed documentation, including pinouts, usage guides, and example projects. Perfect for

Optoelectronics: Optocouplers

In this simple circuit, the input is 5VDC and output is Vcc. There is a voltage shift from the input to the value of Vcc. In a

Interfacing PC817 4-Channel Optocoupler Module with

Learn How to interface a PC817 4-Channel Optocoupler Module with Arduino. using PC817

Optocouplers Guide: Understanding Types, Applications, and

An optocoupler, also known as an opto-isolator or photocoupler, transfers electrical signals between circuits using light.

Isolating Circuits From Your Arduino With Optocouplers

Isolating Circuits From Your Arduino With Optocouplers: A Optocoupler also called a photocoupler, optical isolator or opto-isolator is

How to Use Infrared Slotted Optical Optocoupler Module: Examples

Learn how to use the Infrared Slotted Optical Optocoupler Module with detailed documentation, including pinouts, usage guides, and

How to Use Optacoupler: Examples, Pinouts, and Specs

Arduino UNO-Based Optocoupler Control Circuit with Pushbutton Interface This circuit involves an Arduino

PC817 Optocoupler Module User Guide | Wiring & Setup

Complete PC817 optocoupler isolation module guide. Covers 3.6V–30V wiring, jumper

Opto Coupled Devices

The main function of an optocoupler, whatever type of signal is used, is to provide complete electrical isolation between the input and

Optocouplers, Part 1: Principles and usefulness FAQ

In this situation, the optocoupler is used as a solid-state relay to replace an electromechanical relay. In other cases,

How Optocouplers Work

FREE COURSE!! Learn about optocouplers. We''ll look at how they are used to control circuits, how they work and

What Is Optocoupler and Its Application with Examples

An optocoupler is a semiconductor device that transmits an electrical signal between two isolated circuits using light.

Optocoupler | Explore Our Workshop | Jameco Electronics

Understand what an optocoupler is and how it works at our electronics workshop at Jameco Electronics. Explore tutorials on how

Optocoupler Tutorial and Optocoupler Application

BenefitsMechanismDesignDefinitionExampleEffectsTypesApplicationsConstructionAdvantagesAn optocoupler or opto-isolator consists of a light emitter, the LED and a light sensitive receiver which can be a single photo-diode, photo-transistor, photo-resistor, photo-SCR, or a photo-TRIAC with the basic operation of an optocoupler being very simple to understand.See more on electronics-tutorials.wsLearn about Electronics

Using Opto Couplers - Learn About Electronics

The start of the design process is to specify the input and output conditions the optocoupler is to link.

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

Optocoupler Circuits, Working, Characteristics, Interfacing

Optocouplers become an effective replacement for relays, and for transformers for interfacing digital circuits stages.

PC817 Optocoupler Module User Guide | Wiring & Setup

📦 Module Overview These PC817 optocoupler isolation modules provide a convenient, pre

Optocouplers Selection Guide: Types, Features, Applications

Like opto-isolated SCRs, triac optocouplers typically feature very high current-transfer ratios. A triac optocoupler used in a basic

Still Have a Technical Question?

Our photonic engineering team can help you select the right connector or splitter for your network.

Ask Our Team