PC817 Optocoupler: Working, Pinout, Circuit, Applications, and Selection Guide
PC817 is a widely used optocoupler that provides electrical isolation between input and output using an internal LED and phototransistor. This guide explains its working principle, pinout configuration, circuit connection, and real-world applications in automation and safety systems. Whether you're designing a power supply or a microcontroller interface, PC817 offers a reliable solution for signal isolation.

Device Overview
Introduction
PC817 is a widely used phototransistor-based optocoupler (also known as an optoisolator), designed to transfer electrical signals between two isolated circuits by using light. It plays a crucial role in signal isolation, especially in high-voltage switching, microcontroller protection, and noise-sensitive environments. This article explains the working, pin configuration, circuit design, types, real-world applications, and a practical example of PC817 in detail.
What is PC817 Optocoupler?
PC817 is a 4-pin optocoupler that consists of an infrared LED and a phototransistor housed in a single package. When current flows through the LED, it emits infrared light that is detected by the phototransistor, allowing it to conduct. The biggest advantage of PC817 is electrical isolation between input and output, often rated up to 5,000 Vrms.
PC817 Pinout Diagram
| |
1 --| Anode |
2 --| Cathode |--- Infrared LED
3 --| Emitter |
4 --| Collector |--- Phototransistor
|_________|
Pin Number | Name | Function |
---|---|---|
1 | Anode | LED positive terminal |
2 | Cathode | LED negative terminal |
3 | Emitter | Transistor emitter (output) |
4 | Collector | Transistor collector (output) |
Working Principle of PC817
The input LED emits infrared light when current passes through it. This light activates the phototransistor, allowing it to conduct from collector to emitter. Since there is no direct electrical connection, the input and output sides remain electrically isolated. This helps protect sensitive components like microcontrollers, sensors, and logic circuits from high-voltage spikes or noise.
Technical Specifications of PC817
Parameter | Value |
---|---|
Isolation Voltage | 5,000 Vrms |
Input Forward Voltage | 1.2V (typical) |
Collector Current (max) | 50 mA |
CTR (Current Transfer Ratio) | 50% to 600% |
Operating Temperature | -30°C to +100°C |
Response Time | 3 µs to 18 µs (depends on model) |
Package Type | DIP-4 |
Types and Variants of PC817
PC817 is available in different Current Transfer Ratio (CTR) grades, which define the sensitivity of the phototransistor:
Variant | CTR Range | Suitable For |
---|---|---|
PC817 A | 50% to 100% | General switching, low signal |
PC817 B | 100% to 200% | Medium sensitivity applications |
PC817 C | 200% to 400% | Low drive input, higher output |
PC817 D | 400% to 600% | High-sensitivity circuits |
Applications of PC817 Optocoupler
-
Microcontroller Isolation
-
Power Supply Switching
-
Inverter Gate Drive Circuits
-
AC to DC signal isolation
-
Signal coupling in PLCs and relays
-
Switching Power Regulators
-
Noise Isolation in Audio Circuits
-
Zero-crossing detectors
-
Industrial Automation Systems
-
Safety isolation in medical devices
PC817 Interfacing Circuit Example
Objective: Use PC817 to isolate a microcontroller (5V) from a 12V relay switching circuit.
Components:
- PC817 Optocoupler
- 220Ω Resistor (for input LED)
- 10kΩ Pull-down resistor
- NPN Transistor (e.g., BC547)
- 12V Relay Module
- Diode (1N4007 for back EMF)
- External Power Supply (12V)
Circuit Diagram (Description):
|
Cathode (PC817) ---> GND
Emitter (PC817) ----------> Base of NPN Transistor (via 10kΩ)
Transistor Collector -----> One end of Relay
Relay other end ----------> +12V
Diode across relay coil (Cathode to +12V)
Working:
- When the microcontroller sends HIGH (5V), the LED inside PC817 glows.
- The phototransistor turns ON, triggering the base of the NPN transistor.
- The transistor conducts, activating the 12V relay.
-
This way, the relay switching is completely isolated from the MCU.
Benefits of Using PC817
- High electrical isolation (5kV)
- Compact DIP-4 package
- Cost-effective
- Fast switching
- Long lifespan (no moving parts)
- No electromagnetic interference
- Ideal for AC/DC signal isolation
How to Choose the Right PC817
When selecting PC817, consider the following factors:Requirement | Selection Criteria |
---|---|
High-speed switching needed? | Go for low response time variant |
Low drive current available? | Use PC817-C or D (higher CTR) |
Harsh environments? | Confirm wide temp range (-30 to +100°C) |
High isolation required? | Check 5,000 Vrms isolation rating |
Where to Buy
Platform | Price | Action |
---|---|---|
|
₹89 | Buy Now |
Prices may vary. Click on "Buy Now" to check current availability and pricing.
Administrator
Frequently Asked Questions
Common questions about PC817 Optocoupler: Working, Pinout, Circuit, Applications, and Selection Guide. Find answers to the most frequently asked questions.
User Reviews & Comments
Share your experience with this IoT device. Your feedback helps our community make informed decisions!
Share Your Experience
Help others by sharing your thoughts about this IoT device.
Related Devices
Explore more IoT devices in the same category

Resistors in IoT: Types, Applications, Selection Guide, and Circuit Examples
Supporting Components
Resistors are essential components in IoT circuits, helping control voltage, current, and signal flow. This guide explains the types of resistors, their functions, how to choose the right resistor for your IoT project, and real circuit examples. Learn how resistors improve reliability and performance in connected devices.

Discover everything about diodes in electronics — from types and working principles to real-world applications and how to choose the right diode for your project. This comprehensive guide simplifies diode selection and usage, making it perfect for students, hobbyists, and professionals. Enhance your electronics knowledge with trusted and clear information.

Discover everything about transistors in this complete guide. Learn how transistors work, explore different types like BJT and MOSFET, and understand their real-world applications in electronics. Perfect for students, beginners, and professionals seeking clear, accurate, and practical information about this key electronic component.
No Reviews Yet
Be the first to share your experience with this IoT device!