What is SPICE

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

#181

Post by Mike H »

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.
 
"Entrenched convictions cannot be changed by facts." – Dick Francis
User avatar
IslandPink
Social Sevices have been notified
Posts: 8834
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#182

Post by IslandPink »

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 .
"Peridots and periwinkle, blue medallions Gilded galleons spilled across the ocean floor" ( Mitchell )
User avatar
IslandPink
Social Sevices have been notified
Posts: 8834
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#183

Post by IslandPink »

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 ?
"Peridots and periwinkle, blue medallions Gilded galleons spilled across the ocean floor" ( Mitchell )
User avatar
Mike H
Amstrad Tower of Power
Posts: 19061
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#184

Post by Mike H »

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
 
"Entrenched convictions cannot be changed by facts." – Dick Francis
User avatar
IslandPink
Social Sevices have been notified
Posts: 8834
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#185

Post by IslandPink »

Excellent Mike, Top-notch :D
Now all I need is some time to construct the schematic !
( later )
"Peridots and periwinkle, blue medallions Gilded galleons spilled across the ocean floor" ( Mitchell )
User avatar
Mike H
Amstrad Tower of Power
Posts: 19061
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#186

Post by Mike H »

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
 
"Entrenched convictions cannot be changed by facts." – Dick Francis
User avatar
IslandPink
Social Sevices have been notified
Posts: 8834
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#187

Post by IslandPink »

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:
"Peridots and periwinkle, blue medallions Gilded galleons spilled across the ocean floor" ( Mitchell )
User avatar
IslandPink
Social Sevices have been notified
Posts: 8834
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#188

Post by IslandPink »

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 .
"Peridots and periwinkle, blue medallions Gilded galleons spilled across the ocean floor" ( Mitchell )
User avatar
Nick
Site Admin
Posts: 13657
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#189

Post by Nick »

Select move, click on the device, then whatever the control key combination is to mirror the object.
Little known fact, coherent thought can destructively interfere with itself leaving no thought at all, that’s why I prefer incoherent thought.
User avatar
IslandPink
Social Sevices have been notified
Posts: 8834
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#190

Post by IslandPink »

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 ...
"Peridots and periwinkle, blue medallions Gilded galleons spilled across the ocean floor" ( Mitchell )
User avatar
IslandPink
Social Sevices have been notified
Posts: 8834
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#191

Post by IslandPink »

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.
"Peridots and periwinkle, blue medallions Gilded galleons spilled across the ocean floor" ( Mitchell )
User avatar
Nick
Site Admin
Posts: 13657
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#192

Post by Nick »

Mirror Ctrl + E
Rotate Ctrl+R
Little known fact, coherent thought can destructively interfere with itself leaving no thought at all, that’s why I prefer incoherent thought.
User avatar
IslandPink
Social Sevices have been notified
Posts: 8834
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#193

Post by IslandPink »

Thanks, you pipped me to the post !
"Peridots and periwinkle, blue medallions Gilded galleons spilled across the ocean floor" ( Mitchell )
User avatar
IslandPink
Social Sevices have been notified
Posts: 8834
Joined: Tue May 29, 2007 7:01 pm
Location: Denbigh, N.Wales

#194

Post by IslandPink »

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 !
"Peridots and periwinkle, blue medallions Gilded galleons spilled across the ocean floor" ( Mitchell )
User avatar
Mike H
Amstrad Tower of Power
Posts: 19061
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#195

Post by Mike H »

"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
 
"Entrenched convictions cannot be changed by facts." – Dick Francis
Post Reply