Maxim Integrated Products provides many LED (light-emitting diode) drivers, with PWM (pulse-width modulation) intensity control. This application note explains several methods for applying additional PWM-based intensity control to LED drivers. Several constant-current LED drivers, with or without built-in PWM, serve as examples of the techniques.
A similar article appeared in the May 2010 edition of Electronic Products magazine.
This application note discusses how additional PWM intensity control can be applied to constant-current LED drivers by using a switched-LED power supply. External PWM intensity control can also be emulated by refreshing data bits. LED drivers with built-in PWM can also benefit from additional, external PWM intensity control if clocks regulating these PWM signals can be synchronized.
In this technique PWM emulation data is sent continuously from a controller to the LED driver with 1 bit for each port. A complete data update for all ports is considered a PWM step. This emulated PWM step is repeated with a start index of 1 and an end index equal to the number of intensity levels to form a PWM period. For example, if the intensity level is 256, data refresh for every port is repeated 256 times to form a PWM period. The data bit is 1, if the corresponding port's intensity level is higher than the index of the emulated PWM step; otherwise the data bit is zero. The emulated PWM period is repeated as long as the LED is on.
This PWM emulation procedure can be implemented using the following C code:
Figure 1. This technique uses a PWM-based LED supply.
Figure 2 shows a similar circuit diagram that uses a MOSFET transistor as the power-switching device for enhanced efficiency.
Figure 2. A power MOSFET serves as the switching device.
The following formula can be used to calculate the required power dissipation for the switching transistor:
Equation 2 expresses the total power dissipation as the sum of the switching power plus the transistor's on-power. The switching power is determined by the on/off time. When the transistor is turned on or off, almost the full current is passing through the transistor while the voltage across it is changing from zero to VLED, and vice versa.
Using a fast switching transistor, the rise and fall time is normally around 50ns. For a PWM period (T) of 1/1000 second, an LED supply (VLED) of 5.5V, and a total LED-port current of 200mA, the switching power is about:
Figure 3. Hierarchical master and individual-port PWM intensity control.
Unfortunately, the master intensity control of one MAX6964 cannot be combined with another MAX6964's individual-port intensity control to form a controlled multichip mechanism. The reason for this is that clocks between multiple MAX6964 devices cannot be synchronized; the turn-on time of the individual-port PWM control will not always match the boundaries of the master intensity-control on/off windows. The intensity is less pronounced (darker LEDs) if they are not aligned. Because of the phase shift between clocks, the LED will "beat" (on and off) in intensity periodically.
The hierarchical PWM intensity-control method can applied without the "beating" problem by using an LED driver, such as the MAX7302, with a clock synchronization mechanism and a wide range of operating clock frequencies. Figure 4 shows a circuit diagram using two MAX7302 devices and a few switching transistors to provide the desired hierarchical PWM intensity control.
Figure 4. Use two MAX7302s for hierarchical PWM intensity control.
One of the MAX7302's output ports is connected to the cathodes of the LEDs. Each output port acts as an individual port-intensity controller. The output ports of the other MAX7302 are connected to the anodes of the LEDs with external transistors. This second MAX7302 thereby acts as the master intensity controller. Each individual port-intensity controller is driven by an external clock with a high frequency of 1MHz, which is the upper limit of MAX7302's operating specification. Setting a port intensity level of 15/33, the output of the P2 individual port-intensity controller serves as the clock input for the master intensity controller. Therefore, the equivalent clock frequency for the master intensity controller is about 1000000/33=30kHz. In this application example, the individual port-intensity controller can be used to adjust the color of the RGB LEDs, and the master intensity controller can be used to adjust the intensity.
A similar article appeared in the May 2010 edition of Electronic Products magazine.
Introduction
Maxim Integrated Products provides many LED (light-emitting diode) drivers with PWM (pulse-width modulation) intensity control for a wide range of applications. The intensity is normally controlled by using the serial interface to send the LED driver a command to change the register bits for the corresponding LED. The number of bits for intensity control ranges from 4 to 8 bits, which corresponds to 16 to 256 intensity levels. Intensity control for other Maxim LED drivers is carried out by adjusting the amount of the constant-current sinking through an open-drain LED port.This application note discusses how additional PWM intensity control can be applied to constant-current LED drivers by using a switched-LED power supply. External PWM intensity control can also be emulated by refreshing data bits. LED drivers with built-in PWM can also benefit from additional, external PWM intensity control if clocks regulating these PWM signals can be synchronized.
A PWM emulation technique
On/off data can be sent to an LED driver frequently to emulate the effect of PWM intensity control. Since the transmission rate of the LED data interface is usually much faster than a PWM period, this technique can be easily implemented with a microcontroller or an FPGA (field-programmable gate array). The relationship between PWM frequency, data transmission clock frequency, and PWM intensity level can be described by Equation 1:Where fCLOCK is the clock frequency for the data interface; fPWM is the PWM frequency; nPORT is the number of ports; and nLEVEL is the number of intensity level.
In this technique PWM emulation data is sent continuously from a controller to the LED driver with 1 bit for each port. A complete data update for all ports is considered a PWM step. This emulated PWM step is repeated with a start index of 1 and an end index equal to the number of intensity levels to form a PWM period. For example, if the intensity level is 256, data refresh for every port is repeated 256 times to form a PWM period. The data bit is 1, if the corresponding port's intensity level is higher than the index of the emulated PWM step; otherwise the data bit is zero. The emulated PWM period is repeated as long as the LED is on.
This PWM emulation procedure can be implemented using the following C code:
int INTENS[8] = {200, 100, 50, 25, 12, 6, 3, 1}; bool LEDON = true, DATA[8]; while (LEDON) { for {int i=0, i<256, i++} { for {int j=0, j<8, j++} { if INTENS[j]>i DATA[j]=1; else DATA[j]=0; } Send(DATA); } }The PWM emulation technique can be applied to MAX6968 and MAX6969. The MAX6968 is an 8-port constant-current LED driver with a 25Mbps transmission rate data interface. The MAX6969 is the 16-port version of the MAX6968. Using an emulated 16-bit or 65,536 intensity level control, the PWM frequency can be 47Hz for the MAX6968 or 24Hz for the MAX6969. The PWM frequency can be 752Hz or 376Hz, respectively, if only 12-bit resolution is needed. This PWM emulation technique enables each port to be controlled without modifying the application circuit.
The switched-LED power-supply technique
A switched-LED power-supply approach can also be used to add PWM intensity control to connected LEDs. Figure 1 shows a circuit using a PWM-based supply to provide additional intensity control to some LEDs. The PWM waveform comes from the same microcontroller that sends I²C commands to the LED driver. The PWM waveform can be controlled by a software routine. This technique can be applied to the MAX6969 with constant-current LED ports but no built-in intensity control, and to the MAX6956 with adjustable constant-current LED ports. In this approach the intensity of the LEDs is controlled by the duty cycle of the PWM waveform through a transistor. LED intensity can be controlled by the microcontroller indirectly through the LED driver and directly through the transistor. For the MAX6956 example, the combination of constant-current and PWM duty-cycle adjustments produces additive effects with no interference.Figure 1. This technique uses a PWM-based LED supply.
Figure 2 shows a similar circuit diagram that uses a MOSFET transistor as the power-switching device for enhanced efficiency.
Figure 2. A power MOSFET serves as the switching device.
The following formula can be used to calculate the required power dissipation for the switching transistor:
Where tRISE is the transistor switch rise time; tFALL is the transistor switch fall time; T is the PWM period; tON/T is the PWM intensity level; I is the total LED port current; and RON is the transistor's on-resistance.
Equation 2 expresses the total power dissipation as the sum of the switching power plus the transistor's on-power. The switching power is determined by the on/off time. When the transistor is turned on or off, almost the full current is passing through the transistor while the voltage across it is changing from zero to VLED, and vice versa.
Using a fast switching transistor, the rise and fall time is normally around 50ns. For a PWM period (T) of 1/1000 second, an LED supply (VLED) of 5.5V, and a total LED-port current of 200mA, the switching power is about:
For a transistor with an on-resistance of 0.1Ω, the transistor's on-power at full intensity is:
Equation 4 shows that by choosing a good high-speed switching resistor, the power dissipation should be minimal.
Master and individual port in a hierarchical relationship
PWM intensity control of some LED drivers can be implemented in a hierarchical relationship between a master and individual port controls. Examples for such combinations are the MAX6964, MAX7313, MAX7314, MAX6965, MAX7315, and MAX7316. In this technique, the waveform for individual-port PWM intensity control is repeated many times, as shown in Figure 3. Each repetition corresponds to a master intensity control step. Thus, if the master intensity control has 15 steps, the waveform is repeated 15 times. The individual-port intensity control of the LED drivers alters the duty cycle of the waveform. The master control determines how many of these waveform repetitions should be on or off. Consider an example of a 3/16 individual-port duty cycle and a 4/15 of master control setting. The waveform is turned on 3/16 of the time and the waveform is repeated in the first four time slots of the total 15 time slots available.Figure 3. Hierarchical master and individual-port PWM intensity control.
Unfortunately, the master intensity control of one MAX6964 cannot be combined with another MAX6964's individual-port intensity control to form a controlled multichip mechanism. The reason for this is that clocks between multiple MAX6964 devices cannot be synchronized; the turn-on time of the individual-port PWM control will not always match the boundaries of the master intensity-control on/off windows. The intensity is less pronounced (darker LEDs) if they are not aligned. Because of the phase shift between clocks, the LED will "beat" (on and off) in intensity periodically.
The hierarchical PWM intensity-control method can applied without the "beating" problem by using an LED driver, such as the MAX7302, with a clock synchronization mechanism and a wide range of operating clock frequencies. Figure 4 shows a circuit diagram using two MAX7302 devices and a few switching transistors to provide the desired hierarchical PWM intensity control.
Figure 4. Use two MAX7302s for hierarchical PWM intensity control.
One of the MAX7302's output ports is connected to the cathodes of the LEDs. Each output port acts as an individual port-intensity controller. The output ports of the other MAX7302 are connected to the anodes of the LEDs with external transistors. This second MAX7302 thereby acts as the master intensity controller. Each individual port-intensity controller is driven by an external clock with a high frequency of 1MHz, which is the upper limit of MAX7302's operating specification. Setting a port intensity level of 15/33, the output of the P2 individual port-intensity controller serves as the clock input for the master intensity controller. Therefore, the equivalent clock frequency for the master intensity controller is about 1000000/33=30kHz. In this application example, the individual port-intensity controller can be used to adjust the color of the RGB LEDs, and the master intensity controller can be used to adjust the intensity.
评论
查看更多