Skip to content
LearnTronics menu

LearnTronics

PC817

The PC817 is a simple four-pin phototransistor optocoupler. Inside the package are two devices that do not share an electrical connection: an infrared LED on the input side and a light-sensitive transistor on the output side. Current through the LED produces light; that light causes the transistor to conduct.

Parts indexComponentsProjects

One name, several manufacturers

PC817 has been made by more than one manufacturer and appears in several CTR grades and lead-form variants. The exact manufacturer's data sheet for the device in hand is the final authority. The values below are useful teaching references associated with the classic PC817-family specification, not permission to ignore the marking and data sheet of a particular replacement part.

Typical PC817-family reference values

ItemCommon reference value / note
Package4-pin DIP through-hole; other lead forms also exist
Input deviceInfrared LED
Output deviceNPN phototransistor
LED forward voltageAbout 1.2 V typical; verify at the intended LED current
Collector-emitter voltageCommon classic-family rating: 80 V maximum
Isolation test voltageCommon classic-family rating: 5 kV RMS
CTRStrongly grade-, current- and temperature-dependent; classic family spans roughly 50% to 600% at its stated test point

4-pin pinout

PinNameFunction
1AnodePositive side of the internal LED
2CathodeNegative side of the internal LED
3EmitterPhototransistor emitter
4CollectorPhototransistor collector

Choosing the LED resistor

The input LED needs a series resistor just like an ordinary LED. Start with Ohm's law:

R = (VDRIVE − VF) / IF

Example: suppose a 9 V source drives the LED, the LED drops about 1.2 V, and the desired current is 2 mA:

R = (9 − 1.2) / 0.002 = 3900 Ω ≈ 3.9 kΩ

The nearest standard value is chosen with the real supply range, LED forward voltage, required CTR and power dissipation in mind.

Resistor power

P = I²R

At 2 mA through 3.9 kΩ, the resistor dissipates only about 0.016 W, far below a typical 1/4-watt resistor rating.

CTR: the optocoupler's current gain

CTR means current transfer ratio. It compares output collector current with input LED current:

CTR (%) = (IC / IF) × 100

Rearranging it:

IC ≈ IF × CTR / 100

If IF = 2 mA and the particular device produces 100% CTR at that operating point, the collector current would be about 2 mA. At 50% CTR it would be about 1 mA.

Do not design an optocoupler circuit around a typical CTR alone. CTR has a wide production spread and changes with LED current, temperature and aging. Design using the guaranteed minimum for the exact grade and operating conditions whenever the switching margin matters.

What isolation does — and does not — mean

Because the LED and phototransistor are coupled by light rather than a wire, their circuits can use different electrical references. This can break ground paths, translate control states between sections, and provide galvanic isolation.

In a low-voltage battery project such as the FJD guitar, the PC817 is not being used as an excuse to treat the circuit as mains-safe equipment. PCB spacing, package rating, insulation, wiring and the exact safety standard all matter when hazardous voltages are involved.

Used in LearnTronics

The PC817 is used in the power-control section of the FJD Six-String Piezo Guitar Electronics project. Its LED side provides an optically coupled control path to the transistor/MOSFET side of the battery-switching circuitry.

For this part especially, check the manufacturer and grade actually purchased before assigning a data-sheet link or relying on CTR limits.

LearnTronics treats manufacturer data sheets as the authority for limits and specifications. Verify the exact manufacturer, suffix, package and revision before substituting or building.