PC817 Optocoupler – 4-Pin DIP Isolation IC
🔌 PC817 Optocoupler – 4-Pin DIP Isolation IC
The PC817 is a widely used optocoupler (optical isolator) that combines a light-emitting diode (LED) and a phototransistor in a single 4-pin DIP package. It is ideal for isolating high-voltage circuits from low-voltage control systems such as Arduino, Raspberry Pi, PLC, or MCUs, protecting them from voltage spikes or noise.
⚙️ Technical Specifications
Parameter | Specification |
---|---|
Model | PC817 |
Package | DIP-4 |
Input Type | Infrared LED |
Output Type | Phototransistor |
Forward Voltage (LED) | 1.2V typical |
Input Current | 20mA typical |
Isolation Voltage | 5,000 Vrms |
CTR (Current Transfer Ratio) | 50% – 600% (@5mA, Vce=5V) |
Switching Speed | ~3 – 18 µs |
Operating Voltage | Up to 35V (collector-emitter) |
Max Collector Current | 50 mA |
✅ Features
🧲 Electrical isolation between input and output
⚡ Protects microcontrollers from high-voltage circuits
📦 Small DIP-4 package, easy to solder or breadboard
🔄 Fast switching for digital signal transmission
🔐 Helps eliminate ground loops and electrical noise
🛠️ Common in SMPS, microcontroller interfacing, sensor isolation, and relay control
🛠️ Typical Applications
Relay driver isolation
Microcontroller digital input protection
PLC/industrial signal interfacing
Power supply feedback
Signal level shifting
📘 Arduino Example (Digital Isolation)
// PC817 used to isolate an input button const int inputPin = 2; void setup() { pinMode(inputPin, INPUT); Serial.begin(9600); } void loop() { if (digitalRead(inputPin) == HIGH) { Serial.println("Input Detected via Optocoupler"); } }
Input side (anode & cathode) connected with resistor (e.g., 220Ω) to a 5V trigger source.