1
\$\begingroup\$

I've built a signal generator (with an Arduino) what can output 18kHz and 19kHz signals (separately) and it's connected to a speaker. This works just fine, there are no signals on awkward frequencies.

After I've added an LM386 audio amplifier with the circuit (amplifier with gain = 20). Weird frequencies start to show up around 9-10kHz and my 18-19kHz signals are weakened.

Why is that?

\$\endgroup\$
  • 1
    \$\begingroup\$ Can you post a schematic please? \$\endgroup\$ – Oli Glaser Nov 11 '11 at 15:35
  • 2
    \$\begingroup\$ Yes, we need to see how exactly you wired up the LM386. Did you notice that it only has 300 kHz gain-bandwidth product? That means it's down to unity gain at 15 kHz. \$\endgroup\$ – Olin Lathrop Nov 11 '11 at 15:46
  • 1
    \$\begingroup\$ In addition to the resistive attenuator, try obtaining the signal from the arduino through a .1 uF series capacitor. \$\endgroup\$ – Chris Stratton Nov 11 '11 at 19:09
  • \$\begingroup\$ Doh! I just noticed that my previous statement came out wrong. This part has a 300 kHz gain-bandwidth product and a fixed gain of 20. That means the gain of 20 can't be supported at over 15 kHz. In reality the way the feedback most likely works in the amp to set the gain, it starts falling off from a gain of 20 somewhat below 15 kHz. All this means that while it will still have some gain at 18 and 19 kHz, it will be somewhat below what is expected for for frquencies more in its intended range. \$\endgroup\$ – Olin Lathrop Nov 11 '11 at 21:07
  • 1
    \$\begingroup\$ @Olin - I think that 300kHz is just it's closed loop bandwidth at G=20 (e.g. GBP is more like 6MHz) So it should be usable well over 20kHz. \$\endgroup\$ – Oli Glaser Nov 12 '11 at 4:19
1
\$\begingroup\$

In designing an electronic music box, I found that the LM386 would behave very badly if it tried to drive some kinds of speakers without a series resistor. At very low output levels the thing would sound fine, but at a certain output level the thing would start self-oscillating during certain parts of the input waveform. Adding a small resistor (about an ohm, if I recall) solved the problem, allowing the amplifier to usefully produce a much greater volume (probably more than 10dB improvement) than it otherwise could.

\$\endgroup\$
  • \$\begingroup\$ Probably could use a Zobel network... \$\endgroup\$ – Bitrex Nov 14 '11 at 20:27
1
\$\begingroup\$

What you're seeing is a subharmonic. It's generally a sign of instability. Basically, through clipping or some other mechanism, the amplifier's "state" is not the same at a given point on each cycle of your waveform.

So you're feeding this kind of signal in and expecting a similar output:

--    --    --    --    --    --    --    --    --
  \  /  \  /  \  /  \  /  \  /  \  /  \  /  \  /  
   --    --    --    --    --    --    --    --

But what is coming out looks more like:

--    ---     --    ---     --    ---     --    --
  \  /   \   /  \  /   \   /  \  /   \   /  \  /
   --     ---    --     ---    --     ---    --

(I'm guessing here; can't see your scope, if any.) Note that this signal repeats every two cycles. So it's more like a 9 kHz signal with an 18 kHz second harmonic.

One possible solution would be to first feed the signal through another amplifier to gain up the signal by at least 10, then have its output go to the LM386 which would only need to be at a gain of 2. If you want a volume control, vary the gain of the first amplifier.

EDIT: Just remembered that even-numbered harmonics are usually signs of asymmetry across the x axis, i.e. the top half of the waveform doesn't look like the bottom half. Not sure how to draw it, though.

\$\endgroup\$
0
\$\begingroup\$

Ah, the 386. I always need to bypass the power supply with 10 uF or larger. Also 10 ohm and 220 pf from pin 5 (output) to ground. 470 uF from output to speaker.

\$\endgroup\$
  • \$\begingroup\$ I'm not sure this answers the question, which is why some frequencies are attenuated and others are amplified. Perhaps you can elaborate. \$\endgroup\$ – JYelton Aug 20 '14 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.