OptocouplerOptical isolation · PC817 rank-A example
Pass the signal with light. Keep the two circuits electrically separate.
An optocoupler transfers a signal using light between electrically separate input and output circuits. In a phototransistor type, an infrared LED illuminates a transistor across an insulating barrier. Its output needs its own supply and load; the input signal does not power the isolated circuit. This general guide uses Sharp PC817 rank-A parts as a specific example: PC817X1NSZ1B through-hole and PC817X1NIP1B gullwing SMD. Their four-pin mapping, 80–160% current-transfer ratio at the stated test conditions, package dimensions and ratings below belong to those parts, not every optocoupler. The example uses a 750 Ω input resistor from 5 V and a 10 kΩ pull-up to an independent 3.3 V output supply. Keep GND_A and GND_B separate. Light turns on the phototransistor and pulls the output low. Check drive current, CTR over temperature and life, switching speed and the required insulation system for a real design.

