Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LTSpice: Stepping Question

Status
Not open for further replies.

InvaderZim

New Member
Hi all, I'm familiar with the very basics of stepping a parameter. What I'd like to do is change the RC pair in an op-amp feedback and plot 8 pairs on the same graph.

The rest of the circuit is complicated enough that I didn't really want 8 copies of the op-amp circuit.

I tried using STEP with a node name, and then just switch node names for each iteration, but LTSpice doesn't seem to like that.

Any ideas?

Thanks a ton!
 
hi IZ,
Please post your LTS asc file.
E
 
Thanks, here it is.

I'm trying to switch the various RC nodes (s0, s1, etc.) to the FB (feedback) node, kinda like you would do with a STEP procedure.
 

Attachments

  • Op Amp Circuit Simplified.asc
    5.7 KB · Views: 116
Instead of trying to step the nodes (which I don't know if that can be done) just step the values of R and C.
Here's an example of how to step an R and C value simultaneously.
The number of steps can be any number (2 shown).
In the simulation all values following 1 in the table are used for step 1, all the values following 2 in the table are used for step 2, etc.
Thus for step 1, R1 = 1k and C1 =1uF, and for step 2, R1 = 10k and C1 = 2nF.
upload_2017-4-26_12-24-49.png
 
Sweet! I didn't realize you could index a table like that using param. I was just playing around with something using an "if" statement in a fake resistor; it's clunky and not intuitive.

Yours is much more elegant! I like it!

Thanks!
 
Well I can't take a lot of credit for that, other than doing a Google search and a little simulating to verify its operation. :rolleyes:
 
Your Google must be better than mine : )

I really wasn't understanding the "table" functionality in the help file; something about the wording threw me off. Your example made it all click for me.

Thanks again, I have a very pretty graph and a new trick up my sleeve!
 
I use stepping to design "error amplifiers". Actually many different types of amps.
With an error amp I need phase shift at several different points. Some components effect two points while some effect only one point so the interactions can get complicated.
Years ago in school it took hours/days to design a complicated error amp or multi stage filter. Not in school, I converted all that to a spread sheet. It really sped things up.

As soon as I got an affordable SPICE things got much faster. (with stepping)
Need 6db/oct role off at 20hz. I think the cap is between 1 and 4.7uF but don't want to "think".
In 1 second I get a curve for each value. So 3.3uF looks best.

With ".step param X list" you can do some interesting testing.
Example, I know that most transistors run "fastest" at a certain current. Lower current levels there is not enough energy to drive the capacitance loads and at too high current the transistor's gain drops. By stepping all the resistors in the amp together you can get a curve for 1mA, 2mA, 3mA.....10mA. This is another way to get bandwidth verses collector current of the transistor.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top