Optocoupler (PC817)
PC817 · LED and phototransistor sealed together · CTR ≈ 100 % (I_C ≈ I_F) · 5 kV isolation between the two sides

Try it on the benchThe lab drops it on an empty bench and opens its datasheet card.
Typical part: PC817 optocoupler
Pins
- 1 Anode
- 2 Cathode
- 3 Emitter
- 4 Collector
Ratings and limits
| LED I_F | 50 mA max, 5–20 mA typical |
|---|---|
| CTR | 50–600 % (≈ 100 % here) |
| Isolation | 5 kV |
How to use it
Carries a signal across a gap with no electrical connection: microcontroller to mains, or the feedback in every phone charger.
Lessons and builds that use it
- 65 W USB-C PD charger from scratch: mains flyback (UC3844, 800 V MOSFET, PQ2625 transformer), TL431 + PC817 feedback, PD controller (build)
- Real device: phone charger, 220 V AC wall to 5 V USB (build)
- Real device: laptop charger, 220 V AC wall to 20 V with PFC (build)