Interview questions & answers
Q1. What is an optocoupler and what is its primary function in a circuit?
An optocoupler (optoisolator) is a device that transmits electrical signals between two circuits using light, completely isolating them electrically to prevent ground loops, transient coupling, and voltage hazards. A PC817 contains an infrared LED and a phototransistor in one package separated by a transparent dielectric rated for 5 kV isolation — when the LED conducts 10 mA, the phototransistor conducts 10–80 mA depending on CTR. This galvanic isolation is used to safely connect a low-voltage microcontroller to a high-voltage (220V, 600V) motor drive circuit without risking damage to the MCU or electric shock to the operator.
Follow-up: What is the isolation voltage rating of an optocoupler and what does it mean?
Q2. What is CTR (Current Transfer Ratio) and how does it affect optocoupler circuit design?
CTR is the ratio of the output (phototransistor collector) current to the input (LED) current, expressed as a percentage; for a PC817, CTR = 80–300% meaning a 10 mA LED input produces 8–30 mA of phototransistor collector current. Circuit design must account for the worst-case minimum CTR at end-of-life (typically 50% of initial value after 10 years), so a design requiring 5 mA output needs to drive the LED at enough current to produce 5 mA even when CTR = 80% (minimum): ILED = 5mA / 0.8 = 6.25 mA → use 10 mA for margin. Ignoring CTR degradation is the most common cause of optocoupler-based circuits failing in the field after 2–5 years of operation.
Follow-up: What factors cause CTR to degrade over the lifetime of an optocoupler?
Q3. What causes CTR degradation in optocouplers over lifetime and how do you mitigate it?
CTR degrades primarily because the LED efficiency decreases over time due to defect accumulation at the LED junction, and secondarily because the phototransistor's current gain changes with temperature cycling; LED degradation at high IF accelerates degradation dramatically and is modeled by the LED's drive current and junction temperature. Operating a PC817 LED at 20 mA (rated maximum) degrades CTR 2–3× faster than operating at 5 mA; for a 10-year industrial life, the LED should be driven at 30–50% of maximum IF. Using a metal-lead-frame optocoupler (PS2501, HCPL-314J) instead of a standard plastic package significantly reduces LED package-induced stress and slows degradation.
Follow-up: How do you select an optocoupler's IF operating point for a 10-year field life?
Q4. What is the propagation delay and switching speed of an optocoupler?
Propagation delay is the time from when the LED input crosses its threshold to when the output transistor switches states; for a PC817 it is 4–18 µs at 1 mA LED current, while a high-speed HCPL-0314 achieves 10 ns at 10 mA for PWM and gate drive applications. Standard optocouplers like PC817 are limited to about 25 kbaud or 10 kHz PWM due to their slow phototransistor; high-speed devices with integrated high-gain IC output (HCPL-2630, 6N137) use a photodiode and internal amplifier to achieve 10–100 Mbps data rates. Using a PC817 in a 100 kHz motor drive PWM isolation path is a common design mistake that causes signal distortion and duty cycle errors.
Follow-up: What is the bandwidth-CTR trade-off in optocoupler design?
Q5. How do you design the LED input drive circuit for an optocoupler?
Calculate the LED current IF = (Vsupply - Vf_LED) / Rin, where Vf_LED ≈ 1.2V for an infrared LED; add a series resistor to limit IF to the design operating point (typically 5–15 mA for standard optocouplers). For a 5V logic signal driving a PC817: Rin = (5V - 1.2V) / 10mA = 380 Ω → use 390 Ω standard; the output pulls up through Rc = (Vsupply_out - Vce_sat) / Ic_desired = (5V - 0.2V) / 8mA = 600 Ω → use 560 Ω. When driving the optocoupler input from an open-collector output, ensure the collector voltage is the logic supply of the input side, not the output side.
Follow-up: What happens if the LED drive resistor is too small — what failure mode occurs?
Q6. What is the isolation voltage of an optocoupler and what is the difference between peak, working, and withstand voltage?
Working voltage (also called VISO continuous) is the maximum continuous voltage that can appear across the isolation barrier; peak voltage is the maximum transient the barrier can survive; withstand voltage (dielectric strength) is the 1-minute test voltage per IEC 60747-5 that the barrier must survive during production testing. A PC817 has dielectric withstand voltage of 5000 Vrms for 1 minute, working voltage of 500 Vac continuous, and peak transient of 630V — using it in a 690Vac industrial motor drive that has 1000V transients violates the working voltage rating even though the test voltage is 5 kV. For 690V industrial applications, reinforced-isolation optocouplers rated 3750 Vrms working (like ACPL-P343) are required by IEC 61800-5-1.
Follow-up: What is the difference between basic isolation and reinforced isolation in optocoupler standards?
Q7. What is the common mode transient immunity (CMTI) of an optocoupler and why is it critical in gate drivers?
CMTI is the maximum dV/dt (volts per microsecond) across the isolation barrier that the optocoupler can withstand without producing a false output glitch, typically 10–50 kV/µs for standard optocouplers and up to 100 kV/µs for gate drive optocouplers. In an IGBT half-bridge switching 600V with a 100 ns rise time, the dV/dt across the high-side gate driver isolation is 600V / 100ns = 6000 V/µs — a standard PC817 (CMTI ≈ 500 V/µs) would glitch, causing a false turn-on and potential shoot-through. Gate drive optocouplers like HCPL-314J (CMTI > 30 kV/µs) and digital isolators like ISO7721 (CMTI > 100 kV/µs) are specifically designed for this environment.
Follow-up: How does parasitic capacitance across the isolation barrier create dV/dt-induced noise?
Q8. What is the difference between a phototransistor output and a photodiode-plus-IC output optocoupler?
A phototransistor output optocoupler uses the photocurrent to drive the base of a BJT, providing gain but limiting bandwidth to 10–100 kHz; a photodiode-plus-IC output optocoupler uses a photodiode and internal high-gain comparator to produce a fast digital output, achieving 1–100 Mbps at the cost of fixed output levels. The 6N137 uses a photodiode and an internal threshold comparator that switches in 50 ns and drives a CMOS output stage, making it suitable for SPI, UART, and CAN isolation. The phototransistor type (PC817, 4N25) is lower cost and suitable for slow logic, relay drive, and power supply feedback; the IC-output type is mandatory for high-speed data isolation.
Follow-up: What is an integrated digital isolator and how does it differ from a photocoupler?
Q9. How are optocouplers used for feedback isolation in a flyback power supply?
In a flyback converter, the optocoupler feeds the output voltage error signal across the isolation barrier from the secondary (output) to the primary (control) side, allowing the PWM controller to regulate the output without a direct electrical connection. A PC817 paired with a TL431 shunt regulator on the secondary side: TL431 compares Vout to the reference and drives the optocoupler LED proportionally to the output error; the phototransistor output modulates the PWM controller's (e.g., UC3842) feedback pin. The loop bandwidth of this isolated feedback path is typically 5–20 kHz, limited by the optocoupler bandwidth — using a PC817 variant with CTR carefully matched to the compensation network component values is essential for loop stability.
Follow-up: What is the phase shift introduced by an optocoupler in the feedback loop and how does it affect stability?
Q10. What is the IGBT gate drive optocoupler and what output current does it need to provide?
An IGBT gate drive optocoupler like HCPL-314J or FOD3150 is a reinforced isolation device with an integrated gate driver output stage that sources and sinks 0.5–4A of gate current to rapidly charge and discharge the IGBT gate capacitance. For charging a 1200V/50A IGBT with Qg = 500 nC in 100 ns: peak gate current = 500nC / 100ns = 5A — requiring a FOD3150 (max 4A) or external buffer stage. The turn-on current (source) and turn-off current (sink) are often set differently in IGBT gate drivers by using separate Rgon and Rgoff resistors — faster turn-off reduces tail current losses while faster turn-on risks di/dt-induced overvoltage.
Follow-up: Why do IGBT gate drive optocouplers often include a negative supply pin (typically -5V or -15V)?
Q11. What is the PCB layout requirement for optocouplers to maintain isolation integrity?
The PCB layout must maintain the creepage and clearance distances specified by the isolation standard — IEC 60747-5 requires minimum 8 mm creepage for 5 kV reinforced isolation in pollution degree 2 environments, meaning no copper, vias, or silk screen may exist within 8 mm between input and output pins across the board surface. A practical implementation leaves a slot or cutout in the PCB between input and output pads of the optocoupler body, which breaks the creepage path along the FR4 surface and allows closer component placement without violating isolation distance. Failing to implement proper creepage distances is detected during safety agency (UL, CE, TÜV) testing and causes product rejection.
Follow-up: What is the difference between creepage and clearance in PCB isolation design?
Q12. What is the CTR selection range for a PC817 and how do you choose the right grade?
PC817 is available in four CTR grades: A (80–160%), B (130–260%), C (200–400%), and D (300–600%), where the grade is selected to match the drive and load circuit requirements without excessive overdrive or insufficient output. For an LED driver with IF=5 mA and minimum output Ic=3 mA: minimum CTR needed = 3/5 = 60%, so grade A (80% minimum) provides adequate margin. Grade D (300–600%) is used when the output drives a very sensitive load (e.g., a CMOS input) at minimum LED current to minimize power consumption, but its wide spread can cause output saturation issues if the maximum CTR version is accidentally installed in a circuit designed for minimum CTR.
Follow-up: What is the effect on circuit behavior if a CTR grade B optocoupler is replaced with a grade D in the field?
Q13. What is the difference between analog and digital optocoupler applications?
In digital applications, the optocoupler switches between fully saturated (Vce(sat) ≈ 0.2V) and fully off states, requiring only that the LED drive is above the minimum saturation threshold; in analog applications, the phototransistor must operate linearly in its active region to faithfully transmit a proportional signal, requiring careful biasing and CTR linearization. For analog isolation of a 0–10V process control signal, a linearized optocoupler circuit using a dual-LED feedback configuration (one LED in the signal path, one in a feedback path to compensate CTR nonlinearity) achieves less than 1% nonlinearity — standard open-loop optocoupler circuits have 5–20% linearity error due to CTR variation with IF. The IL300 is a precision analog optocoupler designed specifically for this linearized application.
Follow-up: What is the linearity error of a standard PC817 in an analog signal transmission application?
Q14. What is the galvanic isolation requirement in medical device optocoupler design?
Medical devices in patient-applied (Type BF/CF) categories per IEC 60601-1 require working isolation voltage of at least 1500 Vrms between patient-connected circuits and mains-powered circuits, with 4000 Vrms dielectric withstand test for 1 minute. An ECG monitor's electrode amplifier must be isolated from the USB and display circuits using optocouplers rated for medical isolation like ACPL-P343 or digital isolators like the ADuM1201 (5000 Vrms rated); using a standard PC817 (500 Vrms working) in this path fails medical certification. Medical isolation standards also mandate double or reinforced insulation, specific creepage/clearance distances based on working voltage, and periodic re-test as part of the device maintenance protocol.
Follow-up: What is the difference between functional isolation, basic isolation, and reinforced isolation in safety standards?
Q15. What is the response time improvement achieved by adding a speed-up capacitor across the optocoupler LED resistor?
A small capacitor (10–47 pF) in parallel with the LED series resistor creates a current spike on the rising edge of the input signal by differentiating the edge, injecting extra charge into the LED to reduce turn-on delay at the cost of a small overshoot. For a PC817 with 390 Ω series resistor and 10 pF speed-up cap, the initial LED current spike reaches 5× steady-state for approximately 5×390×10pF = 20 ns, reducing propagation delay from 4 µs to about 1.5 µs. This technique is used in isolated UART and SPI drivers where PC817-class optocouplers must achieve 100–200 kbaud rates that exceed their datasheet switching specifications, though it increases power dissipation due to the capacitive current spike.
Follow-up: What is the maximum data rate achievable with a PC817 using this speed-up technique?
Common misconceptions
Misconception: A higher isolation voltage rating means an optocoupler can be used at higher continuous working voltages.
Correct: The isolation voltage (withstand voltage) is a 1-minute test voltage; the working voltage (continuous) is typically 10–20% of the test voltage — a 5000 Vrms withstand optocoupler may only be rated for 500 Vrms working voltage continuously.
Misconception: CTR of an optocoupler is fixed for a given part number.
Correct: CTR varies widely between individual devices (e.g., 80–300% for PC817), decreases with higher LED current, increases with temperature, and degrades over the device lifetime — circuit design must account for all these variations.
Misconception: Any optocoupler can be used for IGBT gate driving in an inverter.
Correct: Standard optocouplers like PC817 fail in gate drive applications due to insufficient CMTI (dV/dt immunity), too slow switching speed, and insufficient output current — dedicated gate drive optocouplers with >15 kV/µs CMTI are required.
Misconception: The isolation voltage of an optocoupler is the same as the working voltage across the barrier.
Correct: Working voltage (operating) and isolation test voltage are different; the working voltage rating is the continuous voltage the device is approved for, which is far less than the one-minute dielectric test voltage listed prominently in datasheets.