CD74AC14 Spice model consumes 150 KA - Page 1
Forum section: electronics / projects

author: insanoff
author_rank: Contributor
timestamp: November 06, 2022, 04:47:38 pm
content: Hello everyone!I downloaded the Spice model of the Schmitt inverter CD74AC14 from the TI website (https://www.ti.com/lit/zip/schm039) to use it in simulation. I noticed some strange behavior: The model consumes 150 kilo amps.I attach the simulation, the model and the symbol. I would like to know if I am doing something wrong.ThanksAdam

author: jmelson
author_rank: Super Contributor
timestamp: November 06, 2022, 05:13:34 pm
content: Oh, you are doing something wrong. First, check that you have the power supply terminals connected to the right pins. I assume the 150 KA is on V2.Jon

author: Ian.M
author_rank: Super Contributor
timestamp: November 06, 2022, 05:50:15 pm
content: Somebody/something is wrong, but it doesn't appear to be our O.P.The .lib file has:Code:.SUBCKT CD74AC14 Y A VCC AGNDand the .asy has pins VCC as netlist order 3 in the top left corner and AGND as netlist order 4 in the bottom left corner, and V2 polarity is correct, so its hooked up correctly in O.P's test jig.Short of reverse engineering a schematic from the .lib netlist, it isn't going to be easy to figure out.One clue may be a line in the .lib's comment header:QuoteLTspice is UC Berkeley SPICE 3 compatible, with its own extended syntax etc. SPICE 3 does *NOT* support mixed mode or digital simulation, however LTspice does, with its own proprietary digital device primitives.PSPICE also supports mixed mode and digital simulation, but it does so very differently. Don't expect LTspice to run PSPICE digital models cleanly, if at all!

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 08, 2022, 02:45:36 am
content: Hi,I have looked at the netlist of the CD74AC14 provided by TI. The model contains at least two errors:The model is for a two-input gate. The inputs are A and B. There are resistors to GND defined by the parameters RA and RB. These are 22u.Edit the model and change the params for RA and RB to 10E6, 10M. and the model will work properly and give sensible results.In addition to the supply current being 150kA, the input current to node A was 150kA.Changing the values of RA and RB, fixes both.ResultRegards,Jay_Diddy_B

author: insanoff
author_rank: Contributor
timestamp: November 08, 2022, 05:30:49 pm
content: Quote from: Ian.M on November 06, 2022, 05:50:15 pmThank you, Ian.M. I am new to LTspice. It is important to know that there are differences.I was thinking that in general Spice models are designed equal. I will keep that in mind in future.I suppose I should learn a bit Spice scripting as well.

author: insanoff
author_rank: Contributor
timestamp: November 08, 2022, 05:33:13 pm
content: Quote from: Jay_Diddy_B on November 08, 2022, 02:45:36 amGreat! Thanks a lot, Jay_Diddy_B! I will give it another try. I feel an urge to learn some Spice sripting as well.

author: Ian.M
author_rank: Super Contributor
timestamp: November 08, 2022, 05:44:43 pm
content: Jay did a far better job of spotting the problem with the model than I could. Unfortunately I need to reverse engineer more complex netlists to schematics to comprehend them. Others are not so limited.A SPICE power user (of whatever 'flavour' of SPICE program) should be able to understand netlists. Its the first step towards being able to write your own subcircuit models, and debug any problematic models you acquire.

author: insanoff
author_rank: Contributor
timestamp: November 08, 2022, 05:54:38 pm
content: Quote from: Jay_Diddy_B on November 08, 2022, 02:45:36 amI checked the Schmitt buffer SN74LVC1G17 and it seems to have the correct resistances.Thanks again!

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: November 08, 2022, 07:23:37 pm
content: Hi,Just to clarify, this error is not an LTspice vs. Pspice thing, it is a straightforward bug.You would get the same 150kA flowing if you used the model in Pspice.The relevant section of the netlist can be illustrated:The circuits on the left and right are the same.TI used 220Min the SN74LVC1G17 model which is probably the correct value.Jay_Diddy_B

author: insanoff
author_rank: Contributor
timestamp: November 10, 2022, 09:52:36 pm
content: Quote from: Jay_Diddy_B on November 08, 2022, 07:23:37 pmHi Jay_Diddy_B,yes, your explanation was perfect.The simulation model is working as expected. I have reported the error to TI too.Cheers,Adam