LTspiceIV Models

Assorted info that will be of use, spec sheets, docs etc. Non informational postings will be removed.
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#46

Post by Mike H »

Modified triodes library, simplified diode model for forward grid conduction, to better avoid bombing out on 'timestep too small' error (the more complex or 'real' diode model can do this quite often I've found)

All valves zip:
http://www.audio-talk.co.uk/phpBB2/view ... 1641#41641


 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#47

Post by Mike H »

I've started going through the tetrodes models in order to make the screen currents more realistic. Most have the same 'blanket' parameter number that derives screen current ('Kg2=4500'), I've found that in simulations this is most likely to cause unrealistically low voltage drops across screen resistors, when you know full well that it has to be much more than that. Makes it impossible to choose a resistor value that approximates to anything like real life.

The reason why this hasn't been gone into in any detail before (by anybody) is because there is no published data showing comprehensive screen current curves like you have for anodes, so I've adopted the compromise of going by the 'typical operating conditions' tables; i.e. literally simulate a test rig (like, a valve tester) with variable anode, screen and grid Voltages, set them up as per table and measure the currents. The Kg2 number can then be tweaked until the screen current is as per what the table says. Parallel to this the anode current has to be monitored simultaneously so it also stays within the limits.


 
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
musashi
New User
Posts: 2
Joined: Thu Sep 02, 2010 2:03 pm

#48

Post by musashi »

Sorry but in your All Valves.zip I can't find the vrectifier.txt ... :roll:
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#49

Post by Mike H »

There's a good reason for that, it's not in there :lol:


Try it now


 
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
musashi
New User
Posts: 2
Joined: Thu Sep 02, 2010 2:03 pm

#50

Post by musashi »

AHAH thanks!

I'm using Microcap and it dosen't recognize the "uramp" thing... :( It's compatible withe the Pspice format..

Do you know any rules or guidelines to convert these models to pspice?
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#51

Post by Mike H »

Apparently uramp means:

uramp(x)

returns: x if x > 0, else 0

Might be done with if, like

I=if(V(1,3)+.5, 0.00396 * sqrt(V(1,3), 0)


Might it be easier to download SwitcherCAD (LTspice), don't cost nuffink :D


 
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#52

Post by Mike H »

Re: how to display DC operating point on the schematic instead of another window

From: yahoo LTspice group

> Here is short version of it again.
>
> Draw the schematic as usual.
>
> Run the simulation.
>
> Right mouse-click into an empty area.
> Choose View -> Place .op Data Label on the net where you
> want have the DC-voltage shown.
>
> See the text below if you are interested in a few more details.
>
> Best regards,
> Helmut
>
>
> > > Hello xuexucheng,
> > >
> > > If you have a newer version of LTspice IV, you can have the
> > > voltage of the DC-operating point on nets in the schematic.
> > > It works in .OP, .TRAN, .AC, .TF and .NOISE analysis.
> > >
> > > Run the simulation.
> > >
> > > Right mouse-click into an empty area.
> > > Choose View -> Place .op Data Label
> > >
> > > If you have only a .OP analysis,
> > > just clicking on a net is sufficient
> > > to place a Data Label.

The label text can be an expression. To get rid of fractions in the below I've got: int($) for the 337V & 170V, and int($*100)/100 for the 1.32V (thus keeping 2 decimal places) Image


 
Attachments
dc-op-points-demo.gif
dc-op-points-demo.gif (6.36 KiB) Viewed 24321 times
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Nick
Site Admin
Posts: 15694
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#53

Post by Nick »

Useful info.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#54

Post by Mike H »

From the Yahoo! LTspice group

Using the Voltage controlled switch element (component 'SW') as a Voltage regulator.

Yes really!

Expoiting the switch's feature to exhibit a variable resistance as opposed to the usual abrupt on/off resistance changes.

The original cited was for a 5V reg., I have modified it to operate as the adjustable IC type LM317, LM338

Schematic of model below:
Attachments
regulator_with_switch2_adjustable.gif
regulator_with_switch2_adjustable.gif (3.79 KiB) Viewed 23537 times
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#55

Post by Mike H »

Model file (LM317.lib):

Code: Select all

* Node 1 -> In
* Node 2 -> Adj
* Node 3 -> Out

.subckt LM317 1 2 3
S1 3 1 2 3 reg
I1 1 2 50µ load
.model reg sw level=2 Vt=-1.24 Vh=-4m Ron=.1 Roff=1G Ilimit=2.2 Vser=0.2
.ends


.subckt LM338 1 2 3
S1 3 1 2 3 reg
I1 1 2 50µ load
.model reg sw level=2 Vt=-1.24 Vh=-4m Ron=.1 Roff=1G Ilimit=6.0 Vser=0.2
.ends
Only real difference is the current limit, Ilimit (2.2A for LM317, 6A for LM338), it will do that too.
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#56

Post by Mike H »

The symbol looks like as attached:

node 1 = IN (left)
node 2 - GND (bottom)
node 3 = OUT (right)

Symbol Attribute Editor Window (Ctrl+A):
SpiceModel = LM317
Description = Adjustable Voltage Regulator.
ModelFile = LM317.lib

Attribute Add Window (Ctrl+W):
Select: SpiceModel to display which IC on the symbol.


Acknowledgement:
LTspice Yahoo group - A precise 5V voltage regulator after an idea from analogspiceman.
See message #59352. It's for simulation only.
Attachments
lm317-338_asy.gif
lm317-338_asy.gif (2.31 KiB) Viewed 23533 times
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#57

Post by Mike H »

Appendix ~ I've been playing with this in a PSU design and it works really well. So far! :D
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#58

Post by Mike H »

Modified Valves ZIP

Tweaks and things during the last year or so, includes Koren's original models list, and choice of valve symbol shapes, latest is all standardised on the lozenge pentode style.

Last update as edit date.
Attachments
All_Valves2.zip
(40.05 KiB) Downloaded 870 times
Last edited by Mike H on Sun Mar 24, 2013 7:56 pm, edited 4 times in total.
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#59

Post by Mike H »

Generic Op-Amp Models

Created from:
eCircuit Center - Op Amp Models for SPICE
http://www.ecircuitcenter.com/OpModels/OpampModels.htm

... and converted from SPICE to LTspice

Usage: plain symbol linking same name .asc schematic as a sub.

5 types -
1. base generic. Output swing is not limited.
2. as 1 with transistor LTP input. More closely resembles the typical models created by op-amp manufacturers.
3. as 2, output swing limited to 1.5V below supply rails.
4. as 3, plus output current limiting (10mA).
5. as 4, plus current drain on supply rails equal to output current sink. If this is important else is the slowest of the lot.

Includes NE5532 model based on 3 (only).
Attachments
Generic Op-Amp Models.zip
(14.66 KiB) Downloaded 773 times
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#60 Re: LTspiceIV Models

Post by IslandPink »

This thread has oodles of valve models, constantly being updated :
http://www.diyaudio.com/forums/tubes-va ... odels.html
"Once you find out ... the Circumstances ; then you can go out"
Post Reply