LM386 volume control circuit?

This is slightly OT, but I want to add a simple amp + speaker to my arduino for sound output. Taking an output from a output pin (+5v) feeding it into a barebone 386 amp circuit. I am using a very basic 386 schematics. I try spliting the output with a different taper pots, from 10K to 100K and I still get either 100% volume or no volume. Can someone point me to a simple 386 schematic that works with a 5v digital output from something like an arduino?

put a 1k pot in series with the speaker and the amp. i beleive the lm386 puts out 300? milliwatts, so an average potentiometer should be able to handle this.

The problem with pots as volume controls is that most pots you use have a liner characteristic but the ear has a logarithmic characteristic.

This gives the effect you notice of being either full on or off.
What you need is a pot with a logarithmic law. You can get these but most tend to be panel mounting rotary controls.

I am using a 100K log pot, with the "slow" end across GND and the op amp input. I have a 220uF cap inline with the speaker but not a resistor. I will try that next.

Any other ideas? This seems like a pretty standard circuit yet it's not working. I tried rebuilding it on two different breadboards just to make sure wiring is correct.

Just a thought, the gain of your 386 amplifier might be too high. Make sure the feed back connections are connected (pin 2 to 1 or 3 and pin 5 to 4 or 6). You might have too much input voltage, try a potential divider on the input before the pot.

I have the gain set to 20x. I agree with the too much input voltage idea. The normal circuitry for amp expects a line level input of 1V or less, and the digital pin is doing 5V. However I thought the 100K Log Pot is doing the voltage divider sorta, but maybe it is still out of range. I guess I can put a 4.7K/1K divider before and tap the middle to feed the 100k pot?

I thought everyone has to, at some point, wire a digital out to a speaker and this is a common issue... ;)

With a 20X gain you only need 0.25v to give you the full 5V output (assuming a 5 volt power on the amplifier), and that fed into a speaker will be very loud. You are down at the low end of the pot before you even get something that is not saturated. Instead of a potential divider try a 47K resistor in the top end of the pot to spread the useful range of volume control about. If it's still not enough then increase this.