## Using digital pots with audio signals?

23 posts / 0 new
Author
Message

It seems like digital pots with single power supply are only able to "see" signals down to 0V. Is there some way to use them when working with an AC signal which has a negative half? I'm thinking about applications such as volume control.

Well,
You could feed your audio signal into an op amp, as a summer, and add a 2.5 V dc bias. Your audio signal is now based on the 2.5V level for 0 audio signal.

You would then need to AC couple the signal into your following stages to block the 2.5 V dc off set. This would be done by feeding the signal through a series cap.

JC

Last Edited: Tue. Oct 13, 2009 - 11:52 PM

you could shift the ac signal with dc bias? and then get rid of it using capacitor?

So this brings me to another question... how can I scale an input AC signal which might go up to 10V PTP to half the size without distorting it too much?

Scaling only involves a voltage divider. No distortion, there. AC coupling works well, as long as you keep the peak-peak amplitude of the signal within what the digital pot can handle. I've used them for audio with no real problem.

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

ka7ehk wrote:
Scaling only involves a voltage divider. No distortion, there. AC coupling works well, as long as you keep the peak-peak amplitude of the signal within what the digital pot can handle. I've used them for audio with no real problem.

Jim

This sounds almost too easy :)
Any catches?!?

Thanks for the help!

Not really.

What I would do is use a resistor equal to the nominal digital pot value (if the value is a few K or better). Connect this resistor between Vcc and the top of the pot. This biases the input to Vcc/2. Connect the input cap to this point, also. Make sure it is large enough to handle the lowest input frequency with the load made up of the pot and the bias resistor in parallel.

If you need to reduce the input signal down from 10V ppk to 5V ppk, I would just add a resistor in series with the cap. Make it equal to the parallel combo value of the bias resistor and the pot in parallel. Now, you have a 2:1 voltage divider plus AC coupling. Not many parts.

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

Quote:
Any catches?!?
With some pots you will get noise when you change position as the dc across the pot also changes.

I rather use a "dry" pot with no dc across it. Keeping the signal low (300mV PP??) willl avoid any distorsion.

The best thing of course is to follow the guidance of the datasheet or app notes.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Agree with John.

Having DC bias on the pot will result in a little "pop" every time you change the volume up or down. However, without the bias, you really can't keep the signal within the bounds of ground and Vcc. That is the compromise in all this. Whether or not the little pops are a problem in your application is something you will need to determine.

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

Digital potis are not suited for audio applications, since they generate noise on changing. :cry:

You need special audio circuits (e.g. PGA2310), which change the value only on zero crossing of the input signal. :idea:

Peter

As suggested in the post before, you need a PGA2310 (or similar PGA2311) which is an outstanding digital audio potentiometer.

Same suggestion here - there are better volume control chips for audio than digital pots.

Quote:
since they generate noise on changing.
Mine don't. DS1267 (pretty old but still have about 200 in stock)

Set up a 10 step log10 table and it will work like a real volume control. :)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

js wrote:
Quote:
since they generate noise on changing.
Mine don't. DS1267 (pretty old but still have about 200 in stock)

Every time, if you change a voltage fast (switching), it gives a clicking noise on the speaker.
It's not loud, but it's audible in a silent room.
Especially, if you play a low frequency tone, the high frequency clicking was annoying.

Maybe on playing havy metal, it was not audible.

So the trick with zero cross detection was needed.
Zero Volt can be divided, without a fast (audible) change.

Peter

theatrus wrote:
As suggested in the post before, you need a PGA2310 (or similar PGA2311) which is an outstanding digital audio potentiometer.

Can these be used as voltage deviders as well? Seems not...?

slow_rider wrote:

Can these be used as voltage deviders as well? Seems not...?

Why not? You can, but do you really want to?

Jepael wrote:
slow_rider wrote:

Can these be used as voltage deviders as well? Seems not...?

Why not? You can, but do you really want to?

So the terminal that they mark as GND is actually the wiper? Or it can function as a wiper?

On my post I said I was looking at application such as volume control (but not limited to). I also need a pot. that would function as a voltage devider. I thought about using a digi pot. from Analog Devices but they only come in 3x3mm SMD packages and as a DIYer I rather avoid that. And I couldn't find any other pot. from other makers with 256 steps+ that will handle large voltages.

Quote:
Analog Devices but they only come in 3x3mm SMD

The AS7376 comes in PDIP, and can run on +/- 15V, several run on +/- 3V, or +5V.

It is not uncomon to process your signals at low amplitude, and then amplifiy them to meet your needs.

JC

DocJC wrote:
Quote:
Analog Devices but they only come in 3x3mm SMD

The AS7376 comes in PDIP, and can run on +/- 15V, several run on +/- 3V, or +5V.

It is not uncomon to process your signals at low amplitude, and then amplifiy them to meet your needs.

JC

I was looking at that device in the past, but only 128 steps. I'm looking for 256 minimum.

How many signals are your processing?

It is a "Stereo" device, with two channels.

Feed the output of Ch A into the input of Ch B and move on with your project. This would, of course, give you significantly more that 256 steps, but you could easily use whatever portion of the second stage you wanted.

JC

slow_rider wrote:

So the terminal that they mark as GND is actually the wiper? Or it can function as a wiper?

What chip are you referring to? But no, a terminal with GND is really GND.

The PGA mentioned above for audio volume control has internal opamps and stuff. You can use it do "divide voltage", feed something in, get divided voltage out.

There are three-terminal digital pots that have wiper pin like normal pot. Then there are two-terminal digital pots that only gives you variable resistance.

The pop previously referred to is due to the DC bias on the potentiometer. Changing at signal zero crossing does not help because there is still a bias on the pot. The sudden "DC" voltage change gets amplified and high-passed due to AC coupling, leaving a small spike.

Using a pot that can run at zero DC bias will help. Using a voltage controlled amplifier is another way, But, unless the device has some kind of fade or mute, there will always be a pop when the gain value is changed IF the change happens when there is a voltage present. That is inherent in digital control.

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!