At 3.3V VCC the original R2=470 only drives 4.66mA through the PC817 LED, giving marginal bus pull-down on loaded buses (V_LOW=2.5V at 1k pull-up). Three parameter sweeps (R2, bus impedance, CTR grade) identified R2=220 as the fix: LED current doubles to 9.71mA, bus LOW drops to 0.27V even at 1k pull-up. Validated against PC817A typical CTR with worst-case bus loading.
Description
BMW I/K-Bus + OBD-II K-line interface board (ESP32, optocoupler isolated)
Languages
MDX
60.4%
C++
35.7%
C
1.2%
JavaScript
0.8%
Makefile
0.7%
Other
1.2%