LM386 pin 7 cap.

Started by emstin1, November 23, 2010, 05:17:01 PM

Previous topic - Next topic

emstin1

I've been messing around with the Smokey amp http://www.beavisaudio.com/projects/NoisyCricket/oldpics/SmokeyTone.gif

I read the data sheet on the LM386(http://www.biltek.tubitak.gov.tr/gelisim/elektronik/dosyalar/6/LM386.pdf) 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.

PRR

> 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.
  • SUPPORTER

brett

Hi
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.
cheers
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

emstin1

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.

brett

Hi
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).
cheers
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

emstin1

OK I see whats going on now.  Thanks a lot everyone!

pee-j

in 2014, redeyprep posted an entire article, see:  https://redeyeprep.wordpress.com/2014/08/22/adventures-with-the-lm386-part-ii/
and he goes for 10u, not 100n (0.1u) ...

since it looks like the 100nF has long become the consensus, I thought it'd be worth copying this link here...
I'll try it anyway...

Rob Strand

#7
Quote from: pee-j on June 03, 2022, 05:33:21 PM
in 2014, redeyprep posted an entire article, see:  https://redeyeprep.wordpress.com/2014/08/22/adventures-with-the-lm386-part-ii/
and he goes for 10u, not 100n (0.1u) ...

since it looks like the 100nF has long become the consensus, I thought it'd be worth copying this link here...
I'll try it anyway...

100nF will remove hiss and buzz on the power rail but it's not going to be enough for hum on the power.    These days a lot of people are using regulated power supplies so there's virtually no hum and people get away with smaller caps.   The 100nF might help reduce some forms of oscillation but past history for LM386 chips shows caps across the supply help the most here.

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

ElectricDruid

+1 what Rob said.

100nF and 100uF aren't really doing the same job, and I quite often use *both* caps in parallel on pedals. The big cap provides a nice low cutoff frequency that can reduce mains hum. However, big electrolytic caps aren't great at high frequencies. So then the little 100nF provides a simple path to ground for ultrasonics and radio frequencies to keep all that crud out of the circuit.

You might *need* one, or the other, but you might as well use both and be sure.

amz-fx

100nF electrolytic capacitor:

https://www.mouser.com/ProductDetail/Wurth-Elektronik/860010672001?qs=0KOYDY2FL2%252BAjnDJgnKoow%3D%3D

I have some of those as well as the 220nF and 470nF values of the same style.

OTOH, I normally use a film capacitor for any value under 1uF.

Best regards, Jack