Aarav is designing an industrial control board where a 3.3V microcontroller sends a control signal to an external 24V relay driver stage.
To protect the MCU from noise and voltage spikes on the relay side, he wants to use an optocoupler for galvanic isolation between the two sections.
The optocoupler's input LED will be driven at around 5mA to 10mA from a GPIO pin through a series resistor.
The output transistor will drive a small signal into the relay driver stage.
He wants a through-hole DIP-4 package for easy prototyping.
Help him select a suitable transistor output optocoupler from DigiKey.
Make sure it has enough isolation voltage, adequate CTR for signal transfer, and works reliably in industrial temperatures.
Visit DigiKey's Optocouplers category and find a suitable part.

An optoelectronic device that transfers electrical signals between two isolated circuits using light.
Since the two sides are connected only by light, no wires, no common ground, optocouplers provide galvanic isolation, protecting low-voltage microcontrollers from high voltages, spikes, and noise.


| Type | Image | Description |
|---|---|---|
| Phototransistor Output | ![]() | Most common type (4N25, PC817). Used for general signal isolation. Moderate speed (~10–100 µs). |
| Photodarlington Output |
![]() | Photodarlington: Higher gain, slower speed. |
| Phototriac Output | ![]() | For AC mains control (MOC3021, MOC3063). With/without zero-cross detection. |
| High-Speed Logic Optos | ![]() | TTL/CMOS compatible (6N137, HCPL-2631). Used for digital communication signals (UART, CAN, digital comms). |
| MOSFET/IGBT Driver Optos | ![]() | High current isolated gate drivers (e.g., HCPL-3120, ACPL-332J). Used in motor drives, inverters, and power electronics. |
1)Through-Hole (DIP) Packages
| Package Sub-Type | Image Reference | Example / Description |
| DIP-4 | ![]() | 4-pin Dual In-line Package (e.g., PC817). Common for basic signal isolation. |
| DIP-6 | ![]() | 6-pin Dual In-line Package (e.g., MOC3021). Often used for phototriac outputs. |
| DIP-8 | ![]() | 8-pin Dual In-line Package (e.g., 6N137). Common for high-speed logic optocouplers. |
| DIP-16 | ![]() | 16-pin Dual In-line Package (e.g., TLP521-4, ACPL-332J). Used for multi-channel optocouplers or complex gate drivers. |
2)Surface-Mount (SMD / SOIC) Packages
| Package Sub-Type | Image Reference | Example / Description |
| SOIC-4 | ![]() | 4-pin Small Outline IC (e.g., PC817). Compact surface-mount equivalent of the DIP-4. |
| SOIC-6 | ![]() | 6-pin Small Outline IC (e.g., MOC3021). Compact surface-mount equivalent of the DIP-6. |
| SOIC-8 NB | ![]() | 8-pin Narrow Body Small Outline IC. Compact profile for standard surface-mount designs. |
| SOIC-8 WB | ![]() | 8-pin Wide Body Small Outline IC (e.g., HCPL3120). Wider footprint, often required for higher voltage isolation clearances in motor drives and power electronics. |
Example PC817X Series (PC817X_NSZ9F) Optocoupler Specifications:

| Specification | Value |
|---|---|
| Current Transfer Ratio (CTR) | 50% to 600% (at I_F = 5mA, V_CE = 5V) |
| Isolation Voltage (Vrms) | 5000 Vrms (5.0 kV) |
| Input LED Forward Voltage (V_F) | 1.2V Typical, 1.4V Maximum (at I_F = 20mA) |
| Input LED Forward Current (I_F) | 50 mA (Absolute Maximum Rating) |
| Output Collector-Emitter Voltage (V_CEO) | 80V (Absolute Maximum Rating) |
| Output Saturation Voltage (V_CE(sat)) | 0.1V Typical, 0.2V Maximum (at I_F = 20mA, I_C = 1mA) |
| Switching Speed (Rise Time - t_r) | 4 µs Typical, 18 µs Maximum (at V_CE = 2V, I_C = 2mA, R_L = 100Ω) |
| Switching Speed (Fall Time - t_f) | 3 µs Typical, 18 µs Maximum (at V_CE = 2V, I_C = 2mA, R_L = 100Ω) |
| Temperature Range (Operating) | -30°C to +100°C (Power dissipation and forward current require derating above 25°C) |
| Safety Standards & Approvals | UL Approved / Recognized, RoHS Directive Compliant |

1) PC817 (Sharp / Everlight): Most common low-cost opto. (Click Here)

2) MOC3021(ON Semi): Triac driver for AC loads. (Click here)

3) 4N35 / 4N25: Classic phototransistor optos. (Click Here)

4) 6N137 / HCPL-2631: High-speed logic isolation. (Click Here)

5) HCPL-3120 / ACPL-332J: Gate driver optos for IGBTs/MOSFETs. (Click Here)

1) MCU to Relay Isolation

2) AC Lamp/Fan Control

Here is the quick-reference checklist for selecting an optocoupler: