Beruflich Dokumente
Kultur Dokumente
Application Note
Introduction
Nowadays, applications increasingly make Furthermore, it may be necessary to adapt
use of LEDs as a replacement for traditional the driver for LEDs in different brightness
light bulbs. For example, LEDs are groups by means of hardware selection.
frequently used in the design of automobile This is described in the section "Adjusting
tail lights, , signal lights, traffic signals, for Different Brightness Groups".
variable message signs,…. In the following applications, a PIC
LEDs provide several advantages over microcontroller is used as a controlling unit.
traditional light bulbs, such as smaller size
and longer life. In many applications, the
LEDs must be driven with intelligent control The PIC Microcontroller
circuitry. According to the task at hand, this
control circuitry must be able to fulfill various PIC stands for "Programmable Interrupt
functions and tasks. In the following pages, Controller". The controller described below
solutions are provided for various application has been developed by the company
areas. These solutions are principal Microchip (www.microchip.com). The PIC
suggestions, not a concept ready for series comes in various sizes and functionality. For
production. development purposes, rewritable devices
One possible task for control circuitry is are available, which can be erased
regulation of intensity, in case the LED electrically or by UV light. For production,
brightness must be set to various levels. A OTP (One Time Programmable) devices are
solution is described in the section available, which may only be programmed
"Dimming". In addition, the specified once, but are correspondingly less
brightness should be maintained at a expensive. PICs may also be obtained in
constant level. Fluctuations in the supply SMD packaging. Although there are some
voltage, for example, could lead to disadvantages (less memory, limited
significant variations in current. In this case, instruction set, limited debugging facilities),
one must insure that the current through the the PIC has several advantages over other
LEDs and thus the brightness is maintained microcontrollers. It is inexpensive and all of
at a constant level. This problem is covered the required hardware is available on one
in more detail in the section "Current chip. It can be driven at clock rates of up to
Regulation". 20MHz and has exceptionally low power
Another task for control circuitry is failure requirements. In addition, the PIC operates
recognition. Modules consist of individual within a wide temperature range.
LEDs which can be tested for total failure. The following figure shows the block
Additional information can be found in the diagram of a typical PIC microcontroller:
section "Failure Recognition".
A particular characteristic of LEDs is their
strong temperature dependency. Since LED
brightness is strongly dependent on
temperature, the driver circuitry can carry
out temperature compensation. Two
possible approaches are described in the
section "Temperature Compensation".
VCC
D1 D2 D3 D4
R1 R2 R3 R4
D5 D6 D7 D8
R5 R6 R7 R8
Figure 2: LED array in a matrix connection with one resistor per LED
The following sections describe the possible The brightness of the LED should be held
functions of the driver circuitry: constant by the driver circuitry. In order to
guarantee that the brightness remains
constant, the current through the LED must
Dimming remain constant. This requires that the
current be determined for the individual
The first function is the creation of different LEDs. To measure the current passing
brightness levels by dimming the LEDs. A through the diodes, the series resistor for
simple solution is to use PWM (pulse width each diode is utilized. By measuring the
modulation). This signal can be easily set voltage across the resistor, the current
and controlled using the built-in PWM through the resistor, and thus the current
module within the microcontroller. This is through the diode can be determined. The
simply a matter of periodically switching a voltage measurement is carried out by the
DC voltage on and off. A/D module of the PIC, in which voltages up
to 5V can be compared to a constant
reference voltage. The A/D module should
not be directly connected across the series
tp resistor, however. For one thing, the voltage
D= levels may be considerably higher than 5V.
T
In addition, the PWM signal must first be
converted to a DC signal. After 2
measurements and the subsequent
Figure 3: Representation of a PWM signal subtraction, a doubled measurement error
arises. These problems are eliminated with
the circuit shown in Figure 4.
If the period remains constant, the
brightness can be regulated by the length of
tp. So the Duty Cycle D defines the
brightness of the LEDs. An advantage of
using a PWM signal is that the peak current
level remains constant, thus preventing
negative effects (such as wavelength shift in
InGaN devices) from arising.
11
R1
2
11
V-
- 0 R3
1 2
V-
0 R5 OUT - 0
U1 3 1
V+
+ V CC OUT Output
3 V CC
V+
C1 +
4
R6 0
U2
C2
The positive Input voltage is connected to This allows the controller to react to
U2, the negative to U1. The RC components fluctuations in current. Since the operational
convert the signal to a DC signal. These 2 amplifiers have a very high input impedance,
DC-signals are connected to the operational the system is not influenced by the
amplifiers. With various resistors, these two measurement circuitry.
amplifiers are configured as a subtractor.
With this circuit, the DC-Voltage of U1 is
subtracted from U2. This difference is now
measured by the A/D module.
Even when the current remains constant, the The disadvantage of this method is that the
brightness can vary, however, due to the response curve of the resistor must be
influence of temperature. saved as a table of values in the PIC
The following figure shows this dependency memory.
for a Power TOPLED (LA E67B):
VCC
D1 Multiplexer
R1 1
2 1
3 U1
0
D2
Test
R2 Circuit
1
2 1
D3 3 U1
0
R3
0
Controller
Multiplexer D1 D2 D3
1
In01 2
In02 3
In03
Test- +
+ 13
Out1 In04
4
5
Circuit In05 6 R1 R2 R3
Current - 14 In06 7
OUT - Out2 In07 8
OUT In08 9
Contr oll 1
Contr oll 2
In09 10
In10 11 D4 D5 D6
In11 12
In12
Test-
15
16
Circuit
Temperature
OUT R4 R5 R6
OUT
D7 D8 D9
PIC-Microcontroller
1
A /D (Temper atur e)
2 5
A /D (Cur rent) Controll 1 R7 R8 R9
6
3 Controll 2
X1 CLKIN
J1
4 7
CLKOUT PWM
Input1
Input2
Input3
externer
Taktgenerator
3 10
R10
1 8
2 9
OUT 1
OUT 2
OUT 3
LED-Type
Note:
The PWM signal created by the controller is If the array size is increased, additional
connected to a transistor prior to being paths must be connected to the multiplexer
applied to the array. The amplitude of 5V and additional transistors may possibly be
from the controller is too low to drive the required for driver purposes.
array directly.
Multiplexer V CC
1
In01
Test- +
+ 5
Out1
R1 R2 R3
Circuit
Current - 6 2
PIC-Microcontroller
OUT - Out2 In02 3
OUT In03 4
Contr oll 1
Contr oll 2
In04
D1 D2 D3
7
PWM
D4 D5 D6
D1 D2 D3
PIC-Microcontroller
D7 D8 D9
A /D (Cur rent)
1
A /D (Current) 4
Controll 1
5
2 Controll 2
X1 CLKIN
R1
J1
3 6
CLKOUT PWM
Input1
Input2
Input3
externer
Taktgenerator
R10
7
0
1
3
OUT 1
OUT 2
OUT 3
LED-Type
Figure 9: Circuit example with serial connection Figure 10: Circuit example without transistors
All information contained in this document has been checked with the greatest care. OSRAM Opto
Semiconductors GmbH can however, not be made liable for any damage that occurs in connection
with the use of these contents.