Reply by Don Kuenz September 14, 20132013-09-14
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
Reply by OldGuy September 14, 20132013-09-14
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 ---
Reply by OldGuy September 14, 20132013-09-14
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 ---
Reply by Spehro Pefhany September 14, 20132013-09-14
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
Reply by OldGuy September 13, 20132013-09-13
Don Kuenz wrote on 9/13/2013 :
> 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 > > 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. --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Reply by Don Kuenz September 13, 20132013-09-13
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
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. -- Don Kuenz
Reply by Fred Abse September 13, 20132013-09-13
On Fri, 13 Sep 2013 13:46:12 -0700, Jim Thompson wrote:

> On Fri, 13 Sep 2013 13:09:21 -0700, Fred Abse > <excretatauris@invalid.invalid> wrote: > >>On Fri, 13 Sep 2013 13:02:28 -0700, Jim Thompson wrote: >> >>> "Right" click on the subckt line ;-) >> >>I posted a correction right after. Maybe it didn't propagate fast enough. > > Any tricks to bolden the grid? PSpice, the grid shows nicely > (because, in the INI file, you can set the pixel size); LTspice, > barely visible. >
Not that I've ever found. -- "Design is the reverse of analysis" (R.D. Middlebrook)
Reply by Fred Abse September 13, 20132013-09-13
On Fri, 13 Sep 2013 10:51:08 -0700, Jim Thompson wrote:

> 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.
LTspice supports both .include, and .lib. You can actually .include a URL, (provided it's a valid library file), and LTspice will import it, stick it in /lib/sub, and use it. There's .ferret, too, that gets libraries off the 'net. Never tried either, but they're in the manual. -- "Design is the reverse of analysis" (R.D. Middlebrook)
Reply by hamilton September 13, 20132013-09-13
On 9/13/2013 11:31 AM, OldGuy 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.
AND YOU CAME HERE !?!?! Boy, are you going to have a rude awakening ! Go ahead Jim, show him. hamilton
Reply by Jim Thompson September 13, 20132013-09-13
On Fri, 13 Sep 2013 13:09:21 -0700, Fred Abse
<excretatauris@invalid.invalid> wrote:

>On Fri, 13 Sep 2013 13:02:28 -0700, Jim Thompson wrote: > >> "Right" click on the subckt line ;-) > >I posted a correction right after. Maybe it didn't propagate fast enough.
Any tricks to bolden the grid? PSpice, the grid shows nicely (because, in the INI file, you can set the pixel size); LTspice, barely visible. ...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.