This chip provides about half a watt of audio and a gain of about 20. The circuit
below was taken from the LM386 data sheet. The version we built oscillated at
both low and high frequencies. The cure was a large decoulping capacitor (2200
µF) across the power rails. Single
point earthing might have helped too.

Explanations
- Q1 is the LM386 audio power amplifier chip.
- C1 is the input coupling capacitor. It passes the AC audio signals and blocks
any DC signal at the input.
- VR1 is a potentiometer used as a potential divider used as a volume control.
- D1 is a diode. This passes current in one direction only. It protects against
accidental connection of the power supply the wrong way round.
- C2 is a decoupling capacitor. It reduces the performance of the amplifier
at high frequencies. At these higher frequencies, there is an increased risk
of unwanted oscillations. C2 prevents these.
- R2 reduces the current through C2 to a suitable level.
- C3 is the output coupling capacitor. There is a DC voltage on the output
pin 5 of the LM386 chip. This DC voltage would destroy the loudspeaker but
the capacitor passes the audio signal and blocks the DC voltage.
- C4 decouples the power supply. Any AC signals arriving via the power supply
line are grounded.
- Single point earthing is used to reduce the chances of unwanted oscillations
caused by feedback due to poor ground connections.