AN3223
Application note
Driver for double flash LED with I²C interface
Introduction
This application note is dedicated to the design of a flash LED driver using the STCF04
device, which is a buck-boost converter with an I²C interface dedicated to charging a super-
capacitor. The schematic, functional description, recommendations for PCB layout, and
external component selection are also covered. This device is designed for driving four
LEDs. A detailed functional description can be found in
Figure 1
below.
Figure 1.
Picture of the demonstration board and the external transistor with TDK
EDLC
AM05038v1
February 2012
Doc ID 17553 Rev 2
1/29
www.st.com
Contents
AN3223
Contents
1
Schematic description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1
Application schematic with external transistor . . . . . . . . . . . . . . . . . . . . . . 4
2
Selection of external components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1
2.2
2.3
2.4
Input and output capacitor selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Inductor selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
LED selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
NTC and RX resistor selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3
PCB design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1
3.2
PCB design rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
PCB layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.1
An example of the 3-layer PCB with the external transistor STL8NH3LL 7
4
Internal registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1
Accessing the internal registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5
Operation modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.1
5.2
5.3
5.4
5.5
5.6
Shutdown mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Monitoring mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Idle mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
NTC feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Torch mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Flash mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6
7
The STATUS register and the ATN pin . . . . . . . . . . . . . . . . . . . . . . . . . . 17
READY pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7.1
7.2
7.3
Function of the READY pin in Monitoring mode and Torch mode (fixed) . 18
Function of the READY pin in Flash mode . . . . . . . . . . . . . . . . . . . . . . . . 18
Function of the READY pin in Torch mode (optimized) . . . . . . . . . . . . . . 19
8
The light sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2/29
Doc ID 17553 Rev 2
AN3223
Contents
9
Reading and writing to the STCF04 registers through the I²C bus . . . 22
9.1
9.2
9.3
9.4
Writing to a single register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Writing to multiple registers with incremental addressing . . . . . . . . . . . . 22
Reading from a single register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Reading from multiple registers with incremental addressing . . . . . . . . . 23
10
Examples of register setup for each mode . . . . . . . . . . . . . . . . . . . . . . 25
10.1
10.2
10.3
Example 1: 10 A FLASH with 30 ms duration . . . . . . . . . . . . . . . . . . . . . 25
Example 2: 60 mA Torch with 10 s duration . . . . . . . . . . . . . . . . . . . . . . . 25
Example 3: An Auxiliary LED running at 10 mA for 500 ms . . . . . . . . . . . 26
11
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Doc ID 17553 Rev 2
3/29
Schematic description
AN3223
1
Schematic description
The Flash LED driver STCF04 has a high operational frequency (1.8 MHz) which allows the
use of small-sized external components.
1.1
Figure 2.
Application schematic with external transistor
Typical application schematic
AM05040v1
**: Connect to V
I
, GND, SDA, or SCL to choose one of the four different I²C slave addresses.
Blue rectangle: optional components to support auxiliary functions.
4/29
Doc ID 17553 Rev 2
AN3223
Selection of external components
2
2.1
Selection of external components
Input and output capacitor selection
It is recommended to use ceramic capacitors with low ESR as input and output capacitors. It
is recommended to use 10 µF / 6.3 V as a minimum value for the input capacitor, and 10 µF
/ 6.3 V as the optimal value for the output capacitor to achieve a good stability of the device,
for a supply range varying from low input voltage (2.5 V) to the maximum ratings of output
power.
Note:
See recommended components in
Table 1.
2.2
Inductor selection
The STCF04 device works with the switching algorithm ILIM-ZCOM. It charges the inductor
until the current crosses the threshold for the ILIM function and then it discharges the energy
in the inductor to the output until it reaches the zero current value. Therefore, it is
recommended to use a 1 µH inductor as the minimum value, which guarantees a proper
function with the used algorithm and speed of used components in the silicon design.
Note:
See recommended components in
Table 1.
2.3
LED selection
All LEDs with a forward voltage range from 2.5 V to 4.5 V are compatible with the STCF04.
The forward voltage spread of any selected LED must, however, lay within this range (2.5 V
to 4.5 V). It is possible to set the level of the LED current in Flash mode and Torch mode by
setting the dimming registers. The maximum level of the LED current in Flash mode can be
set by changing the external Flash resistor.
Note:
See recommended components in
Table 1.
2.4
NTC and RX resistor selection
The STCF04 requires a negative thermistor (NTC) for sensing the LED temperature, as well
as an R
X
resistor and an external voltage reference in order to use the NTC feature. Please
refer to the typical application schematic in
Figure 2
for more details.
Once the NTC feature is activated, the internal switch connects the R
X
resistor to the NTC,
and this creates a voltage divider supplied by the external reference voltage connected to
the NTC.
If the temperature of the NTC-thermistor rises due to the heat dissipated by the LED, the
voltage on the NTC pin increases. When this voltage exceeds 0.56 V, the NTC_W bit in the
STATUS register is set to high, and the ATN pin is set to low to inform the microcontroller
that the LED is becoming hot. The NTC_W bit is cleared by reading the STATUS register.
If the voltage on the NTC pin rises further and exceeds 1.2 V, the NTC_H bit in the STATUS
register is set to high, and the ATN pin is set to low to inform the microcontroller that the LED
is too hot and the device automatically goes to Ready mode to avoid damaging the LED.
Doc ID 17553 Rev 2
5/29