0
\$\begingroup\$

I've been trying to build a simple audio pot to be controlled with PWM with an arduino, but I'm not sure why it doesn't work. I could do it with a LED (not directly which is simple, but with a FET), but audio seems much more complicated.

Here is the schematic so far...

schematic

simulate this circuit – Schematic created using CircuitLab

I probably need to connect something to the ground of the Arduino, I tried a few things but it didn't work.

The datasheet for the JFET is here: http://eu.mouser.com/ProductDetail/Fairchild-Semiconductor/J202/?qs=ljbEvF4DwONNF0IklNND3Q%3d%3d

I just want to be able to control the level like a digital pot.

Any suggestions?

Thanks!

\$\endgroup\$
  • 4
    \$\begingroup\$ This will not work, either no sound or unattenuated sound comes through, and you will add a 400 Hz tone to the signal as that is the frequency of the PWM signal from the Arduino. My suggestion: look at similar projects on the internet to see how others do this. \$\endgroup\$ – Bimpelrekkie Jun 29 '16 at 10:06
  • \$\begingroup\$ Hi..I couldn't find other projects of people controlling a potentiometer with PWM. I thought it wouldn't add to the signal like in BJTs..for being a FET I thought the gate would only control the signal level. Actually this was the answer someone gave me here in another question...are you sure there is no way? \$\endgroup\$ – Chu Jun 29 '16 at 10:16
  • 1
    \$\begingroup\$ Erm... Jxxx is a JFET, not a MOSFET. Bit of a different beastie there... \$\endgroup\$ – Ignacio Vazquez-Abrams Jun 29 '16 at 10:21
  • 1
    \$\begingroup\$ are you sure there is no way There are ways but not like what you propose, not with a MOSFET, not with unfiltered PWM from an Arduino. A JFET: maybe but you will need some extra circuitry around that. Transistors cannot be used as a potmeter for audio as simple as that. The easiest is to get a dedicated volume control chip. See this: embedded-lab.com/blog/… \$\endgroup\$ – Bimpelrekkie Jun 29 '16 at 10:26
  • 2
    \$\begingroup\$ Possible duplicate of Convert PWM to Analog using a DAC chip in order to emulate a Potentiometer for audio \$\endgroup\$ – dim Jun 29 '16 at 11:54

Your Answer

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

Browse other questions tagged or ask your own question.