u/Citizen4007

[Troubleshooting] PC817 optocoupler LED works but transistor won't conduct - four units fail identically

[Troubleshooting] PC817 optocoupler LED works but transistor won't conduct - four units fail identically

I'm building a K-line OBD2 interface using dual PC817 optocouplers. The RX path (OP2) works perfectly, but the TX path (OP1) fails consistently - LED side works but phototransistor won't conduct. I've replaced it four times with identical failure.

**Circuit (see schematic):**

- GP12 (3.3V) → 220Ω → OP1 LED → GND

- 12V → 1.5kΩ pullup → K-line → OP1 collector

- OP1 emitter → GND

**Measurements (with OP1 LED ON):**

- OP1 Pin 1 (LED anode): 3.28V ✓

- OP1 Pin 2 (LED cathode): 0V ✓

- OP1 Pin 3 (emitter): 0V ✓

- OP1 Pin 4 (collector): 3.25V ✗ (should be ~0V)

- K-line: 3.25V ✗ (should pull to ~0V)

**What works:**

- OP2 (RX optocoupler in same circuit) works perfectly

- OP1 LED gets current (voltage across 220Ω resistor confirms ~9mA)

- All four optocouplers test good with multimeter diode mode before AND after installation

- Pin 3 verified grounded (continuity to GND rail)

- Pin 4 verified connected to K-line (continuity checked)

**What doesn't work:**

- OP1 transistor won't conduct even with LED clearly ON

- Four different PC817 optocouplers fail identically in TX position

- Same optocouplers work fine when tested in RX position

**Power:**

- Clean 12.26V bench supply (not vehicle)

- All grounds tied together

- No voltage spikes or transients

**The mystery:** Why would the LED side work but transistor side fail on four consecutive optocouplers, when the same parts work fine in a different position in the same circuit?

Schematic attached. Any ideas what I'm missing?

u/Citizen4007 — 1 day ago