APRIL 2009: Electronic lighting control is an emerging application in power electronics. One common driver of this market is the resulting efficiency. The addition of a small, low-cost microcontroller unit (MCU) increases efficiency besides providing other benefits in lighting power-sup-ply systems.

For example, an MCU can be added to a LED lighting system for efficiently controlling the brightness of the LED over its entire operating range. (LEDs provide a durable source of light with efficiencies exceeding those of incandescent bulbs.) Similarly, for fluorescent bulbs, which are also a very efficient source of light, electronic control via an MCU allows the bulb to dim to any level, thereby increasing efficiency. The MCU can also monitor bulb currents to ensure that its brightness level remains constant.

Other benefits of using an MCU are active power factor correction (PFC) to further increase the efficiency, battery charging for portable lighting applications and the opportunity to integrate communication protocols such as DALI and DMX512.

The energy used by lighting
A significant amount of energy usage can be saved by switching to more efficient types of light sources and the use of electronic controls. The state of California has some of the most strict energy regulations in the US, and for good reason. It uses approximately 265,000 GWh of electricity each year, and the peak demand increases annually at a rate of 2.4 per cent. This increase in demand is equivalent to the output of three 500MW power plants. It is estimated that their energy-reduction efforts have saved $36 billion so far, and will save another $43 billion by 2013.

The California Energy Commission performed a comprehensive study to document the lighting energy used by the state. The residential data was obtained from 700 homes, and the commercial data was obtained from 1500 commercial buildings. The commercial buildings were further separated into ten categories.

This study showed that residential lighting consumed 8 per cent of all the energy used by the state. Commercial lighting consumed 14 per cent of all the energy used by the state.

Fig. 1: Efficacy of various light sources
Fig. 2: Typical electronic fluorescent ballast circuit
Fig. 2: Typical electronic fluorescent ballast circuit

The efficiency of a light source, or efficacy, is defined as the amount of light output divided by the electrical input power. The light output is measured in lumens. The efficacy of several types of light sources is shown in Fig. 1.

The incandescent light bulb, hardly modified from Edison’s original invention, is still widely used in residential applications. The California data showed that 59 per cent of all residential lighting energy was consumed by incandescent sources. However, the incandescent bulb offers the lowest efficacy of all sources, except for the candle.

The data drove new energy standards in the state of California, known as Title 24. The state has published compliance manuals for residential and commercial applications. To give an idea of how Title 24 is affecting the lighting industry, here is a summary of the residential requirements for new construction and remodeling:

1. High-efficacy lighting is defined as 40 lm/W for lamps less than 15W, 50 lm/W for 15W-40W lamps and 60 lm/W for lamps greater than 40W.

2. At least half of the installed wattage in kitchen must be high-efficacy. The other light sources must be switched separately.

3. Lighting installed in garages, bathrooms, laundry rooms and utility rooms must be high-efficacy or controlled by an occupancy sensor.

4. Lighting in other rooms must be high-efficacy or controlled by an occupant sensor or dimmer.

5. Outdoor lighting must be high-efficacy or controlled by a photocell or motion sensor.

6. Ballasts for lamps over 13W should be electronic type with a switching frequency of 20 kHz or higher.

Fluorescent bulbs
Fluorescent (CFL) bulbs are highly efficient light sources, with efficacies of up to 100 lm/W. Development of the fluorescent bulb dates back to the 1800s, but Edmund Germer is given the credit for making this technology feasible in 1926. General Electric later purchased Germer’s patent for fluorescent technology and brought fluorescent bulbs into widespread use by 1938.

The fluorescent bulbs work by conducting current through a tube that is filled with mercury vapour. The vapour ionises to produce ultraviolet light. The tube has a phosphorous coating which shifts the light output to the visible spectrum.

How to drive a fluorescent bulb?
Fluorescent bulbs cannot operate directly from a power supply because of their negative impedance properties. As the current flow in the tube increases, the internal resistance decreases. This results in a run-away effect. A ballast device is required to limit the current. The ballast could be as simple as a current-limiting resistor, but it is very inefficient. Inductor ballasts have traditionally been used to control fluorescent bulb current. The inductor solution also allows an auto transformer circuit to be implemented, which steps up the line voltage to the bulb’s required level.

Starting the fluorescent bulb
To start a fluorescent bulb, the input voltage must be raised to a ‘strike’ voltage that causes current to flow in the bulb. The strike voltage produces the initial arc in the bulb. After the strike, the resistance of the bulb rapidly decreases.

Fluorescent bulbs are available in pre-heat, rapid-start and instant-start varieties. These types of bulbs differ in the way the filaments are heated prior to striking the arc. The pre-heat type bulbs use an external starting switch to momentarily connect the filaments in series. Rapid-start bulbs use only the starting voltage to heat the filaments. Instant-start bulbs do not require filament heating and can be recognised by a single terminal at either end of the bulb. A voltage that is high enough to strike the arc without heating is applied to the bulb.

Rapid-start bulbs have the best characteristics, especially for electronic ballast applications. Though these bulbs are less efficient than other types because the filaments are continuously heated, less stress placed on the filaments results in longer bulb life.

Electronic ballasts
Fig. 2 shows the circuit that is commonly used to implement an electronic ballast, which offers better efficiency than inductor ballasts.

A resonant circuit using an inductor and capacitor is placed in series with the lamp. The L-C circuit values are chosen such as to provide resonance at the switching frequency, when the lamp is operating. Typically, electronic ballasts use switching frequencies in the range of 20-50 kHz. A second capacitor placed across the lamp effectively connects the two filaments in series at frequencies higher than the resonant frequency. Typically, the starting frequency is 100 kHz.

Fig. 3: Equivalent electrical circuit during fluorescent pre-heat cycle

During the filament heating cycle (high-frequency), Cf conducts and the circuit looks as shown in Fig. 3. After certain time duration of filament heating, the frequency is reduced to start the lamp. Cf becomes an open circuit at the lower frequency. Before the lamp starts, the resistance of the bulb is high and the voltage rapidly rises to the strike voltage, due to the resonance of the inductor-capacitor circuit. The strike voltage is typically 600V AC or higher.

After the arc is struck, the resistance of the bulb falls and the equivalent circuit looks as shown in Fig. 4. The voltage across the bulb also drops dramatically and is usually less than 100V AC.

Fig. 4: Equivalent electrical circuit after strike
Fig. 4: Equivalent electrical circuit after strike
Fig. 5: Electronic fluorescent ballast operation
Fig. 5: Electronic fluorescent ballast operation

Fig. 5 shows the graphical representation of the operating stages of an electronic fluorescent ballast.

Generating a precise variable frequency from a digital PwM module
A typical pulse-width-modulation (PWM) peripheral on an MCU can easily be used to generate variable-frequency oscillation (VFO) required for ballast applications. The PWM module is well suited for generating variable pulse widths at a fixed frequency, but may not have the frequency precision required for the ballast application. This is especially true if dimming is required. The dimming of a fluorescent bulb can be accomplished by increasing the frequency away from the resonant frequency of the drive circuit. Fortunately, there is an easy way to solve the problem using software.

Fig. 6 shows a typical digital PWM peripheral found on an MCU. There is a digital timebase and associated period register that sets the PWM signal period. A third register is used to set the duty cycle of the PWM.

To make the things easy, let us assume that the timebase is clocked from a 10MHz source. Further, assume that the centre frequency required for the ballast circuit is 50 kHz. A value of 200 would be loaded into the period register to get a 50kHz output signal. For good dimming adjustments, you need to be able to vary the frequency in 0.1 per cent (50Hz) steps. If the period register changes to ‘199,’ an output frequency of 50,251 Hz results. So we need a way to increase the frequency resolution by a factor of ‘5.’

The frequency resolution can be increased by forcing the PWM module to switch between two adjacent periods over time. At the end of each PWM period, a value is added to an accumulator register. The value added to the register represents the fractional portion of the required period. If the register overflows as a result of the addition, the higher of the period values is written to the PWM module in order to produce a lower frequency. If the register does not overflow, the lower period value is used.

Assuming that the PWM module has an 8-bit period register and the accumulator register is also 8-bit, you effectively have a 16-bit register for setting the PWM period. Stated another way, you have added eight fractional bits to the frequency-adjustment resolution.

Fig. 6: Block diagram of the digital PWM peripheral
Fig. 6: Block diagram of the digital PWM peripheral

To generate a frequency of 50,050 Hz, the required period value is 199.8. The PWM period register is set to a value of ‘200’ 80 per cent of the time, and a value of ‘199’ 20 per cent of the time. The value added to the 8-bit accumulator register is 0.8×256=204=0xCC.

The table shows how the algorithm works over several PWM periods. The period register of the PWM module is changed between 199 and 200 over time, so the average period of 199.8 is produced.

With the 8-bit accumulator used in this example, the effective frequency can be adjusted in 10Hz steps around the centre frequency of 50,000 Hz. This resolution provides excellent dimming performance in electronic ballast applications.

Power LEDs
LEDs have been widely used in indicator applications for years. The indicator (or winky-blinky) style LEDs are low-current, low-power devices that are not very suitable for lighting applications. However, recent advances in semiconductor manufacturing, silicon structures and phosphor coatings have made high-power LEDs possible.

Present-day power LEDs have a high efficacy that approaches or exceeds that of other efficient light sources. LEDs also offer other benefits like long lifetime and resistance to shock and vibration. These benefits make the LEDs useful for traffic signs, automotive lighting, military applications or any place where safety, reliability or the cost of maintenance could be an issue.

Power LEDs are manufactured with a silicon-carbide or sapphire substrate. The sapphire substrate offers a lower manufacturing cost, but higher thermal resistance. Silicon carbide can be more attractive because of its lower thermal resistance, which is extremely important for power LED applications.

The substrate is then doped with AlInGaP to make the LED red, orange or yellow in colour. Or, the substrate can be doped with AlInGaN to make green, blue or white LED. The colour produced by the LED is a function of the doping (the lens over the LED) and the phosphorous coating that is applied beneath the lens.

White light
The ability to make a white light source with an LED is very important for lighting applications. There are two common methods for making a white LED. The first is to use a blue LED with a phosphor coating that creates a white light. The other method uses an LED that emits light in the ultra-violet range. A mix of red, green and blue phosphors is then used to turn the UV light into visible white light.

There are some pros and cons of each of these methods. The blue-LED+phosphor method provides a very efficient light source. On the downside, it is difficult to control the exact colour of the light output because of variations in the blue LED. The UV LED+RGB phosphor construction provides a more predictable colour because the properties of the phosphor determine the colour of the light output. A disadvantage of this technique is that the red phosphor tends to degrade faster than other phosphors, causing a shift towards cool white.

Another way to produce white light with LEDs is to use three emitters for red, green and blue. If the LEDs are driven in the right proportions, you get white light. Similar to the UV+RGB phosphor type of LED, the colour of the three-LED solution tends to drift as each LED ages differently. In critical applications, active sensing and control can be used to correct the three-LED white light source, over time.

Thermal issues with LEDs
As stated before, heat dissipation and thermal resistance are big issues with power LEDs. A power LED does not radiate heat. This means, unlike incandescent bulbs, you will not feel the heat when you get near the power LED. Instead, the heat generated by an LED must be mechanically conducted away from the junction.


Power LEDs could not be viable without the same assembly techniques as used to make power semiconductors. Winky-blinky LEDs have a junction that is encapsulated by an insulating, epoxy lens. This leaves only the leads to conduct heat away from the junction. In contrast, power LEDs, like other semiconductor devices, are manufactured on a chip. This chip is then fixed to a heat slug that penetrates through the package, and the connections are made to external terminals by bonding wires. The slug is then encapsulated with a silicone gel and covered with a hard plastic lens that is coated with phosphorus. This encapsulation method avoids stress on the bonding wires. The epoxy lens will not be practical, because of thermal expansion.

Heat is the biggest enemy of power LEDs. However, the lifetime of LEDs can exceed 50,000 hours, in comparison to 8000 hours of fluorescent bulbs and 2000 hours of incandescent bulbs. To achieve such a long lifetime, the junction temperature of the LED must be kept low. The actual temperature limit is a subject of debate among major LED manufacturers, but, in general, the junction temperature must be kept at 80°C or less to achieve a long lifetime.

When run continuously at temperatures above 80°C, the LED can fail in less than 10,000 hours. At temperatures near 80°C, the light output falls off rapidly in the first 10,000 hours. But, thereafter, the LED continues to generate a reduced light output for long. At more moderate temperature levels, the LED produces a relatively consistent light output over its entire lifetime.

Although LEDs have evolved to become very efficient sources of light, every LED system design is a tradeoff between light output, efficacy and heat-sink design. It may be necessary to drive a power LED at a reduced power level to meet temperature and heat-sink design requirements. Furthermore, packaging requirements of the lighting fixture might limit the ability to provide good heat-sinking.


The most common method for dimming in large installations is analogue 0-10v DC control. it can be incorporated into the design using an analogue-to-digital converter (ADC) channel.

Power LEDs with power levels exceeding 3W have become widely available. However, it is still easier to meet thermal design requirements using multiple smaller LEDs in the 1-2W power range. Furthermore, greater efficacy can be obtained when the LED is driven at a lower current. LED system designs will continue to become more practical as the efficacy of the LED is increased.

How to drive a power LED?
LEDs require a constant-current source, rather than constant-voltage. For the winky-blinky and lower-power types, a resistor does the trick. For LEDs above 1W, the resistor becomes impractical. Standard switch-mode power supply (SMPS) topologies and controllers can be used to drive the LEDs at these high power levels, using LED current instead of voltage as the feedback to the controller. The choice of topology depends on the system input voltage, LED forward voltage and the number of LEDs connected in series.

Clean power
So far we have discussed only the power-conversion circuits that allow an LED or fluorescent tube to be driven from a DC bus. How current is drawn from the AC line is of equal importance. Typically, a bridge rectifier circuit with filter capacitors consumes current from the AC line only at the peaks of the AC input voltage. The result is a current waveform with a high harmonic content and poor power factor.

An active PFC circuit can improve conversion of AC power into DC power. In simple terms, an active PFC circuit forces the current consumption of the circuit to track the envelope of the incoming AC line voltage. PFC helps to meet energy-efficiency requirements. Thus it helps customers achieve a faster payback for electronic lighting controls.

Active PFC is most easily implemented using a voltage-boost circuit with an outer voltage-feedback loop and an inner current-control loop. The voltage-feedback control loop provides the demand for the inner current-control loop and determines whether more or less current is required to achieve the desired bus voltage. The current loop demand is then used to scale a sinusoidal reference signal.

The sinusoidal reference signal can be derived in two ways. First, it can be measured directly from the rectified AC input voltage. A simpler solution uses a sinusoidal reference stored in the memory of the MCU. A PWM channel on the MCU can be used as a simple digital-to-analogue converter to generate the sinusoidal reference. An R-C filter is connected to the PWM output pin to convert the PWM signal into a voltage.

The values in the sinusoidal table are scaled up or down by the current demand from the voltage control loop. The sinusoidal reference signal stored in the memory is synchronised to the zero crossings of the incoming AC voltage, using an interrupt on the MCU.

The use of a sinusoidal reference table assumes that the incoming AC voltage is purely sinusoidal and does not have any distortion. This assumption is practical for many applications. Consequently, the method is known as indirect PFC. Fig. 7 shows the block diagram of indirect PFC.

Communication control and status
MCUs allow communication to be integrated into lighting applications. This is especially important for commercial applications where regulations and energy pricing incentives may dictate the use of daylight harvesting, occupancy sensors and other automatic control methods.

Fig. 7: Block diagram for indirect PFC
Fig. 7: Block diagram for indirect PFC

The most common method for dimming in large installations is analogue 0-10V DC control. It can be incorporated into the design using an analogue-to-digital converter (ADC) channel.

More sophisticated digital communication solutions, such as digital addressable lighting interface (DALI) and DMX-512, rely on an MCU-based design. DALI is a bidirectional protocol for controlling multiple light fixtures on a two-wire bus. It uses a 1200-baud, bi-phase signal that is easily generated by an MCU. The protocol can address one of 64 lighting fixtures individually (or one of 16 groups, as 16 individual groups can be formed out of the 64 addresses) or broadcast to an entire network. Advanced features such as fading, logarithmic profiles and scene control can be implemented. Since the protocol is bidirectional, fault information can be sent to a host controller.

As the name implies, DMX-512 allows dimming signals for 512 lighting channels to be multiplexed onto one wire. The protocol evolved from analogue multiplexing protocols used in theatre and entertainment industries. DMX-512 can be implemented with a standard UART operating at 250 kilobauds and uses an RS-485 differential driver to allow transmission over long distances.

One disadvantage of DMX-512 is that it provides only unidirectional communication. A new extension to DMX-512, called remote device management (RDM), has recently been proposed as a means to offer bidirectional communication. RDM would also allow remote setting of the node addresses.

One of the disadvantages of DALI, 0-10V and other control schemes is that separate wiring needs to be run to each fixture. With an MCU, control schemes are possible that eliminate the extra wiring. Some systems use the chopped AC waveforms, generated by a TRIAC dimmer as a dimming signal for the ballast. It is also possible to use power-line modem communication schemes. Infrared communication could be used to control multiple fixtures in the same space.

One emerging wireless protocol, called ZigBee, provides a cost-effective solution for low-data-rate control networks and could have potential for use in lighting-control applications. The protocol provides self-commissioning of network nodes and security features.

LED driver issues
The use of MCUs in LED driver applications facilitates PWM dimming. The easiest way to dim a LED is to adjust the current output level of the switch-mode or linear driver.

However, linear dimming is not preferred for two reasons. First, the LED doesn’t operate at its optimal efficiency point over the brightness range. Second, linear dimming can produce a colour shift in the light output of the LED.

PWM dimming solves both of these issues by modulating the LED output with a low-frequency PWM signal. The LED is turned on at a single current-drive level. Its brightness is adjusted by changing the average time period for which the LED is active.

PWM control and LED drive functions can be integrated into a single-chip solution. Or, a low-cost MCU with as few as six pins can be used to generate the PWM dimming signals for a separate driver circuit.

Fluorescent ballast issues
As shown earlier, the fluorescent bulb can be dimmed using a precise, variable-frequency source. The drive-current level is reduced by moving the drive frequency away from the resonant frequency of the L-C circuit. The dimming performance of the electronic fluorescent ballast can be improved further by monitoring the bulb current with the MCU. This allows the bulb current to be set at exactly the right level for the desired output. Furthermore, the MCU can determine whether the lamp has failed to start.

For ballast manufacturers, an MCU-based solution permits a flexible platform. The MCU can easily be reprogrammed with different startup profiles for different types of bulbs and different L-C circuit values.

Why use an MCU?
At first, you might not consider the use of an MCU for a lighting application. However, MCUs can be integrated into the design at any level to create efficient lighting applications. These can handle both communication and power-control functions. Furthermore, they provide a flexible platform that can be easily programmed to create new features and functions.

The author is a technical staff engineer at Microchip Technology Inc.


Please enter your comment!
Please enter your name here