[Design View / Design Solution]
MCUs Provide Power Control And Intelligence For Lighting Applications
Using an MCU or DSC can foster efficient lighting in any setting, as well as decrease complexity and increase flexibility.
Digital Lighting Fluorescent lamps offer a much more efficient source of light over incandescent bulbs. Although the quality of light isn’t as pleasing (due to its lower CRI), the efficacy of a fluorescent bulb is typically 10 times higher than that of an incandescent bulb. Fluorescent bulbs are most widely used in commercial applications, where energy costs must be kept low. However, they’re also finding increased use in residential applications as consumers become more interested in energy savings.
Fluorescent ballast designs have traditionally been based on magnetic (inductor) circuits, but they’re rapidly moving to electronic designs to increase system efficacy. In fact, legislation such as California’s Title 24 has been put in place to ensure that inefficient magnetic designs are gradually phased out of production.
At a minimum, the fluorescent ballast must regulate the bulb current. The resistance of the bulb varies widely, depending on the operational state. The fluorescent bulb consists of a glass tube filled with a small amount of mercury vapor and an inert gas. A tungsten filament is located at each end of the bulb.
Before the bulb is lit, the gas will have a very high resistance. To start the bulb, current is passed through the filaments (not through the gas) so they’re heated and begin to emit electrons. Then, a high voltage potential is applied across the two filaments to strike an arc in the gas mixture. Once the arc is struck, the resistance of the gas mixture drops significantly, due to an avalanche effect. The ballast must lower the voltage across the filaments to maintain the proper current flow through the mixture.
A resonant circuit is commonly used to control the bulb current for switch-mode ballast applications. An inductor and capacitor are placed in series with the bulb (Fig. 3). A second capacitor is placed across the filaments.
A square-wave, variable-frequency oscillator (VFO) drives the resonant circuit through a pair of power transistors connected to a dc bus. A dead-time generator provides complementary signals for the power transistors and ensures that shoot-through currents are eliminated.
The frequency of the VFO regulates the current flow through the lamp. To start the lamp, a high frequency is applied to the circuit. This causes current to flow through the filaments and the filament capacitor CF. The high-frequency operation heats the filaments so the lamp can be started.
After heating the filaments, the VFO’s frequency is changed to a lower frequency. The voltage across the filaments rises rapidly and strikes the arc. When the bulb is lit, the VFO’s frequency can be adjusted to obtain different bulb currents and light-output levels.
A rectifier and a filter-capacitor circuit are usually the first things you’ll find in an electronic ballast circuit to convert the incoming ac voltage into a dc bus for the resonant converter. Unfortunately, this causes the ballast to consume current only at the peaks of the incoming ac voltage. Power-factor correction (PFC) is required in an electronic ballast to increase efficiency and eliminate input-current harmonics.
In many ballast designs, separate ICs are used for the PFC, ballast-control, and external-control functions. However, a digital signal controller (DSC) can be used to implement a complete digital-ballast solution (Fig. 4). This circuit employs the dsPIC33F DSC because its 16-bit CPU has the calculation performance required to simultaneously perform PFC, control the resonant mode inverter, and respond to external control signals if required.
There are many ways to describe how a PFC circuit works, but basically the PFC circuit tries to make the input-current waveform follow the same sinusoidal profile as the input voltage. One of the most popular ways to implement PFC is with a voltage-boost circuit. The inductor current, and therefore the input current, can be controlled by the duty cycle that’s applied to the inductor switch. Ultimately, the rectified ac voltage is boosted to a higher value, usually around 400 V dc. So, the PFC circuit is a boost-voltage regulator. The voltage-regulation function can easily be performed by a digital control loop.
There is a special requirement for this voltage regulator. The regulator uses an inner-current control loop that controls the current profile in the inductor of the PFC circuit. The output of the voltage control loop provides a command to the current control loop, which sets the amount of input current. Before the current command is provided to the current control loop, it’s mixed with a sample of the rectified input voltage. This mixing forces the input current to have the same shape as the input voltage (Fig. 5).
The ballast application uses two PWM channels to implement a fully digital ballast solution. One PWM channel drives a half-bridge circuit connected to the lamp, while the other controls the PFC-boost circuit. The analog-to-digital converter (ADC) monitors two voltages and two currents. The dc-bus voltage, ac-input voltage, and input current are monitored for the PFC function. The lamp current is monitored to control lamp brightness and detect bulb failures.
Proportional-integral-derivative (PID) controllers are used in the PFC algorithm to regulate the bus voltage and input current. The behavior of each PID controller (and the PFC algorithm) can be modified by changing software coefficients. The DSC device has enough CPU bandwidth to execute these PID controllers. In particular, the inner-current control loop will be executed at the same frequency as the PWM signal applied to the boost-circuit switch. A frequency of 100 kHz or more is often used in the boost circuit to keep the inductor size small.
The circuit currents are measured using simple shunt resistors in series with the power switches. This lowers the circuit cost, but requires a little extra work to get the data. The voltage on the shunt resistor only indicates the circuit current at certain times in the PWM cycle. Therefore, the PWM timebase automatically triggers the ADC measurements to ensure that the shunt resistors are sampled at the correct time.