Lighting is a comfort most have come to take for granted. The ability to simply flip a switch – never mindful of the technology behind the lamp – is a luxury unavailable to the lighting engineer. Lighting now comprises approximately a quarter of worldwide electricity consumption, and developed nations are adopting “green” legislation in an attempt to reduce energy consumption and minimize environmental concerns. With lighting receiving increased scrutiny, lighting engineers need to take advantage of efficient lighting alternatives to that of the traditional incandescent light.
At the forefront of the most efficient lighting alternatives today are LED and Compact Fluorescent (CFL) technologies. Actually, the latter has been around for almost 20 years but only recently the industry has been able to get rid of the bad reputation that early CFLs had acquired. In the mad initial rush to get the product into the hands of consumers and at the lowest possible cost, compact fluorescent lamp manufacturers did cut a lot of corners, eventually sacrificing quality. Early compact fluorescent lamps were very slow to start and produced a very “cold” flickery light. It is today’s consensus that such a poor quality stigma did cost dearly to the whole industry. Only the more recent generation of such products, using electronic ballasts to improve on the start time and reducing the flicker in conjunction with improved phosphors producing a warmer light, have been able to win over the resistance of a disenchanted public.
LED technology has the potential to repeat the same mistakes. The pressure to reduce the cost of the solution is perhaps even higher, and it is for this reason that several governmental initiatives have been introduced to avoid falling in the same trap.
It would be such a pity, because LED lighting promises to provide a much better lighting alternative under almost any possible point of view. LEDs do not require the presence of toxic materials such as Mercury, which is present in each fluorescent lamp. They have virtually no start time and can be made to produce a warm and pleasant light. In fact, LED lamps can easily provide any color temperature (Correlated Color Temperature
) required, and are even adjustable on fly. LED lights can be dimmed easily, and can provide an extremely long service life (up to 50,000 hours) with an efficacy that is already superior to that of the best competing technologies. Yet, contrary to the other lighting technologies, they do always require the use of electronics.
Why we need intelligent control solutions
Reducing the cost of an LED lighting solution requires reducing of the cost of the LEDs themselves, which is likely, as all LED manufacturers are applying heavy investments to scale the production capabilities to the immense volumes typical of all broadly adopted lighting technologies.
However, a reduction of the cost of the driving electronics is equally needed.
The dynamics of this second element are not that straightforward though. Much of the benefits of the LED lighting solutions are actually very dependent on the “smarts” of the electronics that we can group in three major categories:
Category 1: Product Life - Long expected product life is only achievable if the driver circuit can withstand the same long life as the LED. The driver must ensure that the light emitting element is treated with care, providing the ideal current, avoiding peaks and temperature extremes, and detecting and compensating for failures (shorts). A long guaranteed life cannot by itself win over new customers, but the lack thereof can certainly taint the product image. Also in some specific market niches such as street lighting, even long-term energy savings can be overshadowed by significantly reduced maintenance costs, thanks to available diagnostic information and accurate failure prediction/indication.
Category 2: Color - Color temperature control and general dimming functionality are achievable with various degrees of complexity once a communication interface is provided. Once communication is enabled, the LED driver can become an integral component of a smart building, allowing ambient light compensation techniques, also known as “light harvesting”, by interacting with occupancy recognition sensors, light sensors, and remote location control interfaces.
Category 3: Efficiency - The last and perhaps the most obvious of the reasons why an LED driver needs to be smart is efficiency. This is a particularly tricky point, as the total efficacy of the lighting solution can be quickly lost when a very efficient light source (LED) is coupled with a poor (inefficient) LED driver, or when the latter is not capable of providing the proper power factor. Also, when dimming and reducing the power output, the driver circuit still needs to be able to operate at similarly high efficiency levels.
What we need is, in essence, a “holistic approach” to driving solid state lights, that is, an approach that requires intelligence at 360 degrees and one that can withstand the test of time. This is made even more difficult because, not only is LED technology moving so fast 
, the standards 
and the market dynamics
are also quick moving targets.
There is no point in wasting time and money in developing single point (fixed) solutions. While possible and even appealing from an economical point of view, developing a custom chip (ASIC) can be a costly mistake. The ideal solution we are advocating should be as flexible as possible, implying the use of microcontroller technology at its core packaged with a set of flexible analog and digital peripherals to help accomplish the job with the lowest possible energy consumption.
Communication and diagnostic
The argument most often heard when advocating the use of intelligence, and in particular the use of microcontrollers in lighting, is when a communication interface is required. In fact, with a few lines of code and a UART (Universal Asynchronous Receiver and Transmitter), a digital peripheral available on most microcontrollers, it is possible to implement a DMX512 interface
. A relatively old and simple protocol that was originally used in the entertainment industry, the DMX512 interface is gaining momentum in solid state lighting, particularly where color and synchronized animations are required in commercial and architectural lighting applications.
The most common communication interface found in all “dimmable” applications is actually an analog 1 to 10 V signal. An ancient technology, easily implemented with a microcontroller and a few lines of code as soon as an ADC (analog to digital converter) is available, which nowadays means practically any microcontroller available on the market down to devices as small as a SMD transistor SOT23 package (see PIC10F
More modern communication interfaces are designed to take advantage of a bi-directional protocol so that diagnostic information can be transmitted back from the fixture to a control unit or user interface of sorts. DALI is one example of such protocols. Although designed primarily with fluorescent lamps as a target (originally it did not contemplate the control of color), DALI does not require the use of any additional custom circuitry to implement a receiver/transmitter interface. Its relatively low speed and the relative recent definition of the protocol show that most manufacturers prefer a “soft” implementation to a dedicated hardware interface. This provides additional flexibility to extend the protocol for custom applications in very large installations or whenever interoperability can be conveniently sacrificed to reduce cost and ease of implementation.
I will not cover here the most advanced interfaces used in Automotive (LIN/CAN) or in the most modern applications where TCP/IP networking (Ethernet) and or wireless interfaces (ZigBee, MiWi, Wi-Fi, etc.) are used, as the point can be easily made that in such applications the communication interface is best kept separate from the actual “driver” circuit.
Customization and calibration
Once the communication interface of choice is available (provided it offers a minimum of addressing capabilities, 1 to 10 V interfaces will be excluded here), the flexibility of the microcontroller approach will immediately bring benefits such as:
Digital, analog or both
- End of line driver customization: special commands can be designed to (re)-configure the driver for different “light engines” as progress, manufacturing needs and market conditions dictate
- Mode of operation selection: the driver unit can be designed to operate in different modes expanding the product offering and providing additional marketing leverage.
- Calibration: reducing the bill of materials and/or avoiding expensive (low tolerance) components to be replaced by lower cost equivalents.
- Customization and In Field Service: re-writing part or all of the microcontroller code to accommodate for custom requests, add new features, or comply with regional specific requirements and last but not least, fix bugs.
Once digital control, in the shape of a software/programmable device, is added to a lighting driver circuit, power supply experts will start immediately questioning the nature of the power conversion control mechanism used. Any LED driver circuit is essentially a power conversion circuit that is called to produce a constant current output. Just as any other power supply circuit and regardless of the topology chosen (buck, boost, sepic…), its core control loop can be implemented as a full digital control loop. Many advantages of this approach can be demonstrated by so called Intelligent Power Supply units using inexpensive digital signal controllers (modern hybrids between a true Digital Signal Processor and an embedded microcontroller) reducing component count, size, cost and eventually providing a better regulation of the output (voltage or current or both).
Figure 1: Analog vs. digital control loop.
This is an important change of perspective, but one that comes at a price. A digital control solution must first prove its ability to match the cost and efficiency of the analog control solution it replaces. While the point (power) where this happens has been lowered significantly in recent years, it is today still in the range of several hundred of watts. In fact, this is still far above the point of operation of the LED lighting application with the highest volume/potential, which requires only a dozen watts to produce the equivalent light output of the typical 60 W incandescent light bulb.
At these power levels, a hybrid solution, featuring an analog control loop supervised by a low cost and low power microcontroller, achieves a better price point, provided a small number of analog functions are integrated in the same device.
Figure 2: Hybrid Control Loop using an inexpensive 8-bit MCU.
Zero MIPS peripherals
If a full digital approach using a Digital Signal Processor needs to operate at hundreds of MIPS to produce the desired level of output regulation, efficiency and savings, a hybrid approach needs to replace some of the key elements of the control loop with (integrated) analog and digital peripherals to reduce the burden on the controller and allow us to use an embedded microcontroller operating at the lowest possible speed.
Figure 3: Flyback hybrid controller.
In Figure 3, we can see a simple offline Flyback topology where an 8-bit microcontroller is efficiently operating a direct power conversion from the mains AC input to produce a regulated DC current output feeding a string of LEDs.
Notice how the CPU is not part of the fundamental control loop (figure with simplified block diagram), although it does have access to each component. The control loop is composed of a comparator, a reference (DAC), a set-reset flip-flop, and an output stage. Once initialized, all these components do not require the microcontroller firmware intervention on a cycle-by-cycle basis to operate. If left to its own, this circuit would be able to “cruise” for milliseconds and perhaps seconds at a time without disruption.
We can say the control loop is essentially requiring “zero” MIPS for its operation (power conversion). The limited computational power available on an inexpensive (8-bit) device can now be spent to “supervise” the driver operation, performing power factor correction, soft start, dimming, and communication, or in other words, the “intelligence” required by the application.
Once the basics are taken care of, an ideal embedded control device (optimized for LED lighting applications) would better integrate a small number of additional goodies such as:
- A high voltage power supply, perhaps as simple as a shunt regulator, so that during the “bootstrap” phase of the circuit, before a stable output voltage is available, the device can power itself without the need for additional external expensive circuitry.
- A fixed voltage reference, so that an absolute value can be provided to measure the input/output voltage thresholds, once more without requiring additional expensive components
- A complementary output pair, possibly with dead-band control, so that synchronous conversion circuits can be implemented in order to minimize the switching losses.
- High current outputs, so to be able to directly drive power MOSFET device gates.
- Fast comparators (20-30ns), so to bring the frequency of the power conversion up to the 400-500 kHz range, right where a good cost/size reduction of the magnetics can be achieved without requiring the use of expensive power MOSFETS or incurring in higher (silicon) losses.
- Finally, a programmable amplifier can be made available to help filter and reduce further the losses in the current feedback circuit (using a smaller resistor).
Figure 4: PIC16HV752 block diagram.
When the design complexity grows to include the control of multiple LED strings, a single PIC 8-bit microcontroller, such as many members of the PIC16F family
, can be employed efficiently to control up to four power conversion circuits: three for red, green, and blue plus one for an additional white component, or three for RGB and one for a boost power factor correcting input stage or any other combination of the above.
Among the most challenging applications, where intelligence is required and the flexibility of a small microcontroller can make the difference, are legacy applications where the new LED lighting lamp is called to replace a previous incandescent (or even fluorescent) lamp. When the design of the luminary is constrained by legacy, economical, and other considerations, common LED lighting challenges such as thermal and dimming control can be exasperated. While LEDs will produce a significantly smaller amount of heat than incandescent light bulbs for a given amount of light output (lumens), all the heat produced has to be transferred exclusively by conduction as opposed to radiation. This means that the new design must include a carefully placed and properly sized heat sink, possibly including ventilation if the form factor does not allow for a natural air flow and sufficient heat dissipation. A small microcontroller can spare a few lines of code for a periodic check of the LED’s temperature via internal or remote temperature sensing, placing a sensing element as close as possible to the actual heat source. Protecting the LEDs from overheating is the best insurance for a long product life and a constant quality light output.
Another example of similar legacy application challenges is the control of the dimming function via an incandescent dimmer circuit. Dimming an LED lamp is in itself a very simple problem that can be solved in numerous and inexpensive ways. Unfortunately none of them happens to be directly compatible with the traditional incandescent lamp dimmers. So, if a direct retrofit solution is desired, leaving the building’s wiring intact and without replacing the switching and dimming circuitry, smarter drivers have to be designed.
These drivers have to interpret the modulated signal they receive from the mains wiring and translate it into the desired LED dimming technique which, in its simplest incarnation, requires changing the duty cycle of a fixed frequency signal (PWM).
The problem would not be so challenging if it was not for the large variety of incandescent light dimmers installed in the world (TRIAC based, IGBT based, leading edge, trailing edge, filtered) and the fact that as the (legacy) dimmer reduces the output power, the LED driver is gradually being “starved” all the while having to maintain the efficiency and desired power factor characteristics.
Algorithms are not forever
Just as the past ten years have seen the LED lighting technology move from experimental (on the desk of a few visionaries and scientists) to mass production, we should not expect anything less dramatic for the next decade. In addition to the technology itself, governments, markets, and other powerful forces are constantly at play to change the scenario and keep moving the target for the solid-state lighting designer. Algorithms are the designers’ best friends, and when implemented as firmware in an embedded microcontroller, they can adapt to the fastest changing conditions.
Intelligent driver design using a small embedded microcontroller and integrating only a few flexible analog and digital peripherals can not only provide an efficient and inexpensive solution, but also one that can withstand the test of time and, in the medium/long term, provides the most return.