Education – Introduction to the Optocoupler

Hello everyone!

Today we are going to start examining Optocouplers. These are an interesting and quite convenient component, and relatively easy to implement.

First of all, what is an optocoupler?

It is a small device that allows the transmission of a signal between parts of a circuit while keeping those two parts electrically isolated. How is this so? Inside our typical optocoupler are two things – an LED and a phototransistor. When a current runs through the LED, it switches on  – at which point the phototransitor detects the light and allows another current to flow through it. And then when the LED is off, current cannot flow through the phototransistor. All the while the two currents are completely electrically isolated (when operated within their stated parameters!)

Let’s have a look at some typical optocouplers. Here are the schematic symbols for some more common units:


Switching DC current will flow from A to B, causing current to flow from C to D. The schematic for figure one is a simple optocoupler, consisting of the LED and the photo-transistor. However, this is not suitable for AC current, as the diode will only conduct current in one direction. For AC currents, we have an example in figure two – it has diodes positioned to allow current to flow in either polarity. Figure three is an optocoupler with a photodarlington output type. These have a much higher output gain, however can only handle lesser frequencies (that is, they need more time to switch on and off).

Physically, optocouplers can be found in the usual range of packaging, such as:


Notice the DIP casing doesn’t have the semi-circle moulded into one end like ICs do, so the white dot indicates pin one.

TO-78 (“Sputnik!”)

surface-mount SOIC-8

Some of you may be thinking “why use an optocoupler, I have a relay?” Good question. There are many reasons, including:

  • Size and weight. Relays are much larger, and heavier;
  • Solid state – no moving parts, so no metal fatigue;
  • Optocouplers are more suited to digital electronics – as they don’t have moving parts they can switch on and off much quicker than a relay;
  • Much less current required to activate than a relay coil
  • The input signal’s impedance may change, which could affect the circuit – using an optocoupler to split the signal removes this issue;

Furthermore, the optocoupler has many more interesting uses. Their property of electrical isolation between the two signals allows many things to be done. For example:

  • you might wish to detect when a telephone is ringing, in order to switch on a beacon. However you cannot just tap into the telephone line. As the ring is an AC current, this can be used with an AC-input optocoupler. Then when the line current starts (ring signal) the optocoupler can turn on the rest of your beacon circuit. Please note that you most likely need to be licensed to do such things. Have a look at the example circuits in this guide from Vishay: Vishay Optocouplers.pdf.
  • You need to send digital signals from an external device into a computer input – an optocoupler allows the signals to pass while keeping the external device electrically isolated from the computer
  • You need to switch a very large current or voltage, but with a very small input current;
  • and so on…

But as expected, the optocoupler has several parameters to be aware of. Let’s look at a data sheet for a very common optocoupler, the 4N25 – 4N25 data sheet.pdf – and turn to page two. The parameters for the input and output stages are quite simple, as they resemble those of the LED and transistor. Then there is the input to output isolation voltage – which is critical. This is the highest voltage that can usually be applied for one second that will not breach the isolation inside the optocoupler.

Side note: You may hear about optoisolators. These are generally known as optocouplers that have output isolation voltages of greater than 5000 volts; however some people regularly interchange optocouplers and optoisolators.

The next parameter of interest is the current-transfer ratio, or CTR. This is the ratio between the output current flow and the input current that caused it. Normally this is around ten to fifty percent – our 4N25 example is twenty percent at optimum input current. CTR will be at a maximum when the LED is the brightest – and not necessarily at the maximum current the LED can handle. Once the CTR is known, you can configure your circuit for an analogue response, in that the input current (due to the CTR) controls the output current.


Finally, the frequency, or bandwidth the optocoupler can accept.  Although this can be measured in microseconds, these parameters can be altered by other factors. For example, the higher the frequency of the current through the input stage, the less accurate the output stage can render the signal. The phototransistors can also be a function of the maximum bandwidth; furthermore if the optocoupler has a darlington output stage, the bandwidth can be reduced by a factor of ten. Here is an example shown on the old cathode-ray oscilloscope. I have set up a digital pulse, at varying frequencies. The upper channel on the display is the input stage, and the lower channel is the output stage:

Notice as the frequency increases, the ability of the output stage to accurately represent the input signal decreases, for example the jitter and the generally slow fall time. Therefore, especially working with high speed digital electronics, the bandwidth of your optocoupler choice does need to be taken into account.

Thus ends the introduction to optocouplers. I hope you understood and can apply what we have discussed today. In the meanwhile have fun and keep checking into Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

Some information from various Isocom and Vishay data sheets and publications; various optocoupler images from element14.

The following two tabs change content below.

John Boxall

Person. Founder and original author for VK3FJBX

14 thoughts on “Education – Introduction to the Optocoupler

  1. highwar

    my question is ,maby anote
    telephone freq ring is 400-450 hz I have a circuit that works with optocoupler 4n25 but at the youtube link at 500 hz the optocoupler didnt work properly
    what I did is put a resistor and a capacitance at the output and it did detect ringing tone ( maby missed the first one once in 5 times)

  2. Pingback: Starter Kit » Separacja galwaniczna czyli transoptor aka optocoupler

  3. Jollino

    For an opto-isolator to act as a relay (ie. shorting two “external” lines), one would simply connect such lines to pins 4 and 5 (collector and emitter), and leave pin 6 (base) disconnected as the base is triggered by the LED across pins 1 and 2, correct?
    Thank you. 🙂

  4. amirhossein

    Thanks for your complete overview.
    I have a question , is any special application for optocouplers in chemical industry ?

  5. Michael Bataragoa

    Hello, great tutorial here as well as tons of arduino tutorials, however i have a question. can i use optocoupler’s output as mikrokontroler input ? for example, optocoupler’s switch-transistor to switch arduino input either high or low.

    1. John Boxall

      You could – however not at a high frequency. See the video at the end of this post. Treat it as you would a button with a pull-down resistor and so on. However experiment first to check for yourself.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.