8

I'm trying to make a small headphone amplifier, and I started out simple: I'm using a LM358 opamp to drive a push-pull stage with a pair of BD transistors.

I started by trying a single channel (only one of the sides of the headphone) so I could check it and then double it to the other channel.

Here's the diagram for the circuit I built:

enter image description here

The load impedance (my headphone speaker) is 32 ohms.

In the input, I added a 1K resistor to the ground (before the capacitor) just to provide some relevant input impedance, as the headphone output expects some.

The circuit keeps every DC point where it should be: The voltage in the opamp output is VCC/2, the voltage in the push-pull output (before the capacitor) is also VCC/2, and there's a constant 0.2V voltage across the emitter resistors (which gives a quiescent current of 10mA).

However, there's a strange distortion. When I play anything in a very low volume, the sound is perfect. If I turn the volume up, it starts distorting really badly all of sudden, specially in low to mid frequencies, and if I keep turning it up, the distortion get's weaker, and the sound seems better again (but still distorted).

Of course, If I turn it up even more it'll start distorting again as the output voltage swing will reach the max peak and will start clipping, just the classic overdrive.

If I play a (quiet) sine wave on it and then start turning up the volume, the impression that I get is that, at some point, a square wave of the same frequency is suddenly "mixed in" in the sound, but as keep turning the volume up, the square wave doesn't grow louder in the same pace as the sine wave, so the distortion gets less perceivable in contrast.

It doesn't sound like crossover distortion (I mean, it is similar to it in the actual sound but the scenario doesn't point to it), the transistors are well biased, even too much, 0.2V is a bit much for the voltage across the output resistors. And if this was so, there would be trouble in lower volumes too, but the sound is perfect.

Maybe the output stage is requiring too much current from the lm358 output?

But if it is, why this distortion doesn't grow worse and worse?

I can't figure this out and the simulations doesn't help, they just show clipping after the output amplitude reach +-2.4V, but with this amplitude I should get something near 80mW RMS in the headphone speaker, which should be quite loud.

This sounds like the amplitude I get in the high volumes before overdrive, so my guess is that this distortion I'm getting doesn't appear in the simulation at all.

Any ideas?

Thanks!

Ps.: If someone saw my trouble with lm358 in my last post, just ignore it, it was a simulator flaw, it works well in reality. When I say things work in the simulation is because I simulated it with both a 741 opamp and an ideal opamp, and the result is the same, that distortion doesn't appear.

Using a 741 in the place of this LM358 in the simulation, and using an AM voltage source with a 100Hz carrier and 1Hz modulation (just to have an increasing amplitude sine voltage in the input), I plotted the output voltage, and you can see that no distortion show up except from the overdrive when it clips:

Plot in the low volume range, the horizontal scale is 20ms/Div and the vertical scale is 100mV/Div:

enter image description here

Plot in the same time window but now with a 1V/Div vertical scale:

enter image description here

Plot with the same vertical scale as before but further in time (when the voltage of the AC source increases and reaches overdrive)

enter image description here

As you can see, no distortion appears before the overdrive

Here's the plot differential voltage over R5 in the same time window of that first plot and with a 200mV/Div vertical scale:

enter image description here

As it's visible here, in that time window, the PNP transistor reaches full cutoff but this causes no distortion on the actual push-pull output, as shown by that first plot.

user2934303
  • 743
  • 5
  • 20
  • What you describe is consistent with (a) low volume, operation fully class A with Q1/2 R5/6 conducting all the time, then (b) start of class B operation, as top or bottom cut off, suddenly changing the loop gain, then (c) still class B, but the constant crossover distortion is related to a larger audio signal, so a lower ratio of distortion. Simulate forensically, not just watching the output waveform, but also the differential voltage across R5 or Q1 VBE. R3/4 are superfluous, no harm, but no use either. Simulate at the same loading as you are listening, output current is important. – Neil_UK Mar 08 '18 at 06:53
  • Yes, I simulated using the same load I'm using in reality, but no distortion appears. The only distortion that appears in the simulation is the overdrive, when the output starts clipping, but before that, no distortion appears in any amplitudes, everything works well. – user2934303 Mar 08 '18 at 06:55
  • post a plot of input voltage, output voltage, and differential voltage across R5 with low, intermediate, high, and distorting amplitudes passing through the amplifier. – Neil_UK Mar 08 '18 at 07:02
  • How do I post it in the comments? – user2934303 Mar 08 '18 at 07:23
  • what is the headphone impedance? – Tony Stewart EE75 Mar 08 '18 at 07:31
  • @TonyStewart.EEsince'75 32 ohms – user2934303 Mar 08 '18 at 07:32
  • "I added a 1K resistor to the ground (before the capacitor) just to provide some relevant input impedance, as the headphone output expects some." - Input impedance of this amp is 1k Ohms, so another 1k to ground makes it 500 Ohms. Exactly what are you driving it with? – Bruce Abbott Mar 08 '18 at 07:36
  • @BruceAbbott The 1K resistor I added is in the other side of the capacitor, it doesn't affect the biasing of the opamp as it would if it was in the same side of the capacitor as the opamp inverting input – user2934303 Mar 08 '18 at 07:46
  • @Neil_UK I just plotted what you asked in the simulation using an AM source to create an increasing amplitude sine wave (I just used a low freq modulation). I added it in the post – user2934303 Mar 08 '18 at 07:47
  • I suspect your transistors have very low hFE or else your battery resistance is too high (assumption) if so add 10uF across battery – Tony Stewart EE75 Mar 08 '18 at 07:56
  • @Neil_UK I just added the plot of the differential voltage over R5 too. – user2934303 Mar 08 '18 at 08:02
  • @TonyStewart.EEsince'75 I also fed this circuit using a regulated power source and the result was the very same as with the battery – user2934303 Mar 08 '18 at 08:03
  • OK I thought there might be ripple on U1pin3... I would reduce 10 ohm to 1 and 57 to 0 and add caps across R7 R8 since you aren't using diode mulitplier – Tony Stewart EE75 Mar 08 '18 at 08:32
  • An oscilloscope would be really helpful for troubleshooting this. And really useful in general. You should consider getting one (or even program an Arduino as a data logger and use Excel/Libreoffice to plot) – user253751 Mar 08 '18 at 09:54
  • @TonyStewart.EEsince'75 Those caps should be large? The idea is to keep the voltage across them stable during signal injection? Can I add a single cap across both of them or do I have to add one cap across each resistor? – user2934303 Mar 08 '18 at 18:33
  • Yes large C, normally bias is done with low ESR diodes, so low ac voltage drop. You will get large series voltage drops from Re=10 and Rbias=470/hFE with a load of 32R essentially for hFE=100 the Vdrop(f) = (10+4.7)/(32+14.7)=31% Normally bias is done with 2 diodes to match Vbe to eliminate crossover with some adjustment for Vf and Vbe differences and thermally coupled diodes to BJT's to reduce thermal offsets that affect quiescent bias current. Using R makes Iq supply sensitive – Tony Stewart EE75 Mar 08 '18 at 18:43
  • @TonyStewart.EEsince'75 I was using diodes before, but the only diodes I find here don't match, their foward voltage is a little below what is needed to avoid crossover distortion – user2934303 Mar 08 '18 at 20:24
  • Op Amp crossover is cured by Pullup and push-pull driver crossover can be cured by negative feedback, Rail to Rail Op Amp (FET type) even better. But a simple driver has tradeoffs – Tony Stewart EE75 Mar 08 '18 at 21:17
  • try this on for size http://tinyurl.com/ybwrvpwp – Tony Stewart EE75 Mar 09 '18 at 02:13

1 Answers1

10

I suspect your problem is crossover distortion, but coming from the op amp rather than the output transistors. The LM358 datasheet says:-

To reduce the power supply current drain, the amplifiers have a class A output stage for small signal levels which converts to class B in a large signal mode...

For ac applications, where the load is capacitively coupled to the output of the amplifier, a resistor should be used, from the output of the amplifier to ground to increase the class A bias current and prevent crossover distortion.

I built your circuit and it exhibited crossover distortion approximately 0.2V below the signal center line, which explains why it suddenly appears as the volume is increased. I was able to move the distortion to the top or bottom of the waveform (where it is only barely noticeable at maximum volume) by connecting a 1kΩ resistor from the op amp output to Vcc or Ground.

Biasing the op amp into class A reduces peak drive voltage in one direction which causes the amplifier to clip asymmetrically, but it is still capable of producing over 2V peak undistorted output into 32Ω.

Bruce Abbott
  • 55,540
  • 1
  • 47
  • 89
  • 1
    This is the classic LM324 bug, the 358 is the same era. (I would also decouple pin 3 (Vin+) to eliminate any noise or feedback on it. –  Mar 08 '18 at 11:59
  • But the amp output is already being biased by those resistors in the push-pull stage. Would using a 741 instead solve this trouble? – user2934303 Mar 08 '18 at 18:34