Forums

SPICE deep yogurt..

Started by Robert Baer August 26, 2014
   Well, according to the "help" document, there should be a "Draw" on 
the top selection bar; NOPE!
   So i have no idea as to draw a new part and label it.
   Therefore i hope i have an invisible LM185ADJ, and hoped it would work...
   I "broke out" the various subcircuits (transistor, opamp, and even 
the LM185ADJ) then drew a "test" circuit to probe.

   Very deep dodo...help?
Version 4
SHEET 1 1592 1524
WIRE -640 112 -720 112
WIRE -368 112 -640 112
WIRE -272 112 -368 112
WIRE -720 160 -720 112
WIRE -640 160 -640 112
WIRE -368 240 -368 192
WIRE -272 240 -368 240
WIRE -144 240 -192 240
WIRE -368 288 -368 240
WIRE -640 304 -640 240
WIRE -512 304 -640 304
WIRE -512 432 -512 304
WIRE -368 432 -368 368
WIRE -368 432 -512 432
WIRE -272 432 -368 432
WIRE -160 432 -192 432
FLAG -144 240 N3
FLAG -272 112 N4
FLAG -160 432 N1
FLAG -720 160 0
SYMBOL res -384 272 R0
WINDOW 3 38 82 Left 2
SYMATTR Value 7.87Meg
SYMATTR InstName R1
SYMBOL voltage -640 144 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName Vreg
SYMATTR Value 180V
SYMBOL res -384 96 R0
SYMATTR InstName R2
SYMATTR Value 412K
SYMBOL res -176 224 R90
WINDOW 0 -1 100 VBottom 2
WINDOW 3 -30 50 VTop 2
SYMATTR InstName R3
SYMATTR Value 0.001
SYMBOL res -176 416 R90
WINDOW 0 -1 100 VBottom 2
WINDOW 3 -30 50 VTop 2
SYMATTR InstName R4
SYMATTR Value 0.001
TEXT -624 -112 Left 2 ;WAS:\n V1  N4 N0 DC 180V ;Vreg\n R1  N3 N1 
7.87MEG ;for Vref 25V appx\n R2  N4 N3 412K    ;3uA at 1.24V
TEXT -272 288 Left 2 !X3 N4  N3 N1 LM285ADJ
TEXT -728 352 Left 2 !.dc Vreg 0 150 .1
TEXT -232 312 Left 2 ;+    FB  -
TEXT -728 16 Left 2 !.LIB "C:\\Program 
Files\\LTC\\LTspiceIV\\DOSbased\\SubCkt\\LM285ADJ.sub"
TEXT -728 40 Left 2 !.LIB "C:\\Program 
Files\\LTC\\LTspiceIV\\DOSbased\\MODELS\\STANDARD.BJT"
TEXT -728 64 Left 2 !.LIB "C:\\Program 
Files\\LTC\\LTspiceIV\\DOSbased\\\\SubCkt\\TL031.sub"
TEXT -8 136 Left 2 ;.SUBCKT LM285ADJ 1 2 3  ; 1=+ cathode, 2=FB, 3=- 
anode\n ISINK  0 81 5UA\n RSINK 81  0 1E15 ; dummy - get +V term 81 rel 
term  0\n VREF 82 81 1.24V ; vary this +/- 1%\n VP 83  0 15V\n VN 84  0 
-15V\n*    C  B  E SUB\n Q1 82 85  0  0  QN2222A\n RA  3  0 1E-6OHM\n RC 
  1 82 1E-6OHM\n X1 81  2 83 84 85 TL031\n.ENDS LM285ADJ
On Mon, 25 Aug 2014 20:11:02 -0700, Robert Baer <robertbaer@localnet.com>  
wrote:

> Version 4 > ..snip... > RC 1 82 1E-6OHM\n X1 81 2 83 84 85 TL031\n.ENDS LM285ADJ
To make your subckt list a true subckt list,not a 'comment', right click on the text area and the select "SPICE directive" Changes the color of the text from blue to black. Still doesn't run, but it's a start. To make a 'new' symbol, go up to FILE on the upper left and select New Symbol. But you don't need one. There's more, so I'll have to keep looking to find more. You could also, select oe of the 3-terminal regulators from the library, THEN change to your subckt. too. Much easier, and faster, and get some really thorough answers, post your schematic to the /temp folder and post your question relating to that schematic to the LTspice group. Helmut will either walk you through, or point you to the step by step directions on a new symbol.
On Mon, 25 Aug 2014 20:11:02 -0700, Robert Baer
<robertbaer@localnet.com> wrote:

> Well, according to the "help" document, there should be a "Draw" on >the top selection bar; NOPE! > So i have no idea as to draw a new part and label it. > Therefore i hope i have an invisible LM185ADJ, and hoped it would work... > I "broke out" the various subcircuits (transistor, opamp, and even >the LM185ADJ) then drew a "test" circuit to probe.
Download this... <http://www.analog-innovations.com/LTspiceTutorials.zip> from the Simulation Tools & Macros Page of my website. Go thru all the tutorials. Flailing rarely is a productive learning mechanism.
> > Very deep dodo...help? >Version 4 >SHEET 1 1592 1524 >WIRE -640 112 -720 112 >WIRE -368 112 -640 112 >WIRE -272 112 -368 112 >WIRE -720 160 -720 112 >WIRE -640 160 -640 112 >WIRE -368 240 -368 192 >WIRE -272 240 -368 240 >WIRE -144 240 -192 240 >WIRE -368 288 -368 240 >WIRE -640 304 -640 240 >WIRE -512 304 -640 304 >WIRE -512 432 -512 304 >WIRE -368 432 -368 368 >WIRE -368 432 -512 432 >WIRE -272 432 -368 432 >WIRE -160 432 -192 432 >FLAG -144 240 N3 >FLAG -272 112 N4 >FLAG -160 432 N1 >FLAG -720 160 0 >SYMBOL res -384 272 R0 >WINDOW 3 38 82 Left 2 >SYMATTR Value 7.87Meg >SYMATTR InstName R1 >SYMBOL voltage -640 144 R0 >WINDOW 123 0 0 Left 2 >WINDOW 39 0 0 Left 2 >SYMATTR InstName Vreg >SYMATTR Value 180V >SYMBOL res -384 96 R0 >SYMATTR InstName R2 >SYMATTR Value 412K >SYMBOL res -176 224 R90 >WINDOW 0 -1 100 VBottom 2 >WINDOW 3 -30 50 VTop 2 >SYMATTR InstName R3 >SYMATTR Value 0.001 >SYMBOL res -176 416 R90 >WINDOW 0 -1 100 VBottom 2 >WINDOW 3 -30 50 VTop 2 >SYMATTR InstName R4 >SYMATTR Value 0.001 >TEXT -624 -112 Left 2 ;WAS:\n V1 N4 N0 DC 180V ;Vreg\n R1 N3 N1 >7.87MEG ;for Vref 25V appx\n R2 N4 N3 412K ;3uA at 1.24V >TEXT -272 288 Left 2 !X3 N4 N3 N1 LM285ADJ >TEXT -728 352 Left 2 !.dc Vreg 0 150 .1 >TEXT -232 312 Left 2 ;+ FB - >TEXT -728 16 Left 2 !.LIB "C:\\Program >Files\\LTC\\LTspiceIV\\DOSbased\\SubCkt\\LM285ADJ.sub" >TEXT -728 40 Left 2 !.LIB "C:\\Program >Files\\LTC\\LTspiceIV\\DOSbased\\MODELS\\STANDARD.BJT" >TEXT -728 64 Left 2 !.LIB "C:\\Program >Files\\LTC\\LTspiceIV\\DOSbased\\\\SubCkt\\TL031.sub" >TEXT -8 136 Left 2 ;.SUBCKT LM285ADJ 1 2 3 ; 1=+ cathode, 2=FB, 3=- >anode\n ISINK 0 81 5UA\n RSINK 81 0 1E15 ; dummy - get +V term 81 rel >term 0\n VREF 82 81 1.24V ; vary this +/- 1%\n VP 83 0 15V\n VN 84 0 >-15V\n* C B E SUB\n Q1 82 85 0 0 QN2222A\n RA 3 0 1E-6OHM\n RC > 1 82 1E-6OHM\n X1 81 2 83 84 85 TL031\n.ENDS LM285ADJ
...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
RobertMacy wrote:
> On Mon, 25 Aug 2014 20:11:02 -0700, Robert Baer > <robertbaer@localnet.com> wrote: > >> Version 4 >> ..snip... >> RC 1 82 1E-6OHM\n X1 81 2 83 84 85 TL031\n.ENDS LM285ADJ > > To make your subckt list a true subckt list,not a 'comment', right click > on the text area and the select "SPICE directive" > > Changes the color of the text from blue to black. > > Still doesn't run, but it's a start. > > To make a 'new' symbol, go up to FILE on the upper left and select New > Symbol. > > But you don't need one. > > There's more, so I'll have to keep looking to find more. > > You could also, select oe of the 3-terminal regulators from the library, > THEN change to your subckt. too. > > Much easier, and faster, and get some really thorough answers, post your > schematic to the /temp folder and post your question relating to that > schematic to the LTspice group. Helmut will either walk you through, or > point you to the step by step directions on a new symbol. > > > > >
Thanks, will try all of your suggestions,in order given or until i get it working.
Jim Thompson wrote:
> On Mon, 25 Aug 2014 20:11:02 -0700, Robert Baer > <robertbaer@localnet.com> wrote: > >> Well, according to the "help" document, there should be a "Draw" on >> the top selection bar; NOPE! >> So i have no idea as to draw a new part and label it. >> Therefore i hope i have an invisible LM185ADJ, and hoped it would work... >> I "broke out" the various subcircuits (transistor, opamp, and even >> the LM185ADJ) then drew a "test" circuit to probe. > > Download this... > > <http://www.analog-innovations.com/LTspiceTutorials.zip> > > from the Simulation Tools& Macros Page of my website. > > Go thru all the tutorials. Flailing rarely is a productive learning > mechanism. > >> >> Very deep dodo...help? >> Version 4 >> SHEET 1 1592 1524 >> WIRE -640 112 -720 112 >> WIRE -368 112 -640 112 >> WIRE -272 112 -368 112 >> WIRE -720 160 -720 112 >> WIRE -640 160 -640 112 >> WIRE -368 240 -368 192 >> WIRE -272 240 -368 240 >> WIRE -144 240 -192 240 >> WIRE -368 288 -368 240 >> WIRE -640 304 -640 240 >> WIRE -512 304 -640 304 >> WIRE -512 432 -512 304 >> WIRE -368 432 -368 368 >> WIRE -368 432 -512 432 >> WIRE -272 432 -368 432 >> WIRE -160 432 -192 432 >> FLAG -144 240 N3 >> FLAG -272 112 N4 >> FLAG -160 432 N1 >> FLAG -720 160 0 >> SYMBOL res -384 272 R0 >> WINDOW 3 38 82 Left 2 >> SYMATTR Value 7.87Meg >> SYMATTR InstName R1 >> SYMBOL voltage -640 144 R0 >> WINDOW 123 0 0 Left 2 >> WINDOW 39 0 0 Left 2 >> SYMATTR InstName Vreg >> SYMATTR Value 180V >> SYMBOL res -384 96 R0 >> SYMATTR InstName R2 >> SYMATTR Value 412K >> SYMBOL res -176 224 R90 >> WINDOW 0 -1 100 VBottom 2 >> WINDOW 3 -30 50 VTop 2 >> SYMATTR InstName R3 >> SYMATTR Value 0.001 >> SYMBOL res -176 416 R90 >> WINDOW 0 -1 100 VBottom 2 >> WINDOW 3 -30 50 VTop 2 >> SYMATTR InstName R4 >> SYMATTR Value 0.001 >> TEXT -624 -112 Left 2 ;WAS:\n V1 N4 N0 DC 180V ;Vreg\n R1 N3 N1 >> 7.87MEG ;for Vref 25V appx\n R2 N4 N3 412K ;3uA at 1.24V >> TEXT -272 288 Left 2 !X3 N4 N3 N1 LM285ADJ >> TEXT -728 352 Left 2 !.dc Vreg 0 150 .1 >> TEXT -232 312 Left 2 ;+ FB - >> TEXT -728 16 Left 2 !.LIB "C:\\Program >> Files\\LTC\\LTspiceIV\\DOSbased\\SubCkt\\LM285ADJ.sub" >> TEXT -728 40 Left 2 !.LIB "C:\\Program >> Files\\LTC\\LTspiceIV\\DOSbased\\MODELS\\STANDARD.BJT" >> TEXT -728 64 Left 2 !.LIB "C:\\Program >> Files\\LTC\\LTspiceIV\\DOSbased\\\\SubCkt\\TL031.sub" >> TEXT -8 136 Left 2 ;.SUBCKT LM285ADJ 1 2 3 ; 1=+ cathode, 2=FB, 3=- >> anode\n ISINK 0 81 5UA\n RSINK 81 0 1E15 ; dummy - get +V term 81 rel >> term 0\n VREF 82 81 1.24V ; vary this +/- 1%\n VP 83 0 15V\n VN 84 0 >> -15V\n* C B E SUB\n Q1 82 85 0 0 QN2222A\n RA 3 0 1E-6OHM\n RC >> 1 82 1E-6OHM\n X1 81 2 83 84 85 TL031\n.ENDS LM285ADJ > > ...Jim Thompson
Thanks.
On Mon, 25 Aug 2014 20:11:02 -0700, Robert Baer <robertbaer@localnet.com>  
wrote:

After taking your schematic and changing the subckt from comment to SPICE  
Directive, it still won't run because couldn't find the .lib files, well  
duh!

What happened when you did that?
On Wed, 27 Aug 2014 06:29:33 -0700, RobertMacy
<robert.a.macy@gmail.com> wrote:

>On Mon, 25 Aug 2014 20:11:02 -0700, Robert Baer <robertbaer@localnet.com> >wrote: > >After taking your schematic and changing the subckt from comment to SPICE >Directive, it still won't run because couldn't find the .lib files, well >duh! > >What happened when you did that?
"you" who ?>:-} Your "Spice directive" should be either a .LIB or a .INC and show the path and filename to the subcircuit declaration. Or, I think... in LTspice you can do that with "TEXT". In PSpice I created a "part" called "TextForce" which forces the subcircuit declaration into the .NET file, otherwise it automatically goes into the .CIR file. The reason I do that is to contain device libraries into subcircuit declarations when I'm creating models for distribution and the end-user doesn't have all my libraries. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On Wed, 27 Aug 2014 09:00:08 -0700, Jim Thompson  
<To-Email-Use-The-Envelope-Icon@on-my-web-site.com> wrote:

> On Wed, 27 Aug 2014 06:29:33 -0700, RobertMacy > <robert.a.macy@gmail.com> wrote: > >> On Mon, 25 Aug 2014 20:11:02 -0700, Robert Baer >> <robertbaer@localnet.com> >> wrote: >> >> After taking your schematic and changing the subckt from comment to >> SPICE >> Directive, it still won't run because couldn't find the .lib files, well >> duh! >> >> What happened when you did that? > > "you" who ?>:-} > > Your "Spice directive" should be either a .LIB or a .INC and show the > path and filename to the subcircuit declaration. > > Or, I think... in LTspice you can do that with "TEXT". > > In PSpice I created a "part" called "TextForce" which forces the > subcircuit declaration into the .NET file, otherwise it automatically > goes into the .CIR file. > > The reason I do that is to contain device libraries into subcircuit > declarations when I'm creating models for distribution and the > end-user doesn't have all my libraries. > > ...Jim Thompson
That was supposed to go back to Robert Baer, the OP, but with all that snipping who knows. Nice feature: LTspice lets you put the whole .subckt description, or .model statment on the schmenatic as SPICE Directive text. However, that gets a bit cluttered, but is self contained.
On Wed, 27 Aug 2014 12:16:01 -0700, RobertMacy
<robert.a.macy@gmail.com> wrote:

>On Wed, 27 Aug 2014 09:00:08 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@on-my-web-site.com> wrote: > >> On Wed, 27 Aug 2014 06:29:33 -0700, RobertMacy >> <robert.a.macy@gmail.com> wrote: >> >>> On Mon, 25 Aug 2014 20:11:02 -0700, Robert Baer >>> <robertbaer@localnet.com> >>> wrote: >>> >>> After taking your schematic and changing the subckt from comment to >>> SPICE >>> Directive, it still won't run because couldn't find the .lib files, well >>> duh! >>> >>> What happened when you did that? >> >> "you" who ?>:-} >> >> Your "Spice directive" should be either a .LIB or a .INC and show the >> path and filename to the subcircuit declaration. >> >> Or, I think... in LTspice you can do that with "TEXT". >> >> In PSpice I created a "part" called "TextForce" which forces the >> subcircuit declaration into the .NET file, otherwise it automatically >> goes into the .CIR file. >> >> The reason I do that is to contain device libraries into subcircuit >> declarations when I'm creating models for distribution and the >> end-user doesn't have all my libraries. >> >> ...Jim Thompson > >That was supposed to go back to Robert Baer, the OP, but with all that >snipping who knows. > >Nice feature: LTspice lets you put the whole .subckt description, or >.model statment on the schmenatic as SPICE Directive text. However, that >gets a bit cluttered, but is self contained.
I have 104 folders from various I/C foundries, each of which has at least three 3-4 different processes. Each library (CMOS in particular) can be hundreds of lines long, so .LIB calls are the only rational way to handle them. PSpice only imports into the simulation whatever devices are used in that simulation, thus saving space. I don't know how LTspice handles them. But I do know .INC (.INCLUDE) sucks in the whole enchilada, thus is terribly wasteful of memory. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On 08/27/2014 03:33 PM, Jim Thompson wrote:
> On Wed, 27 Aug 2014 12:16:01 -0700, RobertMacy > <robert.a.macy@gmail.com> wrote: > >> On Wed, 27 Aug 2014 09:00:08 -0700, Jim Thompson >> <To-Email-Use-The-Envelope-Icon@on-my-web-site.com> wrote: >> >>> On Wed, 27 Aug 2014 06:29:33 -0700, RobertMacy >>> <robert.a.macy@gmail.com> wrote: >>> >>>> On Mon, 25 Aug 2014 20:11:02 -0700, Robert Baer >>>> <robertbaer@localnet.com> >>>> wrote: >>>> >>>> After taking your schematic and changing the subckt from comment to >>>> SPICE >>>> Directive, it still won't run because couldn't find the .lib files, well >>>> duh! >>>> >>>> What happened when you did that? >>> >>> "you" who ?>:-} >>> >>> Your "Spice directive" should be either a .LIB or a .INC and show the >>> path and filename to the subcircuit declaration. >>> >>> Or, I think... in LTspice you can do that with "TEXT". >>> >>> In PSpice I created a "part" called "TextForce" which forces the >>> subcircuit declaration into the .NET file, otherwise it automatically >>> goes into the .CIR file. >>> >>> The reason I do that is to contain device libraries into subcircuit >>> declarations when I'm creating models for distribution and the >>> end-user doesn't have all my libraries. >>> >>> ...Jim Thompson >> >> That was supposed to go back to Robert Baer, the OP, but with all that >> snipping who knows. >> >> Nice feature: LTspice lets you put the whole .subckt description, or >> .model statment on the schmenatic as SPICE Directive text. However, that >> gets a bit cluttered, but is self contained. > > I have 104 folders from various I/C foundries, each of which has at > least three 3-4 different processes. Each library (CMOS in > particular) can be hundreds of lines long, so .LIB calls are the only > rational way to handle them. > > PSpice only imports into the simulation whatever devices are used in > that simulation, thus saving space. I don't know how LTspice handles > them. But I do know .INC (.INCLUDE) sucks in the whole enchilada, > thus is terribly wasteful of memory.
How wasteful can it be? My entire SPICE library directory tree is under a gigabyte, i.e. about 2% of the memory installed on my desk machine. I can't imagine a single simulation pulling in more than a few megabytes of library files. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net