ST AN1320 Application note

1/20
AN1320
APPLICATION NOTE
December 2000
1.0 INTRODUCTION
Roughly speaking a HF-TL ballast converts the 50-60Hz input to a high frequency output, usually in the range
of 25-125KHz.
A rectifier block and a DC to high frequency inverter usually make up a ballast. The half bridge of the inverter
We will focus on a specific driver: the L6574. We will see first how the L6574 can drive and control a ballast,
then how it can communicate and be supervised by a
µ
C.
The aim of this paper is to examine if there are advantages in having a
µ
C work with L6574, the feasibility of
this “cooperation”, and a practical example.
2.0 L6574
L6574 is a BCD off line 16 pin IC specifically designed for ballast applications [r ef.1](see fig.1). It has both driver
functions and controller functions on board.
The most useful characteristics to control the lamp are:
Preheat and frequency shifting timing
Cmos shut down input
Sense op-amp for closed loop control or protection failures
The parameters of the application are set by external components (resistors and capacitors) connected to the
IC. L6574 allows the user to set all the parameters according to the lamp characteristics, and the ballast wi ll be
a high performance one. There is a specific application note on this IC (ref. [2]) : here you find the description of
58W TL ballast with PFC section. Please refer to this application note and to the L6574 datasheet for the IC
details. In the following paragraphs we will focus our attention on a way to interface the L6574 with the micro-
controller rather than on “L6574 - stand alone” perfor mances. The aim of this “supervision” is to control the three
points mentioned above.
by Francesca Sandrini and Luca Rodeschini
L6574 & MICROCONTROLLER
IN BALLAST APPLICATIONS
There is an increasing demand for flexibility in ballast applications. This means a request for having
ballast that can be used for different tubes without changing the soldered components. The aim is to
save money by using less parts (resistors, capacitors and so on) and less ballast models to be stored
and managed.
A way that is going to be investigated is the use of micr ocontroller which can “supervise” the application
in such a way that the key parameters of the application can be modi fied accordi ng to the tube char ac-
teristics just by changing the micro-code.
In this application note we will exploit a way to interface a microcontroller with our integrated ballast
controller: the L6574.
AN1320 APPLICATION NOTE
2/20
Figure 1. L6574 Block Diagram
3.0 L6574: HOW TO SET FREQUENCIES, TIMING, FAULT SIGNALS IN AN “ANALOG APPLICATION”
In this paragraph we will have a snap shot of the L6574 working, just as far as the characteristics important for
the micro interface are concerned. For further details please refer to [1] and [2].
The L6574 typical behavior is shown in fig. 2: there is a starting frequency (f
MAX
or f
PRE
) that is constant for a
set preheat time T
PRE
, than there is a frequency shift towards f
min
that last 0.1 of T
PRE
and is called T
IGN
or T
SH
.
Figure 2. Frequency shift
Leads 1, 2, 3, 4 are used to set frequencies and timing.
The capacitor connected to pin 1[CPRE] sets the preheat time:
T
PRE
= K1 · C
PRE
The ignition time, or better, the time to let frequency shift from preheat value to the min. value is one tenth of T
PRE
.
The current that charges and discharges the capacitor connected to pin 3 (C
F
) sets the half bridge oscillating
frequency.
The current that charges C
F
is set by the current that flows out from pin 2 and 4 during preheat and from pin 4
GND
V
REF
Imin
R
IGN
VCO
EN1
V
THE
V
THE
EN2
V
S
V
BOOT
OUT
C
BOOT
LOAD
H.V.
LVG
UV
DETECTION
V
S
HVG
5
6
7
4
2
3
1
12
9
8
10
11
14
15
16
BOOTSTRAP
DRIVER
HVG
DRIVER
LVG DRIVER
Vthpre
Ifs
C
PRE
V
REF
Imax
R
PRE
Cf
OP AMP
+
-
OPOUT
OPIN-
OPIN+
DEAD
TIME
DRIVING
LOGIC
CONTROL
LOGIC
+
-
Ipre
+
-
+
-
+
-
LEVEL
SHIFTER
D97IN493B
fmax
fmin
freq
time
Tpre
Tsh
normal operation
preheating phase
ignition phase
AN1320 APPLICATION NOTE
3/20
alone during the on phase. As pin 2 and 4 are at 2V, the currents that flow out of them is inversely proportional
to the resistance connected between gnd and pin 2 (R
PRE
) and between gnd and pin 4 (R
IGN
).
There are some useful formula:
Choosing properly the resistor and the c apacitor values the designer can set the desired fr equencies and timing.
When the designer has to do another application for another lamp type, he has to change the resistors and ca-
pacitors in order to have another range of frequencies.
For protection in case of lamp failure two logic input are provided: pin8 [EN1] and pin9 [EN2]. Both are active
high, but they have different functions: when EN2 is activated it forces the IC to start again the preheat se-
quence. When EN1 is activated it shut down the IC until V
CC
is removed or until EN2 is pulled high.
EN2 is usually used as “ignition fault”: if the lamp is not ignited, the preheat sequence starts again.
EN1 can be used to sense lamp removal / replacement or disconnection.
Figure 3. EN1
ƒ
max
1.41 R
pre
R
ign
+()
R
pre
R
ign
⋅⋅
---------------------------------------------------=
ƒ
min
1.41
R
ign
----------------------- -=
V
CC
LVG
HVG
EN1
V
SUVP
D97IN490
AN1320 APPLICATION NOTE
4/20
Figure 4. EN2
L6574 has also a sense op-amp th at can be used to have a closed loop contr ol of the lam p. We can give a volt-
age reference to the non-inverting input, a signal proportional to the load current to the inverting input, and we
can connect the op amp output pin to pin #4. In this way if the current in the load exceeds the reference the op
amp will sink from pin 4 an additional amount of current that has to be added to the current that flows through
R
IGN
. So the current charging C
F
will increase, that means a higher half bridge osci llation frequency, that m eans
a lower current in the load. C hanging the reference v oltage on the non- in verting input of the op amp we change
the frequency of the oscillator, that means we change the current in the load, and this allows lamp dimming.
Figure 5. Cl osed Loop
V
CC
t
PRE
t
PRE
t
SH
t
SH
f
PRE
f
ING
EN2
f
OUT
V
SUVP
D97IN491B
Q3
STP4NB50/
STP6NB50
R25
0.68
C9 8.2nF
R18 100K R19 100K
D3
1N4148
R33 9.1K
65
4
7+
RIGN
-
D98IN818A
5/20
AN1320 APPLICATION NOTE
Figure 6. AN993 Demo Application Circuit
Q2 STP4NB50/
STP6NB50
C12
100nF
C14
1µF
C13
470pF
R25
0.68
Bridge
Fuse
NTC
L1 2.1mH
C7
22µF
450V
DZ1
14V
C6
4.7µF
25V
C8
100nF
D1 BYT11600
C17
100nF 250V
C19
8.2nF
1500V
LAMP
D3
1N4148
R15
1.5K
R14
4.7K
R18
100K
R19
100K
R21
22
R22 22
Q3 STP4NB50/
STP6NB50
2
7
6
5
1
9
8
11
14
15
1612
3
4
10
L6574
R13
100K
R33 9.1K
R17 9.1K
C9
8.2nF
12
6
5
4
7
8
L6561
R1
1.5M
R5
68K
R3
120K
R6 22
R9
0.68
R12
9.53K
R11
750K
R16 47
D4
Q1
STP6NB50
C2
220nF
400V
C3
10nF
C4 680nF
C11
680pF 630V
R23
47K
R20
47K
R7
47K
R4
120K
R27
6.8K
R30
3.9K
C16 1µF
R32 20K
C15
330nF
R29
750K
R28
750K
R26
390K
R24
6.8K
C5
100nF
R10
750K
C1
220nF
630V
C18
100nF 250V
D2
1N4148
RSENSE
R8
0.68
T1 1.24mH (E25*13*7)
10 Turns 1.3mm gapped
C20
100nF
R2
10.1K
3
1N4148
D99IN1064
AN1320 APPLICATION NOTE
6/20
4.0 L6574: HOW TO SET FREQUENCIES, TIMING, FAULT SIGNALS IN A “MICROCONTROLLED
APPLICATION”
We have seen that the frequencies in L6574 are set by fixing the current that flows out from pin 2 and 4 and
fixing the value of the C
F
capacitor.
A microcontroller output pin can give us a high logic level (5V) a low logic one (0V) or a PWM output at fixed
frequency and variable duty cycle.
We can not use the P WM to act directly on C
F
pin, because the rising edge on C
F
is the low side mosfet “on
time” and the falling edge is the high side mosfet one. The half bridge would oscillate in asymmetrical way at
fixed frequency instead of at 50% duty cycle and variable frequency. So we have to interface the
µ
C with th e
pins that set the current that charges C
F
. A push pull output that gives us just 0V or 5V can not be used to in-
terface pin 2 and 4 because they have a maximum voltage level up to 2V. We have to use the integrated value
of a PWM signal to set a voltage level between 0V and 2V.
We can use a PWM output also to gi ve the op amp the vo ltage reference to c hange the load c urrent (and so the
lamp power to perform dimming)
Acting on L6574 pin 4 and (or) on pin 7 (opamp+) we can control the inverter working frequency.
If we want to control the preheat timing and frequency we have to act on pins 2 and 1. First we have to avoid
that the L6574 fixes the preheat time by itself. If we connect to pin 1 a ver y small cap (e.g. 1nF), the L6574 “an-
alog T
PRE
” will be so small to be “invisible” to the lamp (i.e. less than 2ms). During these 2 ms, the oscillating
frequency has to be high enough to avoid lamp filaments preheat (> 150KHz). The resistor connected to pin 2
has to be sized properly.
After these 2 ms L6574 is in “working mode”: it means that pin 4 is no more involved in fixing the frequency.
Only C
F
and R
IGN
(pin 3 and 4) set it.
Now the effective preheat time can be decided by the
µ
C just acting on the PWM that gives the voltage reference
to pin 4. For example, it can have a certain duty cycle (appropriate for the preheat freq.) for a fixed time, than it
can change the duty cycle (i.e. the voltage reference) to set the ignition profile and the final working frequency.
Now we are able to change all the frequencie s and the tim ing invo lved in lamp tur ning on a nd dimming with two
connections between L6574 and the
µ
C.
The fault management can al so be d one by the
µ
C: all the fault si gnals will be br ought to it, and then it will react
according to the code. A connection that can be useful is the one to pin 8 (shut down pin) that can be direct
because the ICs levels are compatible. In this way the
µ
C can react to a signal either by stopping the inverter
or by changing the frequency (i.e. r epeating a preheat sequ ence if there is the no-i gnition al arm, or brin ging the
frequency to a very high value…).
Just with these 3 connection between the L6574 and the
µ
C we can set nearly all the parameters of the appli-
cation by software.
The number of
µ
C inputs we need for fault signals depends only on what we want to control.
We need another input pin to give the
µ
C the information about the dimming level: this is the interface between
the ballast and the “final user”. We can use either switches or an AD input. The first solution is more expensive
in terms of number of pin, the AD input requires some attention for the co de part but allows a much larger num-
ber of levels.
5.0 HOW TO APPLY THIS INTERFACE TO A BALLAST
We started from AN993 demo boar d to build a
µ
C application with the s ame performances and s ome additi onal
degrees of freedom.
We will now apply all the concepts already discussed and put them into a working board.
Loading...
+ 14 hidden pages