TransWikia.com

Digital gain control with a digital pot?

Electrical Engineering Asked by vini_i on January 31, 2021

I want to make an audio amplifier with digital volume control. I figure that by adjusting the feed back path that I won’t change the input impedance and won’t affect the frequency response. (other than the gain bandwidth product)

Does the following setup look reasonable?

Would a digital pot be good for this application?

Are there any drawbacks of digital pots that i’m not aware of that would make them undesirable for this application?

schematic

simulate this circuit – Schematic created using CircuitLab

4 Answers

Digital potentiometers are indeed a suboptimal solution for changing amplifier gains -- the parasitics of a RDAC/digipot are much worse than that of a mechanical potentiometer, and issues like zipper noise can ruin your day as well. Even once those are resolved, the gain vs. code characteristic of an amp with a digipot controlling its gain is quite annoying (i.e. nonlinear in not-good ways).

A better solution would be to use a dedicated Voltage Controlled Amplifier IC such as the THAT2180 driven from a cheap-ish voltage output DAC. This gives you linear-in-dB control with much better noise performance (no zipper noise!) and THD good enough for the professionals.

Answered by ThreePhaseEel on January 31, 2021

I can see two things that are not optimal in that design. For the discussion I will use a random digital potentiometer I found from this article: The DS1881. Most are similar in construction.

Wiper resistance

A digital potentiometer has a pretty high wiper resistance, especially compared to a mechanical potentiometer. Not only is it high, possibly in the order of hundreds of ohms, but it is also not very stable or well-defined. The DS1881 lists it as 160 Ω typical, but up to 250 Ω maximum. It can vary with the signal voltage and such.

It is not a problem if it is in series with a high impedance input, for example the input of an op-amp. Then there is negligible current through it, and thus, a negligible voltage drop. In your case, the wiper is in parallel with a section of the potentiometer:

schematic

simulate this circuit – Schematic created using CircuitLab

Since some amount of current will flow here, it will affect the signal. How bad? Not much, it is somewhat swamped by the 10 kΩ series resistance and the rest of the potentiometer section, but that leads to the next problem:

Absolute resistance variation

A digital potentiometer has a well-defined and trimmed ratio, but its absolute resistance can vary a lot:

PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
End-to-End Resistance REE +25 °C 45
End-to-End Resistance Tolerance +25 °C -20 +20 %
Ratiometric Temperature Coefficient 30 ppm/°C
End-to-End Resistance Temperature Coefficient 750 ppm/°C
Wiper Resistance RW 160 250 Ω

Note the ±20% resistance tolerance, and the 750 ppm/°C temperature coefficient.

Since you want to use it as a rheostat, you are hit by this. If it matters, that is up to you. It will really only make the gain fluctuate a bit by temperature and so on. A digital potentiometer should really be used as a voltage divider, so you can take advantage of the close matching between the steps.

The article I linked to, from Maxim, has a few audio circuits you may want to take a look at, with pros and cons.

Answered by pipe on January 31, 2021

Digital potentiometers can have up to 50 - 100pF of parasitic capacitance to ground, which may alter frequency characteristics of the amplifier when used in the feedback net. And the shape will change with trimpot value. If used as input divider with a fixed-gain amp, you will have more unnecessary noise. That's why they have dedicated gain control ICs in the audio application space. But for a low-end hobby audio it is ok to use them, provided that the amplifier remains stable.

Answered by Ale..chenski on January 31, 2021

I'd just go and use the pot on the in- or output as voltage divider, but this should work, too. Using a digital poti to change the amplitude behaviour of analog systems is exactly what they're designed for.

By the way, there's also PGA (programmable gain amplifiers); maybe these are of interest to you.

Answered by Marcus Müller on January 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP