Fig 1. Compact fluorescent bulbs typically incorporate custom electronics to minimize costs.
Fig 2. LED replacements are available for many form factors. The challenge tends to be LED placement to duplicate the original lighting characteristics.
Fig 3. LED replacement of fluorescent tubes also includes removal of the ballast. The LED tubes are normally connected directly to the power source.
Fig 4. High-intensity discharge (HID) lamps can benefit from the more precise power management available with a microcontroller.
Fig 5. Microchip’s Digital LED Lighting Development Kit includes a 16-bit dsPIC33 GS that can handle everything from ballast control to power factor correction (PFC).
Blinking an LED is the “Hello World” program for embedded developers. But these days, microcontrollers do much more for lighting than controlling the output.
Fluorescent and high-intensity discharge (HID) lighting already have proven to be formidable challenges to incandescent lights. However, incandescent lighting’s power requirements and heat generation also have hastened its decline. Compact fluorescent lamps (CFLs) and LED lighting spell the death knell for incandescent bulbs in all but specialized applications.
Incandescent bulbs have advantages that were hard to beat in the past. They were inexpensive to build and required only wires and switches with some fuses or circuit breakers thrown in for safety. They provide light the instant they are turned on and go out when turned off.
Fluorescent and HID bulbs required a more complex system between themselves and the light switch. Ballasts and starter capacitors are standard replacement fare for these applications. Improved efficiency and bulb life made up for the added cost and complexity, but they still weren’t pushing the optimum efficiency possible with electronics.
Electronic ballasts increased the complexity again but lowered overall costs through even longer life and better power utilization. Initially, the electronic ballasts utilized analog feedback and control. Microcontrollers can do this job better, though, while providing more functionality that an analog approach cannot touch. Add LEDs to the mix and microcontrollers become the centerpiece to extremely flexible and long-lasting lighting.
Today’s microcontroller is extremely compact for the amount of computing and interface power it gives designers. A PC used to be a massive box. Now the microcontroller is a chip measuring a few millimeters on a side with more processing power and advanced analog interfaces.
Many microcontrollers are optimized for power-management and lighting applications, although the typical general-purpose microcontroller has enough processing power and interface support to handle many lighting applications. Likewise, many platforms designed for other power-management chores such as motor control and power-supply control are equally applicable to lighting requirements.
Micros are changing all three lighting application areas: bulb replacement, standard lighting, and embedded lighting. The most obvious is bulb replacement. Tremendous innovation is occurring in the standard lighting market because of the flexibility available to designers, who are no longer restricted by form factor and power. Finally, there is the embedded lighting market for applications such as LED backlighting for LCDs.
Bulb Replacement Market
The screw-mount light bulb tends to fit the most popular retrofit categories for new CFL (Fig. 1) and LED (Fig. 2) lights, while LEDs (Fig. 3) are also finding a home where fluorescent tubes used to be. These two types of bulbs share challenges due to form-factor restrictions and power-supply issues. Heat issues are more common with screw-mount installations. Still, microcontrollers can bring significant benefits to these replacements.
Keep in mind that lately the micro tends to be one of the smallest components in the system, and it’s often dwarfed by capacitors and other power components. Likewise, functionality is rarely limited by package size except to provide sufficient I/O to get the job done. For simple chores, this might mean half a dozen pins, while more complex lighting chores require more pins.
The requirements can vary widely based on the lighting technology being supported, the complexity of the design, and the cost and volume of the support hardware. CFLs require control of a single tube, while most applications need multiple LEDs.
The basics in this market include on/off lighting and dimmable products. On/off lighting often is handled without a micro, but the micro can offer advantages to the designer. These advantages typically include better on and off power sequencing for CFLs because there is usually a tradeoff in terms of bulb lifetime versus the speed to full light intensity.
Analog approaches usually threw lots of power for the initial startup of the arc needed within the CFL. This is a trivial exercise for most micros, and more complex timing procedures will typically turn an almost idling micro into a slightly bored chip as it handles a little more work unless it is doing more advanced power factor correction as well.
The challenge for the other dimmable products lies in the possibility of handling different dimming strategies. The typical dimmer employs a triac to trim the ac current sent to a light. The problem is that the way this is accomplished varies from vendor to vendor and even within a product line. The results were of little or no significance when the device being controlled was a single filament bulb because of its lighting response characteristics.
The problem is that the digital lighting solutions are trying to play with the incoming power and convert it to something that the lighting subsystem can use efficiently. Analog solutions can be used, but many bulbs get returned because they can’t handle all the possible dimmer switches in the field.
The challenge for digital lighting designers is to build a system that can recognize the state of the system and respond to the less than perfect sine wave coming into the bulb. The issue is not as simple as one might think because the response curve of the new digital lighting needs to be similar to that of the incandescent bulb it’s replacing. Incandescent bulbs require at least 15% of their rated power to light, and an exponential power curve is needed for a linear light response.
In a sense, the new technology is working the way theatrical lighting and many other advanced products operate. In these systems, the added cost to handle these relationships as well as the human eye’s response to light can be considered because the overall operation is very nonlinear.
The relationship of the clipped input voltage to the light output needs to account for these factors along with the characteristics of the replacement technology. These characteristics will be different for CFLs versus LEDs. The amount of power needed generally isn’t an issue, but controlling it properly will be.
LEDs are also replacing fluorescent bulbs in the retrofit market because of their efficiency and longer life. An LED bulb typically lasts at least five times longer and uses about half the power of a fluorescent bulb. Then there’s the issue of how the tubes degrade. An LED light can fail incrementally since the bulb comprises many individual LEDs. However, a failure in the control electronics means a complete failure of the bulb.
Compared to the screw-mount replacement, changing to LED tubes is a bit more involved because making an LED tube that replicates the electrical characteristics of a fluorescent tube is cost prohibitive. LEDs like low-voltage dc, while fluorescent tubes like higher-voltage ac power. Fluorescent tube ballasts actually are current limiters because the tube’s resistance goes down as more current flows through the tubes. But more on ballasts later.
Designers can replace or remove the ballast and switch to an LED tube such as the common T8 and T12. The new LED tubes have to do the same thing as the screw-mount replacement bulbs, but the form factor is much different. The most common approaches involve replacing the ballast with a power control unit and connecting the ac wires directly to the tubes.
Replacing the ballast leads to a slightly less expensive tube that must be matched to the control unit. In connecting the ac wires, the power control unit is contained within the tubes themselves. There’s plenty of room for electronics because the tubes normally consist of one large board with LEDs on one side and room for electronics on the other.
Both approaches require changing the wiring inside the light fixture. The fixtures also look like fluorescent light fixtures, but they can only be used with LED tubes. The differences between an LED and a same size fluorescent tube are quite obvious visually. Unfortunately, putting the wrong type of tube in a fixture won’t result in useful lighting and likely will cause havoc in some instances.
The integrated LED tube is easy to install. The process is simply a matter of cutting the wires on the ballast and reconnecting the power lines to the bulb sockets. It only requires wire stripping and some wire nuts. The ballast often is left in place since the room isn’t required and it would simply make for a disposal issue. It would also make a switch back to fluorescent tubes easy.
The only difference between the screw-mount LED bulbs and tubes is the form factor. This simplifies the problem from a design standpoint because it now comes down to circuit board design. A tube may consist of a single controller for all the LED strings or multiple controllers.
Custom technology dominates volume solutions in the retrofit market because cost is such a big factor and the numbers are so large. Billions of bulbs translate into lots of hardware.
Ballast Changes
Migration to LED tubes provides some significant benefits, especially where the cost of replacing a tube is more than the cost of the tube itself. Still, the upfront costs often deter many designers from making this change, especially if the operational lifetime of a single bulb may exceed that of the environment where it is used.
Electronic ballasts of various forms have been around for a while. Yet micro-based solutions can improve performance and lifetimes compared to conventional ballasts. In particular, these solutions can provide power factor correction.
Putting a micro in the ballast brings some interesting options that are being utilized at the high end of the user spectrum. Adding wired or wireless communications becomes a straightforward embedded development project. Communications can provide two major features.
First, the light now can be controlled from the network, making a light switch just another node in the network. Second, communications can provide feedback so systems can sense a variety of different information, such as whether the light is on, if it is operational, and how much power might be used as well as data about the environment like temperature and humidity.
Ballasts are used with HID lights including fluorescent tubes, but HID lights are common in a wide range of application areas. For example, metal-halide HIDs are found in automotive headlights. Xenon headlights are found in luxury cars and automotive add-on kits (Fig. 4).
Ballast and light issues in these arenas also include the color of the lamp as well as how it may change over time. Ballasts that are more intelligent and have additional feedback such as ambient temperature allow better control of the system. HID lighting also is common in street lamps. Remote control of these lights is often necessary, and integrating communications and power control systems has many advantages.
Designers have been taking advantage of HID lighting, but LEDs continue to push their way into these areas because of their low-power requirements. Still, HID lighting often wins out because of brightness. This is one reason HID is still tops in automotive headlights but LEDs are making significant inroads for other automotive lights.
On the other hand, LEDs for trail bike headlights tend to win out because they are battery operated and last longer. The whole assembly also is more compact. The small size of LEDs as well as their ability to be mounted almost everywhere can lead to some interesting applications.
What Micro To Use For Lighting
Micros are utilized in such a wide range of lighting applications that it’s hard to say which is the best even within a particular application area because of the number of variables involved and the architectures of the chips and peripherals. Many applications can be handled by 8- and 16-bit micros, especially where low cost and small size are issues.
Also, 16- and 32-bit micros tend to be better when communications are involved, but it depends on what kind of communications will be used and how fast they will be operating. Many standards like the Digital Addressable Lighting Interface (DALI) run at 1200 baud and half duplex at that. Any 8-bit platform could even bit-bang out this protocol and still have cycles left over.
Peripheral requirements tend to be more interesting in the selection process. Again, these requirements are based on the application and may require analog sensors and analog-to-digital converters (ADCs) or pulse-width modulator (PWM) outputs.
The standard PWMs in most micros can handle many lighting chores. But, like motor control, some applications can benefit from specialized features. With PWMs, some lighting requirements are different from those for motor control.
Motor control PWMs offer useful features such as the ability to include dead time between synchronous PWM outputs, preventing switching issues with linked MOSFETs. Also, some micros can tune leading or falling edges with picosecond accuracy, though the overall timing characteristics may be using 16-bit counters.
Lighting PWM requirements sometimes also need to deal with external hardware issues. For example, PWM streams frequently are used to approximate sinusoidal signals or to drive audio amplifiers. The problem with lighting arises from resonant frequencies that may cause the hardware to operate in a suboptimum mode, resulting in CFLs that flicker.
One approach to solving this problem is to introduce some randomness into the equation. Some micros have PWMs that can shift the PWM streams using pseudorandom or table-driven values. Including this support in hardware allows lower-end micros to provide this feature.
PWM support is key to most lighting control. It can even be exploited where other techniques would utilize more power or provide less functionality. For example, even LEDs deliver nonlinear performance that can be exploited. In many instances, the delivery of maximum brightness requires a constant, high-current source.
Instead, a suitable PWM stream can do the same thing. CRTs use the same approach, as their phosphor dots are pulsed. Similar adjustments can affect other characteristics such as color and power requirements depending on the device being controlled. Sometimes the results include a finer level of control or power savings. Even a small percentage savings can add up.
A single micro may control one device, like a CFL bulb, or multiple strings of LEDs. This is sufficient for a light in the closet, but multiple lights and fixtures are often combined. This is where multiple micros can come into play and communications becomes an issue.
Lighting and Communications
Like lighting control, lighting communications comes in a wide range of flavors addressing a host of applications often with differing requirements including cost. Wireless and wired control both are available for different applications.
Now, add the micro into the mix because its lighting control makes it easier to include communication support. It also greatly simplifies applications such as exhibition lighting and digital signage. Home and commercial lighting control are part of many green initiatives as well.
Then, there’s convenience. Power-line communication (PLC) and control have been available using the X10 system for decades, and newer systems like Smarthome’s Insteon provide two-way communication (see “X-10 Broadcast Power-Control Protocol Gets Major Overhaul” at electronicdesign.com).
Cost and configurability have always been challenges with these systems. Compatibility or at least coexistence with other PLC systems is a more common issue. PLC is used for everything from energy monitoring to computer networking.
As noted, even the smallest micro on the market can easily implement the DALI standard, which uses the micro’s own wired pair to connect up to 64 devices. DALI also offers a gateway protocol for connecting groups of devices and can handle dimming chores. The IEC 60929 standard applies DALI to fluorescent light ballasts.
Those working behind the scenes in theaters and similar areas will recognize DMX, short for DMX512-A. It is an Entertainment Services Technology Association (ESTA) standard for lighting control. It also pertains to control consoles like the elaborate lighting boards needed to handle theatrical presentations. And, DMX is used for a wide range of other applications such as architectural lighting and theme parks.
DMX is based on the EIA-485 differential serial interface, which is another protocol that most micros with a UART can easily handle. It is a multi-drop master-slave bus technology like DALI and many other protocols that handles up to 32 devices. The bus can be up to 3900 feet away, and extenders or gateways can increase this distance.
A network is called a DMX Universe. The communication rate is 250 kbaud. DMX is often preferred to network technology like Ethernet because its cabling system is so robust. The DMX protocol has been extended to the wireless space.
There is a host of wired proprietary systems. There are proprietary solutions in the wireless space as well, but the two leading wireless protocols handle lighting chores: ZigBee and Z-Wave. Both are used in a range of consumer, commercial, and industrial applications where lightning is one of the major aspects. As with PLC, wireless conflicts can be an issue (see “Short-Range WirelessUSB Could Give ZigBee Fits” at electronicdesign.com).
Z-Wave is based on its own source-routed mesh technology (see “Wireless Technology Leads The HAN Push For The Smart Grid” at electronicdesign.com). It is a low-power solution with a range of about 100 feet and a bandwidth up to 40 kbits/s. A single network can handle up to 232 devices with gateways required for larger networks.
Based on 802.15.4, ZigBee includes a home control lighting (HCL) profile (see “Ultra-Low-Power Wi-Fi Module Targets Industrial And Sensor Network Applications” at electronicdesign.com). It also includes commercial building automation (CBA) and industrial plant monitoring (IPM) profiles. ZigBee has a host of other profiles as well since it addresses a wide range of applications beyond lighting and environment control.
ZigBee and 802.15.4 run up to 250 kbits/s with a range of about 10 meters. Like Z-Wave, there can be tradeoffs with bandwidth, power, and distance. ZigBee and 802.15.4 provide a mesh network. Nodes may be full function devices (FFDs) or reduced function devices (RFDs). An FFD can route messages through the mesh, while an RFD is designed for very low-power and low-resource platforms, leaving routing details to a nearby FFD.
Many lighting applications don’t require ZigBee support but may take advantage of 802.15.4. These applications can easily coexist with ZigBee, but they typically won’t interact directly.
Wired protocols like DALI and DMX require lower-performance nodes and do not include any type of security. On the other hand, the wireless protocols tend to be a bit more public in their operation so security is an issue that has been addressed.
Most wireless protocols include at least the option for encryption and secure authentication. This is critical not only from a security standpoint but also from the natural interaction of adjacent wireless networks. This interaction can easily occur in an apartment or home setting as well as a commercial setting like a strip mall.
Of course, linking these wired and wireless control networks to the local-area network (LAN) or Internet is also common fare. There is an app for that, as they say, and these apps let users control lights and other devices from an Android smart phone or Apple iPhone or even tablets like Apple’s iPad or Motorola’s Xoom.
Kits and Reference Designs
Lighting development kits and reference designs are like motor control solutions. There are lots of them, and they target a wide range of applications. They’re also available from microcontroller vendors.
Microchip’s Digital LED Lighting Development Kit (Fig. 5) includes a 16-bit dsPIC33 digital signal controller that can handle power-management chores, including power factor correction (PFC). Different plug-in modules highlight LED support.
NXP puts a 32-bit Arm Cortex microcontroller into its DALI module, which supports one timer/capture interface. It also can handle six light control outputs. The DALI protocol stack supports four PWM outputs.
STMicroelectronics uses an Arm microcontroller for DALI platforms as well. Its Cortex-M3-based STM32 microcontroller provides a range of communication options in addition to lighting control support. STMicroelectronics also has a line of ST7 microcontrollers with peripherals specifically designed for HID applications and another for CFL applications.
Cypress Semiconductor’s programmable system-on-a-chip (PSoC) configurable microcontrollers are a good fit for lighting applications. The Cypress CY3268 PowerPSoC Lighting Starter Kit is designed to handle high-brightness LEDs that can be driven by the chip, A special PowerPSoC Embedded Power Controller can drive up to four 1-A/32-V independent channels. PSoC micros also find homes in DALI and DMX equipment.
Texas Instruments addresses the wide range of lighting applications with three product lines. The 16-bit MSP-430 suits low-end LED chores. The Arm Cortex-based Stellaris line fits apps where communication is key. And, designers can tap the C2000 where complex, real-time computation is necessary.
The C2000 includes the Control Law Accelerator (CLA), which is a coprocessor that can handle power-management and motor control chores in conjunction with or independent of the main processing core (see “Common-Law Accelerator Offloads DSP” at electronicdesign.com). It is often employed in HID and CFL applications as well as high-end LED applications.