2
\$\begingroup\$

I built a circuit in KiCad to simulate the behavior of the Maxim MAX3665. Here is the circuit:

.title KiCad schematic
.include "/home/user/Documents/School/2020-Summer/Tacca/SPICE/3665Circuit.lib"
XU1 VCC VIN NC_01 Net-_C1-Pad1_ GND NC_02 NC_03 GND MAX3665
V1 VCC GND 3.3
V2 VIN GND pulse(V1=0, V2=3.3, TD=500p, TR=1p, TF=1p, PW=500p, PER=1n)
C1 Net-_C1-Pad1_ GND 1000p
.save @v1[i]
.save @v2[i]
.save @c1[i]
.save V(Net-_C1-Pad1_)
.save V(Net-_U1-Pad3_)
.save V(OUTN)
.save V(OUTP)
.save V(VCC)
.save V(VIN)
.tran 1p 2n
.end

Here is the .lib file for the MAX3665. I tweaked the file provided by Maxim since it had some control lines. The original model can be seen in the appendix of this pdf.

* 3665 Output Model
************************************************
* XOUTPKG 2001 2002 50 51 OUTPKG
* XOUTDRV 50 51 101 OUTDRV
************************************************
* .SUBCKT MAX3665 VCC IN NC FILT GND OUTP OUTN GND
.SUBCKT MAX3665 6001 6002 6003 6004 6005 6006 6007 6005
* XOUTPKG OUTP OUTN INTP INTN OUTPKG
XOUTPKG 6006 6007 7001 7002 OUTPKG
* XOUTDRV INTP INTN VCC IN GND FILT OUTDRV
XOUTDRV 7001 7002 6001 6002 6005 6004 OUTDRV
.ENDS
************************************************
* .SUBCKT OUTDRV INTP INTN VCC IN GND FILT
.SUBCKT OUTDRV 50 51 101 1 0 3
R1 2 1 50
R2 4 0 50
C1 2 0 12.5p
C2 4 0 12.5p
RFILT 101 3 1.5k
* Differential Pair
XQ1 50 2 5 0 H14E04_2
XQ2 51 4 5 0 H14E04_2
* Biasing Current
I1 5 0 5.335m
R3 101 50 50
R4 101 51 50
* Offset Capacitors
C3 50 51 1.2p
C4 50 0 10p
C5 51 0 10p
* ESD Structures
XD1 50 101 0 HDE381011
XD2 0 50 0 HDE381011
XD3 101 51 0 HDE381011
XD4 0 51 0 HDE381011
* PAD structures
XP1 50 0 pad3
XP2 51 0 pad3
.ENDS OUTDRV
************************************************
************************************************
* .SUBCKT OUTPKG OUTP OUTN INTP INTN
.SUBCKT OUTPKG 2001 2002 50 51
* Calculated package parameters
RP1 50 60 .0399
RP2 51 61 .0399
LP1 60 2001 1.446n
LP2 61 2002 1.455n
CP1 2001 0 .254p
CP2 2002 0 .193p
CP12 2001 2002 .061p
.ENDS OUTPKG
************************************************
************************************************
* Q1 and Q2 transistor models
.SUBCKT H14E04_2 1 2 3 21
CP1EPI 1 2 24.369F
CP1P2 12 3 39.268F
CTRENCH 1 20 30.614F
RBX 2 12 10.277 TC=2.663M
RCX 1 10 11.754 TC=2.354M,979.573N
RCI 10 11 618.650M TC=2.354M,979.573N
REX 13 3 1.397 TC=123.150U
RSUB 20 21 3.098K
QP 20 10 12 20 TXP 2 OFF
QN 11 12 13 11 TX 2
.MODEL TX NPN( IS=3.326E-017 XTI=3 EG=1.140 BF=232.533 BR=20 XTB=450M
+ VAF=29 VAR=3.500 NF=1.010 NR=1.020 NE=1.650 NC=1.560 IKF=126.546M
+ IKR=2.318M ISE=1.573E-020 ISC=2.022E-029 RB=20.554 RBM=15.416
+ IRB=20.223M CJE=107.672F MJE=490M VJE=940M FC=990M CJC=21.929F
+ MJC=470M VJC=850M TF=3.778P TR=19N XTF=1 VTF=1K ITF=59.621M PTF=5
+ KF=1.500F AF=1 )
.MODEL TXP PNP( IS=1.968E-018 CJE=21.929F MJE=470M VJE=850M
CJC=21.582F
+ MJC=400M VJC=650M BF=10K BR=809.067U TF=1N FC=900M )
.ENDS H14E04_2
************************************************
************************************************
* ESD Diode Models
.SUBCKT HDE381011 1 2 21
CP1EPI 1 4 79.338F
QD 5 4 1 5 QESD
RS 4 2 2.385 TC=3.113M,2.489U
RSUB 5 21 2.318K
CTRENCH 2 5 40.181F
.MODEL QESD PNP( IS=9.707E-018 NF=1.050 BF=800M BR=600U CJE=127.405F
+ VJE=600M MJE=400M CJC=64.825F VJC=650M MJC=400M )
.ENDS HDE381011
************************************************
************************************************
* PAD Models
.SUBCKT PAD3 1 3
CPAD 1 10 87.228F
REPI 10 20 250.111M TC=4.800M,5U
CTRENCH 21 20 22.394F
DS 21 20 DSUB
RS 3 21 369.115
.MODEL DSUB D( IS=12.656F CJO=885.938F M=500M VJ=450M )
.ENDS PAD3
************************************************
.END

Here is the error message I received when I tried to simulate it:

Circuit: KiCad schematic 

Error on line 0 :
  c.xu1.xoutdrv.xq1.cjc=21.582f xu1.xoutdrv.xq1.mjc=400m xu1.xoutdrv.xq1.vjc=650m bf=10k br=809.067u tf=1n fc=900m )
 unknown parameter (xu1.xoutdrv.xq1.vjc) 
Error on line 0 :
  c.xu1.xoutdrv.xq2.cjc=21.582f xu1.xoutdrv.xq2.mjc=400m xu1.xoutdrv.xq2.vjc=650m bf=10k br=809.067u tf=1n fc=900m )
 unknown parameter (xu1.xoutdrv.xq2.vjc) 
Error on line 5 :
  v2 vin 0 pulse(v1=0, v2=3.3, td=500p, tr=1p, tf=1p, pw=500p, per=1n)
no such parameter on this device

Out of curiosity, I deleted the unknown parameter (knowing full well that it was necessary for proper simulation), and it simply claimed the next parameter was unknown. Rinse and repeat with deleting parameters until:

Circuit: KiCad schematic 

Error on line 0 :
  c.xu1.xoutdrv.xq1.cjc=21.582f xu1.xoutdrv.xq1.mjc=400m null 
 unknown parameter (null) 
Error on line 0 :
  c.xu1.xoutdrv.xq2.cjc=21.582f xu1.xoutdrv.xq2.mjc=400m null 
 unknown parameter (null) 
Error on line 5 :
  v2 vin 0 pulse(v1=0, v2=3.3, td=500p, tr=1p, tf=1p, pw=500p, per=1n)
no such parameter on this device

Googling around suggested this could be a SPICE version error, but I have xspice enabled so I'm at a loss.

\$\endgroup\$
1
\$\begingroup\$

It looks like in the subcircuit of H14E04_2, the .model for the TXP has a new line that does not use the concatenation +. Try modifying it to:

+ CJC=21.582F

\$\endgroup\$
1
  • \$\begingroup\$ ...or simply integrate it in the line above (backspace at the beginning of the line). Be sure to leave a space between it and VJE=850M above. \$\endgroup\$ – a concerned citizen Jul 7 '20 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.