How to Calculate LM386 gain?

Thread Starter

disney_snoopy

Joined Feb 19, 2009
28
Ron H,
The software u used is Microsim??? Is there any free trial package for student and is there any LM386 on it?

Well as u know im a student and im sure i cant afford to buy an original full version. If there is any freeware of LM386 can let me know??? I need it for my final year project simulation.

Thank You.
 

thatoneguy

Joined Feb 19, 2009
6,359
See Audioguru's post Here Regarding max output.

For multisim, a student version is available http://www.ni.com/multisim/]HERE. I didn't check he matrix to see which features it has, but I've heard it is as good as most other SPICE programs around the same price (free).

The Power Pro Edition is nifty for rapid design verification, and has a huge library. I wasn't fully paying attention when I horked the LM386. Abuse of software, 10 yard penalty. Employers are how that is usually obtained.
 

Ron H

Joined Apr 14, 2005
7,063
Ron H,
The software u used is Microsim??? Is there any free trial package for student and is there any LM386 on it?

Well as u know im a student and im sure i cant afford to buy an original full version. If there is any freeware of LM386 can let me know??? I need it for my final year project simulation.

Thank You.
I use LTspice. Free and uncastrated. They do not have an LM386 model in their library, but you can easily add models from other manufacturers. If you decide to try LTspice, you can come here for help.
 

Audioguru

Joined Dec 20, 2007
11,248
Hi Thatoneguy,

I have replace the sine wave generator from the microphone and my probe was connect to the speaker. And i plug in the 0.25V from sine wave generator. However, my output was 3.02V from the oscilloscope instead of 5V that u said. Another point is my supply voltage is 6V from 4 AA battery.

Can u tell me why my gain is only 15 compare than what u said gain=20(5V at output).
Look at the curves of Peak To Peak Output Voltage Swing on the datasheet of the LM386.
If your supply is 6V (a battery voltage drops as the battery is used) then the output is typically 5V p-p without a load and is 4V p-p with an 8 ohm load.

Your 3.02V measurement might be average or RMS instead of peak-to-peak.

You cannot measure gain when the output of the amplifier is clipping. Turn down the input level.
 

Thread Starter

disney_snoopy

Joined Feb 19, 2009
28
Look at the curves of Peak To Peak Output Voltage Swing on the datasheet of the LM386.
If your supply is 6V (a battery voltage drops as the battery is used) then the output is typically 5V p-p without a load and is 4V p-p with an 8 ohm load.

Your 3.02V measurement might be average or RMS instead of peak-to-peak.

You cannot measure gain when the output of the amplifier is clipping. Turn down the input level.
Turn down the input level??? how to turn down? can explain further?

However, my speaker were 8ohm load. Plz refer my screenshot and comment...
 

Attachments

Thread Starter

disney_snoopy

Joined Feb 19, 2009
28
I use LTspice. Free and uncastrated. They do not have an LM386 model in their library, but you can easily add models from other manufacturers. If you decide to try LTspice, you can come here for help.

Hi Ron H,

If i would like to try and use the LTSpice, can u teach me how to install it and teach me how to add LM386 device in the software???

As i was no other wayz to do in order to settle my fyp...

Thank you.
 

Thread Starter

disney_snoopy

Joined Feb 19, 2009
28
See Audioguru's post Here Regarding max output.

For multisim, a student version is available http://www.ni.com/multisim/]HERE. I didn't check he matrix to see which features it has, but I've heard it is as good as most other SPICE programs around the same price (free).

The Power Pro Edition is nifty for rapid design verification, and has a huge library. I wasn't fully paying attention when I horked the LM386. Abuse of software, 10 yard penalty. Employers are how that is usually obtained.
Thatoneguy,

why i click on the link but there are error and not found on the webpage?
 

Ron H

Joined Apr 14, 2005
7,063
Hi Ron H,

If i would like to try and use the LTSpice, can u teach me how to install it and teach me how to add LM386 device in the software???

As i was no other wayz to do in order to settle my fyp...

Thank you.
Sure.
LTspice installs itself, and puts an icon on your desktop. I already told you where to find it. See the attached file for details on how to place an LM386 on a schematic.
 

Attachments

Last edited:

Audioguru

Joined Dec 20, 2007
11,248
The output of the LM386 is clipping badly as shown on your 'scope. Turn down the input level so that the output is a smooth sine-wave without the top nor bottom showing clipping.
 

Ron H

Joined Apr 14, 2005
7,063
I also have a symbol for LM386, which is makes the sim slightly simpler and cleaner. Copy and paste the following code into Notepad and save the file as C:\LTC\SwCADIII\lib\sym\misc\LM386.asy.

Rich (BB code):
Version 4
SymbolType CELL
LINE Normal -64 -63 64 0
LINE Normal -64 65 64 0
LINE Normal -64 -63 -64 65
LINE Normal -60 -48 -52 -48
LINE Normal -60 48 -52 48
LINE Normal -56 52 -56 44
LINE Normal -48 -80 -48 -55
LINE Normal -48 80 -48 57
LINE Normal -44 -68 -36 -68
LINE Normal -40 -72 -40 -64
LINE Normal -44 68 -36 68
LINE Normal -16 -39 -16 -64
LINE Normal 0 32 0 48
LINE Normal 48 -8 48 -32
SYMATTR Value LM386
SYMATTR Prefix X
SYMATTR ModelFile LM386.sub
SYMATTR Value2 LM386
SYMATTR Description Low power audio amplifier
PIN -16 -64 LEFT 8
PINATTR PinName g1
PINATTR SpiceOrder 1
PIN -64 -48 NONE 0
PINATTR PinName In-
PINATTR SpiceOrder 2
PIN -64 48 NONE 0
PINATTR PinName In+
PINATTR SpiceOrder 3
PIN -48 80 NONE 0
PINATTR PinName V-
PINATTR SpiceOrder 4
PIN 64 0 NONE 0
PINATTR PinName OUT
PINATTR SpiceOrder 5
PIN -48 -80 NONE 0
PINATTR PinName V+
PINATTR SpiceOrder 6
PIN 0 48 LEFT 8
PINATTR PinName bp
PINATTR SpiceOrder 7
PIN 48 -32 LEFT 8
PINATTR PinName g8
PINATTR SpiceOrder 8
The next time you open LTspice, LM386 will show up as a symbol in the [Misc] library of the Select Component Symbol window. You can select it and put it on the schematic. LM386.asy calls the LM386.sub file, so you don't have to invoke it with a separate .lib option.
 

Thread Starter

disney_snoopy

Joined Feb 19, 2009
28
The output of the LM386 is clipping badly as shown on your 'scope. Turn down the input level so that the output is a smooth sine-wave without the top nor bottom showing clipping.
Turn down the input level?
Izit u mean the 0.25V Vamp that from the function generator?

If not then can u explain what does input level mean.

Thank You.
 

Audioguru

Joined Dec 20, 2007
11,248
Turn down the input level?
Izit u mean the 0.25V Vamp that from the function generator?
If the function generator is the input signal and it has a peak of 0.25V (but is it 0.25V p-p or is it 0.25V RMS?) then the max output is 0.25V x 20= 5V.
Your 'scope shows a max output of about 3.5V p-p so maybe the input is too high at 0.25V peak.
If the input level is reduced to 175mV peak then maybe the amplifier will not clip.
 

Thread Starter

disney_snoopy

Joined Feb 19, 2009
28
If the function generator is the input signal and it has a peak of 0.25V (but is it 0.25V p-p or is it 0.25V RMS?) then the max output is 0.25V x 20= 5V.
Your 'scope shows a max output of about 3.5V p-p so maybe the input is too high at 0.25V peak.
If the input level is reduced to 175mV peak then maybe the amplifier will not clip.
but unfortunately,

my college function generator min Vamp is 0.24V. I hace try to adjust to smaller Vamp but i cant...
is it my circuit problem?

Do u need me to draw attach my circuit design?
 

Ron H

Joined Apr 14, 2005
7,063
but unfortunately,

my college function generator min Vamp is 0.24V. I hace try to adjust to smaller Vamp but i cant...
is it my circuit problem?

Do u need me to draw attach my circuit design?
Put a voltage divider (attenuator) between the generator and the amplifier input.
Hint: You will need two resistors.
 
Top