Strange kink in non-inverting op amp signal - Page 1
Forum section: electronics / beginners

author: tmammela
author_rank: Contributor
timestamp: May 03, 2015, 01:31:47 pm
content: Hi, I wonder if someone would have any idea what could cause this. I just build a very basic non-inverting AC op amp using a LM358P. I will later use a NE5534 as this is going to be an audio preamp for a piezo disc mic, but I'm just testing if this works.The problem is this the strange kink in the output signal of the op amp. Input is coming from a signal generator and power from a bench supply. I have tried altering the frequency, amplitude and supply voltage, but the kink is always there.Input signal is quite noisy but does not have that kink.The circuit has no other problems, it works just fine. I have a gain of 11 and good enough bandwidth from 100 Hz to 10 kHz.

author: rdl
author_rank: Super Contributor
timestamp: May 03, 2015, 01:38:05 pm
content: Crossover distortion.edit: I didn't know this until I just now googled it, but apparently it's a known problem when using the LM358/LM324 as an audio op amp due to the way its output is designed. If you're not going to use an LM358 in the final circuit it's probably not worth worrying about.

author: Zero999
author_rank: Super Contributor
timestamp: May 03, 2015, 02:05:21 pm
content: Yes it's crossover distortion. The LM358 has a class B output stage so it's expected.It should improve the the NE5534.

author: tmammela
author_rank: Contributor
timestamp: May 03, 2015, 02:11:31 pm
content: Thank you both of you for a fast answer! I have never heard the term crossover distortion, but I will investigate so it won't surprise me in the future.

author: Zero999
author_rank: Super Contributor
timestamp: May 03, 2015, 02:23:17 pm
content: It's because it takes 0.6V to turn on a BJT and the output stage is composed of PNP+NPN emitter followers so there's a time in the cycle between the top transistors turning off and the bottom transistors turning on.Here's a more simplified schematic of the LM358 which should be easier to understand.

author: c4757p
author_rank: Super Contributor
timestamp: May 03, 2015, 02:45:44 pm
content: You should consider packing up all your LM358s and LM324s and giving them as a gift to your worst enemy.

author: tmammela
author_rank: Contributor
timestamp: May 03, 2015, 03:24:20 pm
content: Quote from: c4757p on May 03, 2015, 02:45:44 pmHaha, maybe I will do that. Can you recommend some good basic workhorse op amp for general use, so that I can stock up and throw them 358s away..?

author: c4757p
author_rank: Super Contributor
timestamp: May 03, 2015, 03:26:07 pm
content: I tend to favor TL072 and MC33078 depending on the application. LF411 and LF412 are nicer but cost more (AoE favors them as a jellybean; they're a bit expensive for me as a jellybean but definitely good). Also, Microchip makes some passable and very inexpensive CMOS ones if CMOS is your thing (not mine).

author: dom0
author_rank: Super Contributor
timestamp: May 03, 2015, 05:45:01 pm
content: I usually use NE5532. Their increased bias current is negligible in most applications for a '358. However, they are more picky about supply bypassing. While you can get away running a 358 or 324 without dedicated decoupling caps, you most probably won't with a 5532. If not properly bypassed the 5532 tends to oscillate at 8-15 MHz (near the parts ft).I have a strong dislike of the TL072 for it's phase reversal, but I often use it when making mock up circuits in place of a LF442/LF412 (very similar, the '412 is just ten times faster).

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 03, 2015, 06:50:57 pm
content: Hey, I still use LM358s.Pretty much only for control purposes though. Where a little nonlinearity will eventually trickle away, or where the output is used single-ended anyway.If you don't have much load, that's a recommended method -- load resistor to V- keeps the "pull-up" side of the output stage active. Class A!Where I need RRIO, and smoother performance besides, I reach for TLV2372. As a CMOS amp, it is noisier, but that's not usually important either.Tim

author: Zero999
author_rank: Super Contributor
timestamp: May 03, 2015, 10:03:13 pm
content: Quote from: dom0 on May 03, 2015, 05:45:01 pmEven at DC?The NE5532 is a poor DC amplifier, compared to the LM358. As you pointed out the bias currents are higher and so is the offset current. It also uses more power than the LM358, won't work down to 3V and has protection diodes on the inputs which short them together when the differential voltage exceeds 0.6V.The LM358 has the advantage of being able to work when its inputs are at the negative rail. The NE5532's inputs need to be 2V above the negative rail.At DC the LM358 is much better than the NE5532.

author: dentaku
author_rank: Frequent Contributor
timestamp: May 03, 2015, 11:40:30 pm
content: I've been wondering lately about what kind of general purpose through hole opamp I should look into getting. I use TL072/082 for old analog synth type stuff and that works very well but sometimes I need one that can swing much closer to the rails.I've actually had some good use for the LM358 a few times when I needed something that can get closer to the V- rail but I'd like to find something cheap and common that's even better.

author: kg4arn
author_rank: Unknown
timestamp: May 03, 2015, 11:54:50 pm
content: You can bias the output stage by placing a resistive load from output to negative rail. Try 4K7This should resolve the distortion. It is purposely unbiased for lower power applications.

author: mzzj
author_rank: Super Contributor
timestamp: May 04, 2015, 01:45:12 am
content: Quote from: dentaku on May 03, 2015, 11:40:30 pmNothing really compete with TL072, LM324, LM358 and NE5534 price-wise. You can get these jellybeans like 20cnt/piece from reasonably reliable sources on ebay.OP07 is probably the jellybean of precision opamps.NE5534 is remarkably good audio opamp even by todays standards, rest of them are just plain cheap.

author: w2aew
author_rank: Super Contributor
timestamp: May 04, 2015, 02:22:42 am
content: Quote from: kg4arn on May 03, 2015, 11:54:50 pm^^^ Yes, this ^^^This is crossover distortion, and for the LM358 output stage, using a pull-down (resistive load to the negative supply rail (ground or V-) will solve the problem. The more extensive versions of datasheets for the LM358 discuss this.

author: Zero999
author_rank: Super Contributor
timestamp: May 04, 2015, 09:15:41 am
content: I must point out that the NE5534 is under-compensated and without the correct value compensation capacitor it will oscillate.Quote from: dentaku on May 03, 2015, 11:40:30 pmSome CMOS op-amps are good replacements for the LM358 but are limited to lower supply voltages. My favourites are the TLC272 (3V to 16V) and MCP602 (2.7V to 6V).

author: dom0
author_rank: Super Contributor
timestamp: May 04, 2015, 09:27:32 am
content: Quote from: Hero999 on May 03, 2015, 10:03:13 pmNot if some sort of precision is required - I rarely need it :-)

author: dentaku
author_rank: Frequent Contributor
timestamp: May 05, 2015, 03:58:31 pm
content: Quote from: Hero999 on May 04, 2015, 09:15:41 amInteresting.By the way, when manufacturers say rail-to-rail I'm assuming it's a bit of an exaggeration so what do you look for in a datasheet to see just how close to rail-to-rail an opamp is?

author: Howardlong
author_rank: Super Contributor
timestamp: May 05, 2015, 04:10:09 pm
content: Quote from: dentaku on May 05, 2015, 03:58:31 pmThe datasheet will give you the information you need, but in general, unloaded, the outputs will be within a few tens of mV. When significantly loaded, it's a different matter.Inputs on the other hand can even sometimes exceed the rails slightly. Again the datasheet is your source of information.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 05, 2015, 06:53:31 pm
content: There are usually three ranges (per rail) typical, corresponding to standard output stage designs. Darlington followers don't go closer than 1.2V, and typically run out of headroom in the 1.5 to 2V range. Many audio amplifiers are this way, because they are intended to run from +/-15V supplies, and +/-13Vpk is more than enough for any audio signal purpose. These usually have low distortion and full specifications (like a well controlled current limit).The next step up is a single follower, which gets within maybe 0.6 to 1V. Often, one side acts like this, because a PNP current source might be used to pull-up an NPN follower -- the NPN has higher beta, so is more suitable for driving the output. The pull-down might be a common-emitter NPN (as in the LM358, hence it can saturate nearly to V-), or a "boosted" combination (like a Sziklai pair, giving PNP behavior with the performance of the NPN).BTW, crappy PNPs were a characteristic of early bipolar circuits. For example, 74xx series TTL was entirely NPN (hence the crappy pull-up strength and logic signals biased towards GND). Fabbing PNP would've required an extra fab step, increasing cost and reducing yield. Early analog chips (most anything from the 300 and 700 series by LM, uA, etc. prefixes) used "lateral PNP", meaning they hacked a PNP transistor using a poor, sideways geometry, leading to minuscule hFE (typically 1-5) and symmetrical breakdown voltages (a benefit for some purposes, as this gives the full +/-30V input range of many op-amps and comparators). Modern bipolar processes include complementary and BiCMOS (good bipolar and CMOS together in one chip) so this isn't a problem anymore.True rail to rail capability is only attained with "open collector" (or drain, for CMOS) design. This is challenging because the output node becomes a gain node, which makes compensation complicated. Current limit is also poorly defined, because it becomes dependent on hFE and bulk resistance -- neither of which is very well controlled in an IC. (The ratios are well controlled, but it's very difficult to arrange a good ratio in this situation.)The same problem befalls LDO regulators, which have notoriously inaccurate current limits -- often enough only to survive startup and very momentary shorts, not long term stress.Design of the output stage itself is complicated, because in the complementary emitter follower (and circuits like it), it is easy and well defined, which side is conducting current -- one turns on and the other turns off. With independent common-emitter outputs, all the current control has to be designed perfectly, before reaching the outputs; and if you get that wrong, you might sink the full output stage current (which for an op-amp, might be around the current limit rating of 20mA+) straight from +V to -V accidentally, massively increasing power dissipation!Tim