Forums

LTSpice Help

Started by OldGuy September 13, 2013
I am new to Spice as well as LT Spice.

I have input most of my circuit after spending much time looking for 
components.
I have not run the circuit yet since I have a hole where a unijunction 
goes.

The circuit additionally uses a triac, scr and transistor.

I found the
*Programable Unijunction Transistor pkg: TO-226AA
.SUBCKT X2N6027 1 2 3

for a "generic" (to me) unijunction.

But I have no clue how to make a symbol and connect to the .SUBCKT.
Why? Because I do not know the terminology.
The .SUBCKT webpage came with instructions to create the "component" 
but I cannot follow it.  Is there a different tool to use?

Hopefully if I get steered in the right direction I can incorporate the 
unijunction.

I am using a 2N2647 unijunction.

*Programable Unijunction Transistor pkg: TO-226AA
.SUBCKT X2N6027 1 2 3
************** K1 G K2
Q1 2 4 3 NMOD
Q2 4 2 1 PMOD
.MODEL NMOD NPN(IS=5E-15 VAF=100 IKF=0.005 ISE=1.85E-12 NE=1.45
+ RB=10 RE=0.5 RC=0.5 CJE=3.5E-11 VJE=0.75 CJC=1.1E-11 VJC=0.75 
TR=4.76E-8
+ TF=16N VJS=0.75 )
.MODEL PMOD PNP(IS=2E-15 VAF=100 IKF=0.005 ISE=1.9E-12 RB=10 RE=0.5
+ RC=0.5 CJE=3.5E-11 VJE=0.75 TF=1.6E-8 CJC=1.1E-11 VJC=0.75 TR=5.1E-8
+ TF=16N VJS=0.75 )
.ENDS X2N6027

TIA



--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
On Fri, 13 Sep 2013 09:25:13 -0700, OldGuy <OldGuy@spamfree.com> wrote:

> ...snip...
Please tell me you posted this question to the LTspice 'user's group' First, models come in from EVERYWHERE, and second, Helmut, the 'moderator', will walk you through creating stuff you need step by step. Even post your 'attempt' in the temp folder and people will jump in with modifications to your circuit. Thus give you an immediate solution to your simulation and you can learn 'by example'
On Fri, 13 Sep 2013 09:25:13 -0700, OldGuy <OldGuy@spamfree.com>
wrote:

>I am new to Spice as well as LT Spice. > >I have input most of my circuit after spending much time looking for >components. >I have not run the circuit yet since I have a hole where a unijunction >goes. > >The circuit additionally uses a triac, scr and transistor. > >I found the >*Programable Unijunction Transistor pkg: TO-226AA >.SUBCKT X2N6027 1 2 3 > >for a "generic" (to me) unijunction. > >But I have no clue how to make a symbol and connect to the .SUBCKT. >Why? Because I do not know the terminology. >The .SUBCKT webpage came with instructions to create the "component" >but I cannot follow it. Is there a different tool to use? > >Hopefully if I get steered in the right direction I can incorporate the >unijunction. > >I am using a 2N2647 unijunction. > >*Programable Unijunction Transistor pkg: TO-226AA >.SUBCKT X2N6027 1 2 3 >************** K1 G K2 >Q1 2 4 3 NMOD >Q2 4 2 1 PMOD >.MODEL NMOD NPN(IS=5E-15 VAF=100 IKF=0.005 ISE=1.85E-12 NE=1.45 >+ RB=10 RE=0.5 RC=0.5 CJE=3.5E-11 VJE=0.75 CJC=1.1E-11 VJC=0.75 >TR=4.76E-8 >+ TF=16N VJS=0.75 ) >.MODEL PMOD PNP(IS=2E-15 VAF=100 IKF=0.005 ISE=1.9E-12 RB=10 RE=0.5 >+ RC=0.5 CJE=3.5E-11 VJE=0.75 TF=1.6E-8 CJC=1.1E-11 VJC=0.75 TR=5.1E-8 >+ TF=16N VJS=0.75 ) >.ENDS X2N6027 > >TIA >
Here's the pertinent section from an LTspice tutorial... <http://www.analog-innovations.com/SED/LTspice_CreatingSymbols.pdf> LTspice symbol creation is rather crude, pretty much the same as the schematic capture user interface :-( It would be handy if Engelhardt made LTspice import PSpice symbols. It is trivial to make custom symbols in PSpice. As for a Unijunction model, I haven't been able to find an accurate one. (Yours, above, is just a crude 2-transistor attempt.) If someone can provide me with a good data sheet, showing good curves of the negative impedance region, I'll try my hand at making a good model. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | 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.
OK so there is a forum.  Where?
Look I go to forums and find that most are places where people like to 
chit chat about irrelevant stuff.  So I tend not to sign up at forums 
so I do not get swamped with junk mail or have to listen to the people 
noise.  Not saying that the LTSpice forum is like that but I avoid if I 
can.  So if it is a great forum, how do I link there?  (also want to 
avoid bogus clone forums)  Hope you understand.

I have a disconnect.
(Yes, I am sure the spice model is very simple and may not work 
properly but it is all about creating a symbol and placing it into the 
main schematic.  I, with help, can tune it later.

It may be that I am placing stuff in the wrong folders or not properly 
linking "picture" to spice.

So far I have done this:
  created a "sketch" of the circuit.
  called it 2N2647.ASY
  put it in the SYM folder

Version 4
SymbolType BLOCK
LINE Normal -32 33 -32 -32
LINE Normal 0 -16 0 -63
LINE Normal -32 -16 0 -16
LINE Normal 0 16 0 64
LINE Normal -32 16 0 16
LINE Normal -63 0 -80 0
LINE Normal -32 16 -63 0
LINE Normal -39 6 -32 16
LINE Normal -44 16 -39 6
LINE Normal -32 16 -44 16
PIN -80 0 BOTTOM 8
PINATTR PinName G
PINATTR SpiceOrder 1
PIN 0 -64 RIGHT 8
PINATTR PinName K1
PINATTR SpiceOrder 2
PIN 0 64 RIGHT 8
PINATTR PinName K2
PINATTR SpiceOrder 3

  created a spice model using the code previously shown
  called it 2N2647.SUB
  put it in the SUB folder

*Programable Unijunction Transistor pkg: TO-226AA
.SUBCKT X2N2647 1 2 3
************** K1 G K2
Q1 2 4 3 NMOD
Q2 4 2 1 PMOD
.MODEL NMOD NPN(IS=5E-15 VAF=100 IKF=0.005 ISE=1.85E-12 NE=1.45
+ RB=10 RE=0.5 RC=0.5 CJE=3.5E-11 VJE=0.75 CJC=1.1E-11 VJC=0.75 
TR=4.76E-8
+ TF=16N VJS=0.75 )
.MODEL PMOD PNP(IS=2E-15 VAF=100 IKF=0.005 ISE=1.9E-12 RB=10 RE=0.5
+ RC=0.5 CJE=3.5E-11 VJE=0.75 TF=1.6E-8 CJC=1.1E-11 VJC=0.75 TR=5.1E-8
+ TF=16N VJS=0.75 )
.ENDS X2N2647

  I placed the "picture" on the main schematic.
  opened the Component attribute editor
    changed the following
    InstName 2N2647
    SpiceModel 2N2647.sub

  Trying to run I get
 ---------------------------
LTspice IV
---------------------------
Missing schematic(s) of the hierarchy:

     2n2647
---------------------------
OK
---------------------------

followed by
---------------------------
LTspice IV
---------------------------
Trouble Generating netlist for SPICE run
---------------------------
OK
---------------------------



--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
On Fri, 13 Sep 2013 09:25:13 -0700, OldGuy <OldGuy@spamfree.com>
wrote:

>I am new to Spice as well as LT Spice. > >I have input most of my circuit after spending much time looking for >components. >I have not run the circuit yet since I have a hole where a unijunction >goes. > >The circuit additionally uses a triac, scr and transistor. > >I found the >*Programable Unijunction Transistor pkg: TO-226AA >.SUBCKT X2N6027 1 2 3 > >for a "generic" (to me) unijunction. > >But I have no clue how to make a symbol and connect to the .SUBCKT. >Why? Because I do not know the terminology. >The .SUBCKT webpage came with instructions to create the "component" >but I cannot follow it. Is there a different tool to use? > >Hopefully if I get steered in the right direction I can incorporate the >unijunction. > >I am using a 2N2647 unijunction. > >*Programable Unijunction Transistor pkg: TO-226AA >.SUBCKT X2N6027 1 2 3 >************** K1 G K2 >Q1 2 4 3 NMOD >Q2 4 2 1 PMOD >.MODEL NMOD NPN(IS=5E-15 VAF=100 IKF=0.005 ISE=1.85E-12 NE=1.45 >+ RB=10 RE=0.5 RC=0.5 CJE=3.5E-11 VJE=0.75 CJC=1.1E-11 VJC=0.75 >TR=4.76E-8 >+ TF=16N VJS=0.75 ) >.MODEL PMOD PNP(IS=2E-15 VAF=100 IKF=0.005 ISE=1.9E-12 RB=10 RE=0.5 >+ RC=0.5 CJE=3.5E-11 VJE=0.75 TF=1.6E-8 CJC=1.1E-11 VJC=0.75 TR=5.1E-8 >+ TF=16N VJS=0.75 ) >.ENDS X2N6027 > >TIA >
Found this, from DuncanAmps. His models are usually pretty good... ** From *** ** <http://www.duncanamps.com/spice/miscsemi/2n2646.sub> ** *Default N-Channel Unijunction Transistor .SUBCKT XUJT 1 2 3 DE 1 4 EMITTER VE 4 5 DC 0 HVE 6 0 VE 1K RVE 0 6 1MEG BBB 5 7 I=0.00028*V(5,7)+0.00575*V(5,7)*V(6) CBB 5 7 35P RB1 7 2 38.15 RMOD RB2 3 5 2.518K RMOD .MODEL RMOD R TC1=.01 .MODEL EMITTER D (IS=21.3P N=1.8) .ENDS XUJT * Motorola IP=.5U IV=6M VB1(sat)=3 Rbb=6.1K Vob1=3.6: E, B1, B2 .SUBCKT X2N2646 1 2 3 DE 1 4 EMITTER VE 4 5 DC 0 HVE 6 0 VE 1K RVE 0 6 1MEG BBB 5 7 I=0.00028*V(5,7)+0.00575*V(5,7)*V(6) CBB 5 7 35P RB1 7 2 38.15 RMOD RB2 3 5 2.518K RMOD .MODEL RMOD R TC1=.01 .MODEL EMITTER D (IS=21.3P N=1.8) .ENDS X2N2646 ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | 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 Fri, 13 Sep 2013 10:31:55 -0700, OldGuy <OldGuy@spamfree.com>
wrote:

>OK so there is a forum. Where? >Look I go to forums and find that most are places where people like to >chit chat about irrelevant stuff. So I tend not to sign up at forums >so I do not get swamped with junk mail or have to listen to the people >noise. Not saying that the LTSpice forum is like that but I avoid if I >can. So if it is a great forum, how do I link there? (also want to >avoid bogus clone forums) Hope you understand. > >I have a disconnect. >(Yes, I am sure the spice model is very simple and may not work >properly but it is all about creating a symbol and placing it into the >main schematic. I, with help, can tune it later. > >It may be that I am placing stuff in the wrong folders or not properly >linking "picture" to spice. > >So far I have done this: > created a "sketch" of the circuit. > called it 2N2647.ASY > put it in the SYM folder > >Version 4 >SymbolType BLOCK >LINE Normal -32 33 -32 -32 >LINE Normal 0 -16 0 -63 >LINE Normal -32 -16 0 -16 >LINE Normal 0 16 0 64 >LINE Normal -32 16 0 16 >LINE Normal -63 0 -80 0 >LINE Normal -32 16 -63 0 >LINE Normal -39 6 -32 16 >LINE Normal -44 16 -39 6 >LINE Normal -32 16 -44 16 >PIN -80 0 BOTTOM 8 >PINATTR PinName G >PINATTR SpiceOrder 1 >PIN 0 -64 RIGHT 8 >PINATTR PinName K1 >PINATTR SpiceOrder 2 >PIN 0 64 RIGHT 8 >PINATTR PinName K2 >PINATTR SpiceOrder 3 > > created a spice model using the code previously shown > called it 2N2647.SUB > put it in the SUB folder > >*Programable Unijunction Transistor pkg: TO-226AA >.SUBCKT X2N2647 1 2 3 >************** K1 G K2 >Q1 2 4 3 NMOD >Q2 4 2 1 PMOD >.MODEL NMOD NPN(IS=5E-15 VAF=100 IKF=0.005 ISE=1.85E-12 NE=1.45 >+ RB=10 RE=0.5 RC=0.5 CJE=3.5E-11 VJE=0.75 CJC=1.1E-11 VJC=0.75 >TR=4.76E-8 >+ TF=16N VJS=0.75 ) >.MODEL PMOD PNP(IS=2E-15 VAF=100 IKF=0.005 ISE=1.9E-12 RB=10 RE=0.5 >+ RC=0.5 CJE=3.5E-11 VJE=0.75 TF=1.6E-8 CJC=1.1E-11 VJC=0.75 TR=5.1E-8 >+ TF=16N VJS=0.75 ) >.ENDS X2N2647 > > I placed the "picture" on the main schematic. > opened the Component attribute editor > changed the following > InstName 2N2647 > SpiceModel 2N2647.sub > > Trying to run I get > --------------------------- >LTspice IV >--------------------------- >Missing schematic(s) of the hierarchy: > > 2n2647 >--------------------------- >OK >--------------------------- > >followed by >--------------------------- >LTspice IV >--------------------------- >Trouble Generating netlist for SPICE run >--------------------------- >OK >--------------------------- > > > >--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
I'm not at all expert in using LTspice, I use it only to run posted designs, or simply draw in PSpice, then import the resulting .CIR file into LTspice and run. I noted something in the tutorial I posted about needing a .INCLUDE to provide the symbol with a model to use. In PSpice that would be simply a .LIB statement. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | 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 Fri, 13 Sep 2013 09:25:13 -0700, OldGuy <OldGuy@spamfree.com>
wrote:

>I am new to Spice as well as LT Spice. > >I have input most of my circuit after spending much time looking for >components. >I have not run the circuit yet since I have a hole where a unijunction >goes. > >The circuit additionally uses a triac, scr and transistor. > >I found the >*Programable Unijunction Transistor pkg: TO-226AA >.SUBCKT X2N6027 1 2 3 >
Found it! General subcircuit declaration (it's behavioral)... .subckt gen_ujt b2 e b1 + params: + Iv20=6m Ib2m=6m Veb1s=2.5 Ieb20=1u + rbb=6.9k eta=.775 Vv=1.33 Vk=10 Ies=50m vf=.7 Kd=1.5e-6 cgtsr=.1 * x1 b2 e b1 gen_ujtm params: + ries={(veb1s-vf)/(ies+ib2m)} + rlbv={(Vv-Vf)/(Iv20/1.4+vk/rbb+((Ib2m-vk/rbb)/Ies)*(iv20/1.4))} + kd ={kd} + Iv20 ={Iv20} + rbb ={rbb} + Ieb20={Ieb20} + eta ={eta} + veb1s={veb1s} + Ies ={ies} + Ib2m ={ib2m} + Cgtsr={cgtsr} .ends A specific device (I haven't found parameters for 2N6027)... .subckt 2N2646 B2 E B1 * x1 b2 e b1 gen_ujt + params: ;Vob=5 + eta = .655 + rbb = 7k + Veb1s = 3.5 + Ib2m = 15m + Ieb20 = .005u + Iv20 = 6m + Vv = 1.77 + kd = 1.1u + cgtsr = .001 .ends ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | 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 Fri, 13 Sep 2013 11:47:18 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Fri, 13 Sep 2013 09:25:13 -0700, OldGuy <OldGuy@spamfree.com> >wrote: > >>I am new to Spice as well as LT Spice. >> >>I have input most of my circuit after spending much time looking for >>components. >>I have not run the circuit yet since I have a hole where a unijunction >>goes. >> >>The circuit additionally uses a triac, scr and transistor. >> >>I found the >>*Programable Unijunction Transistor pkg: TO-226AA >>.SUBCKT X2N6027 1 2 3 >> > >Found it!
NEGATORY! I didn't read carefully enough... the subcircuit seems to use circular references. I'll go back and see if I can sort it out.
> >General subcircuit declaration (it's behavioral)... > >.subckt gen_ujt b2 e b1 >+ params: >+ Iv20=6m Ib2m=6m Veb1s=2.5 Ieb20=1u >+ rbb=6.9k eta=.775 Vv=1.33 Vk=10 Ies=50m vf=.7 Kd=1.5e-6 cgtsr=.1 >* > x1 b2 e b1 gen_ujtm params: >+ ries={(veb1s-vf)/(ies+ib2m)} >+ rlbv={(Vv-Vf)/(Iv20/1.4+vk/rbb+((Ib2m-vk/rbb)/Ies)*(iv20/1.4))} >+ kd ={kd} >+ Iv20 ={Iv20} >+ rbb ={rbb} >+ Ieb20={Ieb20} >+ eta ={eta} >+ veb1s={veb1s} >+ Ies ={ies} >+ Ib2m ={ib2m} >+ Cgtsr={cgtsr} >.ends > >A specific device (I haven't found parameters for 2N6027)... > >.subckt 2N2646 B2 E B1 >* > x1 b2 e b1 gen_ujt >+ params: ;Vob=5 >+ eta = .655 >+ rbb = 7k >+ Veb1s = 3.5 >+ Ib2m = 15m >+ Ieb20 = .005u >+ Iv20 = 6m >+ Vv = 1.77 >+ kd = 1.1u >+ cgtsr = .001 >.ends > > ...Jim Thompson
...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | 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 Fri, 13 Sep 2013 11:52:38 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Fri, 13 Sep 2013 11:47:18 -0700, Jim Thompson ><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: > >>On Fri, 13 Sep 2013 09:25:13 -0700, OldGuy <OldGuy@spamfree.com> >>wrote: >> >>>I am new to Spice as well as LT Spice. >>> >>>I have input most of my circuit after spending much time looking for >>>components. >>>I have not run the circuit yet since I have a hole where a unijunction >>>goes. >>> >>>The circuit additionally uses a triac, scr and transistor. >>> >>>I found the >>>*Programable Unijunction Transistor pkg: TO-226AA >>>.SUBCKT X2N6027 1 2 3 >>> >> >>Found it! > >NEGATORY! I didn't read carefully enough... the subcircuit seems to >use circular references. I'll go back and see if I can sort it out. >
Nested subcircuits :-( First uses the next, uses the next... Makes no sense, but it runs in PSpice. Dead-end reference to subckt "yx" (see below). Unnecessarily complex. The earmarks of a PhD creating it >:-} *$ .subckt 2N2646 B2 E B1 * x1 b2 e b1 gen_ujt + params: ;Vob=5 + eta = .655 + rbb = 7k + Veb1s = 3.5 + Ib2m = 15m + Ieb20 = .005u + Iv20 = 6m + Vv = 1.77 + kd = 1.1u + cgtsr = .001 .ends *$ .subckt gen_ujt b2 e b1 + params: + Iv20=6m Ib2m=6m Veb1s=2.5 Ieb20=1u + rbb=6.9k eta=.775 Vv=1.33 Vk=10 Ies=50m vf=.7 Kd=1.5e-6 cgtsr=.1 * x1 b2 e b1 gen_ujtm params: + ries={(veb1s-vf)/(ies+ib2m)} + rlbv={(Vv-Vf)/(Iv20/1.4+vk/rbb+((Ib2m-vk/rbb)/Ies)*(iv20/1.4))} + kd ={kd} + Iv20 ={Iv20} + rbb ={rbb} + Ieb20={Ieb20} + eta ={eta} + veb1s={veb1s} + Ies ={ies} + Ib2m ={ib2m} + Cgtsr={cgtsr} .ends *$ .subckt gen_ujtm b2 e b1 + params: + Iv20=6m Ib2m=6m Veb1s=2.5 Ieb20=1u + rbb=6.9k eta=.775 Vv=1.33 Vk=10 Ies=50m vf=.7 Kd=1.5e-6 cgtsr=.1 + ries=1k rlbv=2k * x1 b2 e b1 gen_ujtm1 params: + logrs={log(rlbv/ries)} + kimod={((1-eta)*rbb-(vk-veb1s-vf)/ib2m)/Ies} + kd ={kd} + Iv20 ={Iv20} + rbb ={rbb} + Ieb20={Ieb20} + eta ={eta} + veb1s={veb1s} + Ies ={ies} + Ib2m ={ib2m} + Cgtsr={cgtsr} .ends *$ .subckt gen_ujtm1 b2 e b1 + params: + Iv20=6m Ib2m=6m Veb1s=2.5 Ieb20=1u + rbb=6.9k eta=.775 Vv=1.33 Vk=10 Ies=50m vf=.7 Kd=1.5e-6 cgtsr=.1 + logrs=1 kimod=1 * x1 b2 e b1 gen_ujtl params: + n={logrs/log(ies*1.4/Iv20)} + kimod={kimod} + Ie1 ={Ies/pwr(eta*rbb/((veb1s-vf)/(Ies+Ib2m)),1/(logrs/log(ies*1.4/Iv20)))} + kd ={kd} + Iv20 ={Iv20} + rbb ={rbb} + Ieb20={Ieb20} + eta ={eta} + Cgtsr={cgtsr} .ends *$ .subckt gen_ujtl b2 e b1 + params: + n =.5 + kimod=.001 + Ie1 =1u + Kd =1.5u + Iv20 =6m + rbb =7k + Ieb20=1u + eta =.77 + cgtsr=.05 + isval=1.281e-10 cx=1n + a=8.66e-4 b=51 Vk=10.0 Vf=.7 Ies=50m Vrev=30 * dje e1 x dio .model dio D(Is={isval} Rs=1) vmon e e1 dc 0.0 Ec1 ca 0 value={kd*(isval+abs(v(mon)))+cx} v0c x1 x 0 xc1 ca 0 cc e x1 yx <===== HUH? cxc1 cc 0 1 emon mona 0 value {i(vmon)} rser mona mon {cgtsr} rmon mon 0 1meg cpar mon 0 10u elimv vbb 0 table { v(b2,b1)} (0,0) (20,20) rbb vbb 0 1 Erb1 r1a 0 + value={(eta-a*(v(vbb)-vk))*(rbb+b*(v(vbb)-vk))/pwr(1+v(mon)/ie1,n)} rser1 r1a r1aa {cgtsr} cpar1 r1aa 0 10u xrb1 r1aa 0 r1c x b1 zx rxrb1 r1c 0 1ohm eimonlim vmonl 0 table {i(vmon)} (0,0) (50m,50m) rvmonl vmonl 0 1 Erb2 r2a 0 value={(1-eta+a*(v(vbb)-vk))*(rbb+b*(v(vbb)-vk))-kimod*v(vmonl)} xrb2 r2a 0 r2c b2 x zx rxrb2 r2c 0 1ohm rc e x {Vrev/Ieb20} .ends *$ ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | 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 Fri, 13 Sep 2013 10:12:20 -0700, Jim Thompson wrote:

> LTspice symbol creation is rather crude, pretty much the same as the > schematic capture user interface :-( > > It would be handy if Engelhardt made LTspice import PSpice symbols. It > is trivial to make custom symbols in PSpice.
Open the subckt file in LTspice. Left click on the "subckt" line. A symbol is automatically generated, and the symbol editor opens. You can then edit the symbol as much as you like. Saving the symbol creates a new symbol category, "Auto Generated", if it doesn't already exist. No need for an .include, or .lib statement. The file name is automatically inserted into the symbol "model file" attribute. -- "Design is the reverse of analysis" (R.D. Middlebrook)