PCB Design: An Optocoupler Tutorial for Your PCB Layout

Created: October 31, 2017
Updated: October 2, 2020

Circuitry

Are you guilty of hitting the snooze button at least twice before you reluctantly wake up from your blissful sleep? My wife claims that I probably have the world record time for hitting the snooze button since I do it without even opening my eyes. But there are times when the third snooze alarm mysteriously doesn’t go off and it is a losing battle to get my day started on time.

In electronics, embedded systems often rely on optocoupler circuits to receive input signals from external sensors or switches. In a way, they are like the microcontrollers’ alarm clocks. Ideally, all the signals are relayed accurately to the microcontroller. However, when the symbol of optocouplers is not properly implemented, the microcontroller can sometimes miss input signals or falsely detect signals when no inputs are triggered. In this PCB design optoisolator tutorial, we will discuss how to set up a successful optocoupler PCB layout. But first, let’s remind ourselves how an optocoupler design guide works in this optocoupler tutorial.

Optoisolator Tutorial: Basic Principles Of An Optocoupler PCB

Optocouplers or optoisolators are electronic components that isolate input signals through an optical interface. The most basic form of optocoupler consists of an infrared LED and a photo-transistor within a single integrated circuit. The infrared LED is turned on when electrical current passes through and the intensity depends on the amplitude of the current. The phototransistor is activated by the LED light, which causes a short connection between its collector and emitter.

The infrared LED and the phototransistor are often separated by glass or air. This gives an electrical isolation of <10kV across the optocoupler PCB layout. As a result, optocoupler circuits are an ideal choice for isolating embedded systems from electrical interference originating from the input signal’s environment.

Besides protecting the embedded system from electrical noise, optocouplers are also used to keep low-voltage and high-voltage systems apart. For example, photo-triac, which is a variation of optocouplers, can be used to control high AC voltage devices. For example, an AC motor. This eliminates the risk of circuit faults that can cause damage to the microcontroller and its accompanying components for the device.

Single Phase Magnetic Induction Motor.
An optocoupler can reduce the risk of high-voltage damage.

PCB Optoisolator Tutorial: Mistakes With Optocouplers

The optocoupler is a simple passive component that most designers encounter. Getting an optocoupler PCB to work is not rocket science; however, there are a couple of design mistakes that defeat the purpose of using one or that cause unstable input signals.

1. Failing To Separate Optocoupler PCB Ground Connections.

In the basic optocoupler PCB layout, the integrated circuit (IC) consists of two ground pins. One is connected to the infrared LED and the other is connected to the phototransistor. A mistake is connecting both grounds together when routing the PCB. In my engineering experience, I’ve encountered this even in electronic controllers used in machines.

The main reason for using an optocoupler is to safely separate two circuits. When the external ground is connected to the PCB, any ground noises from the circuitry can directly couple to the sensitive onboard circuit. Instead, create a separate signal connection for the external ground pins and allocate dedicated connectors for the input ground wires.

2. Using The Wrong Value For The Current Limiting Resistor

Besides applying the proper output voltage, the optocoupler’s infrared LED requires adequate current to function properly. The value of the minimum forward current output can be referred from the Current Transfer Ratio chart of the respective optocoupler. If the current limiting resistor performs at the optocoupler’s minimum value, the phototransistor may behave irregularly. For example, out of 10 valid inputs from the switches, only part of it will be detected.

On the other hand, the value of the limiting resistor should not be too low. This is to prevent the infrared LED from breaking down. Like regular LEDs, the infrared LED has a maximum forward current that should not be overshot. This makes choosing the right current limiting resistor a crucial step in ensuring a reliable optocoupler PCB operation.

Image of purple light
As the name implies, enough current need is needed to light up the infrared LED

3. Choosing The Wrong Optocoupler

As general as it may seem, not all optocouplers are built the same. For example, the opto-triac is used for controlling an AC load and opto-Darlington is ideal for situations where only a small amount of input current is generated. Another consideration is the Collector-Emitter breakdown output voltage, which can vary for different models of optocouplers.

But if you’re just using optocoupler design guide for normal input isolators, models like PC817 will do the trick. You’ll also spend less time creating footprints since the generic optocoupler electronic component in your PCB design software will do the trick. When you need to access an easy-to-use PCB layout tool that includes everything needed to build high-quality manufacturable circuit boards, look no further than CircuitMaker. In addition to easy-to-use PCB design software, all CircuitMaker users have access to a personal workspace on the Altium 365 platform. You can upload and store your design data in the cloud, and you can easily view your projects via your web browser in a secure platform.

Start using CircuitMaker today and stay tuned for the new CircuitMaker Pro from Altium.

Related Resources

Related Technical Documentation

Back to Home
Thank you, you are now subscribed to updates.