Using Linear Digital Potentiometer to Implement Logarithmic Adjustment

Publisher:星际穿越Latest update time:2023-07-11 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Overview

Digital potentiometers are widely used to replace mechanical potentiometers, especially in volume control, due to their high reliability, small size, and ease of use. Considering that the human ear perceives volume attenuation as nonlinear, it will treat logarithmic attenuation as linear attenuation. Therefore, logarithmic digital potentiometers are generally used in audio equipment rather than linear digital potentiometers. If only high-resolution linear digital potentiometers are provided in the system, the following method can be used to convert the linear potentiometer (Figure 1) into a logarithmic potentiometer without changing the system hardware.

Figure 1. This family of digital potentiometers has a standard configuration with high and low ends of the resistor string and a center-tap connection point that can be moved along the string.
Figure 1. This series of digital potentiometers uses a standard configuration with a high-end, low-end, and center tap connection point of the resistor string. The position of the center tap can be moved along the resistor string.

Using Linear Potentiometer to Realize Logarithmic Adjustment

The function of a logarithmic digital potentiometer can be achieved by using a linear tap digital potentiometer with a simple and easy-to-understand mathematical relationship. Since the digital potentiometer is essentially a voltage divider circuit, its output voltage has a certain corresponding relationship with the input voltage VIN (VIN acts on RH) acting on both ends of the potentiometer, which can be expressed by the following formula:

VOUT = VIN(RW-L / RH-L) (Formula 1)

Where RW-L is the resistance value between the center tap (W) and the low end of the resistor string (L), and RH-L is the total resistance between the two ends of the potentiometer.

The voltage attenuation is calculated in decibels as follows:

Attenuation (dB) = 20 * log(VOUT / VIN) (Equation 2)

Substituting VOUT from equation (1) into equation (2), we get the following relationship:

Attenuation (dB) = 20 * log[VIN(RW-L / RH-L)/VIN] = 20 * log(RW-L / RH-L) (Equation 3)

As shown in Figure 2, the resistance value can be expressed in terms of the potentiometer tap position (RW-L) and the total number of taps (RH-L).

Figure 2. The wiper point of the linear potentiometer is located at the position of the equally divided resistor string.
Figure 2. The tap points of a linear potentiometer are located at the locations of equally divided resistor strings

The potentiometer tap position (RW-L) can be expressed as:

RW-L = (Total_Taps - x) * R (Equation 4)

Where x = 1, 2, 3...Total_Taps, and Total_Taps is the total number of taps.

Since the first tap point (minimum attenuation) contains no resistor, the total end-to-end resistance is: RH-L = (Total_Taps - 1) * R, and the attenuation can be expressed as follows:

Attenuation (dB) = 20 * log[(Total_Taps - x) / (Total_Taps - 1)] (Equation 5)

where x is Total_Taps. If x = Total_Taps, the attenuation tends to -.

in conclusion

From the above analysis, it can be seen that it is completely feasible to convert a linear potentiometer into a logarithmic potentiometer. This method is very suitable for high-resolution linear potentiometers (128 taps or higher) because the resolution of the logarithmic potentiometer is strictly limited to the range of linear tap points (less than 128). In addition, due to internal structures, such as ESD protection circuits or nonlinear on-resistance of transistors used as switches, accuracy may be affected at the endpoints. The program code given below can realize the conversion between attenuation and tap position (Figure 3) and between the required tap position and attenuation (Figure 4).

Figure 3. This program is used to convert between attenuation and wiper position.
Figure 3. The program is used to convert between attenuation and tap position

Figure 4. This program is used to convert between wiper position and attenuation.
Figure 4. The program is used to convert between tap position and attenuation


Reference address:Using Linear Digital Potentiometer to Implement Logarithmic Adjustment

Previous article:Enhanced Gate Drive Capability of the DS39x Family of CCFL Controllers
Next article:Using the MAXQ3210 in an Audio Attenuator Circuit

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号