A Simple Lowpass Filter
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
) 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:
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.
resistance value verses position plot for the DS3903 10kΩ potentiometers can be seen in Figure 3
. This plot assumes that the end-to-end resistance is exactly 10kΩ and the wiper impedance is its maximum value of 500Ω. Both of these parameters vary significantly, but the variation primarily effects the minimum and maximum cutoff frequencies. The actual cutoff frequency value can be tuned anywhere between the minimum and maximum value, so select capacitor values that place the desired cutoff frequency in the middle of the circuit's adjustable range.
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
Digital Potentiometer Considerations
There 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.
Operation Amplifier Considerations
The primary design requirements for the amplifier in this type of circuit are the minimum stable gain and the input and output voltage swing. Both the input stage of the circuit that accepts the signal and moves its DC reference to VCC
/2 and the filter itself are unity-gain amplifier stages. Thus, the amplifier must be unity-gain stable for proper operation. Additionally, an amplifier with rail-to-rail inputs and outputs is desirable to allow the input signal to remain as large as possible due to the low power-supply range of the circuit.
A digital potentiometer can be used to make a digitally controllable lowpass filter. The 2-pole filter shown in the application note offers good performance for audio applications, and filters can be constructed using different capacitor or potentiometer values with cutoff frequencies up to 500kHz.