TUTORIAL 4346

Pots, Pans, Logs, and Linear Digital Pots Create Arbitrary Voltage Curves

By:  Bill Laumeister, Strategic Applications Engineer
© Dec 11, 2008, Maxim Integrated Products, Inc.

Abstract: Linear digital potentiometers can be used to make arbitrary voltage curves and waveforms. An alternative name for a digital pot is a "string" digital-to-analog converter (DAC). Logging pots is the art of making a linear pot produce a logarithmic response for applications such as audio.

Logging, pots, and pans are about as diverse as subjects get. Well, that is what most people might suspect because the common definition of logging is harvesting trees. When logs are mentioned, people often visualize cabins and former President Lincoln seated at his desk. Pots and pans are typically ignored as mundane. Nonetheless, an average cook needs great pots to help prevent overcooking and burning food. Engineers, however, have different ideas about logs and pots.

Figure 1 compares pots and pans with logs and log cabins. It also shows the linear and logarithmic plots of a digital pot (potentiometer).

Figure 1. Pots and pans, and logs vs. potentiometers; the plots of log and linear responses are resistance vs. pot position.
Figure 1. Pots and pans, and logs vs. potentiometers; the plots of log and linear responses are resistance vs. pot position.

The most popular electronic potentiometers (pots) are linear (Figure 1, dotted line). Due to their large sales volume, they tend to be among the less expensive pots. Nevertheless, other applications like audio require a logarithmic response (Figure 1, solid line) to match the human ear's response. The dichotomy of these responses inevitably leads to a designer's dilemma. How can we convert a linear response to logarithmic? Maxim application note 3996, "Logging the Linear Digital Potentiometer," provides the math to do the conversion.

How, then, can we visualize the simple conversion? We will graphically illustrate a simple solution. As application note 3996 suggests, the minimum number of taps on the digital pot should be 128 or more. This number ensures that enough steps are available to keep the errors under reasonable control. With some thought we realize that half of the taps always represents 6dB. Consequently, the other half of the taps is the attenuations that are more than 6dB.

We can use a 256-step digital pot as an example. The Maxim website has more than 30 different 256-step digital pots available. The pots have a variety of serial interfaces including I²C and SPI™, as well as up/down. The parts have both volatile and nonvolatile memories. An important parameter for audio use is the glitchless switching between taps found in the MAX5403/MAX5404/MAX5405 family of parts.

To convert a linear pot to logarithmic we just skip certain steps. A 256-tap linear pot can provide 38 log steps with about ±1% accuracy. The steps in dB are 48, 42, 38.5, 36, 34, 32.5, and in 1dB there are steps from 31 to 0. A spreadsheet with the exact numbers is available for download. The spreadsheet also contains 0.5dB increments below the 32dB point.

Using the same step-skipping method we can generate other arbitrary voltage curves. Thus we can compensate for other nonlinear responses such as sensors. For example, if a given sensor changes with temperature, we could sense temperature and compensate.

An alternative name for a digital pot is a "string digital-to-analog converter" (DAC), which means that digital pots are specified with parameters like integral nonlinearity and dynamic nonlinearity.

Now we return to the logs, pots, and pans, and can use our imagination to do creative designs. Usually designers do not need to sit at Lincoln's desk for inspiration, and logs do not always conjure up images of rustic cabins. However, we all can go into our own kitchen, grab a pot, create good food, and be inspired.

Related Parts
MAX5403 Dual, 256-Tap, Low-Drift, Digital Potentiometers in 10-µMAX Free Samples  
MAX5404 Dual, 256-Tap, Low-Drift, Digital Potentiometers in 10-µMAX Free Samples  
MAX5405 Dual, 256-Tap, Low-Drift, Digital Potentiometers in 10-µMAX Free Samples  


Next Steps
EE-Mail Subscribe to EE-Mail and receive automatic notice of new documents in your areas of interest.
Download Download, PDF Format (37kB)  
Share
Other Channels  Email this page to an associate or friend. 


The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.

APP 4346: Dec 11, 2008
TUTORIAL 4346, AN4346, AN 4346, APP4346, Appnote4346, Appnote 4346