On Magic and Op-amps - Page 1
Forum section: electronics / general

author: Circuitauger
author_rank: Newbie
timestamp: November 27, 2024, 06:52:21 pm
content: 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 circuitmaywork, 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.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 PCBand 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, 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"

author: coppercone2
author_rank: Super Contributor
timestamp: November 28, 2024, 04:45:54 am
content: alot of people say it got worse with power efficient op amps now that are more difficult to compensate and such

author: Someone
author_rank: Super Contributor
timestamp: November 28, 2024, 06:00:28 am
content: Quote from: Circuitauger on November 27, 2024, 06:52:21 pmSounds 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.

author: Kim Christensen
author_rank: Super Contributor
timestamp: November 28, 2024, 06:02:34 am
content: 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...

author: 16bitanalogue
author_rank: Regular Contributor
timestamp: November 28, 2024, 07:25:06 pm
content: 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.

author: Whales
author_rank: Super Contributor
timestamp: November 28, 2024, 09:19:07 pm
content: 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?)

author: coppercone2
author_rank: Super Contributor
timestamp: November 28, 2024, 09:23:35 pm
content: by the year 50,000 they push that over to a ten KHz

author: TimFox
author_rank: Super Contributor
timestamp: November 28, 2024, 09:25:54 pm
content: 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").

author: coppercone2
author_rank: Super Contributor
timestamp: November 28, 2024, 09:28:02 pm
content: I think it means you can't just throw it down next to a micro controller on the second revisionSo 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 oscillateI 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.

author: TimFox
author_rank: Super Contributor
timestamp: November 28, 2024, 09:34:53 pm
content: 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 texthttps://jontalle.web.engr.illinois.edu/Public/BOOKS/Bode-NetworkAnalysisFeedbackAmplifierDesign.pdffrom 1945.

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 28, 2024, 09:39:54 pm
content: Quote from: coppercone2 on November 28, 2024, 09:28:02 pm

author: coppercone2
author_rank: Super Contributor
timestamp: November 28, 2024, 10:30:45 pm
content: 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 hairyI 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".I never built it, I always wanted to try

author: Whales
author_rank: Super Contributor
timestamp: November 28, 2024, 11:32:57 pm
content: QuoteToday 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?

author: coppercone2
author_rank: Super Contributor
timestamp: November 28, 2024, 11:36:49 pm
content: that is the jim william godzilla amplifier thinghttps://www.analog.com/media/en/technical-documentation/application-notes/an21f.pdf

author: Geoff-AU
author_rank: Frequent Contributor
timestamp: November 29, 2024, 12:30:28 am
content: Quote from: coppercone2 on November 28, 2024, 09:28:02 pmOp-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.

author: schmitt trigger
author_rank: Super Contributor
timestamp: November 29, 2024, 02:00:34 am
content: Quote from: coppercone2 on November 28, 2024, 11:36:49 pmOne of the Jim Williams’ magnum opus. Composite opamps.

author: vk6zgo
author_rank: Super Contributor
timestamp: November 29, 2024, 02:29:04 am
content: Quote from: coppercone2 on November 28, 2024, 09:28:02 pmOp 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 settingTo 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 220resistor in series with the output of the LM358.

author: David Hess
author_rank: Super Contributor
timestamp: November 29, 2024, 04:33:34 am
content: 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.Quote from: coppercone2 on November 28, 2024, 04:45:54 amLow 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.Quote from: coppercone2 on November 28, 2024, 10:30:45 pmWhen 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.

author: Smokey
author_rank: Super Contributor
timestamp: November 29, 2024, 05:47:23 am
content: Quote from: coppercone2 on November 28, 2024, 11:36:49 pmThat 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.

author: David Hess
author_rank: Super Contributor
timestamp: November 29, 2024, 02:57:41 pm
content: Quote from: Smokey on November 29, 2024, 05:47:23 amIt 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.

author: tggzzz
author_rank: Super Contributor
timestamp: November 29, 2024, 03:38:09 pm
content: Quote from: David Hess on November 29, 2024, 02:57:41 pmJust 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. Regrettably some acknowledged analogue masters are offenders in that respect.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.

author: David Hess
author_rank: Super Contributor
timestamp: November 29, 2024, 08:24:54 pm
content: 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.

author: mawyatt
author_rank: Super Contributor
timestamp: November 29, 2024, 09:15:06 pm
content: 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!!Best

author: David Hess
author_rank: Super Contributor
timestamp: November 30, 2024, 02:32:58 am
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: November 30, 2024, 11:07:26 pm
content: Another cool op-amp circuit, which doubles and bootstraps its supply, to give a voltage swing of nearly triple the supply voltage.