Low-Power PWM Output Controls LED Brightness
Figure 1. A common brightness-control circuit for LEDs uses an electrically controlled potentiometer (EPOT) to achieve digital control of the LED brightness.
There is an alternative that reduces the number of ICs and control lines. You can control each LED driver directly with a single output port. Simply replace the EPOT with a simple RC integrator and program the port to output a PWM signal (Figure 2). The average voltage at ADJ (pin 4) varies with the PWM signal and enables the IC (a current regulator for LEDs) to control the LED brightness. An RC time constant at least 50 times the PWM period produces a smooth average voltage across the capacitor. The circuit also includes a 6.65kΩ resistor across the integrating capacitor, which reduces the 5V PWM signal to 1.25V as required by the IC's ADJ input.
Figure 2. Replacing the EPOT of Figure 1 with an RC network reduces both the IC count and the required number of control lines.
A similar article appeared as a Design Idea in the February 20, 2006 edition of EET.