Optocoupler (PC817) · Exterior view
White molded body · DIP-4Pins (1-2 LED, 3-4 transistor)
Black DIP-4 body, pin 1 dot and PC817 marking
Body ≈ 6.5 × 4.6 mm; row spacing 7.62 mm, pin pitch 2.54 mm
Transistors

Optocoupler (PC817)

What is this?

A part whose two rooms talk through light. A small lamp lights in one room, and the eye in the other room sees it.

What is it for?

Carries the signal of one circuit to another without an electrical connection; noise and harmful voltage do not pass.

Where do you see it?

A small black IC, found in chargers and adapters, that separates the mains side from the low-voltage side.

How do you spot it?

A small black body with four pins; two pins are for the LED inside, two for the light-sensing transistor.

Caution:

Put a series resistor in for the LED inside; if you join the grounds of the two sides, the isolation is wasted.

Technical definition

A DIP-4 package holds an infrared LED and an NPN phototransistor facing it. Input current becomes light, and light becomes output current; there is no conductive connection between the two sides. CTR is the ratio of the output collector current to the input LED current and varies widely by part class.

CTR50–600%
LED current50 mA absolute max.
Insulation test5 kV RMS

IEC 60617: the drawing style used in Türkiye and Europe.

1Anode (a), pin 1LED terminal next to the dot; input positive through a series resistora
2Cathode (k), pin 2LED return, negative of the input circuitk
3Emitter (e), pin 3Return of the output circuit; can stay separate from the input GNDe
4Collector (c), pin 4Output load or pull-up resistorc
CTR
50–600% (IF = 5 mA, VCE = 5 V, 25 °C)
LED current (IF)
50 mA absolute max.; 5–10 mA in the experiment
Isolation (Viso)
5 kV RMS, 1-minute test
LED forward voltage
≈1.2 V (20 mA)
VCEO
80 V (PC817X; 35 V in older versions)
Collector current
50 mA absolute max.
VCE(sat)
≤0.2 V (IF = 20 mA, IC = 1 mA)
Speed
µs range; may not be suitable for fast data
Example part
Sharp PC817X, DIP-4
Forgetting the LED resistorThe input is an LED. Connecting it without a series resistor ruins the LED; 50 mA is not an operating target.
Treating CTR as a constant gainCTR varies in the 50–600% range; choose the load for the lowest guaranteed value. Don’t expect the same ratio in saturation.
Joining two groundsJoining the input and output GND removes galvanic isolation. The 5 kV test value is not a safe continuous working voltage.

Test whether this part is good with the multimeter on the measurement screen.

Take a measurement
Isolated logic inputTransferring signals from a noisy circuitPhototransistor switching