Odd Results from OpAmps with vs w/o voltage rails

I'm simulating a circuit with LM324 Op Amps. The circuit has a 5V power supply, and I'm using 50mv voltage generators as signals (3 of them, to 3 different op amp stages, setting them to be at different phases). 3 op amps serve as amplifiers, and 2 to create a differential output. What I am confused about is that if I use the op amps without voltage rails I get output results in excess of 40V! But if I use op amps WITH voltage rails the results are properly within the 5V of the power supply (but the analysis is, of course, MUCH longer). Can someone help me understand this?

FYI I am very new to circuit simulation and not exactly an experienced electronics engineer, though I have a passing knowledge....

Thanks!

by khauser
October 23, 2012

A picture is worth a thousand words.

Please make your circuit Unlisted or Public.

by signality
October 24, 2012

It's a model of someone else's circuit, so I don't really feel comfortable sharing it. The actual original schematic is here: http://filear.com/?p=11.

I created a test model that demonstrates a similar issue with just two OpAmps:

You'll see two identical circuits, except one uses the OpAmp with rails connected to power and ground (I get the same results regardless of which rail gets applied to power or ground), and the other uses the OpAmp with no rails. If you perform the Time-Domain simulation with these parameters:

  • Stop time: 5ms

  • Time Step: 1ms

  • Measure Result1 and Result2

you'll see that the results are quite different. There's a huge difference in the results such that one appears flat. I'm also noticing that in this circuit the results are opposite: The OpAmp without rails produces nearly no measurable output, and the OpAmp with rails produces a small but measurable output (I realize measurable and immeasurable are a fact of scaling.)

by khauser
October 24, 2012

You have entered the values of R5 & R11 as 1m.

in CL, 1m = 1E-3 Ohms.

You probably meant to enter them as 1M = 1E+6 Ohms.

With R5 = R11 = 1M

then your circuit looks about right.

See:

https://www.circuitlab.com/docs/the-basics/#human_friendy_inputs

for more.

:)

by signality
October 24, 2012

Good to know!

That wasn't the root of the issue, though, as I had used upper case 'M' on my original. Changing 'Test' to use upper case M restored the results to exactly what I saw originally (and also makes the simulation a little faster).

So now I see Result1 (the non-rail OpAmp) producing a sine wave output at nearly 40V, and Result2 (the railed OpAmp) producing a nearly square wave output between 0 and 5, which is what I would expect.

by khauser
October 24, 2012

Check if this is what you expect:

Regards, Sancho

by Sancho_P
October 24, 2012

Not exactly, as the two OpAmps are still producing different results. I don't understand why the simulator treats them differently.

I think I may have found my answers.

The root of my question wasn't about how to make the circuit function in a particular way ... the circuit in the original drawing produces predictable output on a breadboard (so says my oscilloscope). The question is about the OpAmps and why the one with rails works differently. Here's what I found (two items of interest):

1) According to https://www.circuitlab.com/docs/circuit-elements/#opamp, "Op-amps with voltage rails are assumed to have rail-to-rail output. If the op-amp will not be asked to saturate its output at voltage rails, using the op-amp component that doesn't have the rails will lead to faster simulation, and generally "behaves better" in terms of circuit convergence."

2) https://www.circuitlab.com/docs/faq/#q_unrealistic_spikes specifically explains the unrealistic voltages.

Does this make sense???

by khauser
October 25, 2012

@khauser,

Short answer:

Yes, it makes sense.

Long answer:

"So now I see Result1 (the non-rail OpAmp) producing a sine wave output at nearly 40V, and Result2 (the railed OpAmp) producing a nearly square wave output between 0 and 5, which is what I would expect."

Well. that's exactly what I would expect too. That's why I said your sim looked about right.

I hadn't realised that you hadn't understood the distinction between the two variants of CL opamps.

Having found some more info in the CL Documentation (!) it might also help to have a look at:

and:

by signality
October 25, 2012

Very helpful. This is a great resource!

by khauser
October 25, 2012

Post a Reply

Please sign in or create an account to comment.