Applications that include LEDs but no microcontroller or other form of control intelligence can take advantage of a simple circuit that provides manual control of the LEDs' light intensity. Among the devices suitable for this purpose are mechanical (analogue) and electronic (digital) potentiometers. The digital potentiometer with up and down pushbuttons, an alternative to the mechanical potentiometer, is smaller, more reliable, and usually less expensive (figure 1).

EDNAOL 2016JUN15 AN 01Fig1Figure 1: This brightness-control circuit lets you manually adjust the LED brightness using the up and down buttons.

IC2, a current regulator, drives a chain of LEDs with current as high as 200 mA. In a standard application circuit, IC2's internal regulator senses the drop across current-sense resistor RSENSE in series with the LED chain. Thus, IC2 controls current through the chain by regulating voltage at the differential inputs, CS– and CS+, to the set value of 204 mV. Resistors RA and RB allow the output voltage IC1's Pin 6 to adjust the current level. IC1 is a 64-tap linear digital potentiometer whose resistance connects between ground and V5, a well-regulated voltage that IC2 internally generates. You manually adjust the RW control voltage (Pin 6), a fraction of V5, using the up and down pushbuttons. A few assumptions allow a quick and simplified calculation of the necessary resistor values. Initially, you fix RA and then calculate RB and RSENSE. The assumptions are that you can neglect the maximum 6.93µA error induced by the bias current at CS+; that the value you choose for RA is much higher than IC1's equivalent resistance, for which the worst-case value at position 32 (top and bottom resistances plus the wiper series resistance) is 2.9 kΩ; and that RSENSE is much less than RB. After setting RA at 25.5 kΩ, VWIPER=(5V/63)×N, where N is the wiper setting (0 to 63). Then, you solve the equation (VWIPER–0.204V)/RA=(0.204V–ILED×RSENSE)/RB. Solve the above equation for RB under the conditions for which ILED=0, which are N=63 and VWIPER=5V (top position): RB=25.5 kΩ×0.204V/(5V×0.204V)=1.085 kΩ. You can choose RB from the standard values of 1.07 kΩ (1% series) or 1.1 kΩ (5% series). At the bottom position, where VWIPER=0 and LED current is the maximum of 200 mA, brightness should be the maximum available. Solving for RSENSE, RSENSE=[0.204V+(0.204V×(1.085/25.5))]/0.2A=1.063Ω; 1.07Ω is a standard value in the 1% series.

EDNAOL 2016JUN15 AN 01Fig2 Figure 2: A plot of LED current versus tap position in Figure 1 exhibits only a slight non-linearity.

A graph of LED current versus tap position shows a slight non-linearity because of the variation in resistance you see looking into the wiper at different tap positions (figure 2). At the extreme ends of the potentiometer, you see only the 400Ω wiper resistance. As the wiper moves towards midpoint, the resistance increases towards a maximum of one-quarter of the end-to-end resistance value. Because IC1 is a 10-kΩ potentiometer, the resistance the wiper sees at midpoint is about 2.5 kΩ in series with RWIPER. This variation introduces a maximum linearity error of 8%, which is negligible in most LED applications. IC2 offers thermal protection against excessive heat and overload conditions. For effective power dissipation and to avoid thermal cycling, you must connect the exposed pad of the package to a large-area ground plane.
This article is a Design Idea selected for re-publication by the editors. It was first published on March 15, 2007 in EDN.com.