LTSPICE Using Sub-Circuits

Discussion in 'General Electronics Chat' started by tubeguy, Jun 8, 2013.

  1. tubeguy

    Thread Starter Well-Known Member

    Nov 3, 2012
    1,157
    197
  2. Mike33

    AAC Fanatic!

    Feb 4, 2005
    349
    25
    Hey Tube,

    I THINK LT comes with a model pot (not sure...I MAY have downloaded it somewhere a long time ago! If it's not in the basic components, do a net search about getting the model and installing it. You just put each file in the appropriate folder of LT, where the other files of the same type are, if that makes sense).

    Anyway...you place the pot on your schema as shown. You edit its properties, and call the wiper position "{ST}" or whatever you like in the dialog box for the pot.

    Then, on your schema, you add a new spice directive.... ".step param st 0 1 .1" or some such 'command'. This works by telling LT to STEP the value of this PARAMETER you are calling ST from 0 ohms to 1 ohm, in .1ohm increments.

    .STEP PARAM STARTVAL ENDVAL INCREMENT

    This works for caps and regular resistors, etc., too!!! You might try it with a cap or something more basic first, to be sure it works ok.

    Hope that helps...

    Look at this page on it: http://jeastham.blogspot.com/2011/09/parameter-sweeps-in-ltspice-step.html
     
  3. tubeguy

    Thread Starter Well-Known Member

    Nov 3, 2012
    1,157
    197
    Thanks for the link - that's a big help.

    I didn't realize what these parameters where, now it makes sense.
    I've tried to add a model in the past and had troubles. May have been in the wrong folder.
    I'll have to give it another try.
     
    Last edited: Jun 9, 2013
  4. crutschow

    Expert

    Mar 14, 2008
    13,001
    3,229
    Below is a simulation showing the stepping of the pot wiper position from 0 (%) at bottom to 1 (100%) at top in 0.1 (10%) steps.

    Constant Current.gif
     
    Last edited: Jun 10, 2013
Loading...