LT Spice - Models for Tubes

stephie's place

Moderator: sbench

Post Reply
sbench
Posts: 296
Joined: Fri Jan 28, 2005 3:45 pm

LT Spice - Models for Tubes

Post by sbench »

A lot of this is on Duncan Munro's site, but for more or less completeness, here's how to add tube Spice modeling to LT Spice.

In the swcadiii directory (that's the default where all the schematics you create reside - usually under "Program Files" and LTC or whatever) place the include files. Attached here are 6CA7.inc and dmtriodep.inc

You need to add a Spice Directive .INC dmtriodep.inc onto your schematic to actually USE it.

Now go down into lib/sym/misc folder and add the tube symbols
triode.asy
triodeh.asy
tetrode.asy
pentode.asy

That's all the overall files you need. To add a tube go to add component, misc and you should find the triode, tetrode etc symbols. Add that to your schematic, and call the "right" tube.

the dmtriodep include file models
NH2A3 virtual cathode...no filament model
NH3CX300 no heater model
NHSV6AS7 no heater model
NH6BM8 no heater, triode section only
NH6DJ8 no heater model
NH6N1P no heater model
6SN7GTB
NH6SN7GTB no heater model
NHD3a also called 7721 My model, no heater, triode conn with g3 to K
12AT7
NH12AT7 no heater model
12AU7
NH12AU7 no heater model
12AX7
NH12AX7 no heater model
NH76 no heater model
NH300B virtual cathode, no filament model
SV5723 SV572-3 virtual cathode, no filament model
SV57210 SV572-10 virtual cathode, no filament model
NH5751 no heater model

There's more on Duncan's site, but this is all I need for info presented here at this point. The D3a/7721 model is mine and close enough for government work.

LTSpice stuff files attached...
SPICE.ZIP =
DMTRIODEP.INC
6CA7.INC
TRIODE.ASY
TETRODE.ASY
PENTODE.ASY
TRIODEH.ASY

Note ... file SPICE.ZIP updated to fix 2A3 in DMTRIODEP.INC

Steve
Attachments
spice.zip
(6 KiB) Downloaded 4127 times
Last edited by sbench on Tue May 03, 2005 8:32 pm, edited 2 times in total.
sbench
Posts: 296
Joined: Fri Jan 28, 2005 3:45 pm

Varying tube parms

Post by sbench »

One thing I didn't include ('cuz I didn't think of it at the time) is LTSpice's
nice graphics plotting... This allows you to see the results of a .STEP command.

What's a .STEP command? Well, it allows you to alter the characteristics of your tube to account for device to device variations and aging.

The dmtriodep.inc file needs to be altered only a little bit...
At the beginning of the file, add the line
.PARAM EMISSIONRANGE=1

Then Alter the Eep function in triode and triodenh subcircuits to look like...
{PWR(V(Em,ERP)*{EMC}*{EMISSIONRANGE}*V(rp)}

That's it for the changes to INC file. Now, to actually USE this function, add the directive
.STEP param EMISSIONRANGE LIST 0.6 0.9 1.0 1.1
(for instance). This steps the "emission" of the tube (actually it's transconductance) from 0.6 "nominal", 0.9 nominal, nominal, and 1.1 nominal, giving you 4 plots instead of 1. You could interpret this as +/- 10% variation to account for part to part variation, and degradation to 60% nominal to account for lifetime. For triodes, the MU doesn't vary much over life, but gm (and hence rp) does.

I used that function in my LR phono preamp to ensure the RIAA response doesn't change over lifetime/tube variation, and was one of the tests which caused me to discard a possible topology I originally was going to use that placed the LR compensation in the cathode.

Steve
dave slagle
Posts: 2085
Joined: Sat Jan 22, 2005 3:54 am
Location: NYC
Contact:

Post by dave slagle »

hey,

has anybody else noticed the 2A3 model is a bit funky? The 300B works great, but the 2A3 dropped in place gives some obviously wrong answers.

also is there a way to label the traces when doing the step / list command?

dave
sbench
Posts: 296
Joined: Fri Jan 28, 2005 3:45 pm

Post by sbench »

has anybody else noticed the 2A3 model is a bit funky? The 300B works great, but the 2A3 dropped in place gives some obviously wrong answers.
EEEKKKK! You're right, they're bleeped up on 2A3 model.
Try the following...
In the .INC file, in NH2A3 model, change exponent of RAF from -02 to -03.
Change RAS from the big string it is now to .98
Change MUR to .0006

That looks like it much more closely follows a real 2A3.

Note. I have updated SPICE.ZIP and the inc file in it with these changes.
also is there a way to label the traces when doing the step / list command?
Two ways, depending on what you're trying to do. When your "focus" is on the plot, PLOT SETTINGS --> Select Steps allows you to manipulate the bunch of stuff being displayed.

Also, There's a "Notes & Annotations" submenu also under PLOT SETTINGS that allows good manipulation of graphics, colors, line style and adding text comments (good for labeling the graph)

Steve
Post Reply