LM386 input level

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I have recently built a power amp using the LM386. I have built several of the circuits from the datasheet including the one below which has a voltage gain of 20.

lm386-20.gif


As I want to feed line level to the input, this would exceed the amplifiers maximum input voltage of 0.8V peak to peak.

Would the potentiometer at the amplifiers input be able to reduce the voltage level that reaches the amplifiers input so that the signal does not distort?
 
.
Here ya go. Before you read anything else scroll down and look at the first image. Or come to think of it don't read anything at all, the picture tells the story.

Measuring the Sine Wave

Your meter reads "calculated RMS" voltage, which for practical purposes is the same as the RMS value referenced.

Sudden thought. "Line level" is nominally one volt. Do you have good reason to believe that the 0.8 volt figure you mention is, in fact, peak-to-peak? If it's the voltage your meter showed you then it's not, unless you have a peak-to-peak meter.

In audio we're not often concerned with peak-to-peak voltage, except in power supplies. A transformer's AC output voltage rectifies into DC at the AC peak value. That is:

AC output voltage (meter reading) x 1.414 = AC peak output voltage = Rectified DC Level

I can't offhand think of any other need to know peak voltages. Note that 1.414 is the inverse of 0.707.
.
 
Last edited:
If a signal has a voltage of 0.8V peak to peak, does this mean that the amplifier must be able to handle an input power of 0.8V, or 0.4V?

The entire audio world orbits around the magical-mystery figure of line level, which is nominally (i.e. approximately) one volt. Nearly everything either/and/or expects a line level input, or has a line level output. That's a one-volt meter reading, peak-to-peak doesn't enter in.

Rule of thumb: Unless otherwise stated amplifiers develop their full output when the input is line level.

If you already have a line level signal then you wouldn't preamp it. You'd either send it to a mixer or other device, or directly to an amplifier.

<< If a signal has a voltage of 0.8V peak to peak, does this mean that the amplifier must be able to handle an input power of 0.8V, or 0.4V? >>

It would mean 0.8 volts, except...

...it means neither, because it doesn't work that way. You don't deal with peak-to-peak voltages. You use your meter reading, or the published specifications for the equipment.

By the way, power and voltage are two different things. Best not to mix terms.
.
 
Last edited:
Would the potentiometer at the amplifiers input be able to reduce the voltage level that reaches the amplifiers input so that the signal does not distort?

Getting back to your original question, as patlaw pointed out, sure it will.

But if you find yourself running with the volume control turned waaay down toward zero, so adjustment is limited and difficult, here are a couple of ways to implement the voltage divider that patlaw also mentioned. The shown resistance values are arbitrary.
.
 

Attachments

  • volume-level-control-dropping-resistor-v3b.jpg
    volume-level-control-dropping-resistor-v3b.jpg
    19.7 KB · Views: 322
  • volume-level-control-dropping-resistor-box-v1c.jpg
    volume-level-control-dropping-resistor-box-v1c.jpg
    41.5 KB · Views: 284
Last edited:
Unless you can control the level of the audio going in, you really need a potentiometer on the input. Also use a input coupling capacitor to keep any possible DC out of the amplifier.

If your speakers are capable of any bass, increase the output cap to 1,000uf.

Do not use the LM386 beyond 9 volts with 8 Ohm loads. It has weak current capability and power collapses under higher loads.

This chip is very sensitive to poor ground layout so separate power ground (supply voltage return, output return) and input & SVR returns into separate traces right at pin 4!
 
Headphone outputs trend to be a little low for driving the LM386 at default gain. You might want the gain at around 40db. If strictly used for headphone devices, you don't have to have a volume pot since most devices have their own. You should also add a 1K resistor across the input so the amp doesn't buzz or oscillate when unplugged from the headphone device.
 
I also built the LM386 with a gain of 46dB and this worked fine.

What I am really trying to figure out is this....

I have attempted to build a studio monitor with a line input for a school project using the LM386. The output from the monitor both sounds and tests reasonably well, however I have to justify why I chose the LM386.

With the LM386 having a maximum input voltage of 0.8V peak to peak, it would only really be suitable for amplifying domestic equipment and not something that would be found in a studio

If I was to attenuate the input level using a potentiometer to below 0.8V peak to peak so that there is no clipping of the signal at the output, how would this affect the output?

For example would attenuating the signal at the input and then amplifying up to the desired level, be the same as having an amplifier than can handle say 3V peak to peak?
 
Last edited:
If I were to use a laptops headphone output as the input of the amplifier, would this give me around 0.775V RMS at the laptops maximum output?

Something like, yes, and it will work fine as a line level output.

In these international times there are, unfortunately, several versions of "line level," but they all hover around the classic one volt. Especially since the whole concept is near-meaningless anyway, see the following.

Voltage determines volume level (current just flows in obedience to the push of voltage, and the resistance of load). When you turn a volume knob you're actually increasing or decreasing the voltage delivered to the amp, headphone, or whatever.

But this voltage varies constantly. A quiet musical passage might be at a millivolt level, a full orchestra might develop several volts at an output. This is why line level is "nominal," it changes all the time anyway. One volt is just the planning figure to use.

You gotta have some number, any number, to plan with, and a "one volt line level" is the number we use.

I should have checked with my multimeter at the time but don't have it anymore!

I guess I overstressed meter readings in my previous posts. You can't read audio voltages with a meter.

This is because meters read the "calculated RMS" voltage I mentioned before, and the calculation is based on the 60 (or 50) Hz of the 110 (or 220) volts appearing at a wall receptacle. Any other Hz gives a wrong reading.

But this is OK because we still stick with the fictional but useful line level idea. Everybody sticks with it.

Example: an ECM (electret mic capslule) has a voltage output of perhaps 5 millivolts. This requires a gain of some 400 to be amplified up to the one volt of line level. So yes, in this case you have to know the ECM's output voltage to do the calculation. But you can't measure that output voltage with a meter (not without great difficulty and lots of conversion formulas), you have to refer to the manufacturer's data sheet.

It always works this way. So please semi-forget what I said about meter readings, and substitute data sheet information instead. It's always reasonable to suppose that any device has a line level output, or requires a line level input. The exception being amplifiers, of course, which feed speakers.

Headphone outputs generally work well as line level outputs, but they might need a small amount of gain, say 5ish. If you're feeding a laptop's headphone output to an LM386 amp I expect it will work fine.
.
 
I have to justify why I chose the LM386.

You're kidding, right? How about you can get them for 10 cents apiece from Asian vendors, ask your super if that's enough justification.

With the LM386 having a maximum input voltage of 0.8V peak to peak...

No it doesn't. We're straight on this, right?

I'm betting you're thinking of the data sheet entry of "Input Voltage: +/- 0.4V"?

Smarty mouth quesition: Why do you think that's +/- 0.4V peak to peak?

Answer: You shouldn't, because it isn't. All voltages are assumed to be RMS (meter reading) voltages unless otherwise specified. Peak to peak will always be specified.

As a matter of fact, that +/- 0.4 volts translates into a real voltage of 0.8 volts. Hmmm, 0.8 volts is very close to 1 volt. So close you could almost call it a nominal 1 volt. Hmmm, what do we know about a nominal one volt?

What if the voltage at the input exceeds the data sheet specification? Then you turn down the volume control (the 10k pot), which in the schematic you posted is actually an input level control. Additionally, if necessary, referring to post #6.
.
 
Last edited:
...the LM386...would only really be suitable for amplifying domestic equipment and not something that would be found in a studio

My advice: don't bet on that. Those guys in the booth are liable to do anything. And then, not everybody works in a studio with a million dollar board.

When you see those studios on TV the guys have hidden the rat's nest of wires they use every day. Then when the cameras are gone they bring out the real equipment and go back to work.

If I was to attenuate the input level using a potentiometer to below 0.8V peak to peak so that there is no clipping of the signal at the output, how would this affect the output?

Leaving aside that everlasting peak to peak voltage that doesn't exist, the input controls the output directly. Turning down the input turns down the output.

For example would attenuating the signal at the input and then amplifying up to the desired level, be the same as having an amplifier than can handle say 3V peak to peak?

If you want to put it that way, yes.

Whatever voltage is applied to pin 3 of the LM386 is amplified, and appears at pin 5 as the output. This is the whole idea in the first place.

The 10k pot connected to pin 3 controls the voltage applied there, from zero to a maximum of whatever voltage is applied at Vin. Thus the 10k pot controls the LM386's output directly, from zero to maximum.

As before, the 10k pot is, strictly speaking, an input level control. But here it functions as a volume control, which is perfectly fine, same difference.
.
 
Last edited:
Thanks bentsnake I've learned so much over so few posts haha!

I suppose the best way to measure the signal level before and after the 10k pot would be to use a signal generator and oscilloscope to see how much the voltage is attenuated by.

When I say justify the LM386, I basically have to say that it is suitable because it amplifies the audible frequency range, can be used with a 9V battery so doesn't pose a safety threat, etc.

What I am still unsure of is how voltage gain works. I can use the LM386 with a voltage gain between 20 and 200. A voltage gain of 20 gives a 26dB gain, and a voltage gain of 200 gives a 46dB gain.

As I am using a driver with a sensitivity level of 90dB, and the LM386N-1 has a typical output power of about 1/3 of a watt, I thought that this meant that the driver would produce around 85dB.

What I would like to know is how the voltage gain levels of 20 and 200 would affect the SPL at the drivers output?

Thanks!
 
.
I think I see what's happened here. Either you've been reading data sheets, which is fatal, or you've been listening to the complicated-is-fun crowd, which is worse.

It is not complicated--or not unless you make it that way. E=IR, always and without fail. E (voltage) pushes current (I) through a resistance (R). Knowing two of the values you can always solve for the third. (If you don't know two of the values, you can't solve the equation.)
In a sidebar, "E" stands for "electromotive force," which is voltage. "I" is current because it stands for "intensity of current" in Italian--early researchers and all. "R" means...er...resistance, which is whatever load you connect.
<< What I am still unsure of is how voltage gain works. >>

You probably don't understand because it's not complicated and you thought it would be. It's simple multiplication. Input voltage x gain = output voltage.

Input = 1 volt
Gain = 20
Output = 20 volts

Ohm's law doesn't enter in here because it's not a voltage-resistance-current calculation, it's a gain calculation. Current doesn't enter in at all. Remember that current flows in obedience to the push of voltage, and the resistance of load.

<< I suppose the best way to measure the signal level before and after the 10k pot would be to use a signal generator and oscilloscope to see how much the voltage is attenuated by. >>

Well yes, and it's actually the best way by far if you happen to have an oscilloscope and a signal generator lying around.

Less accurate, because it doesn't account for frequency, use the method posted below. Measure between A, B, and C as curiosity dictates. The ground in this case is arbitrary, ignore/omit it.

Or you could not measure anything, since the input-output relationship is direct. Did I mention that this stuff doesn't have to be complicated?

Referring to the circuit in your post #1, the 10k pot at the input. Imagine the pot's wiper (the arrowhead) moving up and down. The wiper actually rotates in a round pot, of course, but up and down is operationally the same thing. The pot's wiper is connected to pin 3 of the LM386.

With the pot fully clockwise, or arrowhead at the top, pin 3 sees a signal/voltage level of Vin, 100%.

Turn the pot down to 75% of it's rotation (or slide), and output is 75% of input Vin.

Turn the pot down to 50% of its rotation (or slide), and output is 50% of input Vin.

Turn the pot down to 25% of its rotation (or slide), and output...are you seeing a trend?

Of course this applies to a linear pot. A "log pot" is usually used for a volume control, and here the percentage of resistance varies as the wiper is moved. Try not to think about that. Use a log pot for volume controls, but don't think about the log part.

<< As I am using a driver with a sensitivity level of 90dB, and the LM386N-1 has a typical output power of about 1/3 of a watt, I thought that this meant that the driver would produce around 85dB. >>

I guess by drivers you mean speakers? Speakers don't produce decibels, they produce sound. That aside, I think it might clear up a lot for you if you play with a calculator. There are lots online, here's one: Decibels to Voltage Gain and Loss convert calculation conversion amplification amplifier electronics - sengpielaudio Sengpiel Berlin

<< As I am using a driver with a sensitivity level of 90dB, and the LM386N-1 has a typical output power of about 1/3 of a watt, I thought that this meant that the driver would produce around 85dB...What I would like to know is how the voltage gain levels of 20 and 200 would affect the SPL at the drivers output? >>

Are you an engineering student? If not, and you really need to report all of this stuff to your supervisor, then s/he is making unreasonable demands, probably because s/he has no clue.

Look, if it's too loud then you turn down the volume, yes? Not that an LM386 is going to be too loud.

But plowing hopelessly--and briefly--ahead, watts, gain, SPL (sound pressure level), and decibels are different measurement concepts, kinda-sorta like quarts and feet. They might or might not relate (a quart can be 12 inches high), and it might or might not be possible to convert between them. Or...sure it's always possible, more or less, if you have a good scientific calculator. No, I said a good one.

Having said all of which, here's another calculator: Watts to dBm conversion calculator

However...

<< I am using a driver with a sensitivity level of 90dB, and the LM386N-1 has a typical output power of about 1/3 of a watt, I thought that this meant that the driver would produce around 85dB >>

What you're missing is speaker efficiency, which varies with each individual speaker. For a given amplifier output, high efficiency = more sound out = higher SPL, which is measure as higher decibels. Low efficiency = less sound out = lower SPL, which is measured as lower decibels. So you have to calculate for each individual speaker.

Of course, if you like this kind of stuff then all that's fine. Still, have you considered changing schools?
.
 

Attachments

  • potentiometer-measurements-tests.jpg
    potentiometer-measurements-tests.jpg
    40.1 KB · Views: 136
Last edited:
Hi friends,
Now I've to make audio amplifier that has 3 stage.
Firstly,input signal from the mp3 player is taken and then it is applied to preamplifier(Tl072) that has gain of 4.At this stage,i wanna ask what is the output voltage range of mp3 player?Is it so small??? Now,in my simulation on LTSPICE,i set the input voltage to ac50millivolts and so the output of preamplifier is 200mV.
Secondly,after preamplifier,i used bass and treble tone control circuit that has maximum amplification gain of 14dB(5.012).
So the Vpp voltage of the output of yone circuit become nearly 1V.
Finally, i used power amplifier(LM386N1)of gain 20(26dB).
At this stage,i wanna ask what is the input voltage range of LM386 pin 3?
When i simulate LM386 with 1Vpp at pin3 input on oscilloscope,the output voltage is flat at peak.
But,when i set 0.2Vpp at pin3 input,the output waveform is ok with gain 20.
Why?
Then,what power rating of 8ohm speaker I should use(eg 0.5W or 4W or 25W)
Please explain me step by step.
Please.
Thank.
:)
 
At this stage,i wanna ask what is the input voltage range of LM386 pin 3?
The TI datasheet lists the absolute maximum input as ±400mV. Keep in mind, though, that the input level is ultimately very dependent on the supply voltage (and the gain setting).
The LM386 places the pin 5 output pin at half the supply voltage. The output signal swings above and below this level. It is ~3V with a 6V supply. Divide 3V by the 20x minimum gain and the result is 150mV, which is then the de facto maximum input level.
400mV and 20x gain is 8V. The absolute maximum supply voltage given in the datasheet is 15V. Pin 5 is then 7.5V. I don't have a confident explanation for the ½-volt discrepancy.
When i simulate LM386 with 1Vpp at pin3 input on oscilloscope, the output voltage is flat at peak.
But,when i set 0.2Vpp at pin3 input,the output waveform is ok with gain 20.
Why?
The difference between clipping and not clipping. See above.
Then,what power rating of 8ohm speaker I should use(eg 0.5W or 4W or 25W)
With such low power it matters little. Which one sounds best?
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.