Supply Bypassing and Noise Concerns for LM386-Based Pedal

Started by swamphorn, December 07, 2019, 07:48:52 PM

Previous topic - Next topic

swamphorn

Hi folks,

My goal is to design an LM386-based distortion like the Big Daddy[1] but with a bipolar preamp to sidestep the price and variability of JFETs. To this end I chose a bootstrapped common-emitter amplifier with a gain of approximately 8. I've tested this circuit on the breadboard and it sounds great--high gain with plenty of treble--but I've run into issues with oscillation and noise.

Initially I had low-frequency gain-dependent oscillation that seemed to be caused by an interaction between the amp stages. This was solved by adding a 100 Ohm resistor and 10uF capacitor (R1 and C1[2]) to isolate the preamp supply. But I still have high-frequency noise that persists regardless of gain and, oddly enough, a whistling tone that appears when the guitar's volume is turned all the way down. I suspect that this is an interaction between the preamp and the guitar, but it could just be that the line buzz normally swamps it out. Adding a small or large capacitor to the LM386's bypass pin has no effect on the noise. I do wonder if I should add a small capacitor on the base of the transistor to limit the high-frequency response?

[1] http://runoffgroove.com/grace.html
[2] Schematic


computerlen

#1
The 386 is capable of driving a speaker. I have built a number of them and found that they need a resistor and a capacitor  in series at the output pin to ground. I believe they are 10 ohms and .1 ufd

anotherjim

#2
Always worth trying swapping the input pins of a 386 over - make it inverting, if it's a high gain instability problem, it will be more stable. As you have an inverting preamp, inverting the 386 will make it non-inverting "true polarity" overall.


https://www.electrosmash.com/lm386-analysis


GibsonGM

The R and C from output to ground is called a "Zobel Network"...values vary, 10 ohms/.05u are shown in the design examples and you'll see it all over the place, like in the Ruby.  It's there for stability and should be included.
  • SUPPORTER
MXR Dist +, TS9/808, Easyvibe, Big Muff Pi, Blues Breaker, Guv'nor.  MOSFace, MOS Boost,  BJT boosts - LPB-2, buffers, Phuncgnosis, FF, Orange Sunshine & others, Bazz Fuss, Tonemender, Little Gem, Orange Squeezer, Ruby Tuby, filters, octaves, trems...

swamphorn

Quote from: anotherjim on December 08, 2019, 07:13:07 AM
Always worth trying swapping the input pins of a 386 over - make it inverting, if it's a high gain instability problem, it will be more stable. ...

This makes sense on the face of it and I did try swapping the pins initially, but grounding the positive input seemed to misbias the output and I got more of a gated fuzz sound than an overdrive. It seems that the datasheet does just this though[1], so I'll give it another crack. I wonder if I should connect the positive input through a capacitor to ground instead[2]?

Quote from: GibsonGM on December 08, 2019, 07:14:04 AM
The R and C from output to ground is called a "Zobel Network" ... It's there for stability and should be included.

Should a Zobel network even be necessary for a high-impedance (> 10kOhm), mostly resistive load? I thought the Zobel network was for stabilizing the amplifier for low, reactive loads.

[1] http://www.ti.com/lit/ds/symlink/lm386.pdf, Figure 22
[2] http://e2e.ti.com/support/audio/f/6/t/233812

computerlen


anotherjim

There is a chance a Zobel RC could help, but only by moving the current to voltage phase shift, it really is intended to offset a speakers inductance. Adding some resistance in series with the output pin could do a similar thing.

If the positive pin is just grounded, it might cause a DC offset internally. I would certainly try AC coupling it to ground with a cap, or a resistor sized to reduce input bias current -  at least 10k. Some mini amp designs have used the -input because it seems to be cleaner.


swamphorn

#7
Adding the Zobel network made no difference to the sound. But after somehow letting the magic smoke out of one of my '386's, I suspect there may be something wrong with the chips themselves. None of my five LM386-M chips work the same; some of them bias properly with the inverting input grounded; others work with the inputs switched but with very high distortion. In retrospect, I got them in a variety pack from a Chinese retailer on Amazon; it's entirely possible I have counterfeit chips[1]. I'll just have to shelve this project until I can get a more reliable source of LM386's. That, or redesign the pedal but with a discrete power amp stage, which I'd probably have more fun doing. I appreciate everyone's help.

[1] Oddly enough, the other chips that I received seem to be working properly--even the three PT2399's, and I've heard there's a problem with counterfeits there.

anotherjim

#8
Try finding JRC386 chips. Probably less chance of these being faked because they are still produced.

Edit - keep forgetting they had a name change, they are NJM386 now.

PRR

Most speakers are "high impedance" in the half-Mhz zone which is what the datasheet Zobel addresses. The '386 loves to be unstable up there. So you need the Zobel even if you don't have a low-Z load. (Some batches of '386 need it more than others.)

You really-really want to bypass the BYPASS pin!! Much less supply-crap trouble. And the audio gain function is not right without it. (Specifically different for the two inputs, which you observed, though as bias shift.)

The R-C decoupler to the preamp was smart. However 100r and 10uFd is 166Hz, not full-range. And marginal oscillations may appear higher (OR lower...). And it's only feeding a 20k load, and a volt of loss is no big deal. I'd try R1 as 1k, and C1 as 50uFd. (I like very stable rails.)

Of course if you play pot-luck on eBay, the plan may be fine and the chips are unlucky rejects. There are reputable vendors.

It's gonna squeal with gain of 300-1600 all in about an inch. Input and output wiring separation will be essential.

It is gonna distort with gain of 300-1600 up from guitar. You are asking for 5V-32V output with a 9V supply. _I_ would expect to put a gain pot between preamp and '386.

  • SUPPORTER

anotherjim

There's an applications note for the LM380 that has info worth reading -  it's not exactly the same as a 386, but there are similarities in the front end.
https://www.ti.com/lit/an/snaa086/snaa086.pdf
The LM380 also has a Bypass pin, but it isn't realy discussed and only shown used in the bridge amp schemes.