DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: Paul Marossy on May 09, 2012, 10:04:53 AM

Title: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 09, 2012, 10:04:53 AM
Some of you may remember this thread about TL072 weirdness: http://www.diystompboxes.com/smfforum/index.php?topic=96006.0

The TL072 apparently has a quirk that "the input common-mode range does not extend all the way between the rails. If the common-mode voltage gets to within a couple of volts of the V- rail, the op-amp suffers phase reversal and the inputs swap their polarities. There may be really horrible clipping, where the output hits the bottom rail and then shoots up to hit the top one, or the stage may simply latch up until the power is turned off."

So this little 12V unity gain opamp splitter box thing I made to change the mono output of my old analog keyboard into a pair of signals to feed a digital FX unit was working consistently (the opamp didn't latch up or die), but I noticed after making a recording recently that it was clipping one of the signals. At first I thought that I simply had the recording level too high but then I noticed that I was sounding distorted all the time, and it got really bad unless I had the volume on the keyboard near zero, but then the more notes I played on the keyboard simultaneously, the worse the distortion got.

So I started thinking that I was having a new problem with my keyboard, but before I went down that road I double checked to see if my suspicion about it being the splitter box itself was correct. So I feed the thing with a clean sine wave from my signal generator and found something very interesting: both the outputs were squashed (like 1/3 the amplitude of the original) and one of the outputs was quite distorted and even less in amplitude. So I immediately thought that it was the opamp that was the cause of the problem. Then I decided to try a few different ones. The JRC4580 I tried first worked for a few seconds then latched up. Then I thought I should try using one of these wide bandwidth types just for kicks, so I popped an LF353 in there and looked at the waveforms – the outputs were just like the input! And it kept working and didn't die or latch up. Obviously that made me very happy because now it sounds great, like it should.

So all that to ask, is the input common-mode voltage and bandwidth somehow related? I'm having a little trouble understanding how bandwidth can be a factor when you're feeding a very simple unity gain circuit with a sine wave at a certain frequency and it's crumpling under "the pressure".
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 09, 2012, 12:20:32 PM
Comparing the TL072 datasheet to the LF353 datasheet, I don't see anything there that says one would be any better than the other in terms of output voltage swing or input common-mode voltage range - both data sheets give the some stats. The LF353 has 1 MHz more bandwidth than the TL072 and the slew rates are the same. Both are JFET opamps. And yet one works great and the other one is a poor performer.

Just weird!  :icon_sad:
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: R.G. on May 09, 2012, 12:33:47 PM
To answer your title question, no, ICMR and bandwidth are not directly related; however, they may be tied together with some of the internal tinkering that comes about by trying to get ICMR or bandwidth or both to be better. Secondary effects may degrade one while the other is being made better.

There are a number of oddities about feedback amps and unity gain. Unity gain is often the toughest condition for a feedback amp. It's where there is the most feedback, and therefore the most of any problems feedback brings. Some opamps are only stable for gains of five or over, for instance. As you use an opamp at higher gains - that is, less feedback - less frequency compensation is needed, and so the overall bandwidth of the device is improved. Having internal compensation for unity gain is handy, but it's kind of a worst case.

But I think your problem was a bad TL072 or other problem in the general circuit, not a fundamental limitation of opamps or the TL072.

There was a time when opamps in general could be expected to *die* if you exceeded the input common mode voltage range (or differential voltage range, etc.), but modern designs have gotten much better about this. Still, it's not a good idea to trust the opamp to live under all abusive conditions. It's good practice to have external clamps to prevent the inputs from being forced outside the ICMR or IDMR. This is part of the motivation for the parts in the geofex article "What are all those parts for?"

It could well be that the burly, buffered output of your keyboard can provide enough current to damage the inputs of some opamps even with the internal limiting circuits. It's a more likely scenario than many others.
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 09, 2012, 12:51:22 PM
Quote from: R.G. on May 09, 2012, 12:33:47 PMThere are a number of oddities about feedback amps and unity gain. Unity gain is often the toughest condition for a feedback amp. It's where there is the most feedback, and therefore the most of any problems feedback brings. Some opamps are only stable for gains of five or over, for instance. As you use an opamp at higher gains - that is, less feedback - less frequency compensation is needed, and so the overall bandwidth of the device is improved. Having internal compensation for unity gain is handy, but it's kind of a worst case.

I didn't realize unity gain scenarios were so hard on an opamp. Good to know for future reference!

Quote from: R.G. on May 09, 2012, 12:33:47 PMBut I think your problem was a bad TL072 or other problem in the general circuit, not a fundamental limitation of opamps or the TL072.

Every TL072 I tried either failed or makes distortion. Maybe it's a bad batch? I reworked the whole circuit, so I know that is good.

Quote from: R.G. on May 09, 2012, 12:33:47 PMIt could well be that the burly, buffered output of your keyboard can provide enough current to damage the inputs of some opamps even with the internal limiting circuits. It's a more likely scenario than many others.

That was my initial thought when I had these problems. The output section of the keyboard uses 1/2 of a JRC4558 dual opamp and then the signal goes through a high/low/off attenuation switch. Not sure of the dB numbers, but I can't imagine that it deals with that much current. How much current does it take to blow the inputs of a TL072? I don't have an input resistor on the circuit, would that maybe help? (only an input cap)
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Cliff Schecht on May 09, 2012, 06:11:57 PM
My research is heavily based around designing bad a$$ monolithic op amps, i.e. high bandwidth, high slew rate, anywhere from 1-10A peak output current and as close to rail-to-rail outputs as I can get. In my non-commercial designs I run into all sorts of issues where the bandwidth is directly tied to the instantaneous output voltage. In my case it's because I'm pushing the IC processes to their limits trying to squeeze out as much bandwidth as possible. I've certainly noticed that as I try to push the output voltage closer to the rail (op amp setup as a non-inverting amplifier with gain from 2x-5x) the bandwidth can reduce dramatically, at least if I am swinging with high peak-to-peak signals at high frequencies (where slew rate really hurts).

Some op amps will flip phase if you push the input common-mode signals past their specified ranges. As RG said most modern op amp designs have protection against this but in many older op amp designs (especially those with BJT and JFET inputs) it can be a problem. IIRC it has something to do with how the first stage interacts with the second as you go past the ICMR. This can cause current to flow the wrong way and make the inputs looked flipped from each other. If you monitor the input bias currents they will go up dramatically, something of a tell-tale sign that this is happening (on top of the output being flipped).
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 09, 2012, 06:17:53 PM
Quote from: Cliff Schecht on May 09, 2012, 06:11:57 PM
I've certainly noticed that as I try to push the output voltage closer to the rail (op amp setup as a non-inverting amplifier with gain from 2x-5x) the bandwidth can reduce dramatically, at least if I am swinging with high peak-to-peak signals at high frequencies (where slew rate really hurts).

Interesting. In my case, I basically have two unity gain non-inverting buffers in parallel, which makes them operate in a maximum feedback situation. It would probably get better for the opamp if I had a gain of say five, but so far the LF353 is doing fine. I still wonder if a small series input resistor might not be a bad idea to counter too much input current from possibly blowing the inputs.
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: PRR on May 09, 2012, 11:20:19 PM
> both the outputs were squashed (like 1/3 the amplitude of the original) and one of the outputs was quite distorted and even less in amplitude

Get some DC voltages.

I know you are an experienced builder, that you have re-checked the build, but this still sounds like a misconnection.
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 10, 2012, 09:43:43 AM
I spoke too soon. It crapped out again last night, made loud popping noises like when it failed before. At this point screw it, it's not worth the trouble.

Just for kicks I did measure voltages on one of the inputs when I put it on the scope, it was almost as high as the supply voltage was.
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: PRR on May 10, 2012, 11:43:13 PM
Check DC resistance inputs to ground or Vref.
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 11, 2012, 09:23:16 PM
Quote from: PRR on May 10, 2012, 11:43:13 PM
Check DC resistance inputs to ground or Vref.

I did that this afternoon, anything that may be present is well over what my DMM can measure.

I rebuilt the circuit from scratch and made a few tweaks to the circuit, the main one being that I gave it a gain of 10 instead of making it a unity gain buffer type arrangement. So far so good...
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: brett on May 13, 2012, 07:42:15 PM
Hi
I'm definately no expert, but it seems to me that when an op-amp with less than rail to rail output is presented with an input signal that's nearly rail-to rail, something HAS to give. There can't be enough feedback to hold it at unity gain.

A simple solution for a 9V circuit is to clamp the input using a pair of anti-parallel LEDs across the inputs, trimming the signal to 2 or 3V. In early op-amp guitar preamps (Fender, MusicMan, etc), it was common to see 1N4148s used to trim the input signal (to LM108s, LM308s, etc).
cheers
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: R.G. on May 13, 2012, 08:34:52 PM
Quote from: brett on May 13, 2012, 07:42:15 PM
when an op-amp with less than rail to rail output is presented with an input signal that's nearly rail-to rail, something HAS to give. There can't be enough feedback to hold it at unity gain.
That's absolutely correct. The thing that opamp designers have been thrashing over for at least 40 years is to make what happens in this situation be that the opamp flat lines neatly and does not invert phase, latch up and die, oscillate, or other ugly things, and recovers tidily from the overload without sticking, oscillating, yada, yada...

Some modern opamp do all this well. Not all. In either sense.

QuoteA simple solution for a 9V circuit is to clamp the input using a pair of anti-parallel LEDs across the inputs, trimming the signal to 2 or 3V. In early op-amp guitar preamps (Fender, MusicMan, etc), it was common to see 1N4148s used to trim the input signal (to LM108s, LM308s, etc).
Yep. There are several approaches to input limiting.

In fact, before that, the Thomas Vox power amps used a fairly complex (by comparison) limiter before the power amp specifically for this purpose - limit the input so the amplifier doesn't have to cope with over-size inputs.

It's a good approach, and practical.

Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Earthscum on May 13, 2012, 08:45:24 PM
I latched up a TL072 some time ago in exactly this situation. I also found out what happens when you latch it and take your sweet time poking around for voltages. I blistered my finger, nice little row of 4.  :icon_biggrin:

Anyways, I thought it was something I had done wrong, and blew another chip and pulled the plug on that project. I can't remember exactly what I was doing, but I do remember that I was using it as a direct buffer from a distortion of some kind. So, now that I'm thinking about it (and reading through this) it kinda seems I caused my poor IC's to suffer the same fate as Pauls. The second IC blew with a resistor in line with the input (I think a 10k... all my 10k's are 1% blues... somehow). That is what I had thought was the issue, but the chip went "bbbBBBBRRRRATTTT" and stopped making noise. Just lay there twitching.  :icon_cry: I think I held a candle light ceremony for them, being the first IC's I ever blew out.
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 13, 2012, 10:08:58 PM
Ha ha, well at least I know I'm not crazy! It's been a good learning experience though.  :icon_cool:
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 14, 2012, 09:58:30 AM
Quote from: brett on May 13, 2012, 07:42:15 PM
I'm definately no expert, but it seems to me that when an op-amp with less than rail to rail output is presented with an input signal that's nearly rail-to rail, something HAS to give. There can't be enough feedback to hold it at unity gain.

The thing that I really don't get is that I couldn't have been getting an input signal that is nearly rail-to-rail from my keyboard because if I plugged my guitar into the thing, the signal coming from the guitar was definitely stronger than what was coming from the keyboard. I've got humbuckers going thru a Fishman PowerChip preamp, the output level is not much different than passive pickups are, so I can't see that the keyboard was doing more than maybe 2 volts PTP. With a Vcc of 12V it should have had plenty of room to work with, but reality was something different entirely. The service manual for my keyboard says to adjust VR8 on the output amp to 3V PTP, so the maximum output of the keyboard I guess couldn't be more than 3V PTP when output level is set to "high". But when it was set to "high", it was still a weaker signal than my guitar would provide. (I know, I could measure it huh?)

I guess it comes back to perhaps there being too much current from the keyboard output for the opamp's inputs. But that doesn't make sense to me either because I read the other day in a book that the average opamp has about 10mA of output current, and the signal send from the keyboard is coming from an opamp. Surely feeding an opamp with 10mA of "input current" could not fry an opamp's inputs, can it? If that were the case, then any of these cascaded dual opamp distortion designs ought to have failure problems as you're feeding the input of one with the output of another.

The behaviour of this opamp in this circuit I built is still so mysterious to me!
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Cliff Schecht on May 14, 2012, 12:32:13 PM
Paul the input current to the op amp based buffer is only going to be as high as needed to bias the input transistors. If you are using a FET based op amp, these currents are in the range of nano to picoamps and is negligible. The only current the output of the keyboard will need to push out is enough to drive the cable and input of the buffer (again this is a TINY current).

Also as far as 10mA frying op amp inputs, it really depends on how big the input transistors are. If you are working with unprotected small-sized MOSFET based inputs then pretty much any overvoltage/overcurrent situation can damage the inputs (the guys in my research group doing ultra-low power medical devices deal with this constantly!). But remember, those inputs only draw as much current is needed to bias the input transistors (known as the input bias current) and therefore for the TL07x series of op amps, nearly no current should be measured going into the "+" pin (probably can only measure this with a picoammeter).
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 14, 2012, 01:35:08 PM
Knowing that information, this whole episode is even more bizzare.  :icon_eek:
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Cliff Schecht on May 14, 2012, 02:34:55 PM
After a bit more reading I found that the TL0xx series opamps DO suffer phase reversal if the common-mode input gets too close to the negative rail. So if you are using a 9V supply and Vref=4.5V then your signal is swinging down to 3.5V and up to 5.5V. That 3.5V downward swing might be enough to cause problems in UGFB configuration. According to the datasheet the max output voltage for a 9V supply is about 6V P-P (not very good!) and in UGFB configuration the common-mode input voltage is (ideally) equal to the output voltage (meaning since the . If the output clips negative and you get phase reversal from too low CM input, this will typically causes the signal to slam into the positive rail and either latch up or recover (the TL0xx stuff is supposed to be latch-up free though, which they are IME). Sounds like you might be experiencing this, I don't think I have ever though..


Edit: Ha! Just reread the thread and saw Paul said what I was saying already (about the phase reversal stuff). Also I was wrong on the supply voltage, Paul is using 12V which means he should have enough headroom to not be clipping. It sounds like the DC is off somewhere, maybe a leaky coupling cap? Maybe your keyboard is putting out DC? If you really do have the op amp hooked up correctly (not that it's hard :P) then the circuit should work from the get-go. If it doesn't, something else is wrong. I've used TL0xx's as unity gain buffers a thousand times and rarely had a problem that wasn't either user error or something else in the chain causing issues (faulty cables, bad components, etc..).
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: PRR on May 14, 2012, 08:34:09 PM
>> Check DC resistance inputs to ground or Vref.
> anything that may be present is well over what my DMM can measure.


There really should be measurable DC resistance input to ground/Vref.

With TL072 you "could" go well over 10Meg and be OK; but there's rarely a need to go over 1Meg or so.

With bipolar chips you usually want to see 100K-1Meg or so.

With "no" conductivity input to reference the input bias current will charge-up until the input quits working.

There are a few chips that leak or tend to be self-limiting, will float to a workable point and no further. That may be why the 351(?) works.

> input current to the op amp ...using a FET based op amp, these currents are in the range of nano to picoamps and is negligible

Not negligible if the input reference resistor is infinite. "over what my DMM can measure" suggests over 2Megs which is pretty high.... and we don't know how much "over" it really is.

> If you really do have the op amp hooked up correctly ...then the circuit should work from the get-go.

Right. And Paul is no newbie. Therefore he must be overlooking something in a blind-spot. Lack of input bias-reference resistor is very common in tube-amps, maybe also in opamp work.
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Cliff Schecht on May 14, 2012, 10:35:26 PM
QuoteLack of input bias-reference resistor is very common in tube-amps, maybe also in opamp work.

This is a great point! Especially if one is using a DC blocking cap to the input. If you have no reference to ground then the output will start floating into rails. Ask me how I know this...:D
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Earthscum on May 14, 2012, 11:16:35 PM
Quote from: Cliff Schecht on May 14, 2012, 02:34:55 PM
After a bit more reading I found that the TL0xx series opamps DO suffer phase reversal if the common-mode input gets too close to the negative rail. So if you are using a 9V supply and Vref=4.5V then your signal is swinging down to 3.5V and up to 5.5V. That 3.5V downward swing might be enough to cause problems in UGFB configuration. According to the datasheet the max output voltage for a 9V supply is about 6V P-P (not very good!) and in UGFB configuration the common-mode input voltage is (ideally) equal to the output voltage (meaning since the . If the output clips negative and you get phase reversal from too low CM input, this will typically causes the signal to slam into the positive rail and either latch up or recover (the TL0xx stuff is supposed to be latch-up free though, which they are IME). Sounds like you might be experiencing this, I don't think I have ever though..

I believe that is exactly what I was doing. I remember I had the Op Amp biased directly from the transistor, most likely a 10k off the collector. The first one was probably getting full swing, and the second one I blew must've still been getting enough voltage to blow. Could've been a Bazz Fuss for all I remember. I've used 358's and 2904's like that with no problems, but I'm guessing they are less problematic since the outputs can swing all the way to ground. Or are they prone to this issue as well? (LM358 (2904) has definitely become my favorite little op amp).
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Cliff Schecht on May 15, 2012, 02:58:08 AM
I always look for the schematic diagrams that many manufacturers include in their datasheets. They usually show at least all of the important transistors that make up the gain stages and protection circuitry (biasing is represented as a current source for simplicity when drawing the schematics). This will tell you quite a bit about how the op amp will perform when put under certain "stressful" conditions, be it operating as a unity gain buffer or driving large currents. Some op amps are slightly overcompensated to ensure a good phase margin (one of the criterion for amplifier stability) as a UGB but this has an effect on the transient performance. More compensation means a slower transient response.

Doing a bit of research through a book like Baker's text on op amps at first may seem daunting, but there is a lot of more general information on different op amp topologies and their pros/cons. In his later books he delves into three stage op amps and crazy casocoding techniques that we don't really encounter with general purpose op amps (this is more for ultra low voltage CMOS design in sub micron processes :icon_redface:) but the basic information about general purpose two stage op amps is still there. He also delves into specifics when dealing with JFET and BJT based inputs (or entire amplifiers based on these devices if there is a performance benefit) as well as using PNP/P-Channel vs NPN/N-Channel based inputs (depends on if the common mode needs to extend to the positive rail or negative rail) or even amplifiers that use both P channel and N channel inputs in parallel. I have done the latter in a high speed op amp design and was really excited that I got near rail to rail performance when the amplifier was configured as a UGB, even on the bench!
Title: Re: For The Experts: Is Opamp I.C.M.R. and Bandwidth Related?
Post by: Paul Marossy on May 15, 2012, 09:49:42 AM
Quote from: Cliff Schecht on May 14, 2012, 02:34:55 PM
Edit: Ha! Just reread the thread and saw Paul said what I was saying already (about the phase reversal stuff). Also I was wrong on the supply voltage, Paul is using 12V which means he should have enough headroom to not be clipping. It sounds like the DC is off somewhere, maybe a leaky coupling cap? Maybe your keyboard is putting out DC? If you really do have the op amp hooked up correctly (not that it's hard :P) then the circuit should work from the get-go. If it doesn't, something else is wrong. I've used TL0xx's as unity gain buffers a thousand times and rarely had a problem that wasn't either user error or something else in the chain causing issues (faulty cables, bad components, etc..).

Yeah, that is what was puzzling the heck out of me is that it should have worked with no problems right from the start. I mean it's pretty hard to screw up something THAT simple. It could be that there is some DC coming from the keyboard, maybe a small amount which is enough to whack out the opamp. If there is, you certainly can't hear it. I can play the keyboard thru an amp, no problems. Nothing that sounds like DC on the input. I can use headphones (which signal comes from the same source in the keyboard and has to go through the same capacitor from the output opamp as the line out does), no problem.

In any case, I built a new circuit with a gain of 10 last weekend and it works much better. It's been working every time so far. I'm still using the LM353 though. Maybe I have a bad batch of TL072s or something. I'm not even going there with this project!