Opamp Simulation Issue

Started by Dylfish, April 19, 2014, 11:05:51 AM

Previous topic - Next topic

Dylfish

Hey me again.

Has anyone used Multisim to simulate a opamp for their pedal and had any issues with the model.

I've tried to simulate a gain recovery stage of ~2.8 gain .  I have an input voltage of 1.96v but for some reason am getting an output in the mv range. Below is an excerpt of my simulation and im positive i've got it all wired up correctly.



Can anyone see anything wrong, or are there some nuances with the software that i'm unaware of?

Cheers

Gus

You need a cap from R14 to ground
Also for good design you should have series input and output resistors
Lots of stuff in books and the web on opamp design

Dylfish

#2
I tried that cap before but it didn't seem to make a difference. i have a feeling i had it's polarity back to front though...

The gain for that config would be 1+ (R15 / R14). so ~2.8x gain.

When i push R15 to say 10k we should have ~11x gain and therefore (Theroetically as much as the supply can give) but 21v. but when i plug it into the sim  it only raises it about ~3x.

Is there a simple explanation for that?

Cheers =)


Digital Larry

#3
Haven't used multisim - does it tell you the DC value of the output with no signal in?  Should be at 4.5 volts or so.  If it's at 0 or 9 or thereabouts then you do need to deal with biasing, AC coupling of feedback, etc. however just at first glance the circuit is pretty simple and I don't see anything wrong with it (other than missing the AC coupling cap to ground from R14 previously suggested).  If there's a polarity involved, the (-) side of the cap wants to be connected to ground.

If you think about the DC behavior, keep in mind that opamps always "try" to make the voltage at + and - inputs equal.  You have 4.5 VDC at (+).  In order to get 4.5 v at (-) with R14 grounded, the output has to go to 4.5 * (2.8/1.0) = 12.6 volts.  So I'm willing to bet that your output is slammed into the +9 rail.
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Dylfish

ahh yeah,

I just had a look at the oscilliscope and it's clipped rather heavily. DO you guys know of any good op amp resources where i can read up about this?

R.G.

Simplify.

Take out those 1M bias resistors, and put in a DC voltage source of 4.5V for bias. Run a 500k resistor from the + input to the bias source. Also, run the "ground" end of R14 to the bias source. This gets the DC right. Another way to do this is to put a BFC in series with R14. A sim lets you set non-electros to big values, so make it non electro and avoid those polarity issues until you get the circuit doing what you want, then go back to electros.

What you have there can't work in the real world, even if it works in a sim somehow. Opamps work by using their gain to make the + and - inputs be the same voltage nearly as they can. With no signal, the opamp is trying to make the - input be 4.5V, same as the + input. So it's trying to do this by raising its output voltage to (R15 + R14)/R14 times 4.5V; this is 2.8 times 4.5, or 12.6V. It can't do that with a 9V supply, so the output is always banged (bung?) against the + supply. Adding input signal makes things more confused for the opamp.

What happens in the sim depends on how accurate the model of the opamp is. In the real world, TL07x devices can't go to closer than about 2V to the + supply, so the opamp will probably hang up at +7V or so. It *may* have input range issues and suffer ugly phase reversals, blipping from saturated positive to saturated negative.

The advice is accurate: put a cap in series with R14. This forces the DC bias point to be 4.5V by forcing the DC gain to be unity. Or use a separate bias voltage. This will get the DC set point on the output to be 4.5V, half the available 9V.

Now you have signal issues. Putting 1.96V (peak? average? RMS?) into a gain of 2.8 says you get 4.48V out. Even if 1.96 was peak, that's 4.48V out, and this will bang into the + and - limits of the TL07x series output capability. If it's a good model, you'll see the output limit at about 4.5V +/- 2.5V. If it's a not-very-accurate model, it will limit at the power supply and ground.  If it's an even worse model, the model may use internal power supply limits of +/-15V or +/- infinity. I've seen both.

Changing the gain to larger just makes the signal saturation worse.

If you're only looking at the signal on the probes in multisim, get out the oscilloscope tool and look at the DC and AC signal levels. That will give you a much better idea what's happening.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

PRR

> the DC value of the output with no signal in?  Should be at 4.5 volts or so

+1!!

Always check your DC conditions before you even think about the audio!!


If the output (and maybe inputs) are jammed against the rails, it works as good as a car that has gone off the road and jammed in the ditch.
  • SUPPORTER

Dylfish

Quote from: R.G. on April 19, 2014, 12:22:34 PM
TL07x devices can't go to closer than about 2V to the + supply, so the opamp will probably hang up at +7V or so.

Why is this?  Biasing the + @ 1/2 the supply voltage (in this case 4.5v for a 9v) would be incorrect i take it? since if it's sitting @ 4.5v it will hit the + supply at 7v, giving only 2.5v+ swing?

oh yeah and happy easter all!

PRR

Being conservative, TL072 can't go down closer than 2V up from its negative supply pin.

So +2V, +7V, the optimum is idle at 4.5V and swing 2.5V *either* way from there.

That's over 1.6V of signal. You can slam a Crown DC-300 power-amp with 1.6V.

IMHO the TL072 with easy loading will do a little better than "2V from the rail". But not a lot better. And 2V is a good safe figure for illustration.
  • SUPPORTER

R.G.

Yep.

Dyl, welcome to the painful world of the differences between real and theoretical opamps.  This is the reason for all those hard to understand parameters on the datasheets of opamps.

Opamps differ from the ideal opamp in many ways. One is how close the output can swing to the + supply and - supply, and those are not necessarily the same. Most older opamps like the TL07x series can't get nearer than about 1.5-2V from *either* power supply. The obvious difficulty this causes was the inspiration for "single supply opamps" like the LM324. The LM324 can make its output go within 10-50mV of the negative power supply rail. It can also have its *inputs* biased at the negative power supply rail without ugly consequences, which is not true of the TL07x series.

In fact, the accumulated uglinesses of needing to swing ever closer to the power supplies on both inputs and outputs has led to the creation of "rail to rail" opamps, with some having RTR inputs, some having RTR outputs, and some having RTR on input and output. Often the RTR-ness comes with some price, like slower slew, lower bandwidth, higher power, etc.

You have just come up with a reason to learn more about real world opamps.  :icon_wink:
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.