2
\$\begingroup\$

I'm hoping to build a sound sensor using this schematic (http://cdn.sparkfun.com/datasheets/Sensors/Sound/sound-detector.pdf)

To programmatically adjust the gain, I could use a digipot. My (naive) understanding of the main issue with using a digipot is that it's linear, but gain control should be logarithmic for constant change. That said, I guess the MCU could do the conversion.

Suppose I'd like to save the MCU from the conversion, is JFET a good alternative? If so, which JFETs specifically are good for this? Are there other better alternatives?

Thanks

\$\endgroup\$
  • \$\begingroup\$ What gain range adjustment are you looking for? \$\endgroup\$ – Andy aka May 26 '15 at 9:04
3
\$\begingroup\$

You can use a J-FET but there are challenges.

The main problem is distortion. Here's what happens: the resistance of the channel (D-S) changes as Vgs changes. If the J-FET is in series with the signal, Vgs changes with the signal. There are techniques that minimize this problem but it is something to be aware of.

The next problem is repeatability. Each J-FET has different sensitivity in term of how the channel resistance changes as Vgs is varied.

One place where J-FETs are used very successfully is as the gain-control element in an audio AGC or compressor / limiter circuit. Because the Vgs control voltage is created by sampling the output signal, variations in Vgs sensitivity basically drop out of the equation - these circuits have a classic negative-feedback control circuit and the negative feedback simply compensates for the Vgs sensitivity between different parts.

For what it's worth, I'm currently working on a design that uses a logarithmic-taper digital pot (32k, 100 steps) from Catalyst / On Semiconductor. Although this part is scheduled for end-of-life this year, we will simply purchase enough parts to see the product through its manufacturing lifetime.

And, yes: using a digital pot with log taper makes my hardware design dramatically less complex and expensive.

\$\endgroup\$
2
\$\begingroup\$

For volume control, yes, a logarithmic taper pot is desirable. That said, there are log taper digital pots. They are not nearly as cheap or abundant as linear, but they are out there. If it were my project, I would probably tackle the problem with some sort of VCA, either built with an analog multiplier, or OTAs. If you want to keep your control entirely in the digital domain, another option is a 4 quadrant multiplying DAC. Feed your signal into the Ref pin, and DAC's output code sets the attenuation (ie. on a 10-bit DAC, setting the output to 512 would attenuate the signal to half amplitude).

\$\endgroup\$
  • \$\begingroup\$ Thanks. How come you wouldn't go with a JFET? \$\endgroup\$ – Kar May 26 '15 at 3:34
  • \$\begingroup\$ When working with audio, I prefer to avoid nonlinear devices. \$\endgroup\$ – Matt Young May 26 '15 at 3:40
  • \$\begingroup\$ @MattYoung: Wouldn't OTA's have similar linearity issues? And analog multipliers introduce a bunch of noise, no? Multiplying DACs and digital pots seem most attractive... \$\endgroup\$ – Zulu May 26 '15 at 6:50
  • \$\begingroup\$ @Zulu No, OTAs won't have linearity issues. In this application, the key is to limit the inverting and non-inverting pin voltages to a small range over which any nonlinearity is negligible. As for analog multipliers and their noise, it depends on your choice of part. \$\endgroup\$ – Matt Young May 26 '15 at 13:19
  • \$\begingroup\$ @MattYoung: If you're okay with limiting signal amplitude to a small range for which the OTA's nonlinearity is negligible, you could do the same for an amplifier built around a JFET rheostat... What's the difference? \$\endgroup\$ – Zulu May 26 '15 at 18:22
1
\$\begingroup\$

ONE way of implementing volume control without distorsion is to use a LDR that is driven by a LED the old LDRs were made of cadmium sulphide BUT new ones don't have cadmium I have shown excellent linearity on a actice PFC prototype THE LDR is a lowspeed device and has been used in faders decades ago

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

You can use a logarithmic digipot: you specify the attenuation in dB (logarithmic obviously) and it does the conversion. http://www.maximintegrated.com/en/products/analog/data-converters/digital-potentiometers/DS1882.html

\$\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.