Page 4 of 4

#46

Posted: Sun Aug 01, 2010 8:43 pm
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



#47

Posted: Mon Aug 16, 2010 1:21 pm
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.


 

#48

Posted: Thu Sep 02, 2010 2:13 pm
by musashi
Sorry but in your All Valves.zip I can't find the vrectifier.txt ... :roll:

#49

Posted: Thu Sep 02, 2010 6:02 pm
by Mike H
There's a good reason for that, it's not in there :lol:


Try it now


 

#50

Posted: Fri Sep 03, 2010 8:37 am
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?

#51

Posted: Fri Sep 03, 2010 2:08 pm
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


 

#52

Posted: Sat Apr 16, 2011 1:48 pm
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


 

#53

Posted: Sat Apr 16, 2011 3:18 pm
by Nick
Useful info.

#54

Posted: Mon Oct 15, 2012 6:19 pm
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:

#55

Posted: Mon Oct 15, 2012 6:22 pm
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.

#56

Posted: Mon Oct 15, 2012 6:34 pm
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.

#57

Posted: Mon Oct 15, 2012 6:37 pm
by Mike H
Appendix ~ I've been playing with this in a PSU design and it works really well. So far! :D

#58

Posted: Sun Feb 24, 2013 8:17 pm
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.

#59

Posted: Sun Feb 24, 2013 8:47 pm
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).

#60 Re: LTspiceIV Models

Posted: Fri Jun 22, 2018 1:26 pm
by IslandPink
This thread has oodles of valve models, constantly being updated :
http://www.diyaudio.com/forums/tubes-va ... odels.html