Electronic – Distorted lm386 circuit output waveform

amplifierfrequencylm386

For one of my electrical engineering labs, we are required to build an lm386 circuit with a gain of 40, then measure its frequency response. I have successfully done the first part – I get a gain of 43 at low frequency (~100 Hz).
Diagram: lm386 gain 40

The problem is that when I increase the frequency to about 20k Hz the signal becomes distorted: enter image description here

66k Hz: enter image description here

and after that the waveform is basically unreadable. Is an lm386 even capable of amplifying at these frequencies? I thought it is since the datasheet gives a bandwidth of 300k.

Anyway, I have tried replacing the lm386 twice (same result) as well as the capacitor. The lab tutors say they don't know what else could be causing this. Any ideas?

Best Answer

There is a reason LM386 datasheets include the Zobel network in parallel with the speaker. You built an oscillator and amplifier in one.

schematic

simulate this circuit – Schematic created using CircuitLab