i-k-bus-board/reference/tx_sweep_rpull.cir
Ryan Malloy 52e8acf214 Fix 3.3V TX margin: R2 470->220 ohm (parameter sweep validated)
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.
2026-02-13 00:56:03 -07:00

40 lines
1.4 KiB
Plaintext

* TX Path - Bus Impedance Sweep at Current R2=470 and Typical CTR
* Finding where the design breaks with different bus loading
* PC817 pin order: 1=Anode, 2=Cathode, 3=Collector, 4=Emitter
.param Rpull 4700
V_BAT V12 0 12
V_MCU VCC 0 3.3
V_TX TX 0 PWL(0u 0 199.5u 0 200u 3.3 512u 3.3 512.5u 0 2000u 0)
R_PULL V12 IBUS {Rpull}
C_BUS IBUS 0 100p
R5 TX R5_R3 470
R3 R5_R3 Q1B 10k
Q1 Q1C Q1B 0 BC547B
R2 VCC U2_A 470
XU2 U2_A Q1C IBUS 0 PC817 Igain=1m
R1_RX IBUS U1_A 2k
XU1 U1_A 0 VCC RX PC817 Igain=1m
R4_RX RX 0 1k
.subckt PC817 1 2 3 4
R1 N003 2 2
D1 1 N003 LD
G1 3 N004 N003 2 {Igain}
C1 1 2 18p
Q1 3 N004 4 [4] NP
.model LD D(Is=1e-20 Cjo=18p)
.model NP NPN(Bf=1200 Vaf=140 Ikf=100m Rc=1 Cjc=19p Cje=7p Cjs=7p C2=3e-15)
.ends PC817
.model BC547B NPN(IS=2.39E-14 NF=1.008 ISE=3.545E-15 NE=1.541 BF=294.3 IKF=0.1357 VAF=63.2 NR=1.004 ISC=6.272E-14 NC=1.243 BR=7.946 IKR=0.1144 VAR=25.9 RB=1 IRB=1.00E-06 RBM=1 RE=0.4683 RC=0.85 XTB=0 EG=1.11 XTI=3 CJE=1.358E-11 VJE=0.65 MJE=0.3279 TF=4.391E-10 XTF=120 VTF=2.643 ITF=0.7495 PTF=0 CJC=3.728E-12 VJC=0.3997 MJC=0.2955 XCJC=0.6193 TR=1.00E-32 CJS=0 VJS=0.75 MJS=0.333 FC=0.9579 Vceo=45 Icrating=100m mfg=NXP)
.step param Rpull list 510 1000 2200 3300 4700 6800 10000
.tran 0 1500u 0 0.5u
.meas tran IBUS_LOW MIN V(IBUS)
.meas tran IBUS_HIGH MAX V(IBUS)
.meas tran BUS_RISE TRIG V(IBUS) VAL=0.5 RISE=1 TARG V(IBUS) VAL=3.5 RISE=1
.backanno
.end