Build an RGB LED Controller

Using Parallel FET Dimming

There are a lot of fun and interesting things you can do with LEDs and the different ways to control them. In this article, Dirceu describes an alternative approach to control RGB LEDs, using the parallel FET dimming technique. He steps through his efforts to design and build an alternative lighting system based on power RGB LEDs. To control them he goes very old school and uses an 8-bit MCU and the BASIC programming language.

By Dirceu R. Rodrigues, Jr.

Nowadays, applications involving advanced processors like Arm and Espressif ESP-32 are commonplace. But I thought it would be cool to test some fun lighting sequences that are controlled by an 8-bit microcontroller (MCU) programmed using an ancient language: BASIC. Although using pulse-width modulation (PWM) to dim LEDs with MCUs is a long-established idea and there’s a plethora of such products on the market, my approach differs from others regarding the drive method used. The benefit will be a relatively shorter BOM, but is also of particular interest to embedded system designers involved with LEDs because it will be possible to experiment with alternative configurations for the control stage.

LEDs are inherently nonlinear devices. Their brightness depends primarily on the current flowing through them, even though the voltage on terminals don’t vary that much. To achieve a constant LED current, there are two approaches: linear or switched current regulation. A linear regulator is preferred in situations where the noise due to commutation would be unacceptable—or for example, in high-precision measurement equipment. When efficiency is the main concern, a switched regulator or driver usually is chosen.

A commercially available driver usually operates above 1 MHz, providing hysteretic regulation for the LED current. To implement the required dimming, a common solution is to apply a PWM signal to an enable pin of the regulator. Because the entire component is switched continuously, the delay due to the soft start function must be taken into account. The disadvantage of this mode is, therefore, the limitation at low frequencies, usually 100 Hz. Other drivers, such as the ZXLD1350 from Diodes Inc. (used here), have a similar input named ADJ, capable of accepting a PWM signal up to 1 kHz.

Figure 1
Shown here is the basic idea for the design.

As outlined in Figure 1, my application takes a different approach. Rather than applying PWM pulses to a dedicated regulator pin, these signals are used to “short-circuit” the LED. So, when a switch is closed, the corresponding LED is off. This technique—known as parallel FET dimming—does not pose a problem itself, since the driver is based on a current source. Regardless of the state of each LED, the same current always flows through the entire circuit. For an independent control of three RGB LEDs, traditionally three drivers are employed, each with its own inductor, Schottky diode and sensor resistor, as shown in Figure 2a.

Figure 2
(left) shows a traditional configuration for driving 3 LEDs. (right) shows my alternative configuration, which reduces the number of components by connecting the three LEDs in series.

My alternative configuration to reduce the number of components is to connect the three LEDs in series, each with its own switch driven by PWM (Figure 2b). Note that, in this case, the ADJ pin from the single ZXLD1350 stays floating, and the three PWM signals are moved to the gate of MOSFETs. Therefore, it is possible to control three LEDs using only one set, consisting of driver, sense resistor, flyback diode and inductor. …

Read the full article in the August 349 issue of Circuit Cellar
(Full article word count: 2287 words; Figure count: 9 Figures.)

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

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.

Data Communication Between “Smart” Pendants

As head of the Computer Science and Software  Engineering department at Penn State Erie, The Behrend College, Chris Coulston is busy.

But not too busy to surf the ‘Net for design inspiration.

And one of his latest projects may earn him the title of “social jewelry designer,” along with college professor and department chair.

In the June issue of Circuit Cellar, Coulston writes about his design and construction of an RGB LED pendant that “cycles through a color sequence, detects when another pendant is brought into its proximity, and communicates color sequence information to the other pendant through its LED.” The heart of the design is a Seoul Semiconductor SFT722 RGB LED.

Coulston was online a few years ago when he ran across the first half of his project inspiration—a Mitsubishi Electric Research Laboratories technical report titled “Very Low-Cost Sensing and Communication Using Bi-directional LEDs.” The report, Coulston says, “describes how an ordinary LED with no additional circuitry can act as a full-duplex communication channel.”

Pendant’s two boards

His remaining inspiration came from an article he recalled appearing in Circuit Cellar a decade ago.

The Mitsubishi labs technical report “got me thinking about Jeff Bachiochi’s article ‘Designing with RGB LEDs’ (Circuit Cellar 159, 2003), in which the challenges associated with designing a piece of LED jewelry are described,” Coulston says. “The fusion of these two ideas was the inspiration for my social jewelry design.”

Coulston’s design includes a pair of circuit boards, the upper containing the LED and analog circuitry and the lower containing the microcontroller.

“The prototype pendant is mainly controlled through a USB-to-USART bridge,” Couston says. “Its power is supplied by the same connection.”

He invites anyone who is  “curious how an LED can be used as a transceiver and how it’s used to build a piece of social jewelry” to read his article. You’ll find it in next month’s issue of Circuit Cellar.