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.

Negative Feedback in Electronics

Lead Image Novacek

A Look at the Opposite Side

Besides closed-loop control systems, negative feedback is found in many electronic circuits—especially in amplifiers. And just like positive feedback, negative feedback can significantly change or modify a circuit’s performance.

By George Novacek

Following last month’s discussion of positive feedback, let’s now take a look at its opposite: the negative feedback. Besides closed-loop control systems, it is found in many electronic circuits, especially in amplifiers. As we have already seen, feedback significantly changes or modifies a circuit’s performance. The end of the 19th century and the beginning of the 20th century was the era of introduction of the telephone. For long distance calls, amplifiers were needed along the telephone lines to make up for their transmission losses.

Vacuum tube amplifiers of the day suffered from many ailments: drift, high distortion and generally poor performance, making the long-distance voice communications nearly unintelligible. Harold Stephen Black, an AT&T engineer, was one of many working to solve this problem. Eventually—because he was familiar with the effects of negative feedback in mechanical systems—he tried to apply it to a vacuum tube amplifier. The result was astonishing and amplifiers with negative feedback have been with us ever since.

FIGURE 1 Transfer function of an operational amplifier with negative feedback

FIGURE 1
Transfer function of an operational amplifier with negative feedback

The op amp is the epitome of feedback application in electronic circuits. Because its comprehension is valid for all electronic feedback circuits, let’s take a closer look at the op amp. To analyze the negative feedback mathematically, we’ll consider an amplifier as a combination of two functional blocks: The open loop gain (OLG) block with transfer function A(s) and the feedback block with transfer function β(s). With monolithic amplifiers, the feedback is usually applied externally. The overall transfer function follows the principle shown in Figure 1.. …

Read the full article in the November 328 issue of Circuit Cellar

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.