Lesson 1/176%
MODULE 01 — FOUNDATION

Introduction to Optocouplers

An optocoupler moves a signal between two circuits that share no electrical connection at all — the signal crosses the gap as light. That one trick makes it possible to let a 3.3 V microcontroller safely command a 400 V motor drive, to close the feedback loop of an offline power supply across the mains barrier, and to keep a patient-connected sensor galvanically separated from mains-powered equipment. This module builds the foundation: what an optocoupler is, what is inside it, how Current Transfer Ratio and isolation voltage are defined, and where it stands against modern digital isolators.

Learning Objectives

Define an optocoupler and its purpose
Explain galvanic isolation
Describe signal transfer using light
Identify internal components
Calculate Current Transfer Ratio (CTR)
Interpret isolation voltage ratings
Compare isolation technologies
Recognize advantages and limitations

Signal Transfer Across the Barrier

Watch the signal change domains: an electrical current drives an infrared LED, photons cross the transparent isolation barrier, and a photodetector converts the light back into an electrical current on the other side. At no point does a conductor bridge the two sides — the only thing crossing the gap is light.

An optocoupler — also called an optoisolator or optical isolator — is a component that transfers an electrical signal between two isolated circuits by using light as the intermediate carrier. Inside a single package, an infrared LED faces a photodetector across a transparent insulating barrier. When current flows through the LED, it emits infrared light; the detector absorbs that light and produces a proportional output current.

The purpose is galvanic isolation: the input and output share no conductive path, no common ground, and no direct capacitive or magnetic coupling worth mentioning. The two sides can sit at potentials thousands of volts apart, and the signal still gets through — because photons do not care about the voltage difference between the circuits they connect.

Definition. An optocoupler is a four-or-more terminal device that couples a signal from an input LED to an output photodetector through an optical path, while maintaining galvanic isolation between input and output circuits, typically rated for 2.5–5 kVrms.

Basic operation in one sentence: input current in → light across the gap → output current out. The input side behaves like a normal LED (forward voltage ~1.1–1.5 V for infrared devices, driven at 1–20 mA), and the output side behaves like the chosen detector device — most commonly a phototransistor whose collector current is controlled by the light it receives instead of by a base current.

Isolation vs level shifting. A level shifter translates a signal between voltage domains that share a common ground (e.g., 1.8 V logic to 3.3 V logic). An optocoupler provides galvanic isolation: the domains share nothing. Every optocoupler can level-shift, but no plain level shifter can isolate. Section 8 shows both circuits side by side.

Isolation is rarely optional. It is demanded either by safety standards (a human must never form a path to mains), by signal integrity (two grounds that disagree by a few volts will corrupt any ground-referenced signal), or by the physics of power conversion (the feedback signal of an offline SMPS must cross the primary–secondary barrier somehow). The main reasons engineers reach for an optocoupler:

Safety

Prevents hazardous voltage from reaching user-accessible circuits. Safety standards (IEC 62368-1, IEC 60601-1) mandate isolation barriers between mains and touchable low-voltage parts.

Ground loop elimination

Two chassis grounds 100 m apart can differ by volts. An optocoupler breaks the loop: signal passes, circulating ground current cannot.

Noise immunity

Switching transients, relay kickback, and common-mode noise on the field side stay on the field side. Only the intended signal crosses as light.

High-voltage isolation

Lets logic-level circuits observe or command circuits riding on hundreds of volts — gate drivers, DC-bus monitors, AC line detection.

Protection of low-voltage electronics

A miswired field input or an inductive spike destroys a 20-cent optocoupler, not the microcontroller behind it.

Analog/digital domain separation

Keeps noisy digital switching currents out of sensitive analog measurement grounds, e.g. in instrumentation front ends.

Industrial reality check. A PLC digital input card routinely receives 24 V signals from sensors wired across an entire factory floor. Motor contactors bang the local ground around, welders inject spikes, and the sensor ground may float volts away from the PLC ground. Every one of those inputs goes through an optocoupler precisely so that none of this chaos reaches the backplane logic.

Isolation predates the optocoupler by decades. Click each era to see what the dominant technology was, what problem it solved, and what pushed the industry to the next step.

The cross-section below shows a classic 4-pin DIP phototransistor optocoupler. Click any labelled part of the diagram to read what it does. The same anatomy applies to all output variants — only the detector die changes (photodiode, Darlington pair, TRIAC, SCR, or MOSFET driver).

LED Detector 1 Anode 2 Cathode 4 C 3 E Click: molding · optical path · barrier · LED · detector · lead frame
Select a component

Click any part of the cross-section to learn its function — the infrared LED, the photodetector die, the transparent optical path, the insulating barrier, the lead frame, or the molding compound.

Output-stage family. The detector die defines the device family: phototransistor (general purpose, e.g. PC817), photodiode + amplifier (high speed, e.g. 6N137), photo-Darlington (high gain, slow), photo-TRIAC (AC load switching, e.g. MOC3021), photo-SCR (latching DC/AC control), and MOSFET gate driver (solid-state relays, e.g. TLP3906).

Six things happen, in order, every time an optocoupler transfers a bit or an analog level:

1. LED forward bias
2. Photon generation
3. Optical transmission
4. Photodetection
5. Output transistor conducts
6. Electrical output

When the input current \(I_F\) forward-biases the LED, electron–hole recombination in the GaAs junction releases energy as infrared photons (typically 850–940 nm). The photons travel through the transparent silicone optical path and the insulating film, and are absorbed in the detector's base–collector region, generating a photocurrent. In a phototransistor output, that photocurrent acts exactly like a base current and is amplified by the transistor's gain \(h_{FE}\), producing the collector current \(I_C\). Remove \(I_F\), and the photon flux — and therefore \(I_C\) — collapses.

Animation: photons (amber) generated at the LED junction cross the isolation barrier (violet) and strike the detector, releasing collector current (green electrons) into the output circuit.

CTR is the single most important optocoupler parameter. It is the "current gain" of the whole optical chain — how much collector current you get out for the LED current you put in:

\[ CTR = \frac{I_C}{I_F} \times 100\% \]

Output type Typical CTR Notes
Photodiode 0.1–0.2% Fast, needs external amplification
Phototransistor (e.g. PC817) 50–600% Sorted into CTR bins/ranks (A/B/C/D)
Photo-Darlington 100–5000% Very high gain, slow (≈100 μs)
Logic-output (e.g. 6N137) n/a (specified as thresholds) Internal amplifier, CTR concept replaced by IF(on)

CTR is not a constant. It varies with LED current (peaks around 1–10 mA and falls at both extremes), drops with temperature (roughly −0.5%/°C for phototransistor types), spreads 3:1 or more between manufacturing lots (hence the letter-coded CTR bins), and — critically — degrades over the life of the part as the LED ages. Design rules of thumb: assume CTR can fall to 50% of its initial minimum by end of life, and always design around the minimum binned value, never the typical.

Aging. LED light output decays with accumulated operating hours and current density — faster at high IF and high temperature. A circuit that "just barely" saturates its output transistor on day one will fail in the field years later when CTR has quietly halved. This is the #1 long-term optocoupler failure mode.

Interactive CTR Calculator

Set the LED current, CTR bin, temperature, and aging assumption. The calculator shows the collector current you can actually count on — and whether it saturates a typical 10 kΩ-pull-up logic input.

LED forward current IF 5 mA
Ambient temperature 25 °C
Effective CTR
Collector current IC
Saturation check (needs ≥ 0.5 mA for 10 kΩ @ 5 V)

"5 kV isolation" on a datasheet does not mean you may operate the part with 5 kV across it continuously. Several distinct voltage ratings describe the barrier, and confusing them is a classic safety-review failure:

Rating Symbol Meaning Typical value
Isolation (withstand) voltage VISO Survives this AC rms for 60 s in a Hi-Pot test — a test rating, not an operating rating 2.5 / 3.75 / 5 kVrms
Working voltage VIORM Maximum repetitive peak voltage allowed across the barrier continuously, for life 560–1414 Vpeak
Surge / impulse voltage VIOSM / VIOTM Survivable 1.2/50 μs lightning-type impulse or transient overvoltage 6–10 kVpeak

Safety standards additionally classify the barrier's quality: basic insulation provides one level of protection, while reinforced insulation is equivalent to two independent barriers and is what medical (IEC 60601-1) and most consumer (IEC 62368-1) applications require between mains and touchable circuits. Certification marks to look for: UL 1577 (component recognition, the Hi-Pot rating), IEC 60747-17 / VDE 0884-17 (working voltage, partial discharge, surge — the rating that legally supports reinforced insulation claims).

Isolation Requirement Checker

Enter your system's working voltage and required insulation class; the checker suggests the minimum optocoupler ratings to specify.

System working voltage (AC rms across barrier) 230 V
Min. VIORM (repetitive peak)
Suggested VISO (UL 1577 test)
Min. impulse withstand VIOTM
Guidance

Educational estimate based on typical IEC 62368-1 / IEC 60747-17 practice. Always verify against the applicable end-product standard and the device's VDE/UL certificates.

The optical link itself sets several of the optocoupler's personality traits. The LED emits in the near-infrared (850–940 nm), where GaAs emitters are efficient and silicon detectors respond well. Only a fraction of emitted photons reach the detector — the coupling efficiency — which is why CTR depends so strongly on package geometry. Response time is limited by LED turn-on/turn-off and, dominantly for phototransistors, by the collector-base capacitance being charged through a high-impedance photocurrent: hence the classic 3–4 μs rise/fall of a PC817 versus 20–50 ns for a photodiode + amplifier device.

850–940 nm
IR wavelength
< 1 pF
Barrier capacitance
3–18 μs
Phototransistor switching
≤ 50 ns
Logic-output switching

Isolation vs level shifting — two different jobs

Level shifter (shared ground)
1.8 V MCU 3.3 V logic COMMON GROUND

Translates logic levels; ground current and noise pass freely.

Optocoupler (no shared anything)
Field 24 V MCU 3.3 V GND A GND B ⚡ gap

Two independent grounds; only the optical signal crosses.

Advantages

True galvanic isolation

No conductive path at all; barrier capacitance under 1 pF gives excellent common-mode noise rejection.

Inherent noise immunity

Photons are unaffected by electric or magnetic interference in the gap — unlike capacitive or magnetic isolators.

No power needed to stay off

An unpowered optocoupler passes nothing — a fail-safe default that digital isolators must engineer in.

Low cost & simplicity

A PC817 costs cents, needs one resistor to run, and works from DC to its bandwidth limit — no encoding, no clock.

Compact, standardized packages

4-pin DIP/SMD packages with decades of second-source compatibility across vendors.

Analog capable

Linear optocouplers (e.g. IL300, HCNR201) pass analog signals across the barrier; TRIAC/SCR types switch AC directly.

Limitations

CTR aging

LED output decays over years of operation; designs must include 50% end-of-life CTR margin.

Temperature sensitivity

CTR falls ~0.5%/°C; high ambient plus self-heating can halve available gain at 85–100 °C.

Bandwidth & delay

Phototransistor types manage ~10–100 kHz; even fast logic types trail modern digital isolators (150 Mbps vs 600 Mbps+).

Input power draw

The LED needs milliamps continuously — significant for battery devices and dense multi-channel I/O.

Limited output current

Milliamps only; driving anything substantial requires a buffer stage or a gate-driver variant.

Wide parameter spread

3:1 CTR spread per bin plus aging plus temperature makes worst-case design mandatory, not optional.

Interactive comparison — isolation technologies

Click a criterion to highlight the strongest technology in each row.

Technology Speed Isolation Power Cost EMI emitted Lifetime / aging
Optocoupler DC–150 Mbps (type-dependent) Up to 5 kVrms, reinforced mA-level LED drive Lowest (cents) Essentially none CTR degrades with age
Digital isolator (capacitive) Up to 600 Mbps+ Up to 5 kVrms, reinforced Low, scales with data rate Moderate Carrier/edge emissions No wear-out mechanism
Digital isolator (magnetic) Up to 150–600 Mbps Up to 5 kVrms Low–moderate Moderate Susceptible to/emits magnetic fields No wear-out mechanism
Isolation transformer AC only; bandwidth-limited Very high (tens of kV possible) Passive but lossy High; bulky Stray field leakage Very long life
Fiber-optic link Gbps over km distances Effectively unlimited Transceivers at both ends Highest Zero Transmitter LED/laser ages

Scores are qualitative engineering judgment for typical devices in each class; Module 15 treats this comparison quantitatively.

PLC digital input

24 V field signal → series resistor → optocoupler LED → backplane logic. Isolates kilometres of factory wiring, contact bounce, and ground offsets from the CPU. Typically PC817-class parts, one per channel.

SMPS feedback loop

The classic TL431 + PC817 pair: the secondary-side error amplifier drives the LED, and the phototransistor adjusts the primary-side PWM controller — regulation information crosses the mains barrier optically.

MCU → high-power actuator

A 3.3 V GPIO fires an optocoupler whose output drives a relay or contactor coil supply. A shorted coil driver can never reach the microcontroller.

Motor drive gate isolation

Gate-driver optocouplers (HCPL-3120 class) sit between the PWM controller and IGBT/SiC gates riding on a switching DC bus — surviving 50–100 kV/μs common-mode transients (CMTI).

Medical patient interface

IEC 60601-1 demands reinforced isolation and microamp leakage limits between patient-applied parts and mains equipment; optocouplers carry sensor data across the patient-isolation barrier.

Solar inverter sensing

String voltages of 600–1500 V DC must be monitored by grounded control electronics; isolated feedback and trip signals commonly use optocouplers rated for reinforced insulation.

AC zero-cross detection

A back-to-back-LED optocoupler across the (resistor-fed) AC line produces a logic pulse at each mains zero crossing — the timing reference for TRIAC dimmers and soft-start circuits.

1. Designing to typical CTR. The datasheet "typical" is a marketing number. Use the binned minimum, then derate it for temperature and end-of-life aging. If the output must saturate, prove it at CTRmin × 0.5.
2. Ignoring aging entirely. Field returns after 5–10 years with "intermittent input" symptoms are textbook LED degradation. Higher LED current accelerates it — don't buy speed with IF you'll pay for in lifetime.
3. Wrong LED current. Too little (<1 mA) and CTR collapses and noise margin vanishes; too much (>20 mA continuous) and aging accelerates sharply. The sweet spot for most phototransistor parts is 2–10 mA.
4. Ruining the barrier on the PCB. A 5 kV optocoupler is useless if a ground pour sneaks under the package or creepage between input and output pads is 2 mm. Respect creepage/clearance; slot the board under the part if needed (Module 11).
5. Wrong package/class for the safety file. Reinforced applications need parts with the VDE 0884-17 certificate and adequate VIORM — not just any part with "5 kV" in the title. Auditors read certificates, not headlines.
6. Expecting speed the family can't deliver. A photo-Darlington will not do 100 kHz; a PC817 will not do 1 Mbps. Match the output family to the bandwidth first, then optimize everything else.

Key takeaways

  • An optocoupler transfers signals as light across a galvanic isolation barrier — input LED, optical path, photodetector output, no shared conductor.
  • CTR = IC/IF × 100% is the device's gain; it varies with bin, current, temperature, and — irreversibly — with age.
  • Isolation voltage (VISO, a 60 s test rating) and working voltage (VIORM, a lifetime rating) are different numbers with different jobs; reinforced vs basic insulation is a certification matter, not a datasheet headline.
  • Optocouplers win on cost, true optical noise immunity, and fail-safe "dark = off" behavior; digital isolators win on speed, power, and freedom from aging.
  • Design worst-case: minimum binned CTR, derated for temperature, halved for end of life.

Essential equations

\( CTR = \dfrac{I_C}{I_F} \times 100\% \)   •   \( I_F = \dfrac{V_{drive} - V_F}{R_{LED}} \)   •   \( I_{C(min)} = I_F \times CTR_{min} \times k_{temp} \times k_{age} \)

Quick reference

Parameter Typical value Design note
LED forward voltage VF 1.1–1.5 V @ 10 mA Use 1.2 V for resistor sizing
Recommended IF 2–10 mA Balance CTR vs aging
CTR (PC817B) 130–260% Design at 130% × derating
VISO 2.5 / 3.75 / 5 kVrms 60 s test rating (UL 1577)
Phototransistor tr/tf 3–18 μs Limits practical use to < ~50 kHz
Barrier capacitance 0.5–1 pF Sets common-mode immunity

Knowledge Check

Four parts: 15 multiple-choice questions, 10 true/false statements, a matching exercise, and 3 design scenarios. Score 80% on the multiple choice to pass the module.

Part A — Multiple Choice

Question 1 of 15  •  Score: 0/15

Part B — True or False

Score: 0/10

Part C — Match Output Type to Application

Drag each optocoupler family onto its best-fit application (or click a chip, then click a target). Wrong drops bounce back with an explanation.

Placed: 0/5

Part D — Design Scenarios

Scenario 1 — The output that stopped saturating
A 24 V PLC input uses a PC817A (CTR 80–160%) with IF = 2 mA, output pulling down a 10 kΩ resistor from 5 V. It works in the lab. Predict its 10-year field behavior at 60 °C ambient, and fix the design.
Analysis. Required IC is 0.5 mA. At CTRmin = 80%: IC = 2 mA × 0.8 = 1.6 mA — a 3.2× margin when new. Apply temperature derating (~0.85 at 60 °C) and end-of-life aging (×0.5): 1.6 × 0.85 × 0.5 ≈ 0.68 mA. Margin has shrunk to 1.36× — marginal, and any below-nominal IF (resistor tolerance, low supply) pushes it into failure. Fix: raise IF to 5 mA and/or specify the B bin (130% min): 5 mA × 1.3 × 0.85 × 0.5 = 2.76 mA — a healthy 5.5× end-of-life margin.
Scenario 2 — Choosing the barrier for a 230 V medical supply
An SMPS feedback path crosses the mains barrier in a 230 V AC medical device (IEC 60601-1, 2×MOPP required). What insulation class and certifications must the optocoupler carry?
Answer. 2×MOPP at 230 V requires reinforced insulation: a part certified to IEC 60747-17 / VDE 0884-17 with VIORM ≥ 354 Vpeak (higher in practice — parts rated 890 Vpeak are common), VISO of 5 kVrms (4 kVrms is the usual 2×MOPP minimum at 250 V working voltage), and 8 mm creepage package (wide-body). UL 1577 recognition alone is not sufficient for the reinforced claim — the VDE working-voltage certificate is what the 60601 safety file cites.
Scenario 3 — Optocoupler or digital isolator?
You must isolate (a) a 10 Mbps SPI bus in a battery-powered meter, and (b) a fail-safe emergency-stop input that must read "stop" if the isolator loses power. Which technology fits each, and why?
Answer. (a) Digital isolator: 10 Mbps exceeds economical optocoupler speed, and μA-level idle current beats milliamps of LED drive in a battery budget. (b) Optocoupler: with no LED current there is no light and the output is guaranteed off — an intrinsically fail-safe dark state. Many digital isolators power up in a defined but powered state; proving fail-safety through a powered device is harder in a safety case. Choose per channel, not per fashion.

Additional Resources

Reference datasheets

Sharp/Öncora PC817 (phototransistor workhorse) • Vishay 4N35 • onsemi 6N137 (10 Mbps logic) • Toshiba TLP785 • onsemi MOC3021 (TRIAC driver) • Broadcom HCPL-3120 (gate driver) • Vishay IL300 (linear).

Application notes

Vishay AN "Optocoupler CTR and Response Time" • Toshiba "Optocoupler Application Notes" (basic characteristics & usage) • Renesas "Photocoupler Application Notes" • Broadcom AV02 series on gate-drive optocouplers and CMTI.

Standards to know

UL 1577 (component isolation test) • IEC 60747-17 / VDE 0884-17 (optocoupler safety characteristics) • IEC 62368-1, IEC 61010-1, IEC 60601-1 (end-product insulation requirements) — covered in Module 16.

Keep learning

Module 2 deepens the "why" with fault-current analysis and regulatory context; Module 5 tours every output family; Module 10 works complete, values-included design examples.