Microchip Technology APGRD004 Data Sheet
12
LED Lighting Solutions Design Guide
www.microchip.com/lighting
LED Lighting Solutions
Low Cost Digital Control
Some power supply applications require fast dynamic
response to compensate for load changes. In these
applications, a fast ADC and fast calculation performance
are required. However, a LED provides a stable load for a
constant-current power supply. Therefore, a fast ADC and fast
processing power are not always required to implement a
digital control loop for a LED driver application.
response to compensate for load changes. In these
applications, a fast ADC and fast calculation performance
are required. However, a LED provides a stable load for a
constant-current power supply. Therefore, a fast ADC and fast
processing power are not always required to implement a
digital control loop for a LED driver application.
A low-cost device in the PIC12F or PIC16F family with a CCP
peripheral and an ADC can be used to implement a LED
driver using digital control. The CCP peripheral is used in
PWM mode to control the power supply circuit. Operating
from the internal 8 MHz device oscillator, the CCP can
provide PWM frequencies above 100 KHz to keep power
component sizes small. Since the LED provides a constant
load, it is sufficient to sample the output current and adjust
the PWM duty cycle at a much lower rate. A sample rate of
1000 Hz is ideal for many applications.
peripheral and an ADC can be used to implement a LED
driver using digital control. The CCP peripheral is used in
PWM mode to control the power supply circuit. Operating
from the internal 8 MHz device oscillator, the CCP can
provide PWM frequencies above 100 KHz to keep power
component sizes small. Since the LED provides a constant
load, it is sufficient to sample the output current and adjust
the PWM duty cycle at a much lower rate. A sample rate of
1000 Hz is ideal for many applications.
Digital Control vs. Analog Control
LEDs can be driven with a fully digital control loop. Instead
of measuring the LED current with an op amp or comparator
circuit, the LED current is sampled using an ADC. Some
type of digital algorithm replaces the analog control loop.
A proportional-integral-derivative (PID) control algorithm is
commonly used because it has software coefficients that
can readily be adjusted to affect the controller behavior. A
digital PWM peripheral is used to drive the LED. The digital
algorithm computes an output based on its inputs and
provides the duty cycle for the PWM peripheral.
of measuring the LED current with an op amp or comparator
circuit, the LED current is sampled using an ADC. Some
type of digital algorithm replaces the analog control loop.
A proportional-integral-derivative (PID) control algorithm is
commonly used because it has software coefficients that
can readily be adjusted to affect the controller behavior. A
digital PWM peripheral is used to drive the LED. The digital
algorithm computes an output based on its inputs and
provides the duty cycle for the PWM peripheral.
Literature on the Web
■
AN1138 – A Digital Constant Current Power LED Driver,
DS01138
Set Point
Feedback
Controller
Output
Output
Microcontroller
Feedback
Controller
Output
Output
Digital Controller
Feedback Loop
Set
Set Point
Analog Controller
ADC
PWM
PID or
Digital Filter
Algorithm
Controller
–
+
Comparison of Digital Control vs. Analog Control Functions
PIC12HV615 Buck LED Driver with Digital Control
LED
String
String
15V
5V
Current
Sense
Filter
ADC Input
DC Bus
125 KHz
PWM
PIC12HV615
MCP1402
Gate Driver
Other Device Options:
PIC12F1822
PIC16F1823
PIC12F1822
PIC16F1823