Digital potentiometer as volume control

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Right now you have a couple of good digital potentiometers to choose from. Some of them can handle more than +-5 Volts but at the moment I can't remember the name or number. The new chips have real resistive elements and have low noise and distortion, no pops, with or without memory, with or without microcontroller, worth checking out.
 
the problems with digital pots

is their temperature dependency --

you would probably want two in series -- say a 100K and a 1K -- this will give you a lot of precision.

be mindful that the wiper resistance is usually 50 ohms, not zero.

you can write an algorithm for a logarithmic curve, or just go ahead and purchase the National LM1971, LM1972 or LM1973 series.

or you can fashion a quasi-lorgarithmic voltage controlled gain amplifier by connecting one arm to the output of an op-amp, the wiper to the inverting input and the other arm to the analog input.

THD on digital pots -- the manufacturers have stats -- but Iwould want to check these out myself.

Digital switches -- like the dual 4 channel units from Analog Devices and Maxim combined with discrete transistors might be a preferable from a thd standpoint. These units are used in high end avionics gear.
 
I have used the LM1972 and 73 with excellent results. There is no noise at all during transitions, and 0.5 and 1 dB steps are pretty darned small- it doesn't sound like it is stepping. It just sounds like a smooth volume change.

I used a PIC16F84 microcontroller to bit bang the 3 wire signals into the attenuator chips and put the mpu to sleep (which also puts the clock to sleep when you use a ceramic resonator) when it wasn't changing volume. No digital stuff running at all means no digital noise leaking into analog circuits.

I used pushbuttons to control the volume setting, but if you like twisting knobs, you can use a rotary encoder instead. You can get cheap rotary encoders that will easily outlast any analog pot.

One nice thing you can do with digital pots and attenuators that is extremely hard/expensive to do with analog pots is setting balance by putting an offset on one of the digital pots. Also, channel to channel matching is usually excellent with digital pots so you can easily make multichannel volume pots that will track perfectly for the next 20 years- you can't do that with analog pots.

Another thing you can do if you make a preamp with multiple inputs is build in programmable volume offsets so that when you change inputs, if one source is "hotter" than another, the mpu will apply the offset to the volume setting so you don't get any blasting. Also, you can make nice ramp-down and ramp-up mute and unmute. It's all software, so it doesn't cost anything but time to write the code. The PIC mcus are reprogrammable, so you can create and add features as you think of them.

Check out the PGA2310 attenuator chip (Burr-Brown/Texas Instruments). It uses +/-15V supplies so it can handle just about any audio signal you want to give it.

MR
 
if you don't want an MCU

the you can go to the relay thread and see what they are doing with parallel out DAC's.

If you just want an +/- pushbutton you can use an 8 bit up/down synchronous counter and a double-pole, double throw temporary "on" switch. Jameco has one which you can easily configure for this application. Of course, a microprocessor helps because you can debounce without problem. Otherwise you get into debouncing the contacts with analog and digital circuitry and quickly obviate the simplicity.

I don't see what the problem is with an MCU. You can get the clocking noise down to levels below your supply noise and the DAC or Digipot doesn't even have to be in receipt of a constant clock -- it latches into place.
 
Re: Dig pots

janneman said:
Mark,

To keep THD down, you normally want to keep signal across the switches low, which would mean using them on the virtual ground input of an opamp or something similar. Do you have any experience in this area as well?

Jan Didden

I'm not sure what you mean, but the THD specs of the LM1972/3 and PGA2310 are very low (they are designed for audio applications). I used the recommended FET input op-amp (I used OPA2134) at the output of the LM1972/3 and it worked great. No pops during volume changes as stated in the LM1972/3 data sheet.

A while back I measured the signal out of my CD player using a test CD with a steady tone at 0dBfs and if I recall correctly, the output was about 2V p-p full scale. Music signals on CDs are run considerably lower than that most of the time. I do not have equipment to measure THD, but I could not hear any problems in the output signal. But then, I'm famous for not hearing things like wire color, skin effect, IC microphonics, etc...

I'm working on a circuit with the PGA2310 now. I like its pinout better than the LM1972/3 parts- they keep digital stuff on one side of the chip and analog on the other. It makes board layout a little easier because you can easily keep analog and digital ground planes separated. Since the op-amp is inside the chip, it also simplifies the circuit (but of couse, prevents op-amp swapping). You can actually make a stereo volume control with balance, mute, etc. using just the PGA2310 and an MCU, and a few pushbuttons.

MR
 
Re: if you don't want an MCU

jackinnj said:
I don't see what the problem is with an MCU. You can get the clocking noise down to levels below your supply noise and the DAC or Digipot doesn't even have to be in receipt of a constant clock -- it latches into place.

The only problem with an MCU is you have to invest in the programmer, and usually a few books to get started on programming. Then there's the time required for all this. Some people just aren't interested or don't have the time and other resources required to get into such projects.

Some of the digital pots have up/down counters built in so you only have to add a couple pushbuttons to control volume. I have not used any of them but I don't see any reason why they shouldn't work pretty well.

MCUs and 3 wire control circuits are great for people who like to fool around with the programming and want more than just simple volume up/down operation.

MR
 
Re: if you don't want an MCU

jackinnj said:
the you can go to the relay thread and see what they are doing with parallel out DAC's.

If you just want an +/- pushbutton you can use an 8 bit up/down synchronous counter and a double-pole, double throw temporary "on" switch. Jameco has one which you can easily configure for this application. Of course, a microprocessor helps because you can debounce without problem. Otherwise you get into debouncing the contacts with analog and digital circuitry and quickly obviate the simplicity.

I don't see what the problem is with an MCU. You can get the clocking noise down to levels below your supply noise and the DAC or Digipot doesn't even have to be in receipt of a constant clock -- it latches into place.
dallas (and certainly others) make digital pots, controlled with 2 pins, one for up and the other for down, both pushbuttons


no need for microcontrollers, only 3 parts: the pot and 2 buttons
 
the Nat Semi's seem to have the lowest thd at 0.0008%, followed by Dallas at 0.002%, then Analog at 0.015% -

bricolo -- yeah, you are right, I had to look at the Dallas sheet in my files.

by the way, the National series can be used as logarithmic amps -- they mention this in their PDF -- I first discovered this about 5 years ago when I was looking for a cheaper log amp than the Burr-Brown's. (settled for doing the conversion in software, btw.)
 
AX tech editor
Joined 2002
Paid Member
Re: Re: Dig pots

MRehorst said:

[snip]. But then, I'm famous for not hearing things like wire color, skin effect, IC microphonics, etc...
[snip]MR

You must have my ears.....

What I meant was if you use separate cmos switches, you should use them at the inverting input of the buffer opamp. Since this node is a virtual ground, the switches only see very low (milli- or even microvolt) signal levels. That almost completely gets rid of resistance modulation of the cmos channels, which would cause even order HD. I would think that in the integrated solution with internal opamp they would do the same, but I haven't checked it.

Jan Didden
 
very good explanation of what is possible with digital potentiometers. i came to the same conclusions. thinking to replace my alps 20k pot in my mezmerize b1 buffer (by salas) with a digital potetiometer which i am building since quite some time.
1. i don't like a rotary channel selector --> arduino controlled
2. since i'm already including an arduino in my case --> digital volume control

of course the arduino will get it's own power supply!
 
This is how my PGA based preamp looks inside.
 

Attachments

  • PGA2310 moj.JPG
    PGA2310 moj.JPG
    120.9 KB · Views: 750
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.