LM386 Gain Control

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
After some research, I put together the attachment to document my understanding of setting the gain with pins 1 and 8 (but not pin 5) on the LM386. Because of my limited math skills, I created a spreadsheet to calculate the gain on any value resistor used in series with a 10 μF capacitor. My spreadsheet gives the (essentially) correct answer for no resistor as 201, and for a 1 MΩ resistor as 21, but it calculates the gain with a 1200 Ω resistor as 39.2, which contradicts the datasheet.

Is my formula wrong, or is the datasheet just an approximation?
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
If I had an LM386 then I would simply test it to see how much is the gain with the 1.2k resistor in series with the 10uF capacitor.
Why don't you do it then let us know?

I found an article about boosting the gain of an LM386. It has this formula:
 

Attachments

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
Here are my test results.

pins 1 and 8 open: input = .004V, output = .07V, gain = 17.5
pins 1 and 8 bypassed with 10 μF cap: input = .002V, output = .16V, gain = 80
pins 1 and 8 bypassed with 10 μF cap and 1.2 k resistor in series: input = .0025 V, output = .1 V, gain = 40

As you can see, when I increased the gain, the input sagged. Of the three measurements, the gain of 80 was the most off from the datasheet (200). The other two were closer.

I am attaching the schematic for reference. For the tests, VR1 was at minimum attenuation. Instead of a mic, I used a 1 kHz sine wave for the input.
 

Attachments

Last edited:

Audioguru

Joined Dec 20, 2007
11,248
Your levels are much too low. Then interference and hiss make the results wrong.
Since your volume control was set to zero but the input and output were not zero then the volume control or your breadboard contacts are defective. SOLDER IT on a pcb and use a good volume control!

If your 9V is accurate then the output at clipping is 6Vp-p which is 2.12V RMS so why is your output 18 times less at only 0.07V to 0.16V?

Did you measure the signals with a multimeter that is accurate only at 50Hz and 60Hz?
Use an oscilloscope instead then you can see clipping and accurately see all frequencies.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
Your levels are much too low. Then interference and hiss make the results wrong.
Since your volume control was set to zero but the input and output were not zero then the volume control or your breadboard contacts are defective. SOLDER IT on a pcb and use a good volume control!

If your 9V is accurate then the output at clipping is 6Vp-p which is 2.12V RMS so why is your output 18 times less at only 0.07V to 0.16V?

Did you measure the signals with a multimeter that is accurate only at 50Hz and 60Hz?
Use an oscilloscope instead then you can see clipping and accurately see all frequencies.
The amp is soldered on perfboard. The pot is set for minimum attenuation so it is effectively absent from the circuit. I measured the inputs and outputs with my old dual trace scope. The battery supply (under load) is 8.27 V.

The amp heavily loads the sine wave generator. Under no load, the generator output is about .5 Vpp.
 

Audioguru

Joined Dec 20, 2007
11,248
The pot is set for minimum attenuation so it is effectively absent from the circuit.
It is not absent since it is shorting the input of the amplifier to ground then the amplifier has no input signal (but yours has an input so the volume control is defective or is wired wrong).

The amp heavily loads the sine wave generator.
Impossible.
The input resistance of the LM386 power amp is 50k ohms and you have a 10k ohms volume control parallel to it so the load on the generator is only 8.33k ohms to 10k ohms which is NOT A HEAVY LOAD.

Please post your detailed schematic so we can see what is shorting what.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
It is not absent since it is shorting the input of the amplifier to ground then the amplifier has no input signal (but yours has an input so the volume control is defective or is wired wrong).


Impossible.
The input resistance of the LM386 power amp is 50k ohms and you have a 10k ohms volume control parallel to it so the load on the generator is only 8.33k ohms to 10k ohms which is NOT A HEAVY LOAD.

Please post your detailed schematic so we can see what is shorting what.
The schematics for the amp and the sine wave generator are in post number 3. Thanks.
 

Audioguru

Joined Dec 20, 2007
11,248
The schematics for the amp and the sine wave generator are in post number 3. Thanks.
if you remove R1 that powers the Jfet in the electret mic then the input resistance is the 10k volume control parallel with the 50k input resistance of the LM386 which is 8.33 k ohms to 10k ohms.
ANY generator can easily drive it. Why did you say that "The amp heavily loads the sine wave generator"?
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
if you remove R1 that powers the Jfet in the electret mic then the input resistance is the 10k volume control parallel with the 50k input resistance of the LM386 which is 8.33 k ohms to 10k ohms.
ANY generator can easily drive it. Why did you say that "The amp heavily loads the sine wave generator"?
Because when I disconnect the oscillator's output from the amp's input, the amplitude of the oscillator jumps to .5 Vpp.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
I hadn't removed R1, and when I did, it reduced the loading on the oscillator, but not much. With the output of the oscillator connected to the amp input, the amplitude is .014 Vpp. With the amp disconnected, the amplitude of the oscillator is .5 Vpp.

Maybe there's something wrong with the oscillator; I built it from the Mims drawing.
 
Last edited:
Top