Replacing a analog pot with a digital pot---ground question


The most important DC bias points are shown in the image below. It is useful for circuit failure troubleshooting:

dunlop cry baby wah gcb 95 bias
I am trying to replace the analog potentiometer in my guitar cry baby wah pedal with a digital potentiometer. The top diagram is how I biased the ground terminal of the digital pot inside the AD5220BNZ. Notice the digital pot is grounded to power ground. I have the digital pot working, and I have the Wah circuit working. My only question is where I hook the ground wire that was on the analog pot. I assume I simply hook it to the Wah ground, which is the same as the power ground. The OPA134 op amp is creating a ground so the digital pot ground terminal will work with an audio sine wave.
My question are---do I hook the analog Pot ground to the power ground? Is my ground on the digital pot correct, requiring no other grounding of the digital pot to output the audio signal?

If you are not using it, why not just leave in unconnected?

Is the digital pot circuit, top image left, somehow supposed to replace VR1 in the schematic?

If so, please explain, or pose a revised schematic diagram showing how the replacement fits with the rest of the circuit.

1 Like

Digital potentiometer AD5220: https://www.analog.com/en/products/ad5220.html.
According to the datasheet: The analog pins of the potentiometer must be between 0V and 5V (if it is powered with 5V), but the polarity amongst those three pins does not matter.

You can see them as two separate circuits. The GND should be the digital (Arduino) GND and the VDD should be the digital (Arduino) 5V.

Please do not call a pin of the potentiometer the GND, that is too confusing for me :face_with_spiral_eyes:
Let's call the analog pins: A, W and B

So the 'B' gets 2.5V, and the 'A' swirls around it ? That is okay, that is what the chip is made for.
That means the 'A' can be between 0V and 5V.

Everything I wrote here might be wrong. Something does not add up. What is the 2.5V needed for, when it is not in the original circuit.

I agree. There is too much ambiguity in the words. Please show us the revised schematic.

Thanks to everyone for your reply. aarg, I like your idea of not connecting the analog pot ground wire to anything.
jremington, yes, the digital pot AD5220 is to replace the analog pot VR1 in the schematic.
I will address your request for a revised schematic with my answer to Koepel.
Koepel You stated; "polarity amongst those three pins does not matter." I agree, so I could have hooked up pins A and B of the digital pot either way---to be the audio input, or the DC reference for the audio sine wave. I also agree with your statement; "The GND should be the digital (Arduino) GND, and the VDD should be the digital (Arduino) 5V." Also I totally agree with this; "Please do not call a pin of the potentiometer the GND, that is too confusing for me :
"Let's call the analog pins: A, W and B. So the 'B' gets 2.5V, and the 'A' swirls around it ? That is okay, that is what the chip is made for. That means the 'A' can be between 0V and 5V." Working with audio the term ground can mean many things! It can mean audio ground, power ground, or virtual ground. Ground relates to--and depends on--- how transistors or op-amps are biased ---either with single supply or dual supply. So Koepel---I totally agree the term GND is confusing---the term GND is totally dependent on OTHER aspects of the circuit.
Two have asked for a revised circuit. There are only 3 wire connection between the top circuit and bottom circuit that needs explained. The 1uf capacitor and 150k resistor of the OPA134 are connected to the 5 volt power ground--Arduino 5 volt ground. Next, C5 .22uf of the analog pot VR1 in the bottom diagram is the audio in, so it is connected to terminal A of the digital pot AD5220. The wiper of the analog pot VR1 is connected to W, the wiper of the digital pot AD5220. The ground wire of the analog pot VR1 is not connected to anything as aarg suggested.

If it's so easy to explain, why is it so hard to just draw? It seems like this is a recurring problem with your posts. I think I'll just block you.

I have been watching videos about the CryBaby GCB-95 and the circuit came to life for me. It is all about the frequency range and the feedback by transistor Q2. Any change might influence the sound. It is powered by a 9V battery, although a power supply of 9V is also possible.

The analog potentiometer has the 'B' leg to analog ground. That means a digital potentiometer is not possible.
Creating 2.5V from the Arduino 5V and Arduino GND is not okay. That is the noisy digital side and the 'B' leg would cross over to the dark side, it has to stay in the analog circuit.
Connecting 2.5V to the 'B' leg creates an output voltage of 2.5V because there is a DC path to the output. That is not okay.

I don't know if galvanic isolated digital potentiometers do exist.

Options:

  1. A bright led with a LDR in a chamber (or duct tape) is a galvanic isolated digital resistor. Use two to simulate the potentiometer.
  2. Create a positive and negative voltage for a digital potentiometer that is made for these situations. For example +5V and -5V (or 9V and -9V is perhaps even better).
  3. Adjust the circuit. Perhaps the potentiometer can be placed after C4, with a capacitor to analog ground for the 'B' leg and a 100k resistor in the old place.

I wonder why you think the proposed circuit will do that, and am guessing that you don't understand the original schematic.


I did not hookup the first circuit and run it, because I did a lot of thinking about it, and was uncomfortable. Then I read the last comments today, and some things cleared up in my head.
In my first circuit I don't think my ground was like the ground of the VR1 pot in the Wah circuit.
I have arranged an new circuit presented here in diagram form. I am using a MAX1044 to create a negative voltage. I failed to list the values of the two capacitors on the MAX1044, they are 10uf capacitors. This new arrangement gives the AD5220 dual supply operation.
This allows me to use the B pot terminal as the Arduino 5 volt ground. There is a huge difference in how the B terminal was grounded in my first circuit.
I do have a very important question: I tried my best to check and see if the AD5220 would operate from dual polarity, or if it was only a unipolar digital potentiometer. I looked everywhere and could not determine if the AD5220 works from a dual supply. Simply could find no information about unipolar or bipolar operation concerning the AD5220. I would like some help with that information? If the AD5220 will not work with a dual supply, I will have to find a digital pot that will. I feel like my new circuit will work if the digital pot will handle dual supply operation.

It will not work with a dual power supply.

Can you make a difference between analog ground and digital ground in the drawings ?
The analog section of the digital potentiometer with 'A', 'W', and 'B' should not go near the Arduino GND. The Arduino GND is a noisy digital ground.

The MAX1044 runs at 5kHz, that is in the audible range.

Koepel---Excellent insight. Yes, the Max1044 runs at 5KHz. It can be increased somewhat with a connection to the boost pin, but still in the audio range. I had an interesting experience with the Max1044 about 10 years ago. I was using the MAX1044 in a new audio guitar pedal. People under 30 years of age could hear the noise coming from the MAX1044, and people over 30 could not hear it. I could not hear it! I finally heard it when a friend recorded it and put it in a range I could hear. The Max 1044 is used in a lot of guitar pedals that are designed to create some type of distortion, so I don't suppose noise matters in those applications. Here is a chip like the MAX1044 that operates outside the audio range--LTC1144. It operates at 10Hz and with the boost pin hooked up it is 100K Hz. I have used the LTC1144 in an audio guitar pedal for over 12 years without any noise complaints. That solves the noise issue in the negative voltage converter circuit.
There is no difference in the analog ground and the digital ground in the drawings. I understand what you are saying about the Arduino GND being noisy. I am going to hook the circuit up and see just how noisy it is.
I still can't find any information that determines if the AD5220 will operate from a dual supply.

Koepel, Reminding you of what you said; "2. Create a positive and negative voltage for a digital potentiometer that is made for these situations. For example +5V and -5V (or 9V and -9V is perhaps even better)."
Then you said: "It will not work with a dual power supply."
Those two statements seem to be in conflict with each other. So I assume you meant it will not work with a dual supply because of the noise in the MAX1044 and the GND noise of the Arduino?

You were asking if the AD5220 can work with dual (positive and negative) voltages. The answer is: "No, it will not work with a dual power supply".

I googled

digipot for AC waveform

and turned up this

which describes some digital potentiometer parts that use bipolar power supply voktge, sounds like just what might finally answer @KeithHilton quest.

HTH

a7

Koepel, you are correct. alto777, I was able to find a list of all the digital pots Analog Devices makes. The AD5220, the IC I have been using, only works from single polarity up to 5.5 volts. There is a AD5222 that works from both dual polarity, and single polarity +/-2.75, +5.5 volts.
Another important issue concerning the Arduino and digital pots is the interface. The AD5220 works with an Up/Down interface, which can be controlled with Arduino. Their are other choices for the interface with different pots. Meaning you can use SPI or I2C with different pots.
OK, I am not giving up. I am ordering some AD5222 pots and continue on with my experiments. Yes Koepel, the MAC1044 may have noise if you have good enough hearing to hear in the 5K to 8K range. Also, I am interested in seeing how much the ground noise in the Arduino comes through on this circuit.
I will check back in after I get the new AD5222 chip installed. Thanks to everyone for their help. even to aarg who threatened to block me.

I do not like giving up, but I think it is the best decision at this point. Why am I giving up?
I am needing a dual supply digital potentiometer with 128 steps, that is 100K, and has up and down control. AD5222 is a dual IC that meets the above requirements, but there are other problems. Mouser Electronics have only 10K versions. Digi Key only has 10K and 1Meg versions. Also, I was wanting a DIP through the hole package for easy experimenting, and all the versions available are not DIP.
The problem at hand is working with the AD5220, which is a single supply IC. The analog pot I am trying to replace has a analog ground. If I bias the B terminal of the AD5220 to create a half supply ground, that gives me 2.5 volts on the B terminal. That is not the same as the analog ground on the analog pot I am trying to replace. There may be some way to make the AD5220 work around the ground issue, but I do not see a solution. If someone can come up with a solution I would like to see it.
A person learns as much from his failures as he does from his successes. This time I am defeated.


I have not given up!
I started trying to understand digital potentiometers a few months ago. I had no training--schooling--- concerning digital pots. I could find only limited information about how to use them. 99% of the information--examples on the internet involved single supplies, and turning LEDs off and on. I could find "NO" worthwhile examples, or information, on using digital pots with a sine wave---as in audio. Everything I tried to post on the Forum was met with criticism, and people telling me what I suggested would not work. Almost ZERO help from people helping me understand how to use digital pots with audio.
On my own---I finally learned there were single supply pots, and dual supply pots. I saw an example of one single supply pot biased on the B terminal of the pot. I was again told it would not work. And ----certainly would not work with the analog ground I was trying to use it in.
I kept reading and searching for information on digital pots. I understood I needed a dual supply pot for audio. All I had was a single supply pot. I felt there was a way to bias a single supply pot where it could be used audio. Then I happened to come across an article written by an applications engineer for Analog Devices. The article he had written said I needed to bias both the A and the B terminal to use the single supply pot with audio. The diagram at the top of this post is the diagram I remember from the applications engineer's article.
It seemed to make sense to me. The only thing I would have done differently is bypass the midpoint of the bias resistors with a capacitor to ground. The same way the input of a single supply op amp is biased. So the application engineer's article said to: Bias both the A terminal and B terminal of the single supply digital pot---to half voltage. Thus raising the DC level to where the sine wave could go above and below the DC level.
I would like some help and advice concerning biasing single supply pots like this for AC operation. Can I then mix the ground with the single supply ground? What are the problems with biasing this way, and "WILL IT WORK!". I understand a dual supply is much better for audio, but I am trying to bias a single supply digital pot to work with audio. Thanks

Nearly! :grin:

Capacitor in series with Audio input.

Capacitor from midpoint of voltage divider for "virtual ground" lower op-amp.

Upper op-amp is biased with single resistor to the "B" terminal virtual ground, not two resistors to supply and ground. This FWIW ensure no DC across digital potentiometer - though that is probably more relevant to a mechanical potentiometer - and avoids noise when changing setting.

Paul _B I agree with and understand these things you said.
"Capacitor in series with Audio input.

Capacitor from midpoint of voltage divider for "virtual ground" lower op-amp."

I knew those things were needed but simply failed to put them in the drawing.
The odd thing was the Analog Devices Application Engineer only had two resistors biasing the A terminal and the B terminal. Maybe he just ASSUMED everyone knew there were capacitors
needed.
Paul_B I am not understanding what you said below, unless it is like my new diagram below?

"Upper op-amp is biased with single resistor to the "B" terminal virtual ground, not two resistors to supply and ground. This FWIW ensure no DC across digital potentiometer - though that is probably more relevant to a mechanical potentiometer - and avoids noise when changing setting."
Is my new diagram correct and will this work with a single supply digital pot running audio?