LT Spice Basics

Assorted info that will be of use, spec sheets, docs etc. Non informational postings will be removed.
Post Reply
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#1 LT Spice Basics

Post by IslandPink »

I need to find me feet again with LT Spice after losing the set-up a year or two back.
I am finding I've forgotten even the basics of where to set up stuff, store things and how to enable valve models and symbols.
I'm putting this thread down separately to Mike's so it doesn't add too much irrelevant woffle there.
I did look here :
http://www.audio-talk.co.uk/phpBB3/view ... &start=180
but am finding it hard to pick up the key details, Also, things may have moved on since 2013.

OK so please be patient with my beginner questions ..

I've downloaded LT Spice XVII.
I have a load of schematics I saved from before on a back-up. Also people say "store this ( whatever) where you store your schematics"
So where should I (best ) store the schematics ?
Spice_folder.JPG
This is the top directory . Should I add another folder like the 'examples' and 'lib' into this folder, or just use this main folder ?
"Once you find out ... the Circumstances ; then you can go out"
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#2 Re: LT Spice Basics

Post by IslandPink »

OK, I've sussed this first one. It had defaulted to an area it had created in 'My documents' : sub-folder 'LT Spice XV11'.
I have set up a folder alongside 'examples' and 'lib' in C:\Program Files\LTC\LTspiceXVII. Now the stuff will all be in the same area.
I then went in 'Tools>Control Panel' in Spice and set up this path in the 'Sim and Lib search paths' tab.
"Once you find out ... the Circumstances ; then you can go out"
User avatar
izzy wizzy
Old Hand
Posts: 1496
Joined: Fri Nov 02, 2007 7:02 pm
Location: Auckland NZ
Contact:

#3 Re: LT Spice Basics

Post by izzy wizzy »

I have the main program directory on the C: drive as you but keep the sim files in a completely different place on the NAS; in sub dir in my audio folder along with all other things audio. Program association seems to keep things going which is I guess what you did.

I use Stephie's drop down tube models from intact audio.

Currently looking for a tube reg models for 0C3 and 0D3. I seem to have added some to my phono ;)

cheers,

Stephen
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#4 Re: LT Spice Basics

Post by IslandPink »

I'll be on the lookout - but I notice Stephie Bench only had the others eg. OA2 , OB2.

I went to this thread :
http://www.intactaudio.com/forum/viewtopic.php?t=62
and downloaded the starter pack with the valve symbols.
However when I tried to put the valve symbols in lib/sym/misc I found there were already symbols for the triode, pentode and tetrode there from the current LT Spice download. Presumably, I can just use these ?
"Once you find out ... the Circumstances ; then you can go out"
User avatar
izzy wizzy
Old Hand
Posts: 1496
Joined: Fri Nov 02, 2007 7:02 pm
Location: Auckland NZ
Contact:

#5 Re: LT Spice Basics

Post by izzy wizzy »

I use the drop down .asy files from this thread http://www.intactaudio.com/forum/viewtopic.php?t=523 which makes things nice and easy.

cheers,

Stephen
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#6 Re: LT Spice Basics

Post by IslandPink »

I'll come back to that ...
Just downloaded the Ayumi model set from here :
http://www.diyaudio.com/forums/tubes-va ... odels.html

There is a slight inconvenience of having to edit each file to replace ^ symbols with ** , however shouldn't be a problem given the limited number of valves you need in each new circuit.

In the thread there are loads of new fits and models from 2013 onwards. I took a sample file of ECC40 and edited the data into an existing file in the folder I'd created.
However when I saved it, the extension went from .inc to .txt
I had to fix this, in Windows 7 - the procedure is :

With view of folder in Explorer :
Top line 'Organise'
Drop-down 'Folder and Search options'
'View' Tab
Untick 'Hide extensions for known file types'

Click on file and rename extension.
"Once you find out ... the Circumstances ; then you can go out"
User avatar
izzy wizzy
Old Hand
Posts: 1496
Joined: Fri Nov 02, 2007 7:02 pm
Location: Auckland NZ
Contact:

#7 Re: LT Spice Basics

Post by izzy wizzy »

To get going I did this which I guess is a summary of this thread http://www.intactaudio.com/forum/viewtopic.php?t=523

I downloaded the latest LTSPICE.
In my documents folder it created a folder \LTspiceXVII
In that directory are folders \examples and \lib
In that directory are folders \cmp \sub \sym

From the first post download tubestuff.zip and unzip it

Scroll down to post from Aug 29, 2011 and download tetrode.txt and this replaces the one from tubestuff.zip

Now go to near the end to get the most comprehensive library of models Stephie posted triode_nh.txt from post dated Oct 16, 2012 and this also replaces the one from tubestuff.zip. The nh are models for valves with no heater (nh)

Then do this part of the post

1. triode_dd_htr.asy. Copy this into the ...\lib\sym\misc folder
2. triode_dd.asy. Ditto
3. tetrode_dd.asy. Ditto.
When you make a schematic, you can pick one of these for the tubes in the miscellaneous folder of parts. dd stands for drop down

4. triode.txt Copy this into the ...\lib\sub folder.
triode.txt has triode models for devices that also model the heaters. This is currently 6SN7,12AT7, 12AU7, 12AX7.

5. triode_nh.txt. ditto
triode_nh.txt has models for over 40 triodes. More now with the latest file.

6. tetrode.txt. ditto

Note that these are couped into the subcircuit folder, not the symbol folder.

7. t_curves.asc. An example spice file that displays curves for tubes in each of these files.
Copy this into whatever directory you put your spice files into.

For me that resides in another directory altogether. Don't think it matters where.

8. readme.txt. Essentially this post (Stephies original post)

To get the drop down menu on the valves, right click onthe symbol and then right click on the valve name and a drop down box should list all of those valves types.

And just for fun, I've included my latest phono sim where there's a lot of variables. It might look like fixed and self bias but the self bias bit has values that mean it doesn't do anything. Hopefully it might help to get started.

Cheers,
Stephen
Attachments
riaalolowzeqbaloutdiff.asc
(9.11 KiB) Downloaded 541 times
User avatar
IslandPink
Amstrad Tower of Power
Posts: 10041
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#8 Re: LT Spice Basics

Post by IslandPink »

Thanks Stephen. I will have a good go at this at the weekend. Presumably , once I have the framework established as per Steve/Stephie's instructions, I can add/replace valve models with the latest ones people are generating on DIY Audio ( see other thread ) ?
"Once you find out ... the Circumstances ; then you can go out"
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#9 Re: LT Spice Basics

Post by Mike H »

How you getting on with version XVII ? There were lots of complaints about it on the Yahoo LTspice user group. Things just not working properly
or not as before. Might have been sorted by now, but is why I'm still sticking to version IV.


Coupla notes re using the valve models. It is quite easy to 'break' the model by doing something with it that the contained math doesn't expect. All models expect common cathode Voltage amplifer operation, pretty much, altho you can do cathode followers. In the case of the pentodes, they only work properly where the screen grid is an absolute fixed Voltage relative to cathode. Also there is no screen current, until there's an AC input signal to the signal grid (dont ask me how), and is unrealistic. For these reasons I've had to resort to doing things like give the screen its own special LTspice Voltage source, where a screen resistor in the circuit won't give the right Voltage drop. Also means you can't do triode-strapped or ultra-linear, model will still work, but the behaviour (e.g. gain) is not realsitic. (Triode strapped gain is too high, for ultra-linear, too low.)
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
izzy wizzy
Old Hand
Posts: 1496
Joined: Fri Nov 02, 2007 7:02 pm
Location: Auckland NZ
Contact:

#10 Re: LT Spice Basics

Post by izzy wizzy »

Mike H wrote: Wed Mar 06, 2019 3:06 pm How you getting on with version XVII ? There were lots of complaints about it on the Yahoo LTspice user group. Things just not working properly
or not as before. Might have been sorted by now, but is why I'm still sticking to version IV.


Coupla notes re using the valve models. It is quite easy to 'break' the model by doing something with it that the contained math doesn't expect. All models expect common cathode Voltage amplifer operation, pretty much, altho you can do cathode followers. In the case of the pentodes, they only work properly where the screen grid is an absolute fixed Voltage relative to cathode. Also there is no screen current, until there's an AC input signal to the signal grid (dont ask me how), and is unrealistic. For these reasons I've had to resort to doing things like give the screen its own special LTspice Voltage source, where a screen resistor in the circuit won't give the right Voltage drop. Also means you can't do triode-strapped or ultra-linear, model will still work, but the behaviour (e.g. gain) is not realsitic. (Triode strapped gain is too high, for ultra-linear, too low.)
That's odd. I haven't given it a thrashing yet but for running a simple model as I attached, it seems to work. I get screen current on my pentode. The voltages come out about what I get IRL. I don't play with cathode followers so can't comment but jc does and uses pentodes in his sims and hasn't said anything and his stuff is weird to the point I don't understand the circuits. Do you mean pentodes as cathode followers?

The models, for example a D3a, have a model as a pentode and a model as a triode rather than the pentode strapped as a triode. Dunno if that changes anything. 46 fer instance has two triode models, hi mu, low mu depending on how it's strapped.

Cheers,
Stephen
User avatar
Mike H
Amstrad Tower of Power
Posts: 20156
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#11 Re: LT Spice Basics

Post by Mike H »

Yes the model as a triode is because wiring a pentode model as a triode gives unrealistic behaviour.

Re sceen current, yes I get screen current but it does not equate to that of a real valve. this is something I've found especially frustrating. E.g. I set up a text book circuit for a EF86, the anode Voltage is stupidly low, and (because) the screen is stupidly high, not at all what the real valve does in the same circuit. Ergo I have to 'cheat' (bodge the screen Voltage) Image

Of course your models may be different, I'm using the Norman Koren based models.
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
Post Reply