Connect with us

Switchercad Vs Newbie - Switchercad wins!

Discussion in 'CAD' started by Thurston Phoremost, Sep 6, 2003.

Scroll to continue with content
  1. First, I'll state the obvious... I'm a total newbie when it comes to
    these electronic CAD type programs.

    I've had a look at a couple of them, and I've decided that Switchercad
    will be the easiest one to learn on, due to the fact that it doesn't
    suffer from extreme bloat like the others do.

    I've fiddled around with a few of the supplied examples and components
    etc and I get the general gist of all that.

    But now it's time to go a bit further. All I want to do is try to
    include an SCR in a circuit and fiddle with it.

    Switchercad comes with a SCR symbol, but apparently it needs a "model
    which I supply myself".

    Hmmm.

    Well, I found a .sub file for an SCR, but I can't manage to get it to
    work properly either in the circuit drafting stage or the run
    simulation stage.

    Below are the three files that I'm working with. First one is a
    do-nothing, purely for test purposes .asc file that I made. It's just
    a SCR with all it's terminals grounded.

    Next is the .asy file (as supplied with switchercad).

    The third one (only part of it here to save bandwidth) is a scr.sub
    file that I found on the net somewhere.

    I've got all three files in the same directory,
    and I've tried .lib scr.sub, I've tried various mods to the .asc file
    using a text editor, and all I get is a headache.

    Can anyone tell me what I have to do to get these three files working
    together?

    And is there a step-by-step tutorial anywhere for Switchercad that
    explains this sort of thing? The SC help file assumes that the user is
    already familiar with SPICE-type programs, and therefore is of little
    use to me at this stage.

    TIA.


    ----------
    scr.asc

    Version 4
    SHEET 1 916 716
    WIRE 272 128 160 128
    WIRE 160 128 160 192
    FLAG 272 192 0
    FLAG 224 192 0
    FLAG 160 192 0
    SYMBOL SCR 256 128 R0
    SYMATTR InstName U1
    TEXT 140 260 Left 0 !.op
    TEXT 144 232 Left 0 !.INCLUDE scr.sub
    ----------------


    ---------------
    scr.asy

    Version 4
    SymbolType CELL
    LINE Normal 0 44 32 44
    LINE Normal 0 20 32 20
    LINE Normal 32 20 16 44
    LINE Normal 0 20 16 44
    LINE Normal 16 0 16 20
    LINE Normal 16 44 16 64
    LINE Normal -12 64 -32 64
    LINE Normal -12 64 8 44
    WINDOW 0 24 0 Left 0
    WINDOW 3 24 72 Left 0
    SYMATTR Prefix X
    SYMATTR SpiceModel scr
    SYMATTR SpiceLine *
    SYMATTR SpiceLine2 *
    SYMATTR Description Generic SCR symbol for use with a model that you
    supply.
    PIN 16 0 NONE 0
    PINATTR PinName A
    PINATTR SpiceOrder 1
    PIN -32 64 NONE 0
    PINATTR PinName G
    PINATTR SpiceOrder 2
    PIN 16 64 NONE 0
    PINATTR PinName K
    PINATTR SpiceOrder 3
    ---------------------


    -----------------------
    *scr.sub
    *=======
    *Default SCR - pin order: A G K
    ..SUBCKT XSCR 1 2 3
    Q1 2 4 1 QPSCR AREA=.67 OFF
    Q2 4 2 3 QNSCR AREA=.67
    Q3 5 4 1 QPSCR AREA=.33 OFF
    Q4 4 5 3 QNSCR AREA=.33
    RBN 2 5 40
    ..MODEL QNSCR NPN(TF=400NS TR=1.6US CJC=75PF CJE=175PF XTB=2.5
    + IS=1E-14 ISE=3E-9 NE=2 BF=100 BR=25 ISC=3E-9 NC=2)
    ..MODEL QPSCR PNP(TF=90NS TR=180NS CJC=75PF CJE=80PF XTB=2.5
    + IS=1E-14 ISE=3E-9 NE=2 BF=50 BR=25 ISC=3E-9 NC=2 RE=.03)
    ..ENDS XSCR

    * IR 1200V If=110A tq=16us: A G K
    ..SUBCKT XS19CF 1 3 2
    S1 1 5 6 2 SMOD
    RG 3 4 50
    VX 4 2 DC 0
    VY 5 7 DC 0
    DT 7 2 DMOD
    RT 6 2 1
    CT 6 2 10UF
    BF1 2 6 I=50*I(VX)+11*I(VY)
    ..MODEL SMOD SW(VT=1 RON=0.0105 ROFF=100E5)
    ..MODEL DMOD D(IS=2.2E-15 BV=1200 TT=0 CJO=0)
    ..ENDS XS18CF

    (...)
    -------------------
     
  2. ----- Original Message -----
    From: "Thurston Phoremost" <>
    Newsgroups: sci.electronics.cad,sci.electronics.design
    Sent: Saturday, September 06, 2003 2:56 PM
    Subject: Switchercad Vs Newbie - Switchercad wins!

    Hello Thurston,
    here is a manufacturer's link for SCR,TRIAC-SPICE models.
    http://www.teccor.com/asp/sitemap.asp?group=downloads
    Your symbol file "scr.asy" looks modified(by you?).
    Your mistake with scr.asy is in this line:
    The field "SpiceModel" must be empty for this usage of subcircuits.
    The field "Value" must be filled in with something, e.g. SCR, but
    thats already correct in the supplied model SCR.

    I have attached the original symbol file "scr.asy". Please override
    yours with this file. Then restart LTSPICE!
    Please let the symbol file in the "lib\sym\misc" directory. Don't put it
    in your working directory.
    Be aware that the the same names, e.g. abc.asc and abc.asy, in one
    directory have a special use for hierarchical schematic. So don't
    put the symbol(.asy) into the working directory if there is a
    schematic(.asc)
    with the same name there.
    You don't need any new symbol for the SCR in your working directory,
    because there is already a symbol "scr.asy" in the "lib\sym\misc" directory.
    Schematic:
    You only add the component SCR from the "misc" directory to your schematic.
    Then "right mouse click" over the word SCR and change it to the model
    you want, e.g. XS19CF or XSCR.
    Shure, a command line for the file containing the models must be added to
    the schematic. Here it is .INCLUDE scr.sub .
    You can put the file "scr.sub" either into the "lib\sub" directory of
    SwitcherCADIII or in your working directory where you have stored your
    schematic(.asc).
    I have attached an example schematic(.asc) which should give you an easy
    start.


    Have fun with LTSPICE.
    Helmut


    Correct Symbol file of "scr.asy":
    It should be in your "SwCADIII\lib\sym\misc" directory.

    Version 4
    SymbolType CELL
    LINE Normal 0 44 32 44
    LINE Normal 0 20 32 20
    LINE Normal 32 20 16 44
    LINE Normal 0 20 16 44
    LINE Normal 16 0 16 20
    LINE Normal 16 44 16 64
    LINE Normal -12 64 -32 64
    LINE Normal -12 64 8 44
    WINDOW 0 24 0 Left 0
    WINDOW 3 24 72 Left 0
    SYMATTR Value SCR
    SYMATTR Prefix X
    SYMATTR Description Generic SCR symbol for use with a model that you supply.
    PIN 16 0 NONE 0
    PINATTR PinName A
    PINATTR SpiceOrder 1
    PIN -32 64 NONE 0
    PINATTR PinName G
    PINATTR SpiceOrder 2
    PIN 16 64 NONE 0
    PINATTR PinName K
    PINATTR SpiceOrder 3



    Test circuit "scr_test.asc":

    Version 4
    SHEET 1 880 680
    WIRE 160 80 160 112
    WIRE 160 0 160 -32
    WIRE 160 -32 -80 -32
    WIRE -80 -32 -80 0
    WIRE -80 80 -80 112
    WIRE 80 208 112 208
    WIRE 0 208 -80 208
    WIRE -80 208 -80 240
    WIRE -80 320 -80 352
    WIRE 160 208 160 256
    WIRE 160 112 288 112
    WIRE 160 112 160 144
    WIRE 160 -32 288 -32
    FLAG -80 112 0
    FLAG -80 352 0
    FLAG 160 256 0
    FLAG 288 -32 supply
    IOPIN 288 -32 Out
    FLAG -80 208 trig
    FLAG 288 112 a
    IOPIN 288 112 Out
    SYMBOL Misc\\SCR 144 144 R0
    SYMATTR InstName U1
    SYMATTR Value XSCR
    SYMBOL voltage -80 224 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR InstName V1
    SYMATTR Value PULSE(0 5 4m 1u 1u 100u 10m)
    SYMBOL voltage -80 -16 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR InstName V2
    SYMATTR Value SINE(0 330 50)
    SYMBOL res 144 -16 R0
    SYMATTR InstName Rload
    SYMATTR Value 100
    SYMBOL res -16 224 R270
    WINDOW 0 32 56 VTop 0
    WINDOW 3 0 56 VBottom 0
    SYMATTR InstName R2
    SYMATTR Value 100
    TEXT -176 -112 Left 0 !.include scr.sub
    TEXT -176 -152 Left 0 !.tran 100m
    TEXT -176 -256 Left 0 ;Replace XSCR with the model name.
    TEXT -176 -224 Left 0 ;Library file "scr.sub" contains XSCR and XS19CF.
     
  3. Err..have you looked at SuperSpice?
    LTSpice is not the easiest of programs, although its is cheap, usable,
    fast and
    converges well. Adding parts to LTSpice, last time I checked, required
    doing
    stuff prior to running, then restarting.

    In SuperSpice, its *completely* GUI driven . To add a model its a simple
    drag
    drop. If the model is a generic spice device, e.g. npn, mosfet etc, a
    symbol
    will be attached to it automatically. If its a .sub model, when you try
    and
    place it on the schematic (from the docked file list) it will bring up a
    dialog
    that you can navigate and select an existing symbol. Alternatively, you
    can have
    a new symbol automatically generated from the model, or draw one from
    scratch.

    Run a few examples, an see how easy it really is!

    Kevin Aylward

    http://www.anasoft.co.uk
    SuperSpice, a very affordable Mixed-Mode
    Windows Simulator with Schematic Capture,
    Waveform Display, FFT's and Filter Design.
     
  4. Kevin,
    It only requires restarting if you edit the files outside
    of LTspice. If you edit the libraries in LTspice, then
    it knows what library files have changed and uses the
    version in the editor. But I usually recommend beginners
    to restart because that way there's only one version of
    the library, the one on the disk, an it hasn't been
    cached in memory by LTspice. Usually LTspice never reads
    the same file twice if it hasn't changed.

    --Mike
     
  5. Hi Helmut,

    Just wondered if you were an LT user yourself? If not, which simulator
    do you generally use?
     
  6. Hello Paul,
    I started many years ago with the PPSICE evaluation version. Maybe it was
    version 4 or 5. Later I had access to full PSPICE in my working environment.
    I converted to LTSPICE during the last year. It is now
    the simulator of choice for me because it has no limitations and has nearly
    all the features of PSPICE.
    It also has an unbeatable support by its designer Mike Engelhardt.

    I have tried many eval. versions of different SPICEs, but they are all too
    limited and nearly all of them are far
    beyond my budget in its full versions.

    The only thing I miss in LTSPICE is the magnetic core model for inductors
    like PSPICE has for many years.
    It would be nice to have such a model with hysteris for a mains transformer,
    because I have seen so many
    fruitless discussions about inrush current of mains transformers. A SPICE
    simulation using a model of a
    magnetic core with hystereis and saturation could give the answer.

    Best Regards
    Helmut
    ..
     
  7. Thanks for your input, Helmut. I thoroughly agree that Mike and his
    team at LT have done an amazing job in developing this great program.
    But let's not tell everyone... they might just start charging for it!
    :)
     
  8. Yep, silly me, I changed that to see what would hapen, then I forgot
    to put it back to its original.

    Thanks for your help, Helmut, I am now running SCR simulations just
    fine. I'm looking around in the LTspice Yahoo group too, looks like
    that will help me too.

    BTW, have you seen a library file anywhere that would enable me to
    simulate a xenon flashtube in SWCAD3? It would probably be not much
    different to the neon tube, but with the additional requirement of a
    trigger pulse/voltage.

    Thanks again.

    T.
     
  9. Nope, not yet. Is Superspice a bloat-free zone, then?

    I'm not against bloat per se, apart from the fact that it is very
    intimidating to a newbie. The clean, simple look of SWCAD3 told me
    straight away that it would be a good piece of SW to learn on... and
    hey, it's free. Autotrax is free, too, but it is Bloat City!

    Autotrax is something that I shall return to later, after I have
    learned the basics in SWCAD111. I don't know enough yet to be able to
    judge whether Autotrax is a good proggy or not.

    But back on the subject of SWCAD - interestingly, there seems to be a
    lot of non-newbies about who have a high regard for SWCAD too.
    Thanks, Kevin, I might give it a try.

    T.
     
  10. I do have a CCFL (cold cathode floresent tube) example in SS, ccfl.sss.
    It models strike voltage, holding voltage and the negative resistance
    region. The model shold run in LTSpice

    **********
    ..SUBCKT CCFL_XN _ssi_pin0_1 _ssi_pin1_10
    *
    V_ssi_pin1 _ssi_pin1_10 10 0
    V_ssi_pin0 _ssi_pin0_1 1 0
    * (c) Kevin Aylward 2002 - All rights reserved,
    www.anasoft.co.uk
    *Generic Cold Cathode Floresent Lamp model
    * This model may be freely copied and used, provided this copyright
    notice is included
    *The model is based on, where G is the instaneous conductance,
    *I=G(V,I)*V and dG/dt = aI^2 +b(I/V)^2 + f(I/V)
    * the most general model is dG/dt = aI^2 + kIV + cV^2 + d(I/V)^3
    +b(I/V)^2 + f(I/V)
    *Note: UIC "use initial conditions" in transient setup must be used
    *The tanh, divide and multiple by 1000 is to from a convergence limIter
    to 1000 amps
    B2 1 3 i=1000*tanh(v(1,2)*v(4)/1000)
    v1 3 2 dc 0
    c1 4 0 1 ic=.001
    *integrator time constant resistor, ideal is very large, however make it
    as small as the specific circuit allows
    r1 4 0 0.1
    *change the numerical constants to change the on characteristics
    *core ccfl equation
    b1 4 0 i=-(2.5*I(v1)^2 - 5.0e4*(I(v1)/v(1,2))^2 + 275.0*I(v1)/v(1,2))
    cstray 1 10 100p
    rleak 1 10 10Meg
    *
    *strike control, r diode and c controls turn on time, rrect and c
    controls turn off time
    *full wave rectifier, will keep switch on unless frequency falls too low
    b3 s_1 0 v=abs(v(1,10))
    s1 10 2 s_2 0 ccfl_switch
    Cconverge 10 2 10p
    d1 s_1 s_2 diode
    rrect s_2 0 500k
    cton s_2 0 0.5e-6
    ..model diode d(rs=1k)
    *
    *sets the strike voltage and holding voltage. Vstrike=vt+vh Vhold=vt-vh
    ..model ccfl_switch sw(ron=1 roff=100e6 vh=100 vt=300)
    *
    *these clamps are not used in ordinary operation
    d3 1 12 ccfc_clamp_diode
    d4 1 12 ccfc_clamp_diode
    *
    ..model ccfc_clamp_diode d(rs=1 bv=750)
    ..ends
    ************


    Kevin Aylward

    http://www.anasoft.co.uk
    SuperSpice, a very affordable Mixed-Mode
    Windows Simulator with Schematic Capture,
    Waveform Display, FFT's and Filter Design.
     
  11. Of course. For example, its download is only 5MB, in contrast to the
    50Megs of similar packages.

    The fundamental difference in SS is that it is written by a practising
    analogue engineer, not a software engineer. All key features are there,
    extraneous gibberish isn't.
    The main feature of SWCAD is that it is free, but usable. Most other
    spices are just about impossible to probe signals. Some don't even have
    a simple list box of signals to enable/disable a specific plot post
    simulation. Some, have a bloody "waveform graph window always on top
    that hides the schematic underneath" sort of thing, making schematic
    probing just about impossible.


    Kevin Aylward

    http://www.anasoft.co.uk
    SuperSpice, a very affordable Mixed-Mode
    Windows Simulator with Schematic Capture,
    Waveform Display, FFT's and Filter Design.
     
  12. So we agree on one thing then, Kev. LTSpice is the best simulator
    there is. :->
     
  13. Not at all. How on earth do you come to that conclusion? I certainly
    made no such statement or implications. Indeed, it is most decidedly,
    not the best simulator

    Kevin Aylward

    http://www.anasoft.co.uk
    SuperSpice, a very affordable Mixed-Mode
    Windows Simulator with Schematic Capture,
    Waveform Display, FFT's and Filter Design.
     
  14. Not at all. How on earth do you come to that conclusion? I certainly
    made no such statement or implications. Indeed, it is most decidedly,
    not the best simulator

    Kevin Aylward

    http://www.anasoft.co.uk
    SuperSpice, a very affordable Mixed-Mode
    Windows Simulator with Schematic Capture,
    Waveform Display, FFT's and Filter Design.
     
  15. I think the schematic probing with SCAD3 is very cleverly implemented,
    it's hard to think of any way that the author of this SW could have
    made it any easier or more convenient to use than it is. Little things
    like being able to double-click the probe on a particular node to
    immediately get rid of all other waveforms in view just make things so
    much more convenient, gives a real sense of being in control.

    T.
     
  16. Many thanks for that, Kevin, I'll have a play around with that and let
    you know how I go.

    T.
     
  17. Kev, your postings are coming out in dupicate. Sort things out, m8.
    Once is more than enough. :)
     
  18. John Jardine

    John Jardine Guest

    Although I use SW and SS, I don't think Mike E should get away with it this
    easily :).

    SwitcherCad is free and it's fast, with good convergence but myself feel the
    user interface is many years out of date. ('legacy' Spice stuff ... like
    having to stick a 'dot' command here and a 'dot' command there, awkward
    component selection and deletion, graph colour control, confusing "help"
    info, model editing, graphs that insist on 'Db's' and 'phase' defaults, etc)
    regards
    john
     
  19. I appreciate your comments on LT, John. What's your opinion of SS?
     
  20. John Jardine

    John Jardine Guest

    My thoughts on Spices aren't of much value as I'm not a power-user of these
    things. (usual disclaimers :). I use 'em for backing up a GO/NO-GO on a
    basic design idea, or if there's a particular phase shift needed somewhere
    in the design, or if some oddity turns up in the hardware that I can't
    figure through. Much of the time, the nearest I get to an opamp model is a
    'voltage controlled voltage source'. Essentially I just want to stick some
    library parts on screen, join 'em with bits of wire, and press a -run-
    button.

    Personally, the biggest difference I find is that the SS Spice is *fun* to
    use. Everything is there, ready and waiting and a 'real' circuit can be
    quickly built from the supplied library components. The prog offers wide
    control of it's defaults and the circuit drawing and simulation are
    straightforward (like they should be :). SS offers much more circuit
    analysis than SW and I've a tendency to be 'dragged in' having a look at
    things I didn't start out looking for !).
    In comparison the SW prog' needs a lot of 'massaging' to put some real world
    components in it. I spent 3 hours last week text editing some Zetex
    component models before SW would accept the data. SS has the same Zetex data
    already supplied in it libraries.
    I also much like and use the SS instant 'Filter design' support prog'. This
    is a useful design feature and can be used as a standalone.
    The only real downside to SS is that it costs money. I find the SS screen
    redraws clunky and the simulations slower than SW but for many jobs this is
    not a problem. The artwork of the supplied component symbols are naff but
    this is personal taste and they are easily redrawn.
    Horses for courses I suppose.
    On a couple of occasions I've seen KA remark that SS is 'designer
    orientated', I tend to agree.
    regards
    john
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-