Electronics-Related.com
Forums

LTSpice Help

Started by OldGuy September 13, 2013
On Fri, 13 Sep 2013 10:31:55 -0700, the renowned 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.
BTW, a PUT and a unijunction are two rather different devices. The 2N6027/8 are PUTs The 2N2646/7 are unijunctions. Both have three terminals.. but if you rename a model and stick a PUT in place of a UJT, it won't do what you expect. A PUT actually has three junctions. If you add a couple appropriate external resistors, a PUT will act similarly to a UJT. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
OK so I took the simple .SUB and loaded it into LTSpice.
Got to start somewhere.
Left-clicking did nothing.
I did right-click and found "create symbol".
It did.
I added some lines to make it look like a unijunction symbol and saved 
it.
I went to my main sch and from the Component \ AutoGenerated folder 
found my new symbol.  Loaded it into the schematic and hooked it up.

Tried to run and got:

---------------------------
LTspice IV
---------------------------
Unknown subcircuit called in:
   xu1 line n008 output triac
---------------------------
OK
---------------------------

I believe that Triac is built-in i.e. already exists in lib.
I looked all over to find a .SUB but found none.
So what is line n008 referencing?
"output" is the name of a Net Name[ABC] thingy I thought as to be used 
as a pin for signal monitoring.

u1 is the triac symbol.

Suggestions please.



--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Spehro Pefhany presented the following explanation :
> On Fri, 13 Sep 2013 10:31:55 -0700, the renowned 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. > > BTW, a PUT and a unijunction are two rather different devices. > > The 2N6027/8 are PUTs > The 2N2646/7 are unijunctions. > > Both have three terminals.. but if you rename a model and stick a PUT > in place of a UJT, it won't do what you expect. A PUT actually has > three junctions. > > If you add a couple appropriate external resistors, a PUT will act > similarly to a UJT. > > > > Best regards, > Spehro Pefhany
Yes I know that. My device is not a PUT. 2N2647 is a unijunction. --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
OldGuy <OldGuy@spamfree.com> wrote:
> Don Kuenz wrote on 9/13/2013 :
>> Take a look at >> >> http://electronics.stackexchange.com/questions/52023/unijunction-transistor-in-ltspice >> >> It's a tutorial that shows step-by-step how to integrate the 2N6027 into >> LTSpice. > > Did you try stepping through that? > I cannot follow it.
------------------------------------------------------------------------ These lines go into C:\Program Files\LTC\LTspiceIV\lib\sub\2N6027.sub ------------------------------------------------------------------------ *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 ------------------------------------------------------------------------ These lines go into C:\Program Files\LTC\LTspiceIV\lib\sym\Misc\2N6027.asy ------------------------------------------------------------------------ Version 4 SymbolType CELL LINE Normal 16 16 16 80 LINE Normal 48 72 48 96 LINE Normal 16 72 48 72 LINE Normal 48 24 48 0 LINE Normal 16 24 48 24 LINE Normal 4 68 16 64 LINE Normal 4 60 16 64 LINE Normal 4 60 4 68 LINE Normal -32 32 -64 32 LINE Normal 0 64 -32 32 LINE Normal 4 64 0 64 WINDOW 3 56 72 Left 2 SYMATTR Value X2N6027 SYMATTR Prefix X SYMATTR Description UJT SYMATTR SpiceModel X2N6027 SYMATTR ModelFile 2N6027.sub PIN 48 0 NONE 0 PINATTR PinName K1 PINATTR SpiceOrder 1 PIN -64 32 NONE 0 PINATTR PinName G PINATTR SpiceOrder 2 PIN 48 96 NONE 0 PINATTR PinName K2 PINATTR SpiceOrder 3 ------------------------------------------------------------------------ These lines go into 2N6027.asc ------------------------------------------------------------------------ Version 4 SHEET 1 880 680 WIRE 272 224 272 176 WIRE 272 336 272 304 WIRE 480 336 272 336 WIRE 272 352 272 336 WIRE 160 384 32 384 WIRE 272 512 272 448 FLAG 176 16 0 FLAG 352 16 0 FLAG 176 -64 V+ FLAG 272 176 V+ FLAG 352 -64 Sig FLAG 32 384 Sig FLAG 272 512 0 FLAG 480 336 Out SYMBOL Misc\\2N6027 224 352 R0 WINDOW 0 56 29 Left 2 SYMATTR InstName U1 SYMBOL voltage 176 -80 R0 WINDOW 123 0 0 Left 2 WINDOW 39 -149 14 Left 2 SYMATTR InstName V1 SYMATTR Value 5 SYMATTR SpiceLine Rser=1m SYMBOL voltage 352 -80 R0 WINDOW 123 0 0 Left 2 WINDOW 39 51 54 Left 2 SYMATTR InstName V2 SYMATTR Value PULSE(0 3 0 100n 100n 1m 2m) SYMATTR SpiceLine Rser=0 SYMBOL res 256 208 R0 SYMATTR InstName R1 SYMATTR Value 1K SYMATTR SpiceLine tol=1 pwr=0.1 TEXT -184 -64 Left 2 !.tran 0 10m 0 ------------------------------------------------------------------------ As Spehro Pefhany points out, a PUT is not a UJT. So, it's time to use Boca's 2N4871 datasheet http://www.alldatasheet.com/view.jsp?Searchword=2N4871 and Vladimirescu http://www.amazon.com/The-SPICE-Book-Andrei-Vladimirescu/dp/0471609269 to "roll my own" UJT. More later. -- Don Kuenz