Modern architectural lighting and video displays deal with millions of colors and brightness levels. Flashing the LEDs is simply not enough. Designers are looking for a solution to accurately mix adequate combinations of red, green and blue to create a wide range of colors. RGB LEDs are simple, great devices for such design needs and open up a number of possibilities for lighting applications such as traffic signals, general lighting systems, automotive lighting, advertising signs, LcD backlights, and more
Pulse Width Modulation
Confused what RGB lighting means? In RGB, the “R” stands for red, the “G” stands for green and the “B” stands for blue. These three colors when combined, and varied in intensity, have the ability to produce millions different colors!
An appropriate mixing proportion of red, green and blue can create a color out of endless colors available in the RGB spectrum. To create a color to use, an efficient and simple method is Pulse Width Modulation (PWM) which controls average current flowing through each LED (red, green and blue) of a RGB LED between 0% and 100%, which varies its brightness level from zero brightness to full brightness.
To believe this, let’s take an example of a display with 12-bit resolution. Each pixel in a color display is composed of three LEDs (red, green and blue) and all three LEDs can use any of the 2^12 or 4096 different levels or shades, making a RGB cluster with 68.7 billion colors (4096 × 4096 × 4096 = 68.7 billion).
PWM Duty Cycle
If, over a time duration, we turn on the LED for 50% and off for 50% of the time, the LED will appear half as bright since its total light output is only half of the maximum output. The percentage of time period for which the LED is ON during one cycle (50% in this case) is known as duty cycle. By varying (or ‘modulating’) the PWM duty cycle or ON time of pulse, we can effectively control the LED’s brightness. Hence the term “PWM” or Pulse Width Modulation.
PWM Speed and PWM Resolution
When using PWM, the switching speed of LED or PWM frequency should be generally greater than 100 Hz to keep the user from seeing the LED turn on and off. Flicker is eliminated above 100 Hz and the observer can only see a constant brightness. Another important factor in PWM is “PWM resolution” which affects the total number of colors available in a video display. PWM resolution dictates the number of brightness levels which can be displayed between 0% and 100%.
In a high-quality, full-color video display, the PWM resolution is number of brightness levels available for each of the RGB LEDs that make up a single pixel in a overall display. For instance, 12-bits of resolution provides 2^12 o or 4096 shades or brightness levels for each LED. With each pixel in a color display composed of three LEDs (red, green and blue), each of these LEDs can be driven to any of these 4096 levels rendering a RGB cluster capable of a billion of clusters (4096 × 4096 × 4096 = 68.7 billion colors).
Generating PWM signals Using MCUs and LED Drivers
The following section discusses interesting reference designs on RGB LEDs controlled by microcontrollers and LED drivers along with complete documentation. Take a look!
- Low-cost RGB LED Solution with GUI control: This reference design presents a low-cost solution to add fully-controlled RGB LEDs into any type of design. Complete control over RGB LEDs parameters including – color, blink rate, brightness and breathing (turn on/turn off speed) is allowed. Using an SPI interface and software GUI, users can control all four RGB LED control functions from a MAC or Windows PC via a USB cable. Documentation with schematics, user guides, and more is available. Hardware evaluation board options are available to test and evaluate the RGB LED reference design. More on this Reference Design
- RGB Fun-lighting with LED Driver and MCU: This reference design uses the ADP5520 LED Driver to drive up to 6 LEDs in series and a RGB LED. A microcontroller sends the signal to the LED driver ADP5520 using the I2C bus to show backlight fade in/out, backlight dim, ambient light sensing, and RGB fun-lighting features. More on this Reference Design
- RGB LED Driver for a Portable Projector: This is a reference design for a 6A step-down LED driver for a portable projector. The LED driver uses the MAX16821, a PWM HB LED driver to step-down a 10V to 15V input supply voltage to drive a constant current to an LED with a 4.5V to 6V forward voltage. This circuit drives a single LED and three MAX16821 devices are required to drive RGB LEDs. This design requires the LED current to rise/fall within 1µs during PWM at a 6A LED current. The design includes the circuit specifications, circuit schematic, and circuit description and performance. More on this Reference Design
- LED Lighting Control for Architectural Lighting: This reference design describes a multi-color LED lighting control solution by using the MC9S08AW60 Microcontroller. The MCU allows easier development of code for LED control applications, architectural/entertainment lighting or LCD backlighting. The system consists of a MCU control board and a LED driving board. The separated LED light-box with driving circuitries is also available as a whole demo kit to demonstrate how to do the color mixing and see the visual effects on changing different type of parameter settings. The MCU is responsible for controlling timer channels for the RGB LED color PWM output and communicating with the host PC for receiving command and data input/output. More on this Reference Design
- RGB LED Indication Control by MCU: Here is a reference design that offers a solution to control a RGB tri-color LED. The design can be used where multi-colored LED indication is required. The design uses P-FETs to source LED current directly from VCC supply. Other features included are an independent control of color and brightness, support for 512 unique colors and 50 brightness levels, and a serial interface to externally control the RGB LED. The design uses software PWM generation using the MSP430G2553 MCU from TI. More on this Reference Design
- Generating multicolor light using LED Driver and MCU: This reference design can drive super high brightness multicolor RGB LEDs with current up to 700 mA per LED. Different colors can be generated by controlling the power to red, green and blue LEDs. In this application, the microcontroller ST7FLITE09Y0M6 from ST Microelectronics provides three software PWM signals for LED drivers STP04CM596 so the color can be regulated. The LED over temperature protection is designed to limit power delivered to the LED automatically to prevent LED overheating. More on this Reference Design