Maker Pro
Maker Pro

LM386 power amp IC question

K

Kaz Kylheku

Jan 1, 1970
0
I found an old LM386 chip in one of my piles of junk, and I'm thinking
of putting it into use.

All the schematics in the data sheet use an idiotic, large output
coupling capacitor between the chip and the speaker, which just
makes me cringe.

I'm thinking that since the IC references the output at halfway between
its power rails, and since I'm using a virtual reference in the rest of
my circuit at V/2, can't I just tie the speaker's return to the virtual
ground?

There is a chance that the two voltages may differ, causing some current
to flow at quiescence, and any such current should be kept well below
what the device can deliver.

Any other gotchas with this IC?

Thanks.
 
P

Phil Allison

Jan 1, 1970
0
"Kaz Kylheku"
I found an old LM386 chip in one of my piles of junk, and I'm thinking
of putting it into use.

All the schematics in the data sheet use an idiotic, large output
coupling capacitor between the chip and the speaker, which just
makes me cringe.

** No reason to cringe exists.

You must be an audiophool.

I'm thinking that since the IC references the output at halfway between
its power rails, and since I'm using a virtual reference in the rest of
my circuit at V/2, can't I just tie the speaker's return to the virtual
ground?


** ROTFL.

Jus use the electro cap.


..... Phil
 
J

Jasen Betts

Jan 1, 1970
0
I found an old LM386 chip in one of my piles of junk, and I'm thinking
of putting it into use.

All the schematics in the data sheet use an idiotic, large output
coupling capacitor between the chip and the speaker, which just
makes me cringe.

I'm thinking that since the IC references the output at halfway between
its power rails, and since I'm using a virtual reference in the rest of
my circuit at V/2, can't I just tie the speaker's return to the virtual
ground?

what's going to happen if you feed the LM386 output current into the
"virtual ground"? a virtual ground is usually an (inverting) input
termial, not an output terminal.

you might be able to work it using a center tapped battery supply.
 
M

Michael Black

Jan 1, 1970
0
I found an old LM386 chip in one of my piles of junk, and I'm thinking
of putting it into use.

All the schematics in the data sheet use an idiotic, large output
coupling capacitor between the chip and the speaker, which just
makes me cringe.

I'm thinking that since the IC references the output at halfway between
its power rails, and since I'm using a virtual reference in the rest of
my circuit at V/2, can't I just tie the speaker's return to the virtual
ground?

There is a chance that the two voltages may differ, causing some current
to flow at quiescence, and any such current should be kept well below
what the device can deliver.

Any other gotchas with this IC?

Thanks.
Dig further and find a second one. Then feed one 180degrees out of phase
with the first one, and connect your speaker across the outputs of the two
amplifiers. No more output capacitor, more power, and no Rube Goldberg.

Of course, it was never much of a "power amplifier", just enough for a lot
of things that needed a bit of power to a speaker. Nowadays, one can find
all kinds of more recent amplifier ICs in all kinds of devices, some
likely do have the out of phase second amplifier built in so there's no
coupling capacitor on the output.

One might find these on modem boards or even soundcards, though those may
still be 386s. "Computer speakers", I just brought home two sets from the
garbage this week, likely have them. Car radios will. Anything with a
speaker is a suspect for donating a more recent audio amplifier IC.

Michael
 
R

Rich Grise

Jan 1, 1970
0
Michael said:
Dig further and find a second one. Then feed one 180degrees out of phase
with the first one,

No, don't phase-shift your signal. Just feed the inversion of the signal
to the other input. There should be no appreciable phase shift, just an
inversion of polarity.

With a sinusoid, a 180 degree phase shift may _look_ exactly the same
as a polarity inversion, but they are by no means the same. To illustrate
this, just use an asymmetrical signal on your input, like a pulse train.

Hope This Helps!
Rich
 
R

Rich Grise

Jan 1, 1970
0
Kaz said:
I found an old LM386 chip in one of my piles of junk, and I'm thinking
of putting it into use.

All the schematics in the data sheet use an idiotic, large output
coupling capacitor between the chip and the speaker, which just
makes me cringe.

I'm thinking that since the IC references the output at halfway between
its power rails, and since I'm using a virtual reference in the rest of
my circuit at V/2, can't I just tie the speaker's return to the virtual
ground?
Just use two of them in a bridge amp.

Have Fun!
Rich
 
M

Michael Black

Jan 1, 1970
0
I don't see why it wouldn't work - providing the virtual reference is
"stiff" enough to handle it. Presumably this reference is a power op
amp output, voltage follower, referenced to 1/2 Vcc? Stiff to the
tune of at least a 1/2 amp or so?
You mean like a 386 just sitting there in a static form, properly bypassed
for audio?

Michael
 
It's a crappy chip, but it'll make a noise on a speaker.

It used to be popular with the amateur radio crowd, so I bought a bunch
before I knew any better.

That "1/2 VCC" is going to be very approximate -- use the cap.

I've noticed that unless it is very well bypassed it'll tend to have a
high-frequency oscillation (several hundred kHz or a few MHz, I can't
remember which) on the audio. Some portion of the amplifier is obviously
saturating, because it makes the audio distort.

Put a small cap across the feedback resistor. Limit the amplifier's bandwidth
to 20kHz (2x what you care about), or so.
 
K

Kaz Kylheku

Jan 1, 1970
0
Dig further and find a second one. Then feed one 180degrees out of phase
with the first one, and connect your speaker across the outputs of the two
amplifiers.

Ah yes. Some audio power IC's do this bridging trick internally. Thanks
for the suggestion.

Actually, I already have a capacitance there: the two capacitors (with
balancing resistors) forming a divider which establish the reference
voltage.

So if the speaker is based off the reference voltage, there is
AC coupling to ground already.

I just bumped these caps up to 100uF each, which makes 200uF (since we
can consider them to be parallel, looking from the p.o.v. of AC at the
middle reference.)

This is good: use the caps we already have, avoding the introduction
of redundant ones.

Also it occurs to me that if I had a second LM386, I could use it
simply to generate the middle reference voltage.

This is similar to the out-of-phase trick except that the voltage
of the second amp does not move opposite to the signal. The advantage
is that this reference voltage can be used by the entire circuit,
allowing the capacitor divider to be removed.
 
K

Kaz Kylheku

Jan 1, 1970
0
It's a crappy chip, but it'll make a noise on a speaker.

Yes it is, but this is not a hi-fi application. I've looked at lots of
datasheets for possible alternatives, such as the RC4580.

Next project, maybe.
It used to be popular with the amateur radio crowd, so I bought a bunch
before I knew any better.

That "1/2 VCC" is going to be very approximate -- use the cap.

Right. Since the 1/2 VCC has caps to either power rail, that is
more or less taken care of.
I've noticed that unless it is very well bypassed it'll tend to have a
high-frequency oscillation (several hundred kHz or a few MHz, I can't
remember which) on the audio.

I will watch for that. I do have the 0.05 uF cap + 10 ohm resistor at the
output to pull high frequencies down, right from the datasheet example.
 
K

Kaz Kylheku

Jan 1, 1970
0
No, don't phase-shift your signal. Just feed the inversion of the signal
to the other input. There should be no appreciable phase shift, just an
inversion of polarity.

Of course what Michael is talking about is a polarity reversal.

This is often called "180 degrees out of phase" by electronic
hobbyists. It's a kind of jargon.

I know, it makes me cringe too, but as long as everyone understands
that what is being discussed is a polarity reversal, it isn't an issue.
 
K

Kaz Kylheku

Jan 1, 1970
0
The LM386 was/is a great chip for what it was designed for which was low
cost audio at *modest* output levels. It is not HiFi. Using the cap will
not degrade the sound in anyway if the cap is of suitable size. The cap
will in fact provide some protection to the speaker if things go pear
shaped.

I think that this protection is taken care of by the voltage divider
with bypass caps.

The divider has enough resistance such that any DC flowing through the
speaker to the V/2 reference is going to be quite limited.

(Of course there could be a fault in that V/2 network somewhere,
and the speaker is exposed to that.)

Ah well, I have some airline headphones here that can be sacrificed for
a smoke test, and before that, I can measure DC current at the output
terminals.
 
Ah yes. Some audio power IC's do this bridging trick internally. Thanks
for the suggestion.

The ones I've used simply have an inverting stage driving the other leg.
Nothing fancy at all.
Actually, I already have a capacitance there: the two capacitors (with
balancing resistors) forming a divider which establish the reference
voltage.

Be careful of any noise on this reference. We've generally used an active
filter to drive the reference.
So if the speaker is based off the reference voltage, there is
AC coupling to ground already.

But your driving impedance into the reference is very low.
I just bumped these caps up to 100uF each, which makes 200uF (since we
can consider them to be parallel, looking from the p.o.v. of AC at the
middle reference.)

What's your filter corner?
This is good: use the caps we already have, avoding the introduction
of redundant ones.

Also it occurs to me that if I had a second LM386, I could use it
simply to generate the middle reference voltage.

Yes, but you'd be better off driving the load differentially.
This is similar to the out-of-phase trick except that the voltage
of the second amp does not move opposite to the signal. The advantage
is that this reference voltage can be used by the entire circuit,
allowing the capacitor divider to be removed.

You still have a pretty low impedance driving that reference. That can cause
all sorts of grief up the line. You have feedback paths all over the place.
 
P

Phil Allison

Jan 1, 1970
0
"Kaz Kylheku"
Actually, I already have a capacitance there: the two capacitors (with
balancing resistors) forming a divider which establish the reference
voltage.

So if the speaker is based off the reference voltage, there is
AC coupling to ground already.

I just bumped these caps up to 100uF each, which makes 200uF (since we
can consider them to be parallel, looking from the p.o.v. of AC at the
middle reference.)

This is good: use the caps we already have, avoding the introduction
of redundant ones.

** Our smug friend here is about to discover what the term "motor boating "
refers to .


..... Phil
 
K

Kaz Kylheku

Jan 1, 1970
0
Consider:

Your weird biasing arrangement capacitively couples to the speaker - so

You are right about this. I did not introduce this weird biasing for the
sake of that LM386; it was in the cicuit already.

I got that idea from other people's dumb designs.

However, after doing some analysis on it, prompted by experimentation
and comments here, I understand why it is completely moronic---and
unnecessary in, and easily removable from, those other designs where I
have seen it used. For instance, in one design I was looking at, this
reference network is used as an AC ground by a number of places in the
circuit, such as voltage dividers in op-amp feedbacks, and attenuation
voltage dividers between op-amp stages. But this is completely silly,
because the real ground can be used instead, since this VREF is an AC
short to the real ground anyway. Moreover, all of those couplings use a
capacitor! I.e. the signal drops through the voltage divider, then
through a small cap (say 0.5 uF), and then into VREF, which has two big
caps (100 uF) going to the power rails. Pointless! Why not just go
through the small cap, right to ground? The one or two places which
actually use VREF for a voltage, rather than abusing it as a ground, can
be satisified by a simple voltage divider (with no caps), which sits
between the regulated power rails, and whose resistance is low enough
with respect to the op-amp inputs that it's rock solid. A spare op-amp,
if available, could be used as a buffer to fortify that voltage.

I understand where people are going with that: they are translating a
two-supply design to a single supply circuit. The mistake is creating
this middle reference network and then treating it if it were the ground
in a two-supply. But it is not such a ground. Single supply requires
some adjustments. The voltage divider reference is susceptible to a
disturbance from low impedance couplings such as voltage sources, so you
never want to couple it to such outputs. It's for "reference" only.
Reference means "you can sample this voltage with a sufficiently high
impedance input which won't disturb it". No such caveat applies to a
real ground.

In the design I have now, I used a pair of fairly large (100K) resistors
to generate a reference voltage. There are no pointless capacitors.
This reference is connected to the noninverting input of an op-amp
buffer (previously unused op-amp put to use). The output of this op-amp
is used as a voltage reference in a couple of places (and never as a
current sink or source).

The LM386 is coupled through a 300 uF resistor to the speaker, obeying
the data sheet. Coupling it to the reference network would have been
dumb, because even thugh the LM386 sits nicely at 4.5V, the slightest DC
drift will be readily impressed upon the voltage divider (since the
LM386 has a lower impedance than the divider), and therefore be fed back
to earlier points in the signal chain which use the reference. This
could lead to oscillations at a low frequency that isn't shunted well
through the VREF caps. Or, for that matter, even oscillation at a very
high frequency that also isn't shunted well through large caps due to
their parasitic inductance.

David and everyone, thanks for all the comments.
 
Top