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.
One name, several manufacturers
Typical PC817-family reference values
| Item | Common reference value / note |
|---|---|
| Package | 4-pin DIP through-hole; other lead forms also exist |
| Input device | Infrared LED |
| Output device | NPN phototransistor |
| LED forward voltage | About 1.2 V typical; verify at the intended LED current |
| Collector-emitter voltage | Common classic-family rating: 80 V maximum |
| Isolation test voltage | Common classic-family rating: 5 kV RMS |
| CTR | Strongly grade-, current- and temperature-dependent; classic family spans roughly 50% to 600% at its stated test point |
4-pin pinout
| Pin | Name | Function |
|---|---|---|
| 1 | Anode | Positive side of the internal LED |
| 2 | Cathode | Negative side of the internal LED |
| 3 | Emitter | Phototransistor emitter |
| 4 | Collector | Phototransistor 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) / IFExample: 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²RAt 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) × 100Rearranging it:
IC ≈ IF × CTR / 100If 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.
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.