Author Topic: CD74AC14 Spice model consumes 150 KA  (Read 1702 times)

0 Members and 1 Guest are viewing this topic.

Offline insanoffTopic starter

  • Contributor
  • Posts: 22
  • Country: az
CD74AC14 Spice model consumes 150 KA
« on: November 06, 2022, 04:47:38 pm »
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.
Thanks
Adam
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 2816
  • Country: us
Re: CD74AC14 Spice model consumes 150 KA
« Reply #1 on: November 06, 2022, 05:13:34 pm »
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
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13027
Re: CD74AC14 Spice model consumes 150 KA
« Reply #2 on: November 06, 2022, 05:50:15 pm »
Somebody/something is wrong, but it doesn't appear to be our O.P.
The .lib file has:
Code: [Select]
.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:
Quote
* - Built using generic logic gate behavioral pspice model V2

LTspice 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!
« Last Edit: November 06, 2022, 05:52:08 pm by Ian.M »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2758
  • Country: ca
Re: CD74AC14 Spice model consumes 150 KA
« Reply #3 on: November 08, 2022, 02:45:36 am »
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 \$\Omega\$.

Edit the model and change the params for RA and RB to 10E6, 10M \$\Omega\$. 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.

Result



 Regards,

Jay_Diddy_B


 
The following users thanked this post: Someone, edavid, Ian.M

Offline insanoffTopic starter

  • Contributor
  • Posts: 22
  • Country: az
Re: CD74AC14 Spice model consumes 150 KA
« Reply #4 on: November 08, 2022, 05:30:49 pm »
LTspice 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!

Thank 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.
« Last Edit: November 08, 2022, 05:34:13 pm by insanoff »
 

Offline insanoffTopic starter

  • Contributor
  • Posts: 22
  • Country: az
Re: CD74AC14 Spice model consumes 150 KA
« Reply #5 on: November 08, 2022, 05:33:13 pm »
Edit the model and change the params for RA and RB to 10E6, 10M \$\Omega\$. 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.

Great! Thanks a lot, Jay_Diddy_B! I will give it another try. I feel an urge to learn some Spice sripting as well.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13027
Re: CD74AC14 Spice model consumes 150 KA
« Reply #6 on: November 08, 2022, 05:44:43 pm »
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.
 

Offline insanoffTopic starter

  • Contributor
  • Posts: 22
  • Country: az
Re: CD74AC14 Spice model consumes 150 KA
« Reply #7 on: November 08, 2022, 05:54:38 pm »
Edit the model and change the params for RA and RB to 10E6, 10M \$\Omega\$. and the model will work properly and give sensible results.
I checked the Schmitt buffer SN74LVC1G17 and it seems to have the correct resistances.
Thanks again!
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2758
  • Country: ca
Re: CD74AC14 Spice model consumes 150 KA
« Reply #8 on: November 08, 2022, 07:23:37 pm »
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 220M \$\Omega\$ in the SN74LVC1G17 model which is probably the correct value.

Jay_Diddy_B
 
The following users thanked this post: Ian.M

Offline insanoffTopic starter

  • Contributor
  • Posts: 22
  • Country: az
Re: CD74AC14 Spice model consumes 150 KA
« Reply #9 on: November 10, 2022, 09:52:36 pm »
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.

Hi 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
« Last Edit: September 07, 2024, 05:23:44 pm by insanoff »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf