Archive Article Basics of Design CC Blog Research & Design Hub

Using Digital Potentiometers

Convenient Control

A digital potentiometer probably can’t be considered the most glamorous of electronic components. But it is easy to use and versatile. In this article, Stuart digs into the uses, advantages and disadvantages of digital potentiometers, including how they contrast to mechanical potentiometers.

By Stuart Ball

One good entry point into the understanding of digital potentiometers is to contrast them alongside mechanical potentiometers. So, let’s start there. If you wanted a volume control on a headphone amplifier, you might use a circuit similar to the one shown in Figure 1. A mechanical potentiometer connects to the audio input from some signal source, such as a radio or computer. The other end of the potentiometer connects to ground. The wiper connects to the input of the audio amplifier.

Figure 1
A simple mechanical potentiometer used as a volume control

The potentiometer has a knob, and as you turn the knob, the wiper moves across a resistive element between the audio input and ground. When the wiper is at the ground end of the resistive element, the amplifier gets almost no signal, and the volume is off. When the wiper is at the other end of the resistive element, the amplifier gets the full signal amplitude, and the volume is at maximum. Between the two endpoints, the volume is attenuated. A stereo system would typically have two potentiometers on the same shaft, so the volume in both channels is the same.

The mechanical potentiometer has some drawbacks. The most obvious one is the need for one knob for every function to be controlled. If you have volume plus tone controls for high, midrange and bass, then you need three more knobs. If you have volume plus an eight-band stereo graphic equalizer, then you need a total of 17 knobs, one for volume and eight equalizer knobs for each stereo channel.


Advertise Here

Another issue with mechanical potentiometers is that the wiper must maintain contact with the resistive element. As the knob is turned, the wiper slowly wears away the material on the resistive element, leaving dead spots where no contact is made. If you’ve ever heard a scratchy sound as you turn a volume knob, that is usually the result of the potentiometer material wearing away in spots.

The issue of a worn potentiometer element also causes the wiper to be momentarily open or disconnected as the knob is turned. In an audio circuit, this causes undesirable noise. In other circuits, such as those involving motor control, this can cause more serious consequences.


Figure 2 is a block diagram of a digital potentiometer, or “digipot,” connected to a microcontroller (MCU). Like a mechanical potentiometer, the digital potentiometer has two ends (A1 and B1) and a “wiper” (W1).

Figure 2
Block diagram of a digital potentiometer.

But the digital potentiometer doesn’t have a single resistance element with a moveable wiper. Instead, it is a series string of resistors with electronic switches that select taps in the string (Figure 3). For an 8-bit, 256-position device, there are 256 internal switches and 256 taps in the resistor string. The position of the “wiper” is defined by a digital word, controlling which switch is turned on and which tap is selected. It is controlled electronically by the MCU. In Figure 2 the potentiometer uses the standard SPI interface, though other interfaces such as I2C are available.

Figure 3
Electrical implementation of digital potentiometer

Showing an example circuit, Figure 4 is a schematic of a Texas Instruments (TI) TM4C1233H6 MCU [1] connected to an Analog Devices AD8400 digital potentiometer [2]. In the schematic, the wiper output of the potentiometer drives (through op-amp U4) the base of a transistor that acts as a constant current driver for an LED. The digital potentiometer is an 8-bit device, meaning that the wiper moves between the B1 and A1 values as the control byte ranges from 0 to 255.

The upper terminal of the potentiometer is connected to 3.3 V, and the lower terminal is connected to ground. As a result, the wiper varies between these two voltages as the control value varies from 0 to 255. That voltage drives the transistor base through U4. …

Read the full article in the October 351 issue of Circuit Cellar
(Full article word count: 3057 words; Figure count: 7 Figures).

Don't miss out on upcoming issues of Circuit Cellar. Subscribe today!


Advertise Here

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

Become a Sponsor
Website | + posts

Circuit Cellar's editorial team comprises professional engineers, technical editors, and digital media specialists. You can reach the Editorial Department at [email protected], @circuitcellar, and