I'm trying to implement volume control using a digital potentiometer (LM386) and audio amplifier (MCP4131). The way I have it setup, I'm outputting square wave audio signals out of a PWM pin on the Particle P1 board.
The amplitude of the square wave is adjusted using a digital potentiometer (acts as a moving voltage divider) before it enters a LM386 audio amplifier.
Where I'm having trouble is, when the amplitude of the square wave is adjusted below 2V (feeding this into pin 3), the LM386 audio amplifier stops outputting a signal (pin 5). Everything works fine above 2V and I get a good amplified square wave out of pin 5. This is a problem because it limits the desired range of volume control. I'd like to get softer audio as well.
I've read the LM386 datasheet back and forth and can't see to find a specification that would explain this. I think I may be missing something pretty basic… The schematic is attached.
Any help would be appreciated. If there are any questions about the set-up, let me know!
Datasheets:
LM386- http://www.ti.com/lit/ds/symlink/lm386.pdf
Best Answer
With the addition of "R17" (C17) before the digital pot, the voltages present on pin 5 of the pot, for any typical input signal, will settle to an average of zero volts since capacitors block DC. So the AC signal being fed into the pot, if it were 0-3.3v from a microcontroller, is now -1.65 to +1.65v, which
To quote the MCP4131 Datasheet,
So you are placing as low as -1.65v on a wiper pin with these maximums as defined in the datasheet:
Try it without C17 and it will likely work. If it still misbehaves, then keep C17, but bias pin 5 (add a resistor divider to it from +3V3 to Vss) to around +1.65v or slightly over. Doing so should prevent the signal from going negative into the pot.