Samsung S3F84A5 User Manual

APPLICATION NOTE

S3F84A5
An LED Lighting System
January 2010
Revision 0.00
Confidential Proprietary of Samsung Electronics Co., Ltd
Copyright © 2010 Samsung Electronics, Inc. All Rights Reserved

Important Notice

Samsung reserves the right to make changes in its products or product specifications with the intent to improve function or design at any time and without notice and is not required to update this documentation to reflect such changes.
This publication does not convey to a purchaser of semiconductor devices described herein any license under the patent rights of Samsung or others.
Samsung makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does Samsung assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability, including without limitation any consequential or incidental damages.
"Typical" parameters can and do vary in different applications. All operating parameters, including "Typicals" must be validated for each customer application by the customer's technical experts.
Samsung products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, for other applications intended to support or sustain life, or for any other application in which the failure of the Samsung product could create a situation where personal injury or death may occur.
Should the Buyer purchase or use a Samsung product for any such unintended or unauthorized application, the Buyer shall indemnify and hold Samsung and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, expenses, and reasonable attorney fees arising out of, either directly or indirectly, any claim of personal injury or death that may be associated with such unintended or unauthorized use, even if such claim alleges that Samsung was negligent regarding the design or manufacture of said product.
S3F84A5 An LED Lighting System Application Note, Revision 0.00
Copyright 2010 Samsung Electronics Co., Ltd.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electric or mechanical, by photocopying, recording, or otherwise, without the prior written consent of Samsung Electronics.
Samsung Electronics Co., Ltd. San #24 Nongseo-Dong, Giheung-Gu Yongin-City, Gyeonggi-Do, Korea 446-711
TEL : (82)-(031)-209-4356 FAX : (82)-(031)-209-3262
Home Page: http://www.samsungsemi.com Printed in the Republic of Korea

Revision History

Revision No. Date Description Author(s)
0 Jan. 20, 2010 - Initial draft Wei Ningning

Table of Contents

1 Overview of HPLED Lighting Control System............................................7
1.1 Pin Assignment in S3F84P4........................................................................................................................7
1.2 Key Features of S3F84P4............................................................................................................................8
1.3 System Principle ..........................................................................................................................................8
1.3.1 Buck Circuit...........................................................................................................................................9
1.3.2 Summary ..............................................................................................................................................9
1.3.3 Constant Current Control....................................................................................................................10
2 Hardware Implementation ..........................................................................11
2.1 System Diagram and Circuit......................................................................................................................11
2.2 Components Selection...............................................................................................................................12
2.2.1 Select the Inductance (L1) for the Requirement of Current Ripple....................................................12
2.2.2 Select the Capacitance (C2) for the Requirement of Voltage Ripple.................................................12
3 Software Implementation............................................................................13
4 System Validation .......................................................................................15
5 Appendix......................................................................................................17
5.1 BOM List of Key Circuit..............................................................................................................................17
5.2 Appendix 2: Source Code..........................................................................................................................17

List of Figures

Figure Title Page Number Number
Figure 1-1 S3F84P4 Pin Assignment.....................................................................................................................7
Figure 1-2 Simplified Buck Circuit..........................................................................................................................9
Figure 1-3 Current on load.....................................................................................................................................9
Figure 1-4 HKP-D1W1 Forward Voltage, Forward Current, and Relative Luminous Flux...................................10
Figure 2-1 Control Circuit.....................................................................................................................................11
Figure 3-1 Software Implementation Diagram .....................................................................................................13
Figure 3-2 Way to change PWM duty cycle.........................................................................................................14
Figure 4-1 Waveform for HPLED forward voltage and current............................................................................15

List of Tables

Table Title Page Number Number
Table 4-1 System validation of efficiency.............................................................................................................16
Table 5-1 BOM list of Key Circuit.........................................................................................................................17

S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 1 OVERVIEW OF HPLED LIGHTING CONTROL SYSTEM

S
1 OVERVIEW OF HPLED LIGHTING CONTROL
SYSTEM
A light-emitting diode (LED) is a semiconductor light source that presents several advantages over traditional light (like incandescent) sources such as lower energy consumption, longer lifetime, improved robustness, smaller size,
switching, and greater durability and reliance. It renders “green” light and does not contribute towards
faster material pollution or radiations. Usually, an LED can also be referred to as HPLED (high power LED) if the NRP (normal rated power) is greater than 1W. It can be driven at currents that vary from hundreds of mA to more than an ampere. LEDs can produce hundreds of lumens, and find extensive usage in lighting syste ms.
This do S3F84P4.

1.1 PIN ASSIGNMENT IN S3F84P4

Figure 1-1 shows the pin assignment in S3F84P4.
cument presents a simple HPLED lighting control system implemented with Samsung’s 8-bit MCU
Figure 1-1 S3F84P4 Pin Assignment
amsung Confidential
7
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 1 OVERVIEW OF HPLED LIGHTING CONTROL SYSTEM
S

1.2 KEY FEATURES OF S3F84P4

The key features in S3F84P4 include:
4 kbyte Flash ROM or 208 Byte SRAM  6+6 PWM x 1  10-bit ADC x 4  8-bit Basic Timer (can be used as watchdog timer)  16-bit Timer0 (can be used as Timer A or B, the two 8-bit Timers )  EXINT X 2  Supports Configurable LVR (2.2/ 3.0/ 3.9V)  Supports Configurable RC (1M/ 8MHz @5V)  Supports six IOs (maximum) when using internal LVR and internal RC

1.3 SYSTEM PRINCIPLE

The two considerations for HPLED are:
1. Forward voltage
2. Constant control current Different LED applications have different characteristics. For instance, LEDs come in different colors. In some
cases, manufacturers of the LED applications might also differ. Even if the LED applications come from the same manufacturer, it can lead to differences in forward voltage. In such cases, constant voltage power cannot work.
Different LED applications should select different power suppliers according to its characteristics. For instance, by considering efficiency, switch module power supplier (SMPS) can be chosen for different LED applications. SMPS consists of Buck, Boost, or Buck-Boost circuits.
V
O
D
V
The duty cycl voltage, that is, .
The duty cycl
upply, that is, .
s
The duty cycl
ply and forward voltage.
sup
e of Buck circuit is . It is only used when the power supply is high
VV
OI
e of Boost circuit is . It is only used when the forward voltage is higher than the power
VV
OI
e of Buck-Boost circuit is . It can be used without considering the relationship of power
D
I
VV
OI
V
O
D
V
O
VV
O
er than the forward
I
In this application, buck circuit is chosen to power a HKP-D1W1 white LED (forward voltage 3.5V) with a DC power source of 5V.
amsung Confidential
8
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 1 OVERVIEW OF HPLED LIGHTING CONTROL SYSTEM
S

1.3.1 BUCK CIRCUIT

Figure 1-2 Simplified Buck Circuit
Buck circuit works when a switch signal turns on the transistor (Q). The DC power then starts to cha rge the coil (L). When the current reaches a predefined level, change the transistor state from On to Off using the switch signal. At this time, since the coil will have inertia to keep the current direction, the load still can be powered with a freewheeling diode until the switch signal turns on the transistor again. The resulting current is continuous but alternating (see
Figure 1-3 for more details).
Figure 1-3 Current on load

1.3.2 SUMMARY

The average current over load is determined by the duty cycle of switch signal.
  SMPS can lead to current ripple. But it could be alleviated by increasing the PWM frequency or coil
inductance value, or by adding extra filtering circuits.
amsung Confidential
9
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 1 OVERVIEW OF HPLED LIGHTING CONTROL SYSTEM
S

1.3.3 CONSTANT CURRENT CONTROL

Refer to the HKP-D1W1 datasheet to see the relationship of forward voltage, forward current, and relative luminous flux.
Figure 1-4 HKP-D1W1 Forward Voltage, Forward Current, and Relative Luminous Flux
As shown in Figure function of voltage. Even a slight change of voltage might lead to significant current shift. Therefore, constant current control is used in HPLED applications.
1-4, describing the luminous flux as a function of current is better than describing it as a
amsung Confidential
10
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 2 HARDWARE IMPLEMENTATION
S

2 HARDWARE IMPLEMENTATION

2.1 SYSTEM DIAGRAM AND CIRCUIT

Figure 2-1 Control Circuit
As shown in Figure transistor (Q1). The current over HPLED is sensed by a 1ohm power resisto r. It then goes into S3F84P4’s ADC module after passing through a filter composed of R4 and C3.
Brightness can be obtained by changing the PWM duty cycle after comparing the actual sensin g value and target forward current. This application uses two external interrupts (“ENINT” and “GPIO” as shown in Figure keys to control the turn-on/off and brightness. A normal LED indicates the current brightness as full or half brightness.
2-1, the Buck Circuit comprise of Q1, L1, D1, and C2. The output of PWM turns on/off the
2-1) as
amsung Confidential
11
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 2 HARDWARE IMPLEMENTATION
P
P
I
S

2.2 COMPONENTS SELECTION

Assume the following two conditions:
( 1 ) 3.5 0.35 3.85
V V I ohm V
OFWFW
5
VV
I
If non-divided system clock is selected as the clock source of the 6+6 PWM, its base frequency
f
OSC
6
2
is
125
KHz
.
2.2.1 SELECT THE INDUCTANCE (L1) FOR THE RE
ripple
D
f
WM
3.85
5 125
K
100Lu H
1
()
VV

V
L

1
I
T
LI

1
ripple
Therefore, 20% current ripple means .
2.2.2 SELECT THE CAPACITANCE (C2) FOR THE RE
To reduce the voltage ripple and power loss, a capacitor with small ESR like Tantalum Capacitor should be chosen as C2. When ESL and ESR are negligible, then,
IO
I
(5 3.85) 7.084
QUIREMENT OF CURRENT RIPPLE
QUIREMENT OF VOLTAGE RIPPLE
f
C
CV
WM
2
V
ripple

2
ripple
0.35*0.2 125
K
0.56
47Cu F
Therefore, 1% voltage ripple means . The free
wheeling diode should be a Schottky diode, as the system requires low turn-on voltage and fast switching.
2
amsung Confidential
12
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 3 SOFTWARE IMPLEMENTATION
S

3 SOFTWARE IMPLEMENTATION

Figure 3-1 shows the software implementation.
Initialization
ADC sampling
Value > max?
Vale < min?
Figure 3-1 Software Implementation Diagram
Since the PWM in S3F84P4 is 6+6 type, it affects the software in two ways. Way to change the PWM duty cycle: The duty cycle is the result of both the register values of PWMDATA and
PWMEX. Therefore, any increase or decrease in register from PWMDATA will not change the duty cycle. For more details on register PWMEX, refer to the S3F84P4 User’s Manual. Figure change the PWM duty cycle.
Decrease PWM
duty cycle
Increase PWM
duty cycle
3-2 shows the right way to
amsung Confidential
13
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 3 SOFTWARE IMPLEMENTATION
f
S
Start
PWMEX>=100B?
PWMEX = 0xFF PWMDATA - =1
End
Decrease PWM duty cycle
Change rate of PWM duty cycle: If PWM in S3F84P4 is 6+6 type, the PWM basic frequency is 6-bit, that
f
PWM
264
is,
resolution fully valid, that is, take effect after 0.512ms. Considering the AD conversion duration is 25us, duty cycle can be updated every 21 times of AD conversion.
8
MHz
6
Y
N
PWMEX - =1
Increase PWM duty cycle
Figure 3-2 Way to change PWM duty cycle
125
KHz
when . The overall cycle is still 12-bit to make the 12-bit
12
2

PWM
8fMHz
PWM
4096
8
MHz
0.512
ms
. So Therefore, every change of the duty cycle will
Start
PWMEX>=
11111100B?
N
PWMEX + = 1
End
Y
PWMEX = 0
PWMDATA + =1
amsung Confidential
14
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 4 SYSTEM VALIDATION
R
I
S

4 SYSTEM VALIDATION

Figure 4-1 shows the current ripple and voltage ripple test waveform. Red and blue colors specify the current and
voltage, respectively.
Figure 4-1 Waveform for HPLED forward voltage and current
V
()

VV
fd s
efficiency
Based on the above formulas, Table 1 shows the values of Ips, Imcu, Vfd, Vs, and efficiency (%).
(I)

ps MCU ps
s
s
V
VV
and
5
ps
amsung Confidential
15
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 4 SYSTEM VALIDATION
S
Table 4-1 System validation of efficiency
Ips (power supply) (mA) 300 288 306 285 300 288 309 290 308 304 Imcu (m A)
(MCULED) Vfd V Vs mV Efficiency(%)
NOTE: BD1 and BD2 represent two boards, where the basic difference lies in the value of sensing resistance,
(1)1.0
RBD (2)1.1
. Due to the same reason, the efficiency of BD2 is always better than that
of BD1. The nominal tolerance of VISHAY WSR2 is 1%.
S
RBD 
S
#1 #2 #3 #4 #5
BD1 BD2 BD1 BD2 BD1 BD2 BD1 BD2 BD1 BD2
18 19 18 19 18 19 18 19 18 19
3.82 3.6 357
87.68 81.6
340 359 340 351 340 359 341 358 360
3.85 3.60 3.86 3.6 3.90 3.59 3.90 3.65
87.03 82.5 87.35 81.6 87.37 80.95 87.45 81.11
amsung Confidential
16
S3F84P4_AN_REV0.00 (PRELIMINARY SPEC) 5 APPENDIX
S

5 APPENDIX

5.1 BOM LIST OF KEY CIRCUIT

Table 5-1 shows the BOM list of key circuit.
Table 5-1 BOM list of Key Circuit
Reference Description Manufacturer Part number
R1 1K ohms R2 10 ohms Rs Current sensing Resistor C1 104 C2 47uF Tantalum Capacitor C3 2nF
VISHAY
WSR21R000FEA
C4 100uF R4 33K ohms Q1 HEXFET Power MOSFET D1 Schottky Diode IN5819 L1 100 uH inductance HPLED 1W1 HPLED

5.2 APPENDIX 2: SOURCE CODE

For more information, refer to Source_Code_LED_S3F84P4_V10.
IR
TDK HangKe
IRF9540
VLF12060-101M1R0
amsung Confidential
17
Loading...