SPICE model for tl494

Hello dear engineers.

I started working with SPICE modeling in KiCAD and I want to ask you, where can I find a spice model for tl494?

I have a tl494 model for LTSpice, I downloaded it somewhere on the Internet, but I don’t know how to use it in KiCAD.

If someone knows where I can get this SPICE model for KiCAD or if someone has this model, could you please share it.

Thank You Very Much in Advance!

Please have a look at my tutorial at KiCad Eeschema as GUI for ngspice, tutorial for setting up the simulation , where you will find how to attach an external spice model to your symbol.

You also might join my video channel at https://www.youtube.com/@holger8105/videos, especially https://www.youtube.com/watch?v=Wg7uSs4J_0U does show how to find and attach a vendor model.

Hello, I can do this, it’s quite easy, but when it comes to attaching some complex microcircuit, for example tl494 with LTspice, then problems begin, since there are subcircuits and they all need to be moved somehow into one file, and only then attached, plus you need to take into account the syntax of LTspice and Ngspice.

The subcircuits do not have to be in a single file. Each schematic symbol can have it’s spice symbol in a separate file. I suggest you start with very simple things, and then slowly extend to more complex simulations, and build up your knowledge of how all the parts fit together along the way.

I can add spice models for transistors, operational amplifiers that I downloaded from the Internet, but I can’t add TL494, I tried, I couldn’t, because in the spice file itself there are subcircuits that refer to other files. I also want to ask, how fundamental is the difference in the syntax of NGspice and LTspice? I tried to add the model itself from LTspice, in KiCAD, but it simply did not work, as I understood, this is because there is simply different syntax :frowning:

ngSpice does support subcircuits, after all they are just a netlist that combine more primitive models. Apparently it’s even common to a subcircuit for a single (power) transistor to use for example two transistors and some passives to better emulate the BJT in some specific instances.

But there are also encrypted spice models, with which ngSpice can not do anything. I am also busy with a relative serious attempt to get to know ngSpice a bit better myself, after a bit of searching you find 6 models for the same transistor, and those models are all different, have 20+ parameters, and I have no idea what those parameters mean yet… So I have some work to do.

I found the model below in Bordodynovs library. I have not tested it myself and don’t know if it works.

  • Библиотека личных моделей Валентина Яковлевича Володина
  • Модель ШИМ контроллера TL494
  • Создана 1 Февраля 2008 года

.subckt tl494 IN1 -IN1 IN2 -IN2 FB DTC Vref OCT CT1 ET1 CT2 ET2 Ct Rt GND Vcc
A1 N005 GND N006 GND GND N005 N011 GND DFLOP Vhigh=5 Trise=50n Rout=30
A2 GND GND GND N009 N011 GND N007 GND AND Vhigh=5 Trise=50n Rout=30
A3 N005 N009 GND GND GND GND N013 GND AND Vhigh=5 Trise=50n Rout=30
A4 N006 N007 GND GND GND N004 GND GND OR Vhigh=5 Trise=300n Rout=30
A5 N006 N013 GND GND GND N015 GND GND OR Vhigh=5 Trise=300n Rout=30
G1 N002 ET1 N004 GND table=(1 0,4 250m)
G3 N014 ET2 N015 GND table=(1 0,4 250m)
A6 N008 N012 GND GND GND GND N006 GND OR Vhigh=5 Trise=50n Rout=30
A7 N010 Ct GND GND GND GND N008 GND SCHMITT Vt=0 Vh=0 Vhigh=5
A8 FB N016 GND GND GND GND N012 GND SCHMITT Vt=0 Vh=0 Vhigh=5
V4 N016 Ct 0.7
V5 N010 DTC 0.1
D5 N020 FB IDEAL
D6 N024 FB IDEAL
R1 N017 N018 1meg
R3 N021 N022 1meg
C4 N019 GND 15.9n
C5 N023 GND 15.9n
D1 ET1 N002 IDEALZ
E1 N020 GND N019 GND table=(0,0 5,5)
E2 N024 GND N023 GND table=(0,0 5,5)
R5 -IN1 GND 5meg
R6 IN1 GND 5meg
R7 -IN2 GND 5meg
R8 IN2 GND 5meg
I1 FB GND 0.7m
V2 N001 GND 3.65
F1 GND Ct V2 -1
S1 GND Ct N003 GND OSC
D3 CT1 N002 IDEAL1
D7 CT1 N002 IDEAL2
G2 ET1 N002 Vcc ET1 table=(0 250m,1.42 243m,1.46 150m,1.57 0)
D2 ET2 N014 IDEALZ
D4 CT2 N014 IDEAL1
D8 CT2 N014 IDEAL2
G4 ET2 N014 Vcc ET2 table=(0 250m,1.42 243m,1.46 150m,1.57 0)
C7 N002 ET1 5p
C8 N014 ET2 5p
D9 N001 Rt IDEAL
R14 Ct GND 5meg
R15 ET2 GND 5meg
R16 ET1 GND 5meg
G5 Vcc GND Vcc GND TABLE=(1 0,5 4.5m,6.85 7.6m,40 8.4m)
I2 GND Vref 25m
D10 GND Vref IDEAL5
B1 Vcc GND I=I(D10)+25m
R9 N009 OCT 1k
R10 Ct N003 5k
C1 N003 GND 10p
I3 N018 N019 10m load
I4 N019 N018 10m load
I5 N022 N023 10m load
I6 N023 N022 10m load
E3 N017 GND IN1 -IN1 100000
E4 N021 GND IN2 -IN2 100000
D11 GND N019 DAMP
D12 GND N023 DAMP
.MODEL IDEALZ D(Ron=0 Roff=20meg Vfwd=0 Vrev=41)
.MODEL IDEAL D(Ron=0 Roff=1G Vfwd=0)
.model OSC SW(Ron=10 Vt=1.51 Vh=1.49 Ilimit=20m)
.MODEL IDEAL1 D(Ron=2 Roff=1G Vfwd=0.66)
.MODEL IDEAL2 D(Ron=175 Roff=1G Vfwd=0)
.MODEL IDEAL5 D(Ron=0 Roff=1G Vfwd=0 Vrev=5)
.model DAMP D(Ron=0 Rrev=500 Roff=1Meg Vfwd=0 Vrev=3.5 Revepsilon=1)
.ends tl494

It will not work, as construct like the A1 cited above are specific to LTSPICE only.

It seems to be hand-crafted by Bordodynov for LTSPICE.

The only way will be to replace these A1 - A8 by ngspice code models (we need OR, AND, Dflop and Schmitt-Trigger) to create a model of TL494 specific for ngspice.

TI does not offer a model on its web pages. But you may ask them for a unencrypted PSPICE compatible model.

As I wrote before, I’m still pretty much a beginner with all this spice stuff myself and a bit overwhelmed by both the diversity and chaotic distribution of information. Mix in some lack of knowledge of things like syntax and such and you’re in for some serious ear scratching or hair pulling.