0
\$\begingroup\$

I was wondering if there was a function in LT Spice that I don't yet know of that would allow you to either select a bunch of components, or all of a certain kind of component (capacitor, resistor, etc.) and set them to a certain value? I was simulating the output of a voltage multiplier with many capacitors and I was going to try a few different values for the capacitors.

\$\endgroup\$
2
\$\begingroup\$

You can use a .STEP spice directive of the form

.STEP param PARAM_NAME list val1 val2 val3 ... valn

to run a simulation with val1..valn and put the results on the same plot. (See here for how to add a directive to the schematic)

Set the components whose value you want to step by right clicking them and setting the desired field to {PARAM_NAME}. PARAM_NAME can be any valid alphanumeric string. The curly brackets tell LTSpice to fill in the value from the associated parameter during simulation.

When your run the simulation, you will get an error if the parameter is not defined by a .STEP or a .PARAM directive.

A .PARAM directive is of the form

.PARAM PARAM_NAME = value

and sets the specified parameter to a constant value. If you don't need multiple values in a simulation, you can use a .PARAM directive, or a .STEP directive with a single value.

(You can find a tutorial on the STEP command from Analog Devices here.)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.