Opamp vs. JFET buffer in LM386 amp

Started by mark2, June 10, 2024, 04:42:40 PM

Previous topic - Next topic

mark2

I'm wondering if somebody can point me in the right direction to help understand this:

  • The ruby amp, when buffered with a JFET, works great (schematic from ROG)
  • When buffered with a non-inverting TL071 at unity, it emits a tone. The tone changes if you modify the op amp's gain. Schematic below

Each were powered with a cheap wall wart (haven't yet tried a battery).

This SO answer regarding a different LM386 circuit, had me trying to put a decoupling cap on the 4.5V (second pic below) but only slightly changed the sound.

It's not a big deal since I can use a JFET, but I obviously don't understand what's happening and would like to learn, so I'd appreciate any shoves in the correct direction.






ElectricDruid

If it's producing an audible tone, then it's an oscillator. An oscillator requires two things: some gain, and some positive feedback.

The gain is easy, since you've got loads of that. Where the feedback is coming from is more tricky. That Stack Exchange thread suggested the bias supply, and suggested decoupling it. If you're going to try that (like in your second image) you need to reduce the value of the R1/R2 resistors. Try 10K.
The ground path is another common way signals can get from the output back to the input. Although you've shown us the schematic, we have no idea what the *layout* looks like, and it could well be a layout problem. Have you got input and output wires or board traces close to each other? Are they sharing a ground?

Finally, the SE thread also claims that the TL071 has a minimum supply voltage of 10V for some manufacturers parts. I don't remember that ever being a problem (I must have used *loads* of TL072's in pedal circuits...) but it might just be worth a check in the datasheet for the exact part you've got.

HTH

mark2

Thanks for the info. I'll try adjusting the resistors and thinking more about that (since I think I have a clue as to why that could be an issue but need to sit with it - but if not I may post back with another quesiton).

Yes, layout could certainly be an issue, but I've reproduced it on a (I think) sanely routed etched board as well as my hot mess of a breadboard and another prototype.

I have no idea where these TL071s came from, so maybe I'll try a 72 instead and see how that behaves.

Thanks again!

R.G.

You're getting bad advice from that link.
The TL07xx family is all covered by one datasheet, at least from TI. The TL071 and TL072 will not have different specs. The datasheet also says it works from +/- 2.5Vdc (that is, 5Vdc minimum), not 10V. See https://www.ti.com/lit/ds/symlink/tl071.pdf?ts=1718047843541&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTL071
This fact indicates that the rest of the responder's statements needs to be believed very cautiously, if at all.
9v batteries can produce significant currents -just not for very long. I once hooked a current meter across a fresh 9v and got about 1.5 amps for a short time, then it started tapering down as the battery discharged. The battery got hot doing this.
The data sheet for the LM386 (https://www.ti.com/lit/ds/snas545d/snas545d.pdf?ts=1718022421228&ref_url=https%253A%252F%252Fwww.google.com%252F) does say that the absolute maximum input voltage is +/- 400mV, so that part is worth worrying about. It would be easy enough to use a couple of resistors  and a pair of diodes to ground to limit the inputs to under 400mV.
The TL07xx series does have a hidden quirk. Its output can't swing closer than about 1.8V to either the + or - power supply. That's not a limitation in this circuit.
As to why it's oscillating when using a TL07xx and not with a JFET buffer; the JFET buffer will have a frequency response well up into 100s of MHz. The TL07xx buffer can't do that, because it has a high open loop gain and uses feedback to get down to low gains. The inherent trade-offs in doing this mean there are phase shifts introduced at the high end of the frequency range with the opamp that are not there with the JFET. But these phase shift oscillations tend to happen up at ultrasonic or even RF. An audible tone is often a form of motorboating, which is in turn a term for oscillation induced by feedback through an insufficiently decoupled power supply.
Te LM386 will need its own 47uf to 100uF decoupling electro, and a 0.01uF to 0.1uF ceramic as close to the LM386 + and - pins as you can get them. The TL07xx will also need a 0.01 to 0.1 ceramic as close to its power + and - pins as you can get them. 
Finally, you might (or might not) need to return the power supply (-) pin of the LM386 and the speaker return, and C4 to the power supply input capacitor negative with its own ground lead.  This will keep the V = I*R voltages from power trace resistance off the common ground to the TL07xx.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

PRR

Any time you put a preamp with a "power" amp, even a weeny un-loaded power amp like this, you have to really think about power supply sneak-back. Your first plan shows the opamp bias from half the power rail..... i.e. half the crap on the power rail comes into the opamp. The other end of the power rail is being hammered by the monster half-Amp surges in the '386's output stage. (Even un-loaded the little chip has cross-conduction glitches.)

Showing my age: look at any non-trivial tube guitar amp, even a Champ or Jr. There's a Main Cap near the 6V6, then one or several R-C filter stages to the first 12AX7 stage. (It does help that tube grids bias at zero, while many transistors {but not JFETs!} must be biased partway up the supply voltage.)
  • SUPPORTER

artofharmony

Thanks for posting this! I actually just designed a Noisy Cricket PCB with a TL071 buffer that had the same problem. The oscillation was RIDICULOUS on the breadboard, but somehow isn't as bad on the PCB. A friend used one in an amp build he did; he reported that there is oscillation when the amp is on, but nothing is plugged in. It also happens when the guitar volume is all the way down. Here's my project in Flux.ai in case it helps as a reference in diagnosing the issue: https://www.flux.ai/jwwitherspoon/noisy-cricket-amp. Best of luck!

Rob Strand

You might want to checkout,

Admittedly the speaker loads make ground issues a lot worse than a pedal.

When you add a buffer the layout of the ground also needs careful consideration.

The LM386 has quite poor supply rejection.   A 100nF cap on pin 7 (bypass) isn't going to be
anywhere near as good as a 10uF.

In the first post using 2x1M resistors for the VCC/2 opamp bias doesn't provide very good supply rejection either.   Using a separate Vcc/2 divider like the second circuit does help.   However in this case it doesn't appear to be the main issue.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.