Digital Power Factor Correction for Tube Lamp Ballasts and
other digital power supplies controlled by an 8-bit microcontroller
1 Introduction
The electronic ballast market has undergone dramatic changes over the last few years. It
has moved from full analog, very differentiated applications made by a collection of drivers
and controllers, where use of custom ASICs was widespread, to a couple of standard
platforms.
The basic building bloc ks are st i ll the same. They include a power factor corrector s tage and
an inverting high voltage stage (Figure 1). On the one hand, analog platforms are targeting
the low cost/basic performance applications. Their main drivers and controllers are widely
used and well known ICs such as Power Factor Correctors (L6561/2/3) and High Voltage
Ballast Controllers (L6569x/ L6571x/ L6574). On the other hand, a new digital platform
concept has gained more interest and acceptance. A microcontroller with a simple Half
Bridge Driver (L638x) has replaced the ballast controller. The Half Bridge Driver is used
mainly for high-end applications, especially where the microcontroller has to deal with
communication tasks (e.g. using the Dali protocol).
STMicroelectronics' digital ballast reference design STEVAL-ILB002V1 introduces a safe
operating Power Factor Controller (PFC) and Ballast Controller. Even with relatively simple
microcontroller firmware routines, the results for power control and ballast protection are in
line with advanced analog controlled ballasts, while adding flexibility, for example, the
possibility to drive a wide variety of lamps, or to easily introduce different protection
schemes.
This application note deals in detail with the first block of the digital ballast, which provides
stable DC bus voltage for the halfbridge in all load conditions, as well as controlling the input
current shape which fulfills IEC standards (6.: IEC 61000-3-2 "Electromagnetic
compatibility".).
The final description of the digital ballast - the lamp control block - will be described in detail
in a separate application note.
The first signal used by the microcontroller is a voltage connected to the input connector.
This voltage is first divided and filtered by the circuitry shown in Figure 9. Then it is
measured by an analog to digital converter (ADC) inside the microcontroller. This signal has
several uses. The first is to avoid connecting the wrong input voltage at the beginning (i.e.
only European mains are allowed) and second to guard input over-voltage during normal
operation. The whole operation is stopped if the microcontroller detects any problems. If an
application is stopped due to a fail condition, it could be restarted only by re-lamping
(insertion of the lamp) or by mains recycling. The third use of the input voltage
measurement is to detect this recycling (disconnection and reconnection of the mains).
A fourth use of the input voltage is when it works in conjunction with the main control loop
(described in Chapter 4.2) to recognize a zero mains voltage crossing.
Figure 9.Input voltage sensing circuit
750k
+
–
100n
750k
Vin
10n20k
AI12652
16/35
AN2459 - Application noteSignals measurement, processing & control
Figure 10. Input voltage sensing c i rcuit outp ut
Note:Brown = mains voltage, Green = voltage on ADC pin.
Note:Brown = mains, Green = DC output, Purple = PFC MOSFET gate.
4.2 Output voltage
The DC bus voltage (PFC output voltage) is measured by a high voltage divider with a lowpass filter (Figure 12). It is used by the software as an input for a PID regulator to calculate
the MOSFET on-time. Parameters for the regulat or are not fixed but change depending on
the lamp state. This is because the electronic ballast behaves like a load with strongly
changing conditions (preheating / ignition / normal operation).Figure 13 outlines one control
cycle, and clearly shows that the regulator changes the MOSFET on-time at the
synchronization event with the mains voltage zero crossing.
Input voltage OK
⇒ Σstart switching
18/35
AN2459 - Application noteSignals measurement, processing & control
Figure 14 shows a DC bus voltage waveform during ballast turn-on. The precision of
regulation during normal operation (lamp is on) is ±5%. The only moment when this
accuracy is breached is at ignition phase, when there is a relative fast load change (lamp
voltage and current rise quickly). It is assumed that by improving the regulation parameters,
the ballast will also work from wide range mains (without any component change).
Figure 14. Application start-up
Note:Brown = V
DC BUS
; Yellow = lamp current.
Beside the main control loop, output voltage is also used for protection. The software is
continuously supervising the output voltage value and when it reaches the upper or lower
threshold an error is detected. Overvoltage above the higher threshold could mean that
there is an unexpected fast load reduction. Alternatively, breaking the lower threshold
means a fast increase of the load. Both situation are considered dangerous and are
recognized as faults.
20/35
AN2459 - Application noteSignals measurement, processing & control
Figure 15. Lamp restart - behavior of the control loop
Lamp removedLamp inserted
Note:Brown = DC bus voltage; Blue = lamp filament current.
4.3 Zero Current Detection
Detection of a zero current crossing the PFC inductor is extremely important. As described
in Section 2: Power Factor Correction (PFC), a ZCD defines the moment when the switch
should be turned-on again. A well-known method used in other analog PFC applications has
been implemented for the digital ballast. The secondary winding of PFC inductor (1:10
winding ratio) gives a correct signal for the autoreload timer(Chapter 2.2). Typical signals
are shown in Figure 16.
Note:Green = microcontroller's input pin 18, Blue = inductor current.
22/35
AN2459 - Application noteSignals measurement, processing & control
4.4 MOSFET current measurement
The main reason for measuring a current flowing through the PFC MOSFET is to preve nt
exceeding the maximum current rating and so saturating the boost inductor which results in
damaging components.
The software routines in general are too slow to perform fast reaction. For this reason, only
hardware peripherals are used, and the software is excluded from the detection of overcurrent. Two extra features of the ST7LITE19B are important for this protection:
●the analog comparator;
●the break funct ion.
The comparator integrated inside the microcontroller (datasheet ST7Lite1xB, 4 section 11.6)
is a general purpose analog comparator with either an external or internal reference. Output
can be seen on an external pin (Port P A7 - pin 11), or as it is in this case used only internally
as an input for the second peripheral - the Break.
The Break function is an emergency shutdown used to stop all PWM outputs (i.e. MOSFET
gate signals). A detailed description of it may be found in the ST7FLITE19B datasheet, 4
section 11.2.3.3.
Figure 17. PFC MOSFET ove rcurre n t de t ec tio n c ircuit and zero coil curren t
detection circuit with indicated testing connection and microcontroller
inner structure
PFC Coil
27k
Zero Current Detect
DC
Over current testing
STPP5NK60Z
0.5
1k
2n7
DC BUS
22µF 450V
+
PFC OC
PB0
(pin 4)
Voltage
reference
+
–
on rising edge
generation
ST7FLITE19B
BREAK
active on rising edge
Interrupt
Running SW
PWM0
PWM1
PWM3
PA2
(pin 16)
PA3
(pin 17)
PA5
(pin 13)
AI12654
Halfbridge
high side
Halfbridge
low side
PFC
In order to simulate the PFC MOSFET overcurrent without stressing other components of
the digital ballast, an external DC source has to be connected in parallel with the sense
resi stor R 9 (0 .5Ω). Afterwards, the MOSFET´s gate signal is measured, and the protection
response time may be obtained, as shown in Figure 19. Such a respons e time was
measured in less than 500ns, which is fast enough to prevent coil saturation and thereby
protect the MOSFET from damage.
Figure 18. Ma x imum MOSFET's T
protection routine
ON
Set new T
T
ONnew
T
ONMAX
ON
N
Y
T
ON = TONMAX
N++
Error
Y
N > N
N
MAX
24/35
N = 0
Use new T
ON
Next loop
AI12655
AN2459 - Application noteSignals measurement, processing & control
In addition to the aforementioned hardware protections, another safety feature (Maximum
T
increase protection) is implemented in the software and outlined in Figure 18. During
ON
normal operation, the PFC routine counts the number of times the pre-set MOSFET's ontime maxi mu m (T
) is reached. If the maximum count( N
ONMAX
) is exceeded an error is
MAX
introduced and the application is stopped. This condition indicates that the boost converter
is unable to reach the required output voltage.
Figure 19. Overcurrent reaction demonstration
Microcontroller stops
all PWM outputs
Overcurrent
introduced
Reaction time < 500ns
Note:Brown = sense resistor voltage, Green = digital signal for driving MOSFET's
gate.
25/35
Conclusion and outlookAN2459 - Application note
5 Conclusion and outlook
This application note explains the power factor correction (PFC) stage of the new digital
ballast reference design. It demonstrates a synergy between the power management unit
L6382D5 and the 8-bit microcontroller ST7FLITE19B in a fully digitally controlled
application. The reference design STEVAL-ILB002V1 is introduced with all the features and
protections required for high performance digital power supplies/ electronic ballasts.
Additional flexibility through the use of a digital approach has been highlighted as well.
The document AN1971 (2) could be referred for more information on first implementation of
a digital ballast with control based on the ST7Lite09. Other application notes for full digital
ballast (reference design STEVAL ILB002V1) are published in two further application notes.
26/35
AN2459 - Application noteReferences and related materials
6 References and related materials
1.A. Loidl: "Digital ballast with PFC for Fluorescent Tube Lamps fully digitally controlled
by 8-bit microcontroller", PCIM 2006.
7. STM icroele ctronics, AN1792 Design of fixed-off-time-controlled PFC pre-regulators
with the L6562, http://www.st.com/stonline/products/literature/an/10238.pdf.
27/35
Components calculationAN2459 - Application note
Appendix A Components calculati on
This appendix presents guidelines for the calculation of power components. The content is
based on the design process defined in AN966 (3).
A.1 Input capacitor
The input high frequency filter capacitor (C3) has to attenuate the switching noise due to the
high frequency inductor current ripple (twice the average line current, Figure 9). The worst
conditions occur on the peak of the minimum rated input voltage. The maximum high
frequency voltage ripple is usually imposed between 1% and 10% of the minimum rated
input voltage. This is expressed by a coefficient ‘r’ (typically , r = 0.01 to 0.1):
High values of C
alleviate the burden to the EMI filter but cause the power factor and the
3
harmonic contents of the mains current to worsen, especially at high line and light load. On
the other hand, low values of C
but require heavier EMI filtering and increase power dissipation in the input bridge. It is up to
the designer to find the right trade-off in their application.
A.2 Output capacitor
The output bulk capacitor (Co) selection depends on:
●the DC output voltage;
●the adm itted overvoltage;
●the outp ut power ;
●the des ired voltage ripple.
A voltage ripple (∆Vo = 1/2 ripple peak-to-peak value) of 100 to 120Hz (twice the mains
frequency) is a function of the capacitor impedance and the peak capacitor current (I
Io):
With a low ESR capacitor the capacitive reactance is dominant, therefore:
improve power fact or and reduce mains current distortion
3
C(2f)pk
=
28/35
AN2459 - Application noteComponents calculation
∆Vo is usually selected in the range 1 to 5% of the output voltage. Although ESR usually
does not affect the output ripple, it has to be taken into account for power loss calculations.
The total RMS capacitor ripple current, including mains frequency and switching frequency
components, is:
If the application has to guarantee a specified hold-up time, the selection criterion of the
capacitance will change: C
has to deliver the output power for a certain time (t
o
Hold
) with a
specified maximum dropout voltage:
22
where V
is the minimum output voltage value (which takes load regulation and output
o_min
ripple into account) and V
fail' detection from the downstream system supplied by the PFC.
A.3 Boost inductor
Designing the boost inductor involves several parameters and different approaches can be
followed. First, the inductance value must be defined. The inductance (L) is usually
determined so that the minimum switching frequency is greater than the maximum
frequency of the internal start er, to ensure a correct TM operation. Assuming unity PF, it is
possible to write:
T
being the ON-time and T
on
inductor current in a line cycle and θ the instantaneous line phase (θ
ON-time is constant over a line cycle.
As previously mentioned, I
the input power and the line voltage:
is the minimum output operating voltage before the 'power
op_min
the OFF-time of the power MOSFET, I
off
the maximum peak
Lpk
∈ (0,π)). Note that the
is twice the line-frequency peak current, which is related to
Lpk
29/35
Components calculationAN2459 - Application note
Substituting this relationship in the expressions of Ton and T
possible to find the instantaneous switching frequency along a line cycle:
The switching frequency will be minimum at the top of the sinusoid (θ =
maximum at the zero crossings of the line voltage (θ = 0 or
The absolute minimum frequency f
mains voltage, thus the inductor value is defined by:
where V
Once the value of L is defined, the real design of the inductor can start. Standard high
frequency ferrite (gapped core-set with bobbin) is the usual choice in PFC applications.
Selection of the most suitable one, among the various types offered by manufacturers, will
depend on technical and economic considerations.
The next step is to estimate the core size. To calculate an approximate value of the minimum
core size, the following practical equation may be used:
can be either V
irms
irms(min)
can occur at either the maximum or the minimum
sw(min)
or V
irms(max
), whichever gives the lower value for L.
, after some algebra it is
off
π/2 ⇒
sin(θ) =1 ),
π ⇒
sin (θ) = 0) where T
off
= 0.
•
I
2
rms
I
e
gap
1
e
2
Volume ≥ 4K • L • I
3
where Volume is expressed in cm
the ratio of the gap length (l
The ratio l
Next, the winding has to be specified. Quantities to be defined include the turn number and
the wire cross-section.
The (maximum) instantaneous energy inside the boost inductor (1/2 × L × ILpk^2) can be
expressed in terms of energy stored in the magnetic field, given by the maximum energy
density times and the effective core volum e V
is fixed by t he designer.
e/lgap
1
• L • I
gap
2
Lpk
2
where: A
field strength and ∆B is the swing of the magnetic flux density.
is the effective area of the core cross-section, ∆H is the swing of the magnetic
e
, L in mH and the specific energy constant K depends on
) and the effective m agnet ic length (le) of the ferrite core:
K ≅ 14 • 10
–3
:
e
1
= • ∆H • ∆B • Ve ≈ • ∆H • ∆B • Ae• I
2
30/35
AN2459 - Application noteComponents calculation
An air gap needs to be introduced to prevent the core from saturating because of its high
permeability and to allow an adequate ∆H.
Despite the fact that gap length l
so high (for power ferrites the typical value of µ
good approximation (∆H » ∆Hgap), that the whole magnetic field is concentrated in the air
gap. For instance, with an l
error caused by the above assumption is approximately 4%. The error is smaller if the l
ratio is larger. As a result, the fringing flux in the air gap region may be negl ec ted and the
energy balance can be re-written as:
gap/le
L • I
The flux density ∆B, is the same throughout the core and the air gap, and is related to the
field strength inside the air gap by the well-known relationship:
Then, taking Ampere's law into account (but applying it only to the air gap region):
it is possible to obtain the fol lowing equation from the energy balance equation :
is only a small per cent of le, the permeability of ferrite is
gap
value of 1% (which is the minimum suggested value) the
2
≈ ∆H
Lpk
∆Β
I
• ∆H
gap
is 2500) that it is possible to assume, with
r
• ∆B • Ae• I
gap
=
µ0 • ∆H
gap
gap
≈ N • I
gap
Lpk
gap/le
where N is the turn number of the winding.
Because N is defined, it is recommended to check the core saturation. If the core saturation
result is too close to the rated limit, it wi ll be necessa ry to increase the value of l
make a new calculation.
The wire gauge selection is based on limiting the copper losses to an acceptable value:
4
PCU = • I
2
rms
• RCU
gap
and
3
Due to the high ripple frequency, the effective wire resistance R
proximity effects . For this reason litz wire or multi-wire solutions are recommended. Finally,
the space occupied by the winding needs to be evaluated. If it does not fit the winding area
of the bobbin, a bigger core set needs to be considered and the winding calculation
repeated. It is also necessary to add an auxiliary winding to the inductor, in order for the
ZCD pin to recognize at what point the current flowing through the inductor has fallen to
zero. The winding is a low cost thin wire and the turn number is the only parameter to be
defined.
increase s by s kin and
CU,
31/35
Components calculationAN2459 - Application note
A.4 Power MOSFET
The choice of MOSFET mainly concerns the R
The breakdown voltage is fixed by sum of the output voltage, the overvoltage and a safety
margin .
The MOSFET's power dissipation depends on conduction and switching losses.
The conduction losses are given by:
= I
=
V
2
Qrms
O
P
ON
where:
Switching losses due to current-voltage cross occur only at turn-off because of the TM
operation:
P
CROSS
where t
drain capacitance inside the MOSFET itself. In general, these losses are given by:
is the crossover time at turn-off. At turn-on, loss is due to the discharge of the total
fall
, which depends on the output power.
DSon
• R
DSon
•
I
• t
fall
• f
sw
rms
P
CAP =
3.3 • C
(
OSS
1.52
• V
DRAIN +
1
• C
d
• V
DRAIN
)
• f
sw
2
where C
external drain parasitic capacitance and V
practice, it is possible to give only a rough estimate of the total switc hi ng losses because
both f
not only by the sinusoidal change of the input voltage but also by the drop due to the
resonance of the boost inductor with the total drain capacitance. At low mains voltage, this
causes V
show that "Zero-Voltage-Switchin g" occurs as long as the instantaneous line voltage is less
than half the output voltage.
is the internal drain capacitance of the MOSFET (at VDS = 25V), Cd is the total
and V
sw
oss
change along a given line half-cycle. V
DRAIN
to be zero during a significant portion of each line half-cycle. It is possible to
DRAIN
is the drain voltage at MOSFET turn-on. In
DRAIN
, in particular, is affected
DRAIN
32/35
AN2459 - Application noteComponents calculation
A.5 Boost Diode
The boost freewheeling diode is a fast recovery one. Its respective DC and RMS current
values, which are useful for loss computations, are given below:
The conduction losses can be estimated as follows:
P
DON
= V
• IDO + Rd • I
to
2
Drms
where V
The breakdown voltage is fixed with the same criterion as the MOSFET.
(threshold voltage) and Rd (differential resistance) are parameters of the diode.
to
33/35
Revision historyAN2459 - Application note
7 Revision history
Table 4.Document revision history
DateRevisionChanges
17-Jan-20071Initial release.
34/35
AN2459 - Application note
y
y
Please Read Caref u lly:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at an
time, with out notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchase rs are solely responsible for the choice, selection and use of the S T products and serv i ces descri bed herein , and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services i t s hall not be d eem ed a license grant by ST for the use of such thi rd party p roducts
or services , or any intel lec tual pro per ty cont aine d ther ein or con sidere d as a warra nty c overi ng th e use i n any mann er w hats oever of such
third party products or s ervices or any i ntellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPO SE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUA L PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT
RECOMM ENDE D, AUTH ORI ZED OR WARR ANT ED FOR U SE IN MIL ITA RY, AIR CR AFT, SPA CE, LIF E SAV ING, OR LI FE S USTA INI NG
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMA G E. S T PR ODUC TS W HIC H ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warran ty gr anted by ST fo r the ST produc t or se rvice d es cribed he rein and shall not c reat e o r extend in a ny mann er wha tsoe ver, an
liability of ST.
ST and the ST logo are trademarks or regis t ered trademarks of ST in vari ous countries.
Information in this docum ent supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
Austra l i a - Be l gi um - Brazil - Canada - China - Czech Rep ubl i c - Finland - France - Germ any - Hong Kon g - India - Israe l - It aly - Japan -
Malaysi a - M al ta - Morocco - Singapore - Spain - Sweden - Switze rl and - United Kingdom - Unit ed States of America
www.st.com
35/35
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.