LM386 amp. Simple question. Feedback resistor

Started by brett, November 01, 2023, 02:51:11 AM

Previous topic - Next topic

brett

Hi.  I'm building an LM386 amp. 
Really simple.  Input buffer = emitter follower (330k impedance).
Then a 10k Log volume pot.
LM386 - speaker.

Not interested in a gain control.  So.... what value for the feedback/bypass resistor?
Open = gain of 20.
1k = gain of 50
0 ohms = gain of 200.

Is 1k a fair choice for not-particularly-hot pickups?
Will gain of 50 leave me wanting more sustain/crunch?

Thanks!
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

FiveseveN

Well it entirely depends on how clean you want it to be.
x20 is already enough to distort if you only have 9V to work with, and the 386 can only swing to a fraction of that. See Figure 6-3. Output Voltage vs Supply Voltage.
Breadboard and tweak to taste.
Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

GibsonGM

How about putting a 1k pot in there, dialing it in to taste, and replace the pot w/fixed resistor?
  • 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...

antonis

Just an info of LM386 gain calculation..



Any resistor placed across pins 1 & 8 raises the gain over x21 (due to lowering 1k35 resistor equivalent value) where any resistor placed across pins 1 & 5 (preferably in series with a DC blocking cap) lowers the gain..
(going down to lower than x9 gain is not advisable due to instability issues..)
Of course, a combination of the above could work for a very precise gain setting.. :icon_wink:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

brett

#4
Hi.  All good answers (wire a pot then choose a useful value).
But now I'm confused about other aspects of gain.
I'd "sort of" known what Antonis said about bypassing the 1.35k resistor between pins 1 and 8. 
It raises twice the ratio of the fixed 15k:(150+Rbypassed) (+1?) from 20 up to 200 (at minimal resistance).

I didn't mention that this build also has the "bass boost" option explained in the datasheets (TI datasheet, circuit marked Bass Boost +6dB, figures 9-9 and 9-10), that bypasses the 15k resistor.  My understanding is that it's a treble cut (10k series resistor and 0.033uF cap, with Fc around 400 Hz).

Question: with low frequencies being "blocked" by the RC feedback, I figure it should be a regular "Gain of 20" circuit.  But it has gain of 26.  Why? 

--The graph DOES show the expected gain of 19x at frequencies well above the Fc (ie 2x(15k||10k/1.5k)+1)--

Any and all advice is welcome.
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

antonis

#5
I'm sorry but you lost me..

You can't get gain higher than x21 by simply shunting Rf with an impedance of whichever value..

(just consider it as a non-inverting op-amp configuration with extrinsic Rs and 2XRf ..)
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Dormammu

Quote from: brett on November 01, 2023, 02:51:11 AMIs 1k a fair choice for not-particularly-hot pickups.
I think — this is the right decision.

Quote from: GibsonGM on November 01, 2023, 06:37:47 AMHow about putting a 1k pot in there, dialing it in to taste, and replace the pot w/fixed resistor?
This will also help to better understand the issue.


brett

Sorry Antonis.  I've explained it poorly.
RE:
QuoteYou can't get gain higher than x21 by simply shunting Rf with an impedance of whichever value.."
I might be wrong, but I think the point of shunting Rf is lowering the gain.  That's why I referred to the "bass boost" circuit as really being a treble cut.  But how does it achieve a gain of 26?  As you say, shunting Rf can't increase the gain.  Can it?
The circuit and a graph of the gain vs frequency is in the Texas Instruments Datasheet/App note for the LM386 here.
https://www.ti.com/lit/ds/symlink/lm386.pdf?ts=1698903967298&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252Fzh-tw%252FLM386
Quite possibly I'm thinking of it being more like an op-amp than it is.  Feedback from the output in this case isn't going to the inverted input.  It goes to Pin 1, which seems to be a "summing point" between Rs and Rf.  So "shunting" Rf might not be the only thing it's doing.

Thanks so much!
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

Dormammu

Quote from: brett on November 02, 2023, 06:58:59 AMSorry Antonis.  I've explained it poorly.
RE:
QuoteYou can't get gain higher than x21 by simply shunting Rf with an impedance of whichever value.."
I might be wrong, but I think the point of shunting Rf is lowering the gain.  That's why I referred to the "bass boost" circuit as really being a treble cut.  But how does it achieve a gain of 26?  As you say, shunting Rf can't increase the gain.  Can it?
The circuit and a graph of the gain vs frequency is in the Texas Instruments Datasheet/App note for the LM386 here.

Quite possibly I'm thinking of it being more like an op-amp than it is.  Feedback from the output in this case isn't going to the inverted input.  It goes to Pin 1, which seems to be a "summing point" between Rs and Rf.  So "shunting" Rf might not be the only thing it's doing.

Thanks so much!

Yes, you're wrong.
Shunting Rf gives an increase in gain.  Study the T-bridge feedback network for the op-amp.
It can be made in a truncated form, without the left shoulder.
The opposite current branches off to ground.
I can't say for sure about LM386, because... I'm not familiar with this chip.
But I think something can be found out through natural experiments. In the shunt circuit, it is necessary to use a DC blocking cap so as not to disrupt the bias of the chip.

antonis

Quote from: brett on November 02, 2023, 06:58:59 AMI might be wrong, but I think the point of shunting Rf is lowering the gain.

That's right..!! :icon_wink:
What I said is " you can't get gain higher than x21 by simply shunting Rf with an impedance of whichever value", meaning that X21 is the max gain value for Rf = 15k..
Any impedance set in parallel with Rf lowers the gain, 'cause new (equivalent) Rf value is lower than the initial one..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

antonis

Quote from: Dormammu on November 02, 2023, 07:50:09 AMShunting Rf gives an increase in gain.  Study the T-bridge feedback network for the op-amp.

Terminology isn't your strong point, is it..?? :icon_mrgreen:



(A) Green circled 100k resistor SHUNTS Rf..!!
(B) Green circled 1.02k resistor shunts nothing..!!
(unless you're confused with virtual ground and real ground and you think than 1.02k resistor shunts the left-hand 100k resistor - in such a case I'd suggest you to connect 1.02k resistor lower leg to inverting input to see if you really get 10MΩ or just 101k..)

P.S.
I'm a bit tired trying to preempt your fallacies so could you plz stop it..?? :icon_mrgreen:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Dormammu

#11
Quote from: antonis on November 02, 2023, 08:50:44 AM
Quote from: Dormammu on November 02, 2023, 07:50:09 AMShunting Rf gives an increase in gain.  Study the T-bridge feedback network for the op-amp.



(A) Green circled 100k resistor SHUNTS Rf..!!
(B) Green circled 1.02k resistor shunts nothing..!!

Try to build something like MXR+ and spin the pot inside oval — then you can find out what happens to the gain.
The term "shunting" is not entirely correct, but the idea should be clear, to even a less savvy person.



antonis

Feedback resistor (R4 in MXR+) lies entirelly OUTSIDE the oval space..!!
(at least, that's the idea of a less savvy person like myself..)

P.S.
Should we need another bunch of #60 posts till you admit your falseness..??
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Dormammu

Quote from: antonis on November 02, 2023, 09:41:53 AMFeedback resistor (R4 in MXR+) lies entirelly OUTSIDE the oval space..!!
This is not important, the gain manipulation method associated with Rf is shown.
As OP asked.

antonis

Another thread to be split..
(duck_arse might love you a lot..) :icon_wink:

P.S.
I propose a sticky thread including all Dormammu's revolutionary chaos theory chapters..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

PRR

Quote from: brett on November 02, 2023, 06:58:59 AMpossibly I'm thinking of it being more like an op-amp than it is. 

Yes.

There are TWO 15k resistors. If pin 7 is bypassed as the sheet tells you, the combined Rf is 30k, not 15k. We rarely connect an all-purpose op-amp this way; but when trying to minimize total cost of a pocket radio (the '386's aim), this connection is sweet.

Seems to me there is also a +1, or not, depending which input pin you use.

> Not interested in a gain control.

Unless your amplifier is unforgivably lame (the earliest telephones), you need a gain control. If you point to the one on your guitar (your specific guitar), then you want trial-and-fudge with a temporary gain changer in the amp to find your happy spot.
  • SUPPORTER

drdn0

Quote from: brett on November 01, 2023, 02:51:11 AMHi.  I'm building an LM386 amp. 
Really simple.  Input buffer = emitter follower (330k impedance).
Then a 10k Log volume pot.
LM386 - speaker.

Not interested in a gain control.  So.... what value for the feedback/bypass resistor?
Open = gain of 20.
1k = gain of 50
0 ohms = gain of 200.

Is 1k a fair choice for not-particularly-hot pickups?
Will gain of 50 leave me wanting more sustain/crunch?

Thanks!

I've spent ages messing around with the 386 trying to get some useful sounds out of it. Unbuffered, I found being able to choose between gains of 20 (1-8 open) and 60 (IIRC 330R in series with a 10uf cap across 1-8) gave me the nicest choice of gains - this was however driving a high impedance amp, not a speaker directly.

Don't forget absolutely overkill power filtering, decoupling right on the IC pins, take advantage of the bypass pin (throw in a 10uf cap to ground from pin 7) and throw in some sort of RF filter right at the input to try and get the noise levels down as much as possible. You will need to sacrifice a lot of low frequency response or it sounds pretty average.

What about just throwing a dip switch + trimpot on board to dial it in where you like the sound of it best?

Dormammu

#17
Quote from: antonis on November 01, 2023, 06:49:34 AMAny resistor placed across pins 1 & 8 raises the gain over x21 (due to lowering 1k35 resistor equivalent value) where any resistor placed across pins 1 & 5 (preferably in series with a DC blocking cap) lowers the gain..
Are you sure that ANY resistor is suitable for this? Even more than 100k, for example?
"Interesting" vision of shunting. :icon_mrgreen:  :icon_mrgreen:


antonis

Do you consider bullshiting constructive enough for members without your superior savvy..?? :icon_mrgreen:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

ElectricDruid

#19
Quote from: Dormammu on November 03, 2023, 06:21:52 AMAre you sure that ANY resistor is suitable for this? Even more than 100k, for example?
Yes, *any* resistor in parallel with another resistor will reduce the overall resistance, even if not much. Go and check the formula for parallel resitances.

Quote"Interesting" vision of shunting. :icon_mrgreen:  :icon_mrgreen:
Is that another of your little pointers to indicate you're trolling?