I have built a simple 8 oscillator + resonant low pass filter synthesizer (see Joe Marshall - Human Computer Interaction Research for more details) on my arduino Duemilanove, using 8 bit direct digital synthesis on pin 11.
I've been testing using a piezo sounder, and now I need it to be louder.
So, I've got me an lm386 amplifier chip, and built the circuit 1 (amplify by 20 times) from the datasheet.
I stuck the output from the arduino directly into pin3, which makes sound, but it is clearly too big a signal on the input (gets some analog distortion).
So, I've put a DC blocking capacitor, followed by a 100k log pot on the input, which goes to pin 3 of the LM386.
Now basically, I appear to have a choice of very very quiet (at the bottom of the pot), and then suddenly some kind of very loud oscillation, like some kind of crazy feedback is going on, with nothing in between.
I've tried with and without the DC blocking capacitor, with similar results.
I've also tried with voltage dividing resistors before the pot to bring the voltage down to .2v before the pot, an extra 100k resistor before the pot, etc etc.
I've tried powering it off the 5v supply from the ardiuno USB, and also running everything off a 9v battery.
Does anyone have a built example of a simple arduino -> LM386 -> 8ohm speaker circuit that I could see, so I can try and fix up my circuit, or any ideas of what on earth I'm doing wrong.
cheers,
Joe