Simple op-amp circuit with finite power supplies (+/- 15V) gives -30GV output in dc sweep SOLVED

I made a simple op-amp circuit with +/- 15V rails:

A dc sweep on Vi (plotting Vo) should result in a line with slope close to -5/4 V/V. Circuitlab, however, shows an output of -30GV for some reason at low input voltages. This is obviously wrong, since there are no components in the circuit capable of outputting this kind of voltage. Spice, of course, agrees with me, as does reality.

Anyone know what is going on here?

by collinstocks
April 02, 2013

Hi collinstocks,

Sorry, I’m not an expert here ( @signality, help?) but i have some comments for you:

1) CL’s op amps have some limitations, unfortunately not in the output voltage (even with having rails).

2) I guess the DC sweep is not really helpful with your circuit (albeit it shows other issues of CL’s solver which I did not encounter before). To check your schematic I’d suggest to use the Time Domain Simulation.

3) Your circuit’s problem is caused by CL’s solver (I call it a bug, but I dunno), in particular the initial conditions. This can easily be seen in the Time Domain at time = 0 (or even before that moment) when power is applied to your circuit. As a workaround you should always ramp up the power supply to your circuit - until you know exactly that you don’t need it (see example below, but also search in CL for “initial”).

I really don’t know enough to explain how that could affect the DC sweep, but obviously it does. :-(

4) Regarding your circuit (sorry if I’m wrong, I’m not an expert) it’s questionable whether your R2 makes sense:

The first op amp being a (high impedance) non inverting stage to keep your input signal (your source) “free” of load is OK, but the kind of feedback (R2) renders that nearly to void. You could easily forget R2 and adjust gain by R21 only ?

However, I assume the circuit should work in reality, at least with low frequencies, until the time lag in both stages becomes dominant (but I dunno …).

Regards, Sancho

by Sancho_P
April 04, 2013

Hmm, I suspected it was the solver.

A note about R2 (and the rest of the circuit): This was an assignment which was meant mostly to get us familiar with different simulation software, rather than to learn something about circuitry. Basically, the assignment was to use "ideal" op-amps to create an amplifier with gain=2, and then hook that amplifier up with negative feedback as if it were itself an op-amp. The goal was to verify our calculations that if you wire up an op-amp with gain=2 as an inverting amplifier with nominal gain -5, you really get a gain of -5/4.

We could spend an arbitrary amount of time discussing the merits of the assignment, but yes, I agree that the actual circuit is pretty useless...

The DC sweep was meant to verify that the output is a linear function of the input. Transient response is not really very useful in this context, since I'm looking for steady-state. (Yes, I know that they are the same in this circuit because there are no complex impedances or delay elements.)

That's really too bad about the solver's limitations. I really like the editor---it's the best one I've worked with recently. Unfortunately, since the solver can't compete with SPICE, I'll have to go back to writing netlists or using poorly-conceived user interfaces...

Any chance of CL being able to output a SPICE netlist any time soon? Because I'd love to use the CL editor if I am still able to run the simulations in SPICE.

by collinstocks
April 04, 2013

Yesterday when investigating the circuit I’ve seen several bad points and started to write them down, today I’ll add the bug reports. But I may have missed (or misinterpreted) some details …

Regards, Sancho

by Sancho_P
April 05, 2013

The above comment by Ueinfopedia is spam. Maybe there should be a way to report a comment as spam?

by collinstocks
July 02, 2013

Hi @collinstocks, I believe the op-amp simulation issue has now been fixed in our latest set of updates!

by mrobbins
July 09, 2013

@mrobbins, @collinstocks,

Yup. That's fixed.

Well done CL.

by signality
July 10, 2013

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.