What is SPICE

We all start somewhere
User avatar
Mike H
Amstrad Tower of Power
Posts: 17935
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

Post by Mike H » Tue Mar 19, 2013 3:25 pm

yes I appreciate the problem about not having valve types you actually want. :D

Nick's right you can add an extra new subckt for whatever else.

To this end I created 2 tool schematics which plot grid curves against anode Volts & current like a datasheet graph, these are now in All_Valves2.zip

http://www.audio-talk.co.uk/phpBB2/view ... 509#101509

They are called Graph New Triode - template.asc & Graph New Tetrode - template.asc, best save as new file different name for a new valve.
 
I never make the same mistake twice. Instead I prefer to fill my day with a variety of different mistakes

User avatar
IslandPink
No idea why I do this anymore
Posts: 6368
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

Post by IslandPink » Tue Mar 19, 2013 6:45 pm

I haven't got round to that last bit, Mike, but I did manage to get your valve symbols and data files ( and hence drop-down menu ) working . Excellent - thanks a bunch .

Now, presumably, if I want to get similar functionality with the Steve Bench models, it looks like I could say, copy 'triodes_new' and rename it something obvious like 'Triodes_bench' , then edit the file in Wordpad to replace the line "SYMATTR ModelFile new_triodes.txt" to :
"SYMATTR ModelFile triodes_nh.txt" ( Stephie's data ) ?

Anything else I'd need to change ?

Cheers .
"It's so easy to decide on a name
It's a name caller's game
It's so easy to look down from above " (Wyatt)

User avatar
IslandPink
No idea why I do this anymore
Posts: 6368
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

Post by IslandPink » Tue Mar 19, 2013 6:54 pm

OK, tried this and ran into a snag.
When I edit Mike's .asy file and save it as triodes_bench, it turns into an ordinary text document, and then it can't be seen as a type of component when you try to insert it into the circuit .
I tried editing the filename with a '.asy' at the end but it didn't work .
Any tips ?
"It's so easy to decide on a name
It's a name caller's game
It's so easy to look down from above " (Wyatt)

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

Post by Mike H » Wed Mar 20, 2013 3:49 pm

Ah yes similar prob has come up before on the LTspice yahoo group, this is usually caused by Windows hiding filename extensions. Which it does by default.

What you've probably done is save a 'something.asy' as actually 'something.asy.txt'

Change your Windows explore settings to show all file types.

Menu: Tools > Folder Options

Tab: View
"Hide extensions for known file types", UNTICK its check box
Click 'OK'


Anyway, the best way to edit symbols is use spice itself.

Get the valve symbol you want as a component and put it on a schematic.

Right mouse click on symbol.

In the attributes window, click 'Open Symbol' button. Symbol drawing will be loaded into another child window.

IMPORTANT: save this symbol as something else .asy else will overwrite original! So therefore 'triodes_bench.asy'.

Key 'Ctrl + A' to get the list of attributes to edit.

For ModelFile, put in 'triode_nh.txt'

For SpiceModel, put in 'TRIODENH'

EDIT: the default model for any new instance of this symbol will therefore be 'TRIODENH'

That should get the new symbol working with the triodes_nh.txt library.

You have to close LTspice then restart it before it will list any new symbols, or it might be OK if you created a new one using itself, can't remember offhand. But anyway if the new symbol won't appear in the components list, end the program and rerun it.

HTH
 
I never make the same mistake twice. Instead I prefer to fill my day with a variety of different mistakes

User avatar
IslandPink
No idea why I do this anymore
Posts: 6368
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

Post by IslandPink » Wed Mar 20, 2013 7:22 pm

Excellent Mike, Top-notch :D
Now all I need is some time to construct the schematic !
( later )
"It's so easy to decide on a name
It's a name caller's game
It's so easy to look down from above " (Wyatt)

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

Post by Mike H » Thu Mar 21, 2013 4:50 pm

OK that got you going :D

WARNING: I'm not sure if the Steve version models include compression of the positive going half cycles, same as where the grid lines on the datasheet graph bunch up towards the bottom right corner, this corresponds to large negative grid Volts, large anode Volts, and low anode current. The latest Norman Koren models as I use can do this. (I say 'latest' cos there is an earlier version of his, that don't.)

This non-linearity can be made easily visible on .tran LTspice plots, especially for large signal swings.

Without this behaviour though you can easily think that the waveform plots you are seeing are better quality than they really would be.

HTH
 
I never make the same mistake twice. Instead I prefer to fill my day with a variety of different mistakes

User avatar
IslandPink
No idea why I do this anymore
Posts: 6368
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

Post by IslandPink » Thu Mar 21, 2013 6:19 pm

Once I've got the circuit set up, I'll try both tetrode KT88 models and see if there are any differences in the behaviour . In this case it's not like running the valve as an amplification device, so hopefully it won't be too critical.

I might also build the power supply and listen to it ! :cyclopsani:
"It's so easy to decide on a name
It's a name caller's game
It's so easy to look down from above " (Wyatt)

User avatar
IslandPink
No idea why I do this anymore
Posts: 6368
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

Post by IslandPink » Thu Mar 21, 2013 8:12 pm

I think I should have drawn my circuit the other way round , as now the Grid connection on the valve symbols is on the wrong side to connect to the other bits I've placed :oops: I guess that's OK but there will be a lot of fiddly wire links going across other wires . I assume that as long as you don't create a node as it crosses the other wire, the program assumes it isn't connected ?
Or, if I could reverse (flip) the symbol , that would be great, but I suspect that is embedded in the drawing commands that make up the symbol .
"It's so easy to decide on a name
It's a name caller's game
It's so easy to look down from above " (Wyatt)

User avatar
Nick
Site Admin
Posts: 11499
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

Post by Nick » Thu Mar 21, 2013 9:24 pm

Select move, click on the device, then whatever the control key combination is to mirror the object.
Resistance isn't futile it's V / I.

User avatar
IslandPink
No idea why I do this anymore
Posts: 6368
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

Post by IslandPink » Thu Mar 21, 2013 9:43 pm

Nice - I now know how to Move as a result of that !
But I guess I'll have to search for the 'mirror' control code.
Ok , let me try the next-to-useless Help manual, just in case ...
"It's so easy to decide on a name
It's a name caller's game
It's so easy to look down from above " (Wyatt)

User avatar
IslandPink
No idea why I do this anymore
Posts: 6368
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

Post by IslandPink » Thu Mar 21, 2013 9:48 pm

No, it's officially USELESS .
'Move' does not appear in 'index' or 'search' in Help, you wouldn't know it existed .
Looking up 'resistor' shows no information on the fact you can use 'k' to denote 1000 , and maybe or maybe not you can use 'm' or 'M' to denote 1,000,000 . ( Can you ? ) .
'Capacitor' search reveals no information on whether you can use 'u' to create 0.000001 Farads , etc, etc ......

I think it may be less useful than the Microsoft help routines :shock:

Edit : Google search reveals 'Ctrl+e' once you have the component selected with 'Move' . Obvious !! :laughing5:
Last edited by IslandPink on Thu Mar 21, 2013 9:52 pm, edited 1 time in total.
"It's so easy to decide on a name
It's a name caller's game
It's so easy to look down from above " (Wyatt)

User avatar
Nick
Site Admin
Posts: 11499
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

Post by Nick » Thu Mar 21, 2013 9:49 pm

Mirror Ctrl + E
Rotate Ctrl+R
Resistance isn't futile it's V / I.

User avatar
IslandPink
No idea why I do this anymore
Posts: 6368
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

Post by IslandPink » Thu Mar 21, 2013 9:53 pm

Thanks, you pipped me to the post !
"It's so easy to decide on a name
It's a name caller's game
It's so easy to look down from above " (Wyatt)

User avatar
IslandPink
No idea why I do this anymore
Posts: 6368
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

Post by IslandPink » Fri Mar 22, 2013 12:34 pm

Have constructed the TRex power supply now .
Pic on the other thread - I need a bit of help in getting any useful information out of it !
"It's so easy to decide on a name
It's a name caller's game
It's so easy to look down from above " (Wyatt)

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

Post by Mike H » Fri Mar 22, 2013 4:12 pm

"other thread" ?

IslandPink wrote:No, it's officially USELESS .
'Move' does not appear in 'index' or 'search' in Help, you wouldn't know it existed .
It does, Contents > Schematic Capture > Keyboard Shortcuts

The menus also tell you a lot, including the shortcuts :D

Looking up 'resistor' shows no information on the fact you can use 'k' to denote 1000 , and maybe or maybe not you can use 'm' or 'M' to denote 1,000,000 . ( Can you ? ) .
'Capacitor' search reveals no information on whether you can use 'u' to create 0.000001 Farads , etc, etc ......

Again, Help file Contents > LTspice > Introduction > General Structure And Conventions

T (Tetra) - 1e12
G (Giga) - 1e9
Meg (mega) - 1e6
K (kilo) - 1e3
M (milli) - 1e-3
u(or µ) (micro) - 1e-6
n (nano) - 1e-9
p (pico) - 1e-12
f (femto) - 1e-15

^ not case sensitive.

If readability matters then for resistor values you could use 'R' suffix if in Ohms; 'F' suffix if capacitor; 'H' suffix if inductor

HTH
 
I never make the same mistake twice. Instead I prefer to fill my day with a variety of different mistakes

Post Reply