LTSPICE Using Sub-Circuits

Mike33

Joined Feb 4, 2005
349
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
 

Thread Starter

tubeguy

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

I didn't realize what these parameters where, now it makes sense.
.STEP PARAM STARTVAL ENDVAL INCREMENT
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:

crutschow

Joined Mar 14, 2008
34,464
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:
Top