DIY Stompboxes => Building your own stompbox => Topic started by: emstin1 on November 23, 2010, 05:17:01 PM

Title: LM386 pin 7 cap.
Post by: emstin1 on November 23, 2010, 05:17:01 PM
I've been messing around with the Smokey amp

I read the data sheet on the LM386( but I'm having trouble understanding what exactly putting a cap to ground on pin 7 does.  I mean, I understand what the effect is without it, real noisy modulation and what have you.  But what exactly is it doing?   It only seems needed when bypassing the 1.35k resistor between pins 1 and 8 for increased gain.  I just can't seem to find any information explaining it. Does the value have to be specific?  Can it be anything within a certain range? Can anyone help me understand what's going on here?  Thanks in advance.
Title: Re: LM386 pin 7 cap.
Post by: PRR on November 23, 2010, 07:07:06 PM
> what exactly putting a cap to ground on pin 7 does

You may have missed this graph:


The LM386 internal amplifier has FOUR inputs. The two obvious signal inputs pins 2 and 3. An internal connection to the output at pin 5; the leverage of this 15K resistor to the 1,500 or 150 ohm resistor sets the audio gain at 20 or 200. And the two 15K resistors up to the power supply pin so that the amp will set its DC idle output voltage to half of the power voltage.

Note this _direct_ connection to the power supply. Power supplies may have several types of crap. Hum/buzz if they come from wall-power. If the power supply sags, and the amp drives a load, then there will be some (distorted) audio on the power supply line.

We need the DC reference. We do NOT want buzz and audio-wobble coming into the amp.

That's why two 15K resistors with the joint brought out to a pin. Put a cap on there, it will float to the DC level, but average-out any rapid swings (like buzz and audio).

On the chart, "C7" is the cap from pin 7 to ground. With no cap, any supply crap comes into the amp and levers to the output at "6dB", which means half voltage. If you have 1V of crap on the power, there is 0.5V crap on the output.

If power supply is very clean and solid, no pin 7 cap is needed. This is shown in datasheet page 5 top left: Minimum Parts.

Say you build that with a crappy supply, and the buzz is 10 times (20dB) higher than you like. You could clean-up the supply, but being a Power amp Power supply this will require a BIG cap which may cost a whole dollar. Or you could read the graph and find a cap which will give 26dB (20dB more than the inherent 6dB) PSRR at 120Hz buzz frequency. Looks like 4uFd or 5uFd. Then you look at a price list to see if 4 or 5 or 10 uFd makes a difference in price. For DIY quantity, prices run like this:

470pf $0.15
0.1uF $0.25
10uF $0.25
47uF $0.25
100uF $0.25 (

If you buy boxloads you get a better per-each price:
10uF $0.04 (500+ $0.02)
47uF $0.04
68uF $0.04 (
Is a smaller cap cheaper? No, electrolytic is the cheapest kind, and 10uFd (or so) is as small as it is worth making. For a lower uFd value you turn to Film caps, and they cost more:
0.47uF $0.22 (

So the deal with the cap on pin 7: maybe you don't need it. If you do, you stick on 10uFd or 100uFd, whatever is handy.
Title: Re: LM386 pin 7 cap.
Post by: brett on November 23, 2010, 07:08:53 PM
I'm no expert, but it seems that a cap from pin 7 provides supply de-coupling (especially high frequency decoupling).  This particular method, where the cap is placed between 2 resistors, requires a much smaller cap than if a cap was connected directly to V+.  
You'll see this method used in vintage pedals because electro caps (e.g. 47uF) were large, expensive and unreliable relative to small greencaps (e.g. 0.1uF).  I think the Bosstone ses a similar approach.  Roger Mayer also used it in some of Jimi H's pedals.
Aim for RxC > 1 kuF.  For R=15k, 0.1uF is fine.  0.01uF is too small.  10uF works ok, but is over-the-top.  I'd use a film cap.
Title: Re: LM386 pin 7 cap.
Post by: emstin1 on November 23, 2010, 10:37:20 PM
So if I understand, it helps to compensate for a dirty power supply by cleaning it up before it gets to the output. I might be phrasing that wrong, but I think I get the gist of whats going on.
Title: Re: LM386 pin 7 cap.
Post by: brett on November 24, 2010, 06:56:44 PM
that's close. 
It's more about cutting noise before it gets to the input (if it gets to the input it gets amplified through to the output).
Title: Re: LM386 pin 7 cap.
Post by: emstin1 on November 24, 2010, 08:16:13 PM
OK I see whats going on now.  Thanks a lot everyone!