Optoisolator Relay: How to Choose, Drive, and Troubleshoot Solid-State Relay Circuits
An optoisolator relay (often called a photorelay or a solid-state relay (SSR) using optical isolation) is the part you pick when you want relay behavior—galvanic isolation, on/off switching, clean control-domain separation— but you don’t want the downsides of mechanical relays (coil power, contact bounce, arcing, wear, audible clicks, and limited life).
The catch: SSR-ish optoisolator relays fail in sneaky ways. They “work” on a bench with a resistive load and then misbehave in the real world: mystery leakage, dv/dt false triggering, surge damage, thermal runaway, or EMC noise coupling. This guide is built to stop those problems before they happen.
One-Screen Answer (Selection + Design + Procurement)
- AC mains load: Triac-output SSR optocoupler + external triac is common; watch dv/dt and snubbers.
- DC load: MOSFET-output photorelay/SSR (PhotoMOS-style) is typically the cleanest; watch RON and leakage.
- Small signal switching: Photorelay beats reed relay when you need no bounce and long life.
- High current: Often you use an optocoupler to drive a power MOSFET/IGBT or a relay driver, not a tiny photorelay.
- Isolation rating + creepage/clearance for your safety standard and pollution degree.
- Output behavior: triac vs MOSFET vs transistor (and whether you need zero-cross).
- Leakage current (why “OFF” still powers LEDs, SMPS, and high-impedance loads).
- Surge / dV/dt immunity (why it false-triggers near motors, triacs, and long cables).
- Thermal path (RON or Vdrop losses become heat; heat becomes failure).
If it’s DC and under a few hundred mA → start with a MOSFET-output photorelay (low leakage, no bounce, easy MCU drive).
If it’s AC mains and you need robust switching → opto-triac driver + external triac and design the snubber/TVS properly.
If you’re switching tiny analog signals → photorelay (watch capacitance and leakage).
If you’re switching amps continuously → treat SSR losses as a heat source and validate worst-case temperature rise.
What Is an Optoisolator Relay (and Why People Use It)?
An optoisolator relay is a switching component that combines (1) an optical input stage (usually an LED) and (2) an output switch stage (MOSFETs, triac structure, or transistor) so that your control system and load system are galvanically isolated. Your microcontroller pin (or PLC output, or FPGA GPIO) can toggle the LED current, and the output stage changes conduction without a direct electrical connection between the two sides.
Compared with a mechanical relay, the optoisolator relay is typically: silent, bounce-free, fast, and can last for a massive number of cycles. But unlike a mechanical relay, it is not an ideal open circuit when off, and it is not an ideal short circuit when on. That “non-ideal” behavior is exactly where design mistakes happen.
- Industrial IO: isolate sensor lines, enable valves/solenoids via a higher-power stage, protect PLC inputs.
- Test/measurement: switch analog paths without relay bounce, reduce ground loops.
- Medical and safety-critical: isolate patient-side circuitry from system ground (design must match standards).
- Home/IoT: switch mains loads using opto driver circuits, keep MCU safe from transients.
- Power supplies: optocouplers for feedback isolation (not a relay), and SSRs for input selection or inrush control.
.png?x-oss-process=image/auto-orient,1/quality,q_70/format,webp)
Main Types of “Optoisolator Relay” (Know Which Family You’re Actually Buying)
- Output is typically back-to-back MOSFETs (bidirectional for AC/signal, or DC-friendly variants).
- Pros: No bounce, low drive current, high isolation, great for low-level signals.
- Cons: On-resistance causes loss; off-state leakage can still matter; output capacitance can inject noise.
- Selection meaning: Think like a MOSFET switch, not like a perfect relay contact.
- Output is a triac trigger structure; often used to drive an external triac.
- Zero-cross types reduce EMI for resistive loads; random-phase is needed for phase control.
- Pros: Simple interface; strong safety separation; common in mains designs.
- Cons: Susceptible to dv/dt issues; inductive loads need snubbers; triacs have holding-current behavior.
- Often incorrectly called “opto relay,” but it’s an isolator that needs an external switching device.
- Pros: Flexible, cheap, widely available.
- Cons: You must design the driver and the power switch separately.
- Selection meaning: Best when you need custom switching current/voltage beyond photorelay limits.
Selection Logic: The 8 Questions That Pick the Right Optoisolator Relay
Don’t start with “I need an optoisolator relay, give me a part number.” Start with the questions below. They force you to choose the correct output physics (MOSFET vs triac), and they expose “hidden requirements” like surge, leakage, and dv/dt.
- Is the load AC or DC? AC mains often points to optotriac driver + triac; DC often points to MOSFET photorelay.
- What is the continuous current and inrush current? SSRs hate surprises; inrush defines survivability.
- What is the load type? Resistive, inductive (motor/solenoid), capacitive (SMPS input), or “weird” (LED driver).
- How “OFF” must OFF be? Leakage matters: ghosting LEDs and partially powering supplies is common.
- How fast must it switch? Photorelays can be fast; triac zero-cross types follow mains crossing behavior.
- What safety standard applies? Isolation rating and PCB creepage/clearance must match your category.
- What is the EMC environment? dv/dt, surge, long cables, and nearby switching nodes change everything.
- What alternates will you accept? Lock footprints that support multiple sources; define re-qualification scope up front.
.png?x-oss-process=image/auto-orient,1/quality,q_70/format,webp)
How to Drive an Optoisolator Relay from an MCU (No Guessing, Just Simple Math)
The input side is usually an LED. Your job is to provide enough LED current to guarantee switching across temperature and production variation—without overdriving the LED or your GPIO.
For a direct MCU GPIO drive (when allowed):
R = (VGPIO − VF) / IF
Pick IF using the relay’s guaranteed turn-on region (not typical), and validate the MCU’s GPIO current limit.
- Multiple relays on at once (total GPIO current becomes a power/ground noise problem).
- Long control cables (ESD/surge risk → add transistor stage + protection).
- You need stronger LED current for guaranteed turn-on at temperature extremes.
| Control source | Recommended input stage | Why |
|---|---|---|
| 3.3 V MCU GPIO | Series resistor → opto relay LED | Simplest, but check GPIO current and EMI sensitivity. |
| 5 V MCU / PLC | Series resistor + optional NPN/NMOS low-side driver | More LED current margin; easier protection placement. |
| Noisy industrial line | Driver transistor + RC filter + TVS at connector | Stops ESD/surge from punching through LED and logic ground. |
Tip: If you’re trying to meet EMC, consider slowing the input edge slightly (small RC) so you’re not injecting sharp current spikes into ground.
Load Behavior: Why Optoisolator Relays Act “Weird” (Leakage, Inrush, Holding Current)
Mechanical relays are forgiving. Solid-state switching is not. Your optoisolator relay choice must match how the load behaves in time: what happens the instant you switch, what happens at steady state, and what happens at turn-off.
Most SSR-style devices have a small leakage current when off. With high-impedance loads (LED lamps, SMPS inputs, meters), that leakage can charge capacitors, light LEDs faintly, or keep control electronics partially alive.
- Fix: add a bleeder resistor or RC network across the load (size it for safety and power).
- Fix: choose a lower-leakage MOSFET-output photorelay where possible.
Capacitive inputs (SMPS, LED drivers) can pull huge inrush for milliseconds. Inductive loads (motors, solenoids) kick back energy on turn-off. Both can exceed what the SSR can survive.
- Fix: add inrush limiting (NTC, series resistor + bypass, active circuit).
- Fix: add flyback diode (DC coils) or snubber/TVS (AC/inductive).
Triac-based switching needs a minimum current to stay latched. Very light loads can cause flicker, partial conduction, or “won’t stay on” behavior—especially with certain LED drivers.
- Fix: add a minimum-load resistor (careful: heat and safety).
- Fix: switch with a MOSFET-based solution if the load is effectively DC or very light.
.png?x-oss-process=image/auto-orient,1/quality,q_70/format,webp)
PCB Layout & Safety: Creepage/Clearance Is Part of the “Optoisolator Relay” Decision
The optoisolator relay gives you an isolation barrier inside the package—but your PCB can ruin it. If your design touches mains or high energy, you must design the board like it’s a safety component: creepage, clearance, protective spacing, slots, and controlled routing.
Putting a “high-isolation” part on a PCB where copper pours, silkscreen, or contamination effectively bridge the isolation gap. In audits and failures, this shows up as “fake isolation.” Treat the isolation boundary as sacred.
- Define a clear CONTROL zone and LOAD/HV zone; keep components and copper separated.
- Use isolation slots if needed; avoid copper under the isolation barrier unless your standard allows it.
- Place surge/ESD protection at the connector, not “somewhere on the board.”
- Keep high dv/dt nodes away from the opto input ground return to avoid false triggering.
- Document creepage/clearance targets in the design notes so alternates don’t break compliance.
EMC & dv/dt: Why Your Optoisolator Relay False-Triggers (and How to Stop It)
A classic optoisolator relay failure mode is “it turns on by itself” or “it glitches when something else switches.” That’s usually not software. It’s coupling: dv/dt, stray capacitance, ground bounce, or long-cable pickup.
- High dv/dt near the output couples through capacitance into the input side.
- Long input wiring acts like an antenna → injects current into the LED path.
- Poor ground return makes the LED reference bounce when loads switch.
- No snubber on inductive AC loads → ringing spikes cross trigger thresholds.
- RC snubber across the load or triac (for AC inductive loads).
- TVS at terminals (for surge/ESD) + series impedance where acceptable.
- Input RC filter (small) + stronger pull-down (if your input stage allows it).
- Layout discipline: keep switching currents away from LED return; star the control ground.
.png?x-oss-process=image/auto-orient,1/quality,q_70/format,webp)
Thermal Reality: SSR Losses Turn into Heat (and Heat Turns into Failure)
With MOSFET-output photorelays, you often estimate dissipation like a MOSFET: P ≈ I² × RON. With triac-based solutions, it’s closer to P ≈ I × Vdrop. If you’re switching continuously, those watts have to go somewhere.
- Use worst-case current (including duty cycle and ambient temperature).
- Don’t trust “room temp” behavior—validate at hot soak.
- Give the package copper area if allowed; route heat away from sensitive analog sections.
- For mains power switching at higher current: consider external power devices with heatsinking.
Troubleshooting Matrix: Symptoms → Likely Causes → Fixes
This section is built for real debug sessions: you’re in the lab, it’s “almost working,” and the optoisolator relay is the suspect.
| Symptom | Most likely cause | Fast tests | Fix |
|---|---|---|---|
| Load “ghosts” when OFF | Off-state leakage + load is high impedance | Measure off-state voltage/current; try a dummy resistive load | Add bleeder resistor/RC; choose lower-leakage photorelay; use mechanical relay if necessary |
| Random turn-on / glitches | dv/dt coupling, ringing, ground bounce, long input wiring | Scope input LED current, control ground, output node ringing | Add snubber/TVS; improve layout; add input RC; shielding/cable routing |
| Works with resistive load, fails with motor/solenoid | Inductive kickback; insufficient surge rating | Observe turn-off spike; check for clamp components | Add flyback diode (DC), snubber/TVS (AC), upgrade power stage |
| SSR gets hot | I²R loss (MOSFET) or I×Vdrop (triac), poor thermal path | Measure voltage drop across output at load current | Reduce current, improve copper/heatsinking, choose lower RON device, external power switch |
| AC LED lamp flickers | Holding current issue, leakage, load driver behavior | Try adding a dummy load; check with different lamp type | Minimum-load resistor (careful), different topology, MOSFET SSR approach |
Recommended Peripheral / BOM Add-ons (Conversion-Friendly, Real Projects)
Below is a practical “don’t get burned later” BOM bundle. You won’t use every item in every design, but if you design optoisolator relay switching for production, these are the components you typically reach for.
- Series resistor for LED current set (e.g., 330 Ω–2.2 kΩ typical range depending on VGPIO and IF target).
- Driver transistor (small NMOS/NPN) if multiple channels or higher IF is needed.
- Input RC (small) for noise filtering if the control line is noisy.
- TVS at control connector for ESD (especially with external wiring).
- Flyback diode for DC coils (fast recovery preferred for quicker release).
- RC snubber for AC inductive loads (start with conservative values and tune by scope).
- MOV / TVS for surge (mains and long cable loads).
- Bleeder resistor across load to eliminate ghosting (size for safety and dissipation).
- Isolation slot under/near the barrier if your creepage target demands it.
- Fusing (or resettable protection) based on fault energy analysis.
- Terminal blocks rated for voltage/creepage (don’t cheap out here).
- Test points for input current and output voltage drop (debug becomes 10× faster).
.png?x-oss-process=image/auto-orient,1/quality,q_70/format,webp)
Alternatives & Upgrade Comparison Table (When “Optoisolator Relay” Isn’t the Best Answer)
Sometimes you search “optoisolator relay” but what you actually need is a different architecture. Use this table to choose the most robust path based on current, environment, and compliance.
| Option | Best for | Pros | Cons / watch-outs |
|---|---|---|---|
| MOSFET photorelay (optoisolator relay) | DC loads, signal switching, silent long-life switching | No bounce; easy MCU drive; high isolation | RON heating; leakage; output capacitance coupling |
| Optotriac + external triac | AC mains switching, moderate/high current | Mature topology; good for resistive loads | dv/dt sensitivity; snubber required; holding current quirks |
| Mechanical relay + optocoupler driver | When you need true open circuit and low on resistance | Near-zero leakage when open; handles overload pulses better | Bounce; wear; audible; coil power; slower |
| Isolated gate driver + power MOSFET/IGBT | High current, fast switching, custom power stages | Best efficiency and control; scalable | More design effort; isolation and protections are on you |
Popular Part Numbers Engineers Reference (Starting Points, Not Automatic Drop-ins)
These are commonly referenced part numbers in the “optoisolator relay / SSR / photorelay / optotriac” space. They’re useful as anchors for searching datasheets and understanding categories. Always validate: output type, surge rating, leakage, RON, package, and compliance.
| Part number | Family | Typical use | Why people pick it |
|---|---|---|---|
| TLP222A | Photorelay / MOSFET output | DC/signal switching, low noise paths | Common “PhotoMOS-style” reference for isolated switching |
| PVG612A | Photorelay / MOSFET output | Signal switching, instrumentation | Popular photorelay footprint/class for board-level designs |
| G3VM-61A1 | Photorelay / MOSFET output | General isolated switching | Common reference in photorelay discussions and app notes |
| G3VM-351A | Photorelay / MOSFET output | Low-level switching | Useful “small photorelay” anchor part number |
| MOC3063 | Optotriac driver (zero-cross) | AC mains resistive load switching | Classic zero-cross optotriac reference |
| MOC3021 | Optotriac driver (random-phase) | Phase control / dimming | Common random-phase optotriac anchor |
| PC817 | Optocoupler (transistor output) | Isolation for logic/feedback/driver stages | Not a relay, but ubiquitous in isolated control designs |
Even within the same “family,” devices can differ in RON, leakage, surge, dv/dt immunity, and package. Treat alternates as a mini-qualification: worst-case load, temperature corners, and a quick EMC smoke test.
.png?x-oss-process=image/auto-orient,1/quality,q_70/format,webp)
Optoisolator Relay RFQ Checklist (Copy/Paste Ready)
This is the fastest way to stop supply-chain substitutions from turning into engineering emergencies. Specify behavior, not just voltage/current.
| Decision item | What to specify | Why it matters |
|---|---|---|
| Output type | MOSFET photorelay / optotriac driver / transistor optocoupler | Defines behavior, leakage, dv/dt risks, and load compatibility |
| Load profile | AC/DC, resistive/inductive/capacitive, inrush estimate | Survival depends on inrush and turn-off transients |
| Off-state leakage max | Maximum acceptable leakage at rated voltage | Prevents ghosting and partial-power failures |
| On-state loss | RON (MOSFET) or Vdrop (triac) and thermal conditions | Heat drives reliability and derating requirements |
| Isolation & package | Isolation rating, creepage/clearance, package footprint | Compliance and PCB design constraints |
| Alternates strategy | Approved alternates list + qualification scope (temp, inrush, EMC) | Avoids “same rating” substitutions breaking your product |
CTA: Get the Right Optoisolator Relay Matched to Your Load, Surge, and Leakage Limits
If you’re replacing an EOL part, switching mains loads, or seeing weird leakage/glitches, send an RFQ with your load profile, inrush estimate, and max allowable leakage. You’ll get options that reduce re-test risk and keep your build stable.
- AC/DC, load type, continuous + inrush current
- Max allowable leakage (OFF behavior)
- Switching speed requirement (if any)
- Isolation/compliance target + PCB constraints
- Environment: surge, dv/dt, cable length
FAQ: Optoisolator Relay (Photorelay / SSR) Selection & Troubleshooting
What is an optoisolator relay?
An optoisolator relay uses an optical input (LED) and an isolated output switching element (MOSFETs or triac structure) to provide relay-like on/off switching while keeping the control side galvanically isolated from the load side.
Why does an SSR/photorelay leak current when OFF?
Solid-state outputs are not perfect open circuits. MOSFET and triac structures have off-state leakage paths, and output capacitance can also pass small AC currents. With high-impedance loads, leakage can become visible as ghost power.
How do I stop false triggering from dv/dt or noise?
Add the right suppression network for the load (snubber/TVS), improve PCB separation and ground returns, filter the input with a small RC if needed, and keep high dv/dt switching nodes away from the opto input wiring.
Should I use a zero-cross optotriac driver?
Zero-cross types reduce EMI for resistive loads by switching near mains zero crossing. If you need phase control (dimming, speed control), you typically need random-phase triggering and must design for EMI and load behavior accordingly.
Can I substitute a “same rating” optoisolator relay?
Not safely without checking leakage, RON/Vdrop, surge/dvdt ratings, and package footprint. Even “equivalent” ratings can behave very differently with inductive or capacitive loads. Treat alternates as a mini-qualification: worst-case load + temperature + EMC smoke test.
Related Articles
- ·Optoisolator Relay: How to Choose, Drive, and Troubleshoot Solid-State Relay Circuits
- ·Optoisolator Board: How to Choose the Right Isolation Module for MCU, PLC, and Noisy Power Systems
- ·Analog Optoisolator: How to Choose Linear Isolation That Doesn’t Drift, Clip, or Ghost Your Signal
- ·Triac Optoisolator: How to Choose the Right Part for AC Switching, Dimming, and Industrial Control

.png?x-oss-process=image/auto-orient,1/quality,q_70/format,webp)





.png?x-oss-process=image/format,webp/resize,h_32)










