Electrical
Opto-Isolator
LED plus photodetector in one package — a signal hop across kilovolts of isolation, carried by photons
An opto-isolator couples an LED to a photodetector inside a single light-tight package, transmitting a logic or analog signal across a galvanic-isolated dielectric barrier rated typically 2.5 to 10 kV. The input and output grounds share no electrical path — only photons cross the gap — making it the workhorse component for safely bridging logic and high-voltage power circuits, instrumentation, and patient-contact medical electronics.
- Isolation rating2.5 – 10 kV
- CTR (phototransistor)20 – 100%
- 4N25 speed~10 μs (10 kHz)
- 6N137 speed75 ns (10 Mbit/s)
- Output typesBJT, MOSFET, SCR, photodiode
- Invented~1968 (GE H11A1)
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
How it works
An opto-isolator is the simplest galvanic isolator in production: two semiconductor devices in one moulded package, separated by a transparent dielectric and looking at each other across it. On the input side, an infrared LED — typically gallium-arsenide, emitting around 940 nm — converts forward current into photons. On the output side, a silicon photodetector absorbs those photons and produces a collector current, a switched MOSFET channel, a gated SCR, or a tiny photodiode current that drives an internal amplifier. The two halves of the package share nothing but a transparent epoxy or silicone gel; there is no copper trace, no bond wire, no resistive path between input ground and output ground.
That asymmetry is the entire point. The input LED can sit on logic ground at 5 V, while the output transistor can ride on a floating rail that is thousands of volts above (or below) that logic ground. Photons cross the gap at the speed of light regardless of the potential difference. The barrier between them is rated by its dielectric strength — the voltage at which the gel arcs over and lets current jump — typically 2.5 kV, 5 kV, or 7.5 kV for a one-minute hi-pot test, with reinforced-isolation parts going to 10 kV.
Current transfer ratio
The fundamental DC transfer specification is the current transfer ratio:
CTR = I_C / I_F (typically 20 – 100% for phototransistor parts)
Drive 10 mA into the LED and a CTR-50% part will sink about 5 mA at the collector — assuming the collector load lets the transistor stay in its active region. The number is a property of the LED-detector geometry, the LED's external quantum efficiency, and the phototransistor's internal current gain. It is also a moving target: LEDs slowly degrade with hours-at-temperature-at-current, so the same part that ships at CTR = 100% may drop to 50% after a few thousand hours of continuous operation. Designs target the worst-case end-of-life CTR with margin, not the typical fresh value on the datasheet.
For higher CTR, the output stage can be a Darlington pair (4N32, 6N138) which multiplies gain by a factor of 100-1000 — giving CTRs above 500% — at the cost of speed. Higher-current LEDs and matched detector geometry can also bump CTR; the Avago/Broadcom HCPL series tightens part-to-part variation by laser-trimming the LED and binning detectors.
Speed and bandwidth
Speed is the single dimension along which opto-isolator families differ the most. Three regimes dominate the market.
| Family | Output | Typical part | t_PHL / t_PLH | Max data rate |
|---|---|---|---|---|
| Slow phototransistor | BJT | 4N25, PC817, CNY17 | 3 – 10 μs | ~10 kHz |
| Darlington | BJT Darlington | 4N32, 6N138 | 30 – 50 μs | ~2 kHz |
| High-speed digital | Photodiode + logic gate | 6N137, HCPL-2601, HCPL-2611 | 50 – 100 ns | 10 Mbit/s |
| Gate driver | Bipolar push-pull, 2-4 A peak | HCPL-3120, ACPL-W346, FOD3120 | 200 – 500 ns | Switching, not data |
| Linear | Matched photodiode + sigma-delta | HCPL-7800, ACPL-C87B | 1 – 3 μs | ~100 kHz analog BW |
| SCR / triac driver | Photo-SCR or photo-triac | MOC3041, MOC3081 | ms-scale | Mains-frequency switching |
| Photo-MOSFET (SSR) | Two photo-MOSFETs back-to-back | AQY212, TLP222 | 0.1 – 1 ms | Solid-state relay |
The 4N25's speed limit comes from base-charge storage in its phototransistor. The base is its photoactive region — there is no base lead to bleed off stored charge — so when the LED switches off, the carriers in the base must recombine on their natural lifetime, which is microseconds. The 6N137 sidesteps this by using a discrete photodiode for detection and feeding its photocurrent into a high-speed logic-gate amplifier with active pull-down. Result: 75 ns propagation delay and 10 Mbit/s clean.
Worked example: driving a 4N25 from a microcontroller
A 3.3 V GPIO needs to switch a 24 V relay coil via a 4N25 phototransistor optocoupler. The relay coil draws 60 mA at 24 V. Design the LED drive resistor and check that the optocoupler can sink the coil current.
LED forward drop: V_F ≈ 1.2 V @ I_F = 10 mA
GPIO high level: V_OH = 3.0 V (worst case)
LED drive resistor:
R_LED = (V_OH − V_F) / I_F = (3.0 − 1.2) / 0.010 = 180 Ω
Output requirement:
I_C(needed) = 60 mA
End-of-life CTR (4N25, worst case): ~20%
I_F required = I_C / CTR_min = 60 / 0.2 = 300 mA
That is FAR beyond the 4N25's I_F(max) of 50 mA.
The 4N25 alone cannot drive 60 mA.
Two fixes are common. First, use the optocoupler output to switch a small MOSFET that handles the coil current — the 4N25 only needs to source a few microamps of gate charge, and the actual coil current flows through the MOSFET on the isolated side. Second, replace the 4N25 with a Darlington-output part (4N32, CTR > 500%) and accept the slower turn-off. For relays this is fine; for PWM it is not.
Where they show up
- MOSFET / IGBT gate driver isolation. Half-bridges and three-phase inverters need the high-side switch's gate driver to float with the source rail. An HCPL-3120 or ACPL-W346 delivers a 2 A gate pulse referenced to the floating MOSFET source from a controller on logic ground.
- AC mains zero-cross detection. A current-limited LED across the rectified mains pulses off at every zero crossing. The output gives the microcontroller a 100 Hz / 120 Hz timing signal for phase-cut dimmers, triac firing, and inverter synchronisation.
- Switch-mode power supply feedback. The output voltage on the isolated secondary side feeds a TLV431 shunt regulator that pulls current through the LED of a PC817; the primary side sees the photodetector current and adjusts the duty cycle. Decades of every wall-wart, ATX PSU, and laptop brick.
- Industrial 4-20 mA loops. A factory PLC's analog inputs need to reject hundreds of volts of common-mode noise picked up by long cable runs across a plant. An optocoupler on every loop breaks the ground path and rejects everything that is not differential.
- USB and RS-232 isolation. Dedicated isolated USB transceivers (ADuM3160, USB1T20) and isolated UART parts sit between a host PC and a sensor that cannot share grounds — common in test instruments, automotive ECUs, and medical sensors.
- Medical patient-leakage isolation. IEC 60601-1 caps body-contact leakage at 10 μA (CF parts). Every signal line that crosses the patient boundary is opto- or digital-isolated to force leakage through the multi-kV barrier instead of the cable shield.
- Solid-state relays. A photo-MOSFET output (AQY212) or photo-SCR (MOC3041) replaces a mechanical relay's contacts with a fully isolated semiconductor switch — zero contact bounce, silent, no wear.
Picking a part
The first cut is the output type:
- Slow logic / control signals. 4N25, PC817, CNY17 — cheap, ubiquitous, 10 kHz max.
- Fast digital data (UART, SPI clock, PWM). 6N137, HCPL-2611 — 10 Mbit/s with the photodiode-plus-amplifier topology.
- Gate drive into a power FET. HCPL-3120, ACPL-W346, FOD3120 — push-pull output, 2-4 A peak source/sink, designed for V_iso ≥ 5 kV and high CMTI (common-mode transient immunity).
- Analog feedback. HCPL-7800 family, ACPL-C87B — matched photodiodes with feedback linearisation; 8-12 bit equivalent linearity.
- AC line switching. MOC3041 (zero-cross triac driver), MOC3081 (random-phase triac driver) — the canonical interface from a 5 V MCU to a 230 VAC load.
- Solid-state relay. Photo-MOSFET parts (AQY212, TLP222) for sub-amp signal switching with no contact bounce.
The second cut is the isolation rating: 2.5 kV is sufficient for "functional" isolation inside a low-voltage product; 5 kV is the standard for "basic" safety isolation against mains; 7.5 to 10 kV reinforced is required when the part is the sole safety barrier between a user-touched surface and AC mains.
Versus digital isolators
Since roughly 2010, capacitive (Silicon Labs Si84xx) and giant-magnetoresistive (Analog Devices ADuM, NVE IsoLoop) digital isolators have eaten significant share from optocouplers in the high-speed and high-reliability slots. Their advantages are concrete:
| Metric | Optocoupler (6N137) | Digital isolator (Si8410) |
|---|---|---|
| Propagation delay | 75 ns | 10 ns |
| Data rate | 10 Mbit/s | 150 Mbit/s |
| Channel-to-channel skew | ~50 ns | < 2 ns |
| Service life (50% CTR drop) | 10⁴ – 10⁵ hours | Effectively unlimited |
| Common-mode transient immunity | 10 – 25 kV/μs | 50 – 100 kV/μs |
| Quiescent supply | ~5 mA per channel | 1 – 3 mA per channel |
| Cost at 1 ku | $0.30 – $1.50 | $1 – $3 |
Optocouplers still hold the field where: (a) the part needs to bridge analog feedback with photo-linearity, (b) the application is low-speed and cost-sensitive (PC817 is pennies), (c) the output happens to be a SCR or photo-MOSFET that digital isolators do not natively provide. Most newly-designed isolated UART, SPI, and CAN links are now digital isolators; new SMPS feedback loops increasingly use digital isolators plus a digital controller; new gate-driver designs split — high-speed silicon-carbide drives push to digital, mainstream IGBT drives still ship with optocoupled gate drivers because the existing reference designs work.
Common pitfalls
- Designing to typical CTR instead of end-of-life worst case. A part that works on the bench at CTR = 100% may drop to CTR = 30% after 5000 hours, leaving the design starving for output current. Always size for the minimum CTR over temperature and lifetime.
- Forgetting the LED drive resistor. The LED is a forward-biased diode; without a series resistor it is a short circuit and burns up at first power-on. Compute R = (V_drive − V_F) / I_F.
- Treating the 4N25 as a digital part. Its 10 μs turn-off is a bandwidth ceiling, and its CTR drift makes its on-resistance unpredictable. Above a few kHz, use the 6N137 family.
- Ignoring CMTI in gate-driver applications. When a high-side MOSFET switches the bus, dV/dt across the optocoupler can hit 50 kV/μs. A part with CMTI of 10 kV/μs will glitch — your gate fires when it shouldn't, the bridge cross-conducts, the inverter dies. Always pick a gate-driver optocoupler with CMTI well above the worst-case dV/dt of your switching node.
- Trusting isolation voltage as a working voltage. A 5 kV-rated part is rated for a one-minute hi-pot test. The maximum continuous working voltage across the barrier is set by creepage, clearance, and pollution-degree rules (IEC 60664-1) — often a few hundred volts on the same part. Always read the working-voltage spec, not just the isolation rating.
- Using a phototransistor optocoupler for analog signals. CTR is nonlinear in I_F, drifts with temperature, and ages with time. A plain optocoupler in an analog feedback path bakes those nonlinearities into your control loop. Use a linear optocoupler (HCPL-7800) or a digital isolator + ADC.
Frequently asked questions
What does the isolation voltage rating actually mean?
Isolation voltage is the breakdown strength of the dielectric barrier between the LED and the detector — typically the moulded epoxy or silicone gel that fills the gap. Common ratings are 2.5 kV, 5 kV, and 7.5 kV for one-minute hi-pot, with 10 kV available on reinforced parts. The number is the test voltage the part survives without arc-over; the working voltage you can sit across the barrier continuously is much lower (a few hundred volts on a 5 kV part) and is set by the creepage and clearance distances on the pinout, not just by the internal dielectric.
What is the Current Transfer Ratio (CTR)?
CTR is the DC ratio of output collector current to input LED current at a specified bias: CTR = I_C / I_F. For a typical phototransistor optocoupler like the 4N25 it is 20-100% over the rated range. CTR degrades over time — LED efficiency drops with hours of operation, especially at high drive current and elevated temperature — so designs target the worst-case end-of-life CTR (often 50% of initial) rather than the typical fresh value. Darlington-output parts (4N32, 6N138) push CTR above 500% by stacking two transistors at the cost of speed.
Why is the 4N25 slow and the 6N137 fast?
The 4N25 uses a bare phototransistor whose base is its photoactive region — and that base is floating, with no terminal to discharge it. The Miller capacitance from collector to base combined with finite base-region resistance gives turn-off times of several microseconds, capping the part at about 10 kHz of clean digital throughput. The 6N137 puts a photodiode in front of a discrete logic-gate amplifier with active pull-down, so the slow base-charge tail is replaced by a sharp CMOS switching edge. Result: 75 ns propagation delay and 10 Mbit/s clean data rate.
Why use an optocoupler for a MOSFET gate driver?
In a half-bridge or three-phase inverter the high-side MOSFET source swings between ground and the full bus voltage every switching cycle. The microcontroller driving the gate sits on logic ground and can't tolerate ±600 V common-mode swings. An optocoupler (e.g. HCPL-3120, ACPL-W346) breaks the galvanic path: the LED is referenced to controller ground while the output stage is referenced to the floating MOSFET source. Photons cross the isolation barrier in nanoseconds — at speeds high enough to drive the gate cleanly through PWM transitions — without exposing the controller to bus voltage.
How does an opto-isolator detect AC zero-cross?
Wire the mains through a current-limit resistor and a small bridge (or back-to-back diode pair) into the LED of an optocoupler. The LED conducts whenever the absolute mains voltage exceeds the LED's threshold (~1.2 V) — so it is on for almost the entire half-cycle and off only in a narrow window centred on each zero-crossing. The output transistor mirrors that: it pulses low through the zero-crossing window, giving a clean 100 Hz / 120 Hz timing signal referenced to logic ground. The microcontroller uses those edges to fire a triac for phase-controlled dimming or to synchronise an inverter.
Are digital isolators (Si8410, ISO7841) replacing optocouplers?
For high-speed digital and reinforced-isolation roles, yes. Silicon Labs Si84xx and TI ISO78xx use either capacitive or magnetic coupling across a thin-film silicon-dioxide barrier on-die. They achieve 150 Mbit/s, propagation delays under 10 ns, much tighter timing matching across channels, and orders of magnitude longer service life (no LED to age out). They also reject common-mode transients better. Optocouplers still win on cost for low-speed control signals, on linearity for analog feedback (HCPL-7800), and on simple integration into SCR/triac control. Most new high-current SMPS designs that used to use 6N137 + TLV431 feedback now use a digital isolator plus a digital controller.
How does a linear optocoupler like the HCPL-7800 work?
Plain optocouplers are nonlinear — CTR varies with I_F, temperature, and age — so they cannot pass analog signals faithfully. Linear optocouplers solve this by packaging two matched photodiodes alongside the LED: one detector sees the LED in a feedback loop that linearises the LED-to-detector transfer, and the second matched detector picks off the same light to drive the output. The HCPL-7800 family integrates this with a sigma-delta ADC and PWM-modulated optical link, delivering ±200 mV analog input with 8-12 ENOB across a 5 kV barrier — the standard for isolating motor current-sense shunts and SMPS feedback before digital isolators caught up.
Why is opto-isolation mandatory in medical equipment?
IEC 60601-1 caps the patient-leakage current that can flow through a body-contacting electrode under any single fault — typically 10 μA for cardiac-floating (CF) applied parts and 100 μA for body-floating (BF). A bare USB or RS-232 connection to a mains-powered host can deliver milliamps of leakage if the host's Y-capacitors discharge through the patient. Slotting an opto-isolator (or digital isolator) on every signal line that crosses the patient-applied-parts boundary forces all leakage to go through the multi-kV isolation barrier, dropping it well below the IEC limit. The same logic applies to dental chairs, ECG amplifiers, and pulse oximeters.