Author Topic: On Magic and Op-amps  (Read 1506 times)

0 Members and 1 Guest are viewing this topic.

Offline CircuitaugerTopic starter

  • Newbie
  • Posts: 9
  • Country: us
On Magic and Op-amps
« on: November 27, 2024, 06:52:21 pm »
My whole life, from a little kid to now as a professional engineer, I’ve found op-amps to exist under their own mysterious rules. As a kid I’d build circuits out of radio shack’s electronics learning lab and I’d of course make mistakes, fix them, and once fixed have a circuit do w/e thing it was supposed to do.. all unless it had op-amps in the design. If Op-Amps were involved the circuit may work, and if I was lucky enough that it did great it would continue too. But if the circuit did not however work right off the bat, well who knows what magic would lead it to not, often only disassembling the circuit entirely and building from scratch again would resolve the problem, unlike the other circuits I just didn’t have any intuition as to what could be worng. I was just a kid though and obviously might just be unable to discover the error I made.

Fast forward to college however and this problem still would crop up, I would do undergrad research in active filtering and for the most part my simulations would work irl and then suddenly not. A wire would be misplaced in a RC filter somewhere and now the Op-amp is out to lunch, can I fix it? Somehow not, was the amp broken? Nope, building it back from scratch and it all works again. :palm:
Later I’d take a known good design that simulated properly, worked on a bread board/ prototype board and fab a PCB – that PCB has never worked and why remains a mystery as to why, I’ve triple checked the schematic, the gerber and ult. just ohmed out every pad on the PCB  :-/O and it all checks out… but never the less doesn’t work the OP amps do literally nothing I get no signal out from any part of the circuit, and eventually they’d permanently break, why who can know lol it’s not like there are any obvious shorts or errant voltages.

Even now in my profession this sorta thing causes problems, recently needed to design a Schmidt trigger for a prototype system, works great in LTspice – on the board doesn't work  :scared:, either screams at me or latches to one rail or another… even a simple comparator somehow eludes expected behavior sometimes, eventually I'll get it all to work but why? Who knows?

Wondering if anyone else out there has had a similar experience with Op-amp "magic"
 
The following users thanked this post: BILLPOD

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 11241
  • Country: us
  • $
Re: On Magic and Op-amps
« Reply #1 on: November 28, 2024, 04:45:54 am »
alot of people say it got worse with power efficient op amps now that are more difficult to compensate and such
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 5124
  • Country: au
    • send complaints here
Re: On Magic and Op-amps
« Reply #2 on: November 28, 2024, 06:00:28 am »
Wondering if anyone else out there has had a similar experience with Op-amp "magic"
Sounds like the familiar confusion when the mechanisms/theory/maths behind opamps has not been learnt and become second nature.

Calculating DC feedback ratios or doing linear superposition is easy and requires little understanding. Stabilising feedback in dynamic/AC conditions is the bit that needs the higher maths (ever easier with modern simulators and analysis tools getting the noise gain trivially, but still works better when the relationships are already clear in your mind). Then you're chasing device/part parasitics and non-ideal effects.
 

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1819
  • Country: ca
Re: On Magic and Op-amps
« Reply #3 on: November 28, 2024, 06:02:34 am »
Some OpAmps will exhibit output phase reversal when their inputs are outside their common mode range.
Other OpAmps will have back to back diodes between the inputs which can be a gotcha when using them as comparators.
High bandwidth OpAmps will need proper power supply bypass capacitors close to their power pins or they'll become unstable.
etc...
 
The following users thanked this post: Someone

Offline 16bitanalogue

  • Regular Contributor
  • *
  • Posts: 72
  • Country: us
Re: On Magic and Op-amps
« Reply #4 on: November 28, 2024, 07:25:06 pm »
Whenever I hear "bread board" the knee-jerk response is the parasitics especially capacitance. Op-amps will ring and oscillate due to poor phase margin because of output capacitive loads and/or parasitic capacitance at the inverting node. The later will be far more of an issue for wide bandwidth amplifiers.

Other gotchas are input common-mode range violations, output swing limits at heavy current loads, small gain/feedback resistors causing an unnecessary load, load, too gain/feedback resistors with parasitic capacitance introducing phase shift.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2105
  • Country: au
    • Halestrom
Re: On Magic and Op-amps
« Reply #5 on: November 28, 2024, 09:19:07 pm »
Almost all opamps have a built-in pole around 10Hz to a few KHz.  Below this frequency they're almost ideal and you can drive capacitors with them!  Above it (ie most use cases) you have to worry about driving capacitive loads.

Example from TL074 datasheet:


Some datasheets cut off the nice bit and just show the 90deg region, because they assume you don't care about this unobtainable nirvana.

(Do current-feedback opamps avoid this pole?)
« Last Edit: November 28, 2024, 09:24:16 pm by Whales »
 

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 11241
  • Country: us
  • $
Re: On Magic and Op-amps
« Reply #6 on: November 28, 2024, 09:23:35 pm »
by the year 50,000 they push that over to a ten KHz
« Last Edit: November 28, 2024, 09:26:29 pm by coppercone2 »
 
The following users thanked this post: vk6zgo

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 8901
  • Country: us
  • Retired, now restoring antique test equipment
Re: On Magic and Op-amps
« Reply #7 on: November 28, 2024, 09:25:54 pm »
One can easily cope with the wide range of frequencies where the phase shift is close to 90 deg, even with a capacitive load, by proper circuit design.
"Shitty" is an adolescent error.
The important thing is to have the magnitude of the (gain x feedback) fall to unity before the total phase shift reaches 180 deg, preferably several degrees less ("phase margin").
 

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 11241
  • Country: us
  • $
Re: On Magic and Op-amps
« Reply #8 on: November 28, 2024, 09:28:02 pm »
I think it means you can't just throw it down next to a micro controller on the second revision

So when your boss puts together a rag tag crew of under paid STEM majors, mostly having to do with medicine or programming, it requires 'engineering'.

Opamps in theory can quickly solve some problems that show up in the last minute when a project is totally ignored for a long time and then it fails to meet some requirement. In practice it will usually oscillate

I almost see it as a feature for EE 'utility'.

Well that is if they get to the op-amp. Usually someone remembers a single transistor amplifier concept circuit from a intro to electronics for doctors and botanists and it does something... memorable. Things like discrete gates show up in this situation too, after its determined that relay based logic won't work.
« Last Edit: November 28, 2024, 09:36:06 pm by coppercone2 »
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 8901
  • Country: us
  • Retired, now restoring antique test equipment
Re: On Magic and Op-amps
« Reply #9 on: November 28, 2024, 09:34:53 pm »
The 90 degree phase shift over a wide frequency range is the unavoidable result of a carefully-controlled fall of the forward gain from its high value at DC to unity at high frequencies, before the other sources of phase shift get in the way.
Op amps have been used successfully without unwanted oscillation since WW II, but a knowledge of complex variables helps.
See the classic text  https://jontalle.web.engr.illinois.edu/Public/BOOKS/Bode-NetworkAnalysisFeedbackAmplifierDesign.pdf  from 1945.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15711
  • Country: fr
Re: On Magic and Op-amps
« Reply #10 on: November 28, 2024, 09:39:54 pm »
Opamps in theory can quickly solve some problems that show up in the last minute when a project is totally ignored for a long time and then it fails to meet some requirement. In practice it will usually oscillate

 ;D
 

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 11241
  • Country: us
  • $
Re: On Magic and Op-amps
« Reply #11 on: November 28, 2024, 10:30:45 pm »
Its not a bad thing. Programmers have a whole library of books to throw at you when sometimes does not work. With EE its scary that someone can claim to take your job because they found a voltage divider calculator and a 'boolean diagram' (bastardized description of a analog op amp), so at least there is some nuances to keep you better employed.

I think there is a wide region of some op amps that suddenly might become 'easy' if you have a concrete understanding of the feedback loop like TimFox says. But there is also a region way beyond that where things are possible but its hard even for like a circuit analysis professor (aka jim williams when he was bored/curious, godzilla amplifier comes to mind).

It gets way more hard when you have composite/hybrid amplifiers (using discrete transistors), things like sensors in feedback loops, servo mechanisms, chopping, high impedance, etc.... in addition to the usual difficulty, that is frequency. There is a good thread some where here on high order analog PID (or rather, JSC (jerk snap crackle?) circuits for controlling micro vibrations, at high speed. I am sure that got hairy

I noticed that sometimes they have neat chips that might solve a very difficult problem, but you are within the specs of that chip. If you need to solve a similar problem with incompatible or tighter specifications, I am sure it will get extremely difficult very quickly, if you can't use the standard AD/LT solution to the problem.


Alot of things look 'solved' but the fact is, it might not meet the spec that you need. And its not a solution if it does not meet the spec, usually I imagine its so hard people fight back to widen the spec then to solve the problem! But that means your solutions are not what the guy that postulated the question wanted!


Don't you love it when you hear about a problem, and think "I know the chip that does this perfectly!" and then when you look at the data sheet you see "this thing is not going to work".   >:D



I never built it, I always wanted to try

« Last Edit: November 28, 2024, 10:52:55 pm by coppercone2 »
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 2105
  • Country: au
    • Halestrom
Re: On Magic and Op-amps
« Reply #12 on: November 28, 2024, 11:32:57 pm »
Quote
Don't you love it when you hear about a problem, and think "I know the chip that does this perfectly!" and then when you look at the data sheet you see "this thing is not going to work".   >:D

Today is supposed to be my day off, stop this at once!  ^-^

What is your picture of?  It looks like a discrete low-impedence-input opamp, but with two opamps inside.  Possibly a current feedback opamp with two traditional voltage opamps to paper over low-frequency/DC performance?

Online coppercone2

  • Super Contributor
  • ***
  • Posts: 11241
  • Country: us
  • $
Re: On Magic and Op-amps
« Reply #13 on: November 28, 2024, 11:36:49 pm »
 
The following users thanked this post: Smokey, schmitt trigger

Offline Geoff-AU

  • Regular Contributor
  • *
  • Posts: 236
  • Country: au
Re: On Magic and Op-amps
« Reply #14 on: November 29, 2024, 12:30:28 am »
In practice it will usually oscillate

Op-amps are just an integrated version of the usual maxim: If you set out to build an amplifier you'll end up with an oscillator, and vice-versa.
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2415
  • Country: mx
Re: On Magic and Op-amps
« Reply #15 on: November 29, 2024, 02:00:34 am »
that is the jim william godzilla amplifier thing

https://www.analog.com/media/en/technical-documentation/application-notes/an21f.pdf

One of the Jim Williams’ magnum opus. Composite opamps.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7833
  • Country: au
Re: On Magic and Op-amps
« Reply #16 on: November 29, 2024, 02:29:04 am »
I think it means you can't just throw it down next to a micro controller on the second revision

So when your boss puts together a rag tag crew of under paid STEM majors, mostly having to do with medicine or programming, it requires 'engineering'.

Opamps in theory can quickly solve some problems that show up in the last minute when a project is totally ignored for a long time and then it fails to meet some requirement. In practice it will usually oscillate

I almost see it as a feature for EE 'utility'.

Well that is if they get to the op-amp. Usually someone remembers a single transistor amplifier concept circuit from a intro to electronics for doctors and botanists and it does something... memorable. Things like discrete gates show up in this situation too, after its determined that relay based logic won't work.

Op Amps just love to oscillate.
We had a bunch of ISM UHF transmitters, some of which would cook their power supplies when run at their lowest power setting
To perform their designed task, they required controllable output power.

To this end the "rent an EEs" back in the dear old PRC where the things originated used a "sniff" of RF from the Tx output, rectified it &
fed it into one input of a LM358, with the other input being set by the selected power level.

The output of the Op Amp was a dc voltage proportional to the difference between the two inputs.
This was in turn applied to a PIN diode, which controlled the  RF voltage level to the RF amplifier inputs, both setting them & keeping the level steady to a quite accurate spec.

So that very short duration disturbances of the power selector voltage didn't cause equally short output power changes, the control voltage to the PIN diode was bypassed by a fairly hefty poly capacitor.
Unfortunately, the Op Amps in some of the Transmitters, when set to low power would Oscillate at 88kHz, driving the output control voltage rail to rail .
This resulted in AM overmodulation, & the power supply which was not designed for such service, went BANG!

The solution was a 220  \$\Omega\$ resistor in series with the output of the  LM358.
 
The following users thanked this post: Whales

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17375
  • Country: us
  • DavidH
Re: On Magic and Op-amps
« Reply #17 on: November 29, 2024, 04:33:34 am »
The only difficult problems I had with operational amplifiers was lack of precision, which was solved when I discovered the 308.  Everybody has problems with frequency compensation until they learn about Bode plots and realize that 90 degrees of phase lag is associated with each 6dB/octave in roll-off, so if you have 12dB/octave, the phase lag is 180 degrees, etc.

alot of people say it got worse with power efficient op amps now that are more difficult to compensate and such

Low quiescent current combined with a rail-to-rail output means that the operating point and output resistance of the common emitter source output stage changes significantly with load.  Micropower low dropout regulators have the same problem.

I never built it, I always wanted to try

When I was first doing my own audio amplifier designs, I came up with something similar, including the Q5-Q6-Diodes current mirrors driving an emitter follower output stage.  I had a separate operational amplifier controlling the bias current, sampled from the collectors of the output transistors, but I placed the discrete output stage within the feedback loop rather than beside it, and I used a common *base* input differential pair, so the drive signal went into the emitter junction of Q3 and Q4 in place of the 51 ohm resistor.

It worked fabulously well getting 600+ kHz out of 2 MHz output transistors.  I did not realize it at the time, but the bias current control loop on mine failed with full power at the maximum frequency because the delay time of the output transistors was not allowing them to turn off, so cross conduction made the bias control loop saturate trying to lower the bias current.  I kept trying to find more complicated ways to solve this non-problem.

Jim Williams' design is closer to what I would come up with today, which is a discrete version of a traditional current feedback amplifier topology without my weird common base input stage.
« Last Edit: November 29, 2024, 04:37:04 am by David Hess »
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 3014
  • Country: us
  • Not An Expert
Re: On Magic and Op-amps
« Reply #18 on: November 29, 2024, 05:47:23 am »
that is the jim william godzilla amplifier thing

https://www.analog.com/media/en/technical-documentation/application-notes/an21f.pdf

That is a good app note.  Not sure now I missed that one before.  It's both fun and frustrating to stare at a circuit like some of these and not know what a bunch of the parts are supposed to be doing before reading the explanation. 
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17375
  • Country: us
  • DavidH
Re: On Magic and Op-amps
« Reply #19 on: November 29, 2024, 02:57:41 pm »
That is a good app note.  Not sure now I missed that one before.  It's both fun and frustrating to stare at a circuit like some of these and not know what a bunch of the parts are supposed to be doing before reading the explanation.

It is a matter of experience in recognizing common circuit configurations, like current mirrors, followers, current feedback, differential pairs, etc.  The discrete part of that circuit uses the same topology as the first circuit shown below, but you can find examples of the principle of operation going back to the early days of integrated operational amplifiers, and no doubt further.  As I pointed out, it is a discrete version of a modern current feedback amplifier, so inspection of a current feedback amplifier schematic will show the similarities.  The second example is from the first Fairchild 741 datasheets.  The third example from the Tektronix 7A29 vertical amplifier first made available in 1979 shows the same concept.
 
The following users thanked this post: coppercone2

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21113
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: On Magic and Op-amps
« Reply #20 on: November 29, 2024, 03:38:09 pm »
It is a matter of experience in recognizing common circuit configurations, like current mirrors, followers, current feedback, differential pairs, etc. 

Just so.

I like to refer to such idioms as "design patterns", since they are equivalent to the similar software concepts espoused by the GoF. As with software, using such idioms not only aid designing circuits but also understanding circuits made by other people.

Recognising the idioms is eased by drawing sub-circuits in the schematic in the standard way. Equally, understanding is hindered by drawing them in a non-standard way[1]. Regrettably some acknowledged analogue masters are offenders in that respect.

[1]e.g. signal flow not left to right, resistors in odd positions, cramming too much into a single schematic, relying on net names for interconnections.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17375
  • Country: us
  • DavidH
Re: On Magic and Op-amps
« Reply #21 on: November 29, 2024, 08:24:54 pm »
There is a lot to be learned from old electronics designs, old application notes, and old datasheets.

Current feedback operational amplifiers were known before Comlinear released them, as two of my examples showed.  What changed was the availability of an integrated complementary bipolar process, meaning PNP transistors as good or almost as good as the NPN transistors.  Before this current feedback operational amplifiers were sometimes found in hybrid or discrete construction.  Cathode or emitter feedback is the same thing but lower performance without PNPs and is often found in older audio amplifier designs.
 

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 4075
  • Country: us
Re: On Magic and Op-amps
« Reply #22 on: November 29, 2024, 09:15:06 pm »
Recall the founder of Comlinear came from HP where he was developing CMF Amplifiers. Comlinear utilized the CBIC V2 Complementary Bipolar Process (9.8GHz NPN and 4.6GHz PNP) developed at Bell Labs, as did Burr Brown, Harris and others. It's likely ADIs High Speed Complementary Bipolar Process had it's origins from CBIC-V2 also.

We developed our 1st MW/MMW Silicon RFIC Receiver in an early rendition of CBIC-V2, Bell Labs wanted to see if highly integrated (read complete receiver) MW/MMW functions were possible in Silicon at the time, as many "experts" said No!! :o

Best
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17375
  • Country: us
  • DavidH
Re: On Magic and Op-amps
« Reply #23 on: November 30, 2024, 02:32:58 am »
Here is an example of current feedback from Douglas Self that is very close to what Jim Williams was doing.  Williams added a pair of emitter followers to the output for current gain and lower output impedance.

The second example below is another variation of the same thing.

Current feedback amplifiers are not known for their precision, so Jim Williams added a traditional operational amplifier to correct offset and gain at low frequencies.
« Last Edit: November 30, 2024, 02:35:03 am by David Hess »
 
The following users thanked this post: coppercone2

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20273
  • Country: gb
  • 0999
Re: On Magic and Op-amps
« Reply #24 on: November 30, 2024, 11:07:26 pm »
Another cool op-amp circuit, which doubles and bootstraps its supply, to give a voltage swing of nearly triple the supply voltage.
« Last Edit: November 30, 2024, 11:09:01 pm by Zero999 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf