A Digitally Controllable Lowpass Filter Using a Digital Potentiometer
A Simple Lowpass FilterFigure 1 shows an audio frequency lowpass filter using a DS3903. This circuit is designed to operate from a single supply (2.7V to 5.5V), and contains a pre-attenuation stage that is capable of handling 5.0VP-P input (1.77VRMS) with a 5.0V supply. To generate a lowpass filter with two poles (12dB/octave attenuation) at the same frequency, C3 must be two times greater than C2, and POT0 and POT2 are programmed to the same values. This will result in a cutoff frequency (fC) given by:
Where RPOT is the resistance value corresponding to the numerical value programmed into both POT0 and POT2.
Figure 1. Audio range lowpass filter using a DS3903.
The input portion of the circuit (C1, U1-POT1, U2A, R1, and R2) is a volume control. It also serves the purpose of shifting the DC bias of the audio signal to VCC/2 so signals can be passed through the digital potentiometer and the operational amplifiers without clipping. This design allows the circuit to work well with any VCC value between 2.7V and 5.5V because the circuit always allows the maximum signal swing for any given supply. The DC level of the output will remain at VCC/2 unless circuitry is implemented beyond the output of this circuit to move the level to a different operating point.
For applications that are already constrained to operate within the supply limits, the input portion of the circuit can be eliminated and a direct-coupled connection to the filter circuit may be used. If the input circuit is eliminated, the output signal will simply be the input signal filtered by a 2-pole filter with cutoff frequency (fC), which includes the DC component of the input signal that will be passed to the output.
By modifying the values of the capacitor, or choosing a digital potentiometer with different end-to-end resistance values, this circuit can be designed with cutoff frequencies up to 500kHz.
A digital resistor model for calculating RPOT is shown in Figure 2. For a given position setting, the corresponding switch will be closed and all the other position switches will be open. Each increasing position of the potentiometer can be thought of as increasing the resistance by 1 LSB (10kΩ/128 = 78Ω for the DS3903), with the exception of the highest position settings where the parallel combination of the potentiometer resistance and the wiper resistance causes some nonlinearly. The formula for determining RPOT is given by:
- RLSB is equal to the end-to-end resistance from datasheet electrical table divided by the number of positions (a).
- RW is the wiper resistance from the datasheet electrical table.
- n is the position programmed into the potentiometer.
- a is the total number of positions for the digital potentiometer.
Figure 2. Digital potentiometer resistor model.
The performance of the circuit in Figure 1 was tested using an Audio Precision® tester, and the test results for the attenuation and THD+N are shown in Figures 4 through 6.
Digital Potentiometer ConsiderationsThere are several items that should be considered when selecting a digital potentiometer for a filter circuit.
Probably the most limiting constraint of using a digital potentiometer is that the voltages presented to the potentiometer terminals must generally be between VCC and GND to prevent the diodes within the ESD structures from clipping the audio signal. The DS3903 has an ESD structure that allows the inputs to be between 6V and GND as long as VCC is within specification (2.7V to 5.5V). This allows some flexibility for applications that require inputs greater than VCC. However, in the circuit shown in Figure 1 there was little incentive to attempt to handle a 6VP-P signal because the operational amplifier would clip the signal anyway unless its supply was at least 6V. The DS3903's ability to handle larger signals could be utilized if the operational amplifiers are powered from a higher voltage supply.
The type of potentiometer taper (linear or logarithmic) will determine if the cutoff frequency of the circuit is linearly or logarithmically adjusted. For an audio range filter circuit as in Figure 1, a linear taper was desired to allow a large number of potential cutoff frequencies between 40Hz and 800Hz.
The resolution of the potentiometer (e.g., 128 or 256 positions) will determine how precisely the cutoff frequency can be tuned. More positions allow more precise tuning. It is unlikely in an audio application that more than 64 or 128 positions for a lowpass filter would be appreciable. It may be desirable to have more positions for applications adjusting the filter bandwidth over a wider frequency range.
Some digital potentiometers are nonvolatile, which allows their position to be maintained in the absence of power. This can be used to allow the filter's position to be calibrated and left unadjusted with future power-ups. Volatile potentiometers begin at a predetermined position, which requires the application to live with the default position until it is modified.
Digital potentiometers have a wide tolerance for the end-to-end resistance and the wiper resistance. Ideally, for a circuit such as Figure 1 where two resistor (POT0 and POT2) values should be equal, both potentiometers should be on the same die. The exact values of the potentiometers will still vary (generally ±20% for end-to-end resistance), but their relative values will be matched.
Additionally, digital potentiometers contain some internal parasitic capacitance that will limit the maximum recommended cutoff frequency. It is not recommended to use 10kΩ pots with cutoff frequencies above 500kHz, 50kΩ potentiometers above 100kHz, or 100kΩ potentiometers above 50kHz. For audio range applications the available bandwidth is excessive, but for higher bandwidth applications it is an important consideration.