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.
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.
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 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.
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).
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.
Six things happen, in order, every time an optocoupler transfers a bit or an analog level:
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.
"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).
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.
Isolation vs level shifting — two different jobs
Level shifter (shared ground)
Translates logic levels; ground current and noise pass freely.
Optocoupler (no shared anything)
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.
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
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.