Understanding Digital Potentiometers

Digital Potentiometers are similar to analog potentiometers, but different in many ways. It has been a challenge for me to understand digital potentiometers. I first started with the MCP4231. I was able to get that pot controlling some LEDs, with Arduino, with the help of examples.
I realized that I did not fully understand digital pots, because controlling LEDs, by DC is not
like operating digital pots and audio with a sine wave. I decided to learn more about digital pots by trying to operate a less complex digital pot, one that had a manual up and down control. There are simple digital pots, and very complex digital pots. For example, there are digital pots with individual register addresses for each resistor step. The simplest digital pots just have a up, and a down button.
I chose the AD5220 digital pot to experiment with. Yes, I got LEDs doing interesting things with the up and down simple control. I realized I could even hook the AD5220 to Arduino and do the same thing I was doing manually. Still many questions came up.
I had read somewhere that the digital pot was totally independent of it's power supply. With that thought in mind, I decided to check for resistances between the end terminals A and B, and the wiper W. As I powered the digital pot with 5 volts DC, and measured resistance between the wiper and end terminals, I found something that surprised me. I was using the 100K version of the AD5220. When I hooked my ohm meter from the wiper to the A end terminal that was connected to ground, the readings went from 0 to 50K. When I hooked my ohm meter from the wiper to the B end terminal that was connected to 5 volts DC, the readings went from 50K to 100K. This was surprising to me as I assumed resistances were simply added up the ladder. It was obvious that was not the case. It seemed like each step on the ladder had different value instead of steps on the ladder being added. What made this seem strange to me is the thought of reversing the A and B terminals. Meaning making the A end connected to 5 volts DC, and the B end connected to ground. That would reverse the value of each step. That confused me as to how that was accomplished.
With an analog pot a rheostat variable resistance can be created by tying one of the end terminals to the wiper. Then the wiper and end terminal create a variable resistance to the other end terminal. I am not sure this would work with a digital pot?
Even more complex thoughts entered my mind thinking about how I would control an audio sine wave with a digital pot. A sine wave goes above and below the DC reference.
I wondered if I could power the digital pot with dual polarity, meaning a PLUS, MINUS, and a ground. Meaning the VDD of the digital pot is a + voltage and the VSS of the digital pot is a - voltage, and there is a ground. Of course there is another way of creating the DC ground reference. With an OP-Amp a DC reference voltage can be created by feeding the input of the OP-Amp 1/2 of the supply voltage. So I wondered which way I needed to power the digital pot for sine wave operation. I wondered how to create the DC reference voltage for the Digital Pot????
I then went back to what I had read: "The digital pot end terminals A and B, and the wiper W are independent of the power supply". If that was true, then I could simply operate the digital pot from DC voltage, and use the digital pot in a audio sine wave circuit. Something about that operation did not seem clear either! The audio circuit I wanted to use the digital pot in operated from 9 volts around a DC reference voltage of 4.5 volts DC. It seemed to me---if the ends of the digital pot A and B, and the wiper W, were totally independent of the power supply, then I was only dealing with "Resistances". If that was the case I could not understand why I could not use the digital pot in the sine wave circuit. Even though the digital pot operated from 5 volts, I could use a voltage regulator to drop the 9 volts down to 5.
The problem is I am dealing with voltage in the audio signal, so the digital pot is dividing the audio sine wave voltage. Dividing the sine wave voltage is totally different than if you were simply controlling the resistance in the loop of an Op-Amp.
As you can see, I am totally confused about many things concerning the operation of a digital pot in a sine wave circuit. I wish someone would clear up my many concerns and understanding of using a digital pot in an audio circuit.

You measured Ohms in a powered circuit?

How to Test Ohms with a Multimeter - Hand Tools for Fun.

1 Like

While the A B and W are independent of the power supply but they must be within the range of the parts power supply. So some digital pots have a pin for a negative supply for you to put a negative voltage into it. So if you put a -5V to that pin then your inputs could be between +5 and -5V.

If you do not wire it like this and you apply a sin wave hen the negative half of the wave will be outside the limits of the chip and it will distorted.

The way round this is to add a bias to the signal. That is simply two resistors one to the positive rail and the other to the negative point. You then couple into the join with a capacitor.

Braking you text into a few paragraphs would make it much easer to read.

1 Like

Idahowalker----A B and W are independent of the power supply. That is what I said, and Grumpy _Mike repeated that.
Good to hear from you Grumpy_Mike! I totally understand what you "always" say about using a digital pot in an audio circuit. You say this:
Figure 2. Passive bias circuit.
Another way to bias and get dual polarity with a ground is with TLE2426. A Texas Instruments IC designed to convert single polarity to dual polarity. Dual polarity is another way of doing it. By "it" I mean raising the DC bias so the sine wave goes above and below the DC bias.
Armed with this information I went to the data sheet for the AD5220 IC. I read all of it! I did not find anything in the data sheet concerning hooking +5 volts to VDD on AD5220, and -5 volts to the VCC on AD5220. If I do that---is the ground of the wiper hooked to the artificial ground created?
If this is not correct Grumpy_Mike, please direct me to a circuit diagram of how to bias the AD5220 IC so I can connect it to an sine wave audio circuit? Thanks!

Grumpy_Mike, here is what the company Analog Devices has to say about digital pots and audio signals.
"Yes. Analog Devices offers digital potentiometers with dual ±2.5 V, ±5 V, or ±15 V supplies that can handle bipolar or ac operation. The user can still achieve ac operation with a single dc supply by raising the dc offset. Terminal A, Terminal B, and Terminal W have no polarity constraints with respect to one another."
I understand what is needed ---by the term---raising the dc offset. What I need is a diagram of exactly how to hook up the VDD and VSS of the digital pot chip, and what is the relative ground and where is it hooked? I just need a simple diagram of an actual 8 pin digital potentiometer biased for audio operation? I know how to bias op-amps for audio operation---is biasing for a digital potentiometer any different?
If you will read what Analog Devices says in the quote,---- they say: "Terminal A, Terminal B, and Terminal W have no polarity constraints with respect to one another."
If terminals A, B, and W have no polarity constraints, then it must be the power supply to the digital IC that has the polarity constraints!!!!!!! So how do you bias the digital potentiometer IC for single DC supply, by raising he dc offset? A circuit would be worth a thousand words Grumpy_Mike.
Here is the AD5220 chip. If I use the TLE2426 powered by single 5 volts, do I hook the negative 2.5 volts to pin 4, and the positive 2.5 volts to pin 8. Then is the ground of the TLE2426 referenced to the wiper ground?
image
That is "ONE WAY" of biasing. The other way is resistor biasing for the dc offset of the single supply. Now Grumpy_Mike, tell me how to hook up the resistor divider biasing method to the picture of the actual chip. What is ground and what hooks to the AD5200 chip? Thanks!

OK but first can I clear up a few points.

In your first post you said:-

Where the sin wave signal you were using was a 9V peak to peak signal.
Well no you can't do that to an audio signal. The whole thing about a voltage regulator is the output should be constant when the input is a voltage or so higher then you want the voltage to be.

What is the nature of this audio signal, it seems to be very big. Remember the current limit of the pot is 20 mA.

Do you want to control the amplitude of this audio signal so you can listen to it? If so there is an audible click when you change the pot value as the signal suddenly drops or rises. This is due to the discontinuity of the signal. This is sometimes called zip noise because it sounds like a zipper over the noise.

One way round this is to only perform the switching at the point where the input waveform crosses zero. On page 18 and 19 of the AD5290 data sheet is a circuit to do this.

The other thing about using it as a volume control is that the digital pot is linear but your ear is not. In audio circuits the pots used are logarithmic pots , or log pots for short. This means that for most of the digital pots range you will hear little difference I. The volume and then it will change very rapidly.

1 Like

OK I have drawn this. This is what I would expect to work but as I don't have a AD5220 to hand I have not been able to test it.

I would expect the V audio to be the voltage of the audio side of your circuit, but it could work (perhaps) with just the 5V from the Arduino. The Op amp needs to be able to produce the expected output swing from the AC signal.

1 Like

Grumpy_Mike here is the proper way to bias an Op-Amp for audio.
Figure 2
Looking at your diagram, I have never seen audio fed into an op-amp like you have it drawn. Where you have "V audio" drawn on your diagram is where the power enters the op amp. Audio either enters the + of the op-amp for a non inverting output, or the - of the op-amp for a inverting output. You do have the sine wave "input" input entering the + of the op-amp. The audio can't enter both the places!
I am starting to think that biasing for audio operation has more to do with the circuit than it does with the digital potentiometer.
I displayed an example of biasing an op-amp for audio operation---with all the hookups necessary. Show me a 8 pin digital potentiometer biased for audio operation with all the hookups necessary.

That is virtually what I drew.
The biasing is exactly the same only that diagram has a differential audio input, where as mine is single ended.

Well I think that is a shortcoming of yours rather than mine.

No idea what you mean, my circuit has the audio entering a non inverting voltage follower buffer, your circuit has a feedback circuit with a capacitor which means it is a first order filter and some gain.

As you seem not to want this and you are only intent on critical observations, I decline and kindly ask you to bugger off.

1 Like

Grumpy_Mike In your diagram "V audio" , I see now you intended the audio to be powered there. At first I thought you intended the audio to enter there. It is where power enters and that is correct. I just was confused by you listing "audio" there. Your audio is entering correctly to the + input of the op-amp.
Your arrangement is a volume control arrangement. That is a correct arrangement. I have ideas for other uses, such as gain resistances for op-amps. Or resistances for different kinds of audio filters.
I am starting to think biasing for audio operation has everything to do with the circuit construction, including the digital pot. What has been confusing to me has been the discussion totally centered around biasing the digital pot. The pot ends and wiper are independent of everything.

Sorry about that, your arrangement is not a volume control arrangement. I did not read your diagram correctly. I understand, and thanks for your insight.

Here is an example of an non inverting op-amp, where gain of the op-amp can be changed.

Changes to the resistor ratios of Rf and R2 can increase or decrease gain. If I were to use a digital pot hooked up as a rheostat--- to be one of these resistances, how would I bias the digital pot. Since I am a slow learner, a diagram would be helpful. Consider the Vin as a audio signal to the op-amp. Thanks.

Unless you bypass the lower end of the volume control at "B", you are inserting a 24k resistor in series with the minimum end of the potentiometer and injecting any noise on the power supply. :astonished:

Paul_B, I agree. You avoid the noise if you hook the audio in the circuit next to the op-amp like I have it drawn in my diagram---- "above"--- of the "Proper way to bias an Op-Amp for audio."
Grumpy_Mike has presented his way of biasing a digital pot on the input of an op amp. I have asked that he or someone show me how to bias a digital pot used as a resistance in the feedback loop of an op amp. Hopefully Grumpy_Mike will share with us.

No Paul. If you bypass the lower side of the pot you will totally screw up the biasing.

How? :thinking:

One thing that needs to be considered in Grumpy_Mike's diagram and my op-amp biasing diagram, is the input impedance to the op-amp. The input impedance is determined by the resistance values to ground. For musical instruments, like guitars into audio op-amps, the impedance needs to be no lower than 500K. If you go lower you kill high end frequency. Not saying Grumpy_Mike is wrong, or my diagram is wrong. Just saying the resistors need to be high enough in value in accordance with the impedance needed. In my diagram I would use RA=100K and RB=100K, but Rin I would use 1 meg resistance.
Now getting back to what I need. I need a drawing--circuit--of "biasing" a digital pot used as a rheostat in the feedback loop of an op-amp to increase or lower gain. I need to know how to bias a digital pot used in that application. I am starting to wonder if Grumpy_Mike knows how.

In this circuit the U3 op amp is providing the bias for the digital pot operating audio. I have some questions that may clear up my understanding of digital pots used with audio.
In this example the bias is applied to the B terminal of the pot---which could be considered the audio ground. Is the bias always applied to the digital pot terminal considered ground? Of course the input signal could be reversed, meaning being the input could be from either terminals A or B on the pot.
Next question is a "situation" not in the diagram, but refers to the biasing U3 is doing. If we make a pot a rheostat, by tying A terminal to the wiper W, then we have a variable resistor. The rheostat hookup terminals then would be W and B. If we wanted to use that rheostat in the gain loop of an "audio" op amp, or as a variable resistor in a "audio" filter---could we bias the rheostat the same way U3 is biasing in the diagram below?
Audio Amplifier with Volume Control

Figure 11. Audio Amplifier with Volume Control.

So… your audio "ground" is 2.5 volts with respect to the "ground" in the circuit you present?

I think what you need to bias is not the digipot, but the audio signal. Add 2.5 volts to it, let "ground" be, well, ground for real all places.

As for using a rheostat configuration in an op-amp circuit you seem to want to stay confused. Between this and your other thread, I would have hoped that by now you understand:

  1. digipots work, they do what the data sheet sez.

  2. As long as the real voltage on pins A, W and B are in line with what a particular digipot's data sheet sez they must be, anywhere you wanted a resistor or rheostat or potentiometer is a place where you can use a digipot.

a7

1 Like

Whatever bias you apply to the pot will be blocked by capacitor C1 and will not affect the input to U2. So the addition of the U3 stage makes no sense.