0
\$\begingroup\$

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!

http://i68.tinypic.com/15grneo.jpg

Datasheets: LM386- http://www.ti.com/lit/ds/symlink/lm386.pdf

\$\endgroup\$
  • 3
    \$\begingroup\$ You seem to have misconnected your digital pot. As shown on your schematic, it is acting as a variable input resistor, not as a voltage divider. Pin 3 of the LM386 should be connected to the wiper arm of the digital pot. \$\endgroup\$ – Barry Jun 16 '16 at 23:18
  • \$\begingroup\$ What are the values of R1 and C1? \$\endgroup\$ – BobT Jun 16 '16 at 23:52
  • \$\begingroup\$ Woops, I was in a hurry. I edited the original post with the correct schematic \$\endgroup\$ – Cat Jun 22 '16 at 21:40
1
\$\begingroup\$

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,

The terminal A pin does not have a polarity relative to the terminal W or B pins. The terminal A pin can support both positive and negative current. The voltage on terminal A must be between Vss and Vdd.

So you are placing as low as -1.65v on a wiper pin with these maximums as defined in the datasheet:

Voltage on all other pins (PxA, PxW, PxB, and SDO) with respect to VSS .................. -0.3V to Vdd + 0.3V

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.

\$\endgroup\$
0
\$\begingroup\$

Have you looked at the signals with an oscilloscope? I think your problem is on the input side, more specifically R17 (R??? It's a capacitor!).

The potentiometer nodes can not be outside of the potentiometer supply voltages, and when you block the DC with the capacitor, this is exactly what you're getting. Since you are now operating the potentiometer outside its specifications, it can act up in unpredictable ways, but it's likely that you're just getting half the expected voltage out.

I suggest that you simulate your setup, and observe the voltages involved at any node. They should not go below zero for the circuit to operate within specifications.

\$\endgroup\$
0
\$\begingroup\$

Ok, here's a different answer: it is because your R17 is a resistor and not a 1 uF capacitor like you show in your schematic. I bet if you change it back to a 1 uF capacitor it will work fine.

Let me know if that was it and then I can explain in more detail.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.