386, speaker, 9v adapter, arduino

Hi,
I made a post awhile ago about using a 386 audio amplifier chip and an arduino. I got a lot of help and I have it all set up now but I'm having some weird problems.

I'm using this schematic: http://www.hobby-hour.com/electronics/lm386-20.gif
(However, I don't have the exact capacitors...instead of a .05uf, I have a .1uf...instead of a 250uf, I have a 220uf of a 330uf.)

Just in case, here is how I have it set up: Pin 1: nothing, Pin 2: Ground, Pin 3: Using a 10k pot - middle goes to pin 3, one side goes into pin 7 in Arduino, other side goes to ground.
Pin 4: ground, Pin 5: 104 cap in two spaces after pin, followed by a 10ohm resistor with the other end in ground, followed by a 220 or 330uf cap which has it's negative side attached to the + end of speaker. Other end of speaker is grounded. Pin 6 goes to the power rail in breadboard. Pin 7&8: Nothing.

I'm trying to power everything from one source...so I'm powering the Arduino through the Vin pin.
I have everything set up in what seems to be the right pins but when I put the power in the rails of the breadboard with a 9v adapter (This one, clipped and breadboard ready: 9 VDC 1000mA regulated switching power adapter - UL listed : ID 63 : $8.95 : Adafruit Industries, Unique & fun DIY electronics and kits), the sound is very muffled in the speaker and the chip starts to overheat very quickly and one of my 10ohm resistors turned brown even...
If I power everything with a 9v battery, the sound works fine but the chip starts to overheat after a few resets of the arduino. (I'm just running the SimpleMelody example in the digital examples section in the Arduino IDE).

Any ideas? Is it because my caps are the wrong size? Does anyone have experience using a 386 with Arduino?
Thanks for any help!

No experience with it, but that circuit is pretty much the one from the datasheet for a gain of 20:

http://www.biltek.tubitak.gov.tr/gelisim/elektronik/dosyalar/6/LM386.pdf

Also check this thread:

You don't indicate which chip is getting hot (the LM386, or the ATMega?); at any rate, read the datasheet very carefully. Most notes I have seen indicate that parts should be placed very close to the chip, and ground/signal leads should be twisted tightly (see the datasheet AM radio amplifier for instance - in fact, that might be a good version of the amplifier to try). Also note that you should try to keep the component values as close to the spec as possible.

Most likely high level of the high frequency product present at the output of LM386.
This is why a lot of heat and resistor 10 Ohm getting to hot.

Two possible reason:

  1. parasitic oscillation due instability of the chip, as you drive it with DC offset.
    Solution: Insert capacitor between 7 pin of arduino and pot 10 kOhm
    Value 1.0 microF, negative pin connected to pot.

  2. too much HF components coming from input, as you applying PWM,
    that has a lot of second order, third etc .
    Solution: Low Pass filter at the input, cutting of anything above ~15kHz.