What causing this distortion in my 3-opamp Differential Amplifier Circuit? - Page 1
Forum section: electronics / beginners

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 12, 2017, 03:16:01 am
content: 1st picture is the circuit, i feed 0.333Vpp to Vpi+ and Vri- (Vri+ and Vpi- grounded), at gain 150 / 5 = 30, it should give me 10Vpp on the output ie Irdi+ and Ird-, which they do. but there is distortion at 1V on Irdi+ and 1.4V on Irdi- (on the 2nd picture). i tried loading the output with 10Kohm each with hope minimum current requirement is met, but the distortion is still there. all opamps are LM324 and powered from +15V and -15V. is this due to poor performance of LM324? or something i did wrong in the circuit? if its from LM324, i think the result is unacceptable. any thought anyone? thanks.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 12, 2017, 05:06:41 am
content: 1. What's common mode range look like for each amp?2. LM324, really? Ewwwwww! That may well be normal.Tim

author: amspire
author_rank: Super Contributor
timestamp: March 12, 2017, 05:24:28 am
content: I am not sure where your outputs are taken from. What is P3- and P3+?The 324 does have crossover distortion, but that looks extreme. Anyway one way to eliminate the LM324 crossover issue is to add pullup resistors on the opamp outputs so that the 324 outputs only ever sink current.

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 12, 2017, 06:17:02 am
content: Quote from: T3sl4co1l on March 12, 2017, 05:06:41 amfor the above case, the input is 0.333Vpp sine centered at half of it, ie 0.167V, further is attenuated 1/5X by resistive divider on the left side picture, so CM is close to 0V, where they can take ±15V CM.Quote from: T3sl4co1l on March 12, 2017, 05:06:41 ami'm clearing the stock, so i'll use what is still left, next time i'll buy TL074 or better for new stock.Quote from: amspire on March 12, 2017, 05:24:28 amsorry, it refers to another document file. P3- and P3+ is Irdi- and Irdi+ node respectively in the 1st picture above (outputs on the right side). P3- and P3+ are DIP pin on the PCB.Quote from: T3sl4co1l on March 12, 2017, 05:06:41 ammaybe the 30X gain also enlarge crossover distortion and first stage input (2 opamps at each channel on the left side that receives differential input) imbalance makes the crossover distortion not at 0V level. i need to think about this. thanks for your suggestion.

author: BrianHG
author_rank: Super Contributor
timestamp: March 12, 2017, 06:25:52 am
content: You are using a quad op-amp, for 1 source signal going thru on all 4, with approximately 1k series load + many quad op-amps internally share some constant current sources + a vref or 2 + share power-supply pins for all 4, quite a few of the regular op-amps out there will give you exactly the distortion you see, guaranteed.The way your op amps are connected + that the distortion for each one is approximately at the same point means the distortion is getting amplified to something larger than what you would normally see on one channel alone...You can try a much higher speed and quality op-amp with better output drive with better isolation between the 4 channels.Can I see a photo of your circuit board layout & power decoupling. Can you on one channel, leaving the others to note the distortion, scope the PWR & GND, ac coupled with some high gain of course right at the opamp?

author: amspire
author_rank: Super Contributor
timestamp: March 12, 2017, 06:56:17 am
content: The loads on the opamps is also pretty heavy - around 1K. Probably could multiply all the feedback resistors by 10 without a problem. Depending on the chip temperature, the outputs can start misbehaving at as low as 5mA - that is 5V peak output.Also the LM324 can definitely not drive 220 ohms well and the output stage has this followed by an unknown value capacitor. If that capacitor is too big, it could easily cause a problem with the final LM324.Look at the outputs of the first stage and see if there is any sign of distortion there, and if so, at what DC voltage is the distortion occurring at.

author: bson
author_rank: Unknown
timestamp: March 12, 2017, 07:11:31 am
content: The LM324 is class-B biased. To be expected.

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 12, 2017, 07:35:34 am
content: refer to picture. 1st picture is how the decoupling caps, not neat. but top pcb in 3d view is the 2nd picture. 3rd pic is probing on 1st stage input of U8, result = there is distortion. 4th pic is ripple on Vcc (+15V) rail, i dont think 33.6mV ripple will contribute any effect to the distortion. no? i guess this problem inherent to the LM324's property/design/topology. and 150X gain + floating differential input way, will exaggerate this issue.

author: amspire
author_rank: Super Contributor
timestamp: March 12, 2017, 07:49:30 am
content: Definitely more then crossover distortion. Are we seeing the correct DC voltages, or have you offset the waveforms to fit on the screen?

author: BrianHG
author_rank: Super Contributor
timestamp: March 12, 2017, 08:14:49 am
content: Note that the output of the op-amp supposed to be fairly immune to noise from the power supply pins. The noise you see is most likely the load dynamics as the op-amp switches from sinking current to sourcing current at the outputs. Note that your can try 2x 10uf caps for the Vcc & Vee of the op-amp, but this shouldn't do much as the distortion you see is conventional cross-over distortion of a ClassB output op-amp. You may soften the edge slightly, but not get rid of the problem.BUT....................................................................U8B and U8C are so perfect a mirror..................Something more is at play here. That positive spike of U8B so perfectly matches that negative spike on U8C in location with an offset, usually the crossover from positive drive and the negative crossover drive have a different slew rate or angle since the output of the op-amp isn't driven in such balance. That mirror is too perfect, especially for such a low quality op-amp.Can you show us what U8A is driving in your schematic.And probe U8B + and - input pin.Also, where is your scope GND tied?When probing U8B + and -, GND your scope to in-between the decoupling caps & nowhere else...

author: bson
author_rank: Unknown
timestamp: March 12, 2017, 10:23:39 am
content: The distortion isn't centered because it's loaded.Here's an illustration of class B distortion waveform open and loaded, at 8:37.

author: BrianHG
author_rank: Super Contributor
timestamp: March 12, 2017, 12:08:20 pm
content: Quote from: BrianHG on March 12, 2017, 08:14:49 amOk, after seeing that video with that ridiculous huge crossover distortion on the LM358 with only a 1k load, your problem is cross-over distortion.

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 12, 2017, 12:56:44 pm
content: Quote from: amspire on March 12, 2017, 06:56:17 ami dont get how you and BrianHG come up with 1K load, i only can see at least 10K termination/feedback to ground on each opamp output, on the 1st stage, the voltage swing is only 0.4V, hardly near the opamp limit of 13mA sink current. even with 1K load. 0.4V swing will be 0.4mA of current.Quote from: amspire on March 12, 2017, 06:56:17 ami put cap in sch only just in case i need to put filter cap there, but in reality i havent installed any capacitor there. 220ohm i put there to isolate voltage bias up front (see vd.png). changing the bias will not improve or worsen the distortion, at best the load of bias divider is 6K, the worst is 1K.Quote from: amspire on March 12, 2017, 07:49:30 ami've offset some/all channels to fit the screen to get maximum Vpp reading and better clarity of the distortion. you can see the channel marker on the left, some of them are offset 3 graticules below.Quote from: BrianHG on March 12, 2017, 08:14:49 ami guess thats because 3-opamp diff-amp nature of floating/connected/linked -ve input between U8B and U8C? ie R152 (1.8Kohm) there?Quote from: BrianHG on March 12, 2017, 08:14:49 amhere we go, see a1.png. U8A is driving a voltage divider bias (vd.png) and an NE5532 +ve input that acts as buffer (vb.png), so its pretty light imho. the U8D however is driving a voltage gain bjts v_amp_+ve.SchDoc (picture in a3.png), from my basic calculation, the worst case, the 50V voltage gain stage may cause the U8D to sink 5mA (when Q2b saturated), Q1b and C3b are indeed ommited in the pcb as stated.Quote from: BrianHG on March 12, 2017, 08:14:49 ammy probe gnd was tied to the edge of the board where i can grab the gnd plane. done with your setup, i soldered a wire to near the decoupler gnd, distortion is still there. the Vcc rail is a bit noisier i believe due to longer gnd clip + wire.yellow channel 1: Vcc (+15V) ripple AC coupled to scopecyan channel 2: signal at Vri-, Vri+ is floated (NC) hence grounded through R162, R154purple channel 3: probe at U8B +ve inputpurple channel 4: probe at U8C +ve inputDS1Z_QuickPrint1.pngyellow channel 1: same as above (not shown)cyan channel 2: same as abovepurple channel 3: probe at U8B -ve inputpurple channel 4: probe at U8C -ve inputDS1Z_QuickPrint1a.pngyellow channel 1: same as abovecyan channel 2: same as abovepurple channel 3: probe at U8B outputpurple channel 4: probe at U8C outputDS1Z_QuickPrint2.pngyellow channel 1: same as abovecyan channel 2: same as abovepurple channel 3: probe at U8A output (Irdi-)purple channel 4: probe at gain voltage output (Q3b's emitter) (not seen as its overlapped with CH3)DS1Z_QuickPrint5.pngas i change the input signal upward to be more +ve, the distortion is gone since they are occuring at fixed voltage. so i dont think its loading problem. as can be seen in DS1Z_QuickPrint3.png, DS1Z_QuickPrint4.png (setup same as DS1Z_QuickPrint2.png) and DS1Z_QuickPrint6.png, DS1Z_QuickPrint7.png (setup same as DS1Z_QuickPrint5.png)

author: BrianHG
author_rank: Super Contributor
timestamp: March 12, 2017, 01:49:30 pm
content: Can you do 1 last check, disconnect U8D's output and - input, short them together? I guess just place the op-amp back in the socket with those 2 pins bent out, or remove the solder on the bottom of the PCB.See if that changes the distortion pattern.

author: BrianHG
author_rank: Super Contributor
timestamp: March 12, 2017, 02:33:02 pm
content: Quote from: Mechatrommer on March 12, 2017, 12:56:44 pmLook at U8C's output, it's driving a 470 ohm resistor in series to a 1k pot. I assume that pot is adjusted somewhere near the center, so around 1k total. Now, U8A's output goes through a 10k, but, remember, the output is swinging to compensate that out to match the + input, so, in effect, at times along the waveform feeding that point, it appears to U8C's output that it's feeding a 1K load to GND, not 11k to GND. It would only look like a 11K to GND if U8A's output stayed at 0v, but it isn't, U8A's output is swinging in the opposite direction voltage wise making U8C's output look like that approximate 1K load to GND I and amspire described.If you watch the video posted above by 'bson', (if you are impatient, set the playback speed to 1.5x or 2x), he also has a 1k load on his output & other than his waveform goes balanced through the 0v center, his distortion is very close to yours. (Allowing for the V/div difference and timebase)

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 12, 2017, 04:31:01 pm
content: Quote from: BrianHG on March 12, 2017, 01:49:30 pmnot feasible as everything are soldered in, not using socket.Quote from: BrianHG on March 12, 2017, 02:33:02 pmfair enough, thanks for explanation, now i see it. but investigating further into U8C's output, its range is only somewhere 0.4Vpp range (the 0.333Vpp input i gave in the picture is the maximum input range it should take in real life operation), that makes the maximum current passing through 1K load is 0.4mA only, yet still far from dangerous region. correct?Quote from: amspire on March 12, 2017, 05:24:28 amthis! i added 10Kohm pulldown to -15V on U8C and U8B output and the diff_amp output improves significantly (see attached picture). thanks for sharing the trick... i choose pulldown instead of pullup as originally suggested because i see LM324 source current spec in datasheet is better than sink (40mA source instead of 15mA sink), i'm not sure why but i let LM324 to always source current (1.5mA give or take) to -15V.