By: Charlie Ice, Product Marketing Manager, High-Performance Microcontroller Division, Microchip Technology Inc.
A modern city glistens with color. Neighborhoods bask in the orange glow of sodium-ion streetlights. Automobile headlights and taillights turn the highways into rivers of light, and the downtown skyline is lit with the subtle hue of skyscrapers. A state-of-the-art concert uses lights to transform the stage. A building uses colored light to make it look more attractive, and even a pool can use color-changing lights to set the mood.
Lighting is everywhere, and fixtures that can project any color of the rainbow are becoming more and more commonplace. LEDs are leading the way for making color-changing fixtures not only more efficient, but also more accessible and less expensive. With an LED, designers find a unique combination of efficiency, dimming capabilities for color mixing and long life. Using a Digital Signal Controller (DSC), LEDs can be controlled digitally, giving the lighting fixture both intelligence and the ability to communicate to the outside world. These features give the designer the freedom to implement new and exciting features in LED fixtures.
Most engineers are quite familiar with typical low-power-indicator LEDs, whether they be surface-mount or the classical through-hole packages. All that’s needed to use them is a voltage source and a series resistor of the right value, to keep the current of the LED within spec—typically less than 5 mA. Tie this to a GPIO pin on a microcontroller, and you get one of the world’s most common demonstrations— a blinking LED. However, move to a high-brightness, high-current LED with a forward current of well over 350 mA, and put 10 of them together in a string, and all of the simplicity goes out the window.
The first issue with a high-brightness LED is efficiently maintaining the higher constant current that is required to maintain its brightness and color. As can be seen in Figure 1, the Luminous Flux of the LED, which is effectively the measurement of the amount of light emitted by the LED, is related to the forward current through the LED. This shows the need to maintain a constant forward current (IF) through the LED to achieve a consistent color and light output. If we consider the case of a simple resistor in series with the LED, the forward current is determined by: (IF = (VSource-VF)/R). As the source voltage (VSource) varies, the forward current (IF) will also fluctuate, causing variations in the amount of light emitted by the LED. This clearly shows the need for the LED to be driven by a power supply that actively regulates the forward current of the LED. In general, one characteristic of LEDs and diodes is that, as the temperature increases, the forward voltage (VF) will also increase— even with a constant and regulated forward current. As shown in Figure 2, if the forward current is not properly regulated as the forward voltage of the LED varies, so will the forward current. This is another example of the need to properly regulate the forward current through the LED, and not the forward voltage.
The next major challenge is heat. High-power LEDs get hot—very hot. Excessive heat will significantly decrease the LED’s lifespan or possibly cause premature failures. Actively controlling the LED’s forward current gives designers the ability to determine the heat-sinking requirements, based upon the target forward current and estimated forward voltage. The use of temperature sensors also provides the option of monitoring for possible overtemperature situations. Additionally, there are issues with high-brightness LEDs that must be addressed, beyond those presented. However, the intelligence of a DSC enables these issues to be addressed through the power of software-based control.
LEDs have the amazing ability to change their light output almost instantly. This makes them perfect for color light-fixture applications, as the color can be rapidly changed. Simply string a red, green and blue LED, or strings of LEDs, together, and they can make any color of the rainbow by adjusting the brightness of each LED. At this point, dimming each LED becomes a design challenge. Since the forward current of the LED dictates the brightness, the obvious approach is to simply raise or lower the forward current of each LED. However, this creates a problem, as the color of the LED will also change slightly when the forward current changes. This is undesirable in applications where maintaining the proper color is important. Therefore, instead of directly lowering or raising the LED’s forward current, the forward current can be pulsed, resulting in the same dimming effect as lowering the forward current. Looking at Figure 3, the effects of this technique become clear. The dashed red line shows the average current, which creates the perceived change in brightness. However, the forward current across the LED is kept constant so that a constant color is maintained.
Pulsed current dimming is greatly simplified by using digital control. Many DSCs have advanced PWM modules that generate PWM signals to control the power stage for the LED. These PWM modules have override inputs that can quickly and precisely shut off the PWM outputs, allowing the current to the LED to be controlled and dimming achieved. The amount of dimming is quantified by a number between zero and some value that represents full brightness. To set the LED to 50% brightness, a counter would count from zero to 255 and, when a count of 128 is reached, a signal would trigger the PWM override. The PWM output then would shut off, effectively removing the current from the LED. When the counter reaches its maximum value of 255, it is reset to 0, and the PWM is again enabled. The process starts again, creating the pulsed current needed to dim the LED, as shown in Figure 4. The dimming frequency must be fast enough so that the human eye cannot perceive the flicker in the LED. Typically, a frequency greater than 400 Hz will achieve this.
As previously mentioned, the forward current for a high-brightness LED must be actively controlled, resulting in the need for an active power supply to power the LED. The buck and the boost Switch Mode Power Supply (SMPS) topologies are two power-supply topologies commonly used to power LEDs. Both actively control the current to the LED, and both benefit from the intelligence of a DSC.
A buck topology is ideal in cases where the forward voltage of the LED or string of LEDs is less than the source voltage. Figure 5 shows a typical buck topology used to control an LED. As shown, the PWM controls the switch (Q), and the voltage across the sense resistor (Rsns) corresponds to the forward current of the LED when the switch (Q) is closed. The voltage across the resistor (Rsns) is fed into the DSC’s comparator, which then compares this voltage against a configurable internal reference that is proportional to the desired forward current of the LED. If the sensed voltage is greater than the internal reference, the analog comparator disables the PWM’s opening switch (Q), which causes the inductor (L) to discharge its stored current through the diode (D) and the LED. On the start of the next PWM period, switch (Q) closes, and the process begins again. With the DSC’s advanced features, this method is able to actively regulate the forward current through the LED while using no CPU overhead.
As the name implies, a boost topology is ideal in cases where the forward voltage of the LED or string of LEDs is greater than the source voltage. Figure 6 shows a typical boost topology used to control an LED. Like the buck topology, the PWM controls the switch (Q) and the forward current is monitored across the sense resistor (Rsns). The ADC module on the DSC samples the voltage across the sense resistor, which corresponds to the forward current of the LED. This value is then fed into a Proportional Integral (PI) control loop being executed in software on the DSC. Based upon the ADC reading and a software reference value corresponding to the needed current, the PI loop adjusts the duty cycle to the switch (Q), accordingly. The advantage of using a DSC here is that the PI control loop is implemented in software so that a wide variety of other control-loop methods can be used. Furthermore, the PI control loop uses very little CPU overhead so that the DSC can control multiple LED strings and still have headroom left over for other features.
Speaking of other features, one of the most exciting reasons to use a DSC to control a light fixture is the ability to add communications to the system. A DSC has enough processing capability to intelligently control the LED fixture, while at the same time implementing a communication protocol to communicate with the outside world. This eliminates the need for a separate communication-and-control device. One common lighting-control protocol is DMX512. This standard uses one-way communication with one master and multiple slaves, to send commands across to the individual light fixtures. DMX512 transmits 512 bytes of data per packet and allows for each device or node to be individually addressed. A DSC’s high-speed processing enables it to execute the fast control loop, such as the PI controller for the boost converter, as its top priority, while running the communication protocol, such as DMX512, in the background. Since the communication is implemented in software, the fixture isn’t limited to just one protocol—rather, it can implement any communication scheme the designer needs.
Like any new technology, digital LED control has a learning curve. To simplify learning digital control, many silicon suppliers now offer digitally controlled LED lighting kits and reference designs. Many of these offer free source code and hardware documentation. Because there are such a wide variety of LED topologies, some even offer interchangeable power stages. For example the LED Lighting Development Kit (part # DM330014) from Microchip has the LED driver stage on a daughter card, enabling multiple driver stages to be experimented with using the same board. With many development tools and application notes available, the learning curve for digital LED control is much easier to overcome.
LEDs continue to grow in popularity, due to their high efficiency and their instant dimming properties, which makes them a great fit for color-mixing applications. Designers need to add more features to these fixtures, to make them more competitive in the market. Intelligent control and communication are two critical features in future fixture designs. Digital control using a DSC can take designers and their lighting fixtures to the next level.