AN1261 MCP1631 MCP1631HV PIC16F616 MCP1631/MCP1631V MCP1631HV/ MCP1631VHV - Datasheet Archive
Dimming Power LEDs Using a SEPIC Converter and MCP1631 PIC Attach PWM Controller Author: Valentin C. Constantin Microchip
AN1261 AN1261 Dimming Power LEDs Using a SEPIC Converter and MCP1631 MCP1631 PIC Attach PWM Controller Author: Valentin C. Constantin Microchip Technology Inc. INTRODUCTION This application note covers the general concept, design and some source code modifications for using the MCP1631HV MCP1631HV Digitally Controlled Programmable Current Source Reference Design for an LED lighting application. The document offers additional insight into the MCP1631HV MCP1631HV Digitally Controlled Programmable Current Source Reference Design. A Microchip MCP1631 MCP1631 PWM controller and a low-cost PIC16F616 PIC16F616 microcontroller are used to manage a SEPIC (Single Ended Primary Inductive Converter) powertrain. The SEPIC topology is then used to drive and dim Light Emitting Diodes (LEDs). The LED technology continues to change and evolve. The energy efficiency (lumens/watt) of today's LEDs allows them to replace the classical tungsten filament and gas vapor lighting systems with solid-state technology. The most efficient LEDs are able to perform as well as Compact Fluorescent Lamps (CFL). The most important advantage of LEDs over tungsten and gas vapor bulbs is the cycle life. LED lifetimes currently show a 30% improvement over their counterparts. LEDs are being used in the automotive and commercial lighting industries with good results. LEDs must be carefully integrated into lighting systems because of their sensitivity to thermal and electrical stress. The LED current must be optimized for both thermal and electrical characteristics. Excessive driving current will deteriorate LED performance, shorten the lifetime, and cause permanent reduction in the luminous intensity. LEDs may be driven using constant current sources in order to maintain a consistent color output. One low cost but inefficient solution for driving LEDs is using series resistors. The series resistor method is very sensitive to power supply variation. Constant LED current depends on a constant supply voltage. Any variation of the voltage supplying the resistor and LED combination will result in a change in current and thus a change in output color. There are more efficient solutions for driving LEDs that save energy and provide good current control. Two methods of driving an LED are Constant Current and Pulse Width Modulation (PWM) current control. © 2009 Microchip Technology Inc. The PWM driver is used to dim an LED and is based upon the persistence of vision of the human eye. The current does not flow through the LED continuously. The PWM period is normally in the range of 100 Hz to 250 Hz. Dimming is obtained by changing the PWM duty cycle. Variations in supply voltage will directly affect the LED current. The Constant Current Source driver is used to supply the LED with a constant current. The constant current results in a consistent LED color output. A high frequency PWM signal may be used to control the current that is flowing through the LED. The PWM signal is used to set the LED current and thus the LED intensity. The Constant Current Source driver is based upon driving the LED with a constant current source to obtain the desired brightness and color. The current source is controlled by a high frequency PWM signal. The PWM modulated constant current source is set to the desired LED current. By changing the PWM duty cycle, the LED current can be adjusted for desired intensity and to offset aging. Constant current driving is recommended to eliminate light flickering and electrical stress due to voltage fluctuations. An important observation is the LED is not affected by the variation of input power supply voltage that can vary as much as +/- 30% of the nominal value. The design topology used for this application note will be the Single Ended Primary Inductive Controller or SEPIC topology. The SEPIC topology allows both buck and boost operation. This allows for a constant current drive output with variations in input voltage. The SEPIC uses a current sense feedback loop for efficient control. Microchip's MCP1631HV MCP1631HV Digitally Controlled Programmable Current Source Reference Design is used for this application note. DS01261A-page 1 AN1261 AN1261 LED BACKGROUND There are a few important parameters that must be considered when designing an LED driver. LED Power, Maximum Forward Current and Voltage Generally, the LED manufacturers recommend driving LEDs at constant current. For power type LEDs, the drive current covers hundreds of milliamps. Standard values which are currently used for LED drive current are: 350 mA, 700 mA, 1A and higher. Some standard power LEDs are rated for 1W, 3W, and 5W. LED Power is Vf x If, where Vf is the forward voltage of the LED and If is the forward current. Power LED applications utilizing higher current levels waste energy and create excessive heat when supplied by series resistors. Any power supply voltage variation will result in a change in LED current and luminous intensity. It is important to note that the LED's forward voltage varies from device to device and also varies significantly with temperature. The typical forward voltage drop of a red LED (ultra red, super red, or amber) ranges from 1.8V to 2.2V. Yellow and green LEDs range from 2.1V to 2.2V. Blue and white (cool or warm) LEDs range from 3.6V to 3.8V. The user should consult the manufacturers data sheet for the proper design parameters when using high power LEDs. Another important parameter is the Maximum Reverse Voltage (Vrmax), which is typically 5V. Applying reverse voltage in excess of the manufacturers recommendation will degrade the LED and may destroy it. Series and Parallel Connection If the user intends to connect two or more power LEDs in series, it is necessary to calculate the sum of the individual forward voltages. The color of the LEDs used may be different when using a series topology. Forward Current (mA) 400 White & Blue Green Amber 350 300 250 200 150 100 50 0 0 0.5 1 1.5 2 2.5 3 3.5 4 Forward Voltage (V) FIGURE 1: Typical Forward Current vs. Forward Voltage for a White, Blue, Green, and Amber Power LEDs (P3 series) at +25°C. The Direct Relation between Forward Voltage and the Color of the LED, Maximum Reverse Voltage Different color LEDs have different forward voltage (Vf) drops based upon the diode chemistry. A red LED dissipates less energy than a white LED when operated at the same current level. That is because the red LED has a lower Forward Voltage drop than the white LED. LED manufacturers datasheets will provide the maximum forward voltage drop (Vfmax) at a given maximum forward current (Ifmax). The higher Vfmax values are typically for white and blue LEDs and the lower are typically for red LEDs. DS01261A-page 2 FIGURE 2: Topology of an LED String (Series and Parallel Connection). The LED string can be driven by a Constant Current driver without series resistors. The sum of the forward voltage of each diode in a series string must not exceed the maximum voltage capability of the current source. Due to LED tolerances, parallel connections using a single current sense may not be able to maintain a uniform intensity and color. Better control is done using separate current sensing for each LED rung in a parallel system. The advantage of paralleling LEDs is that more LEDs can be supplied at lower output voltage levels on constant current supplies. If slight variations in luminous intensity are tolerable, a single current sense can be used to control the current loop. However, if one rung of the parallel LED string fails, the current through the other LEDs will increase and possibly cause undesirable consequences. Therefore, it is recommended to monitor current through each rung and drive each rung as if the string was a series string. © 2009 Microchip Technology Inc. AN1261 AN1261 When LEDs are connected in series, the maximum reverse voltage increases with each additional LED added to the string. The group of LEDs may make up a series connected system or they may make up one rung of a parallel connected system. Operating Temperature and Cooling the Power LED The forward voltage of an LED is temperature dependent. The temperature coefficient of forward voltage is published in the data sheet and its value is around 3 to 5 mV/°K, depending on the LED's color. This parameter shows the changes in forward voltage with the ambient temperature. The temperature increases directly with forward current. The Operating Temperature Range is generally between -20°C and +85°C. It is important to keep the LED case temperature around 30°C to 40°C for good results. The LED junction can typically work at a maximum of +125°C. The LED manufacturers recommend in their datasheets that a heatsink be used with the power LEDs. A successful design starts with the transfer of LED heat away from the device. Two typical methods used to provide proper heat sinking are an external heatsink or the printed circuit board (PCB) layout. A PCB on FR4 substrate with a large copper area and thermal vias under a surface mount (SMD) LED is a low-cost but inefficient solution. For good thermal results, the PCB needs to be double-sided. PCB heat-sinking is not indicated for power LEDs that require more than 1W. Modern lighting lamps use Metal Core PCBs (MCPCB) with special substrates like aluminum or copper. Copper offers the best thermal conductivity. These PCBs offer better cooling because of the lower thermal resistance of the core metal compared to FR4 fiberglass. The heat is dissipated in all directions on the metal surface. Where the space does not permit a large heat sink or a large metal PCB, a small electric fan may be used to force the air across the heat sink. It is recommended to use extra thermal protection devices to avoid accidental overheating due to wrong drive current, high ambient temperature or fan fault. The extra protection can be managed by an electronic controller. A small NTC thermistor or a semiconductor sensor may be placed on the LED heat sink or on the metal PCB. The temperature trip point may be set around 30°C to 40°C. Note that the short term effect of excessive heating is color shifting, which is reversible. The long term effect of excessive heating is a permanent decrease in luminous intensity and LED life cycle. The ideal operating temperature is typically 25°C. The luminous intensity will be at a maximum around this temperature. The red and amber LEDs are affected the most by heating. The white LED is least affected by heating. © 2009 Microchip Technology Inc. Minimum Heat Sink Requirements, Thermal Modeling When designing a lighting system with power LEDs, a big challenge is thermal management. Thermal management includes the selection of the cooling method or combination of methods. Thermal management methods may consist of PCB material, fan, and heat sinks and their respective fastening processes. After selecting the cooling method, the cooling system may then be designed. Thermal modeling is used to predict the junction temperature of the LED in order to avoid exceeding the LED thermal limits specified in the datasheet. The thermal limit for power LEDs is typically between +120°C and +135°C. The thermal model used in thermal management design is the concept of Thermal Resistance (Rt), given in °C/W. Thermal resistance is defined as the ratio of temperature difference to the corresponding electrical power dissipation. EQUATION 1: o R tJA [ C / W ] = T JA / P dLED Where: RtJA = represents the thermal resistance from junction to ambient. PdLED = the electrical power dissipated by LED. TJA = the difference between junction and ambient temperatures. EQUATION 2: P dLED [ W ] = V f × I f Where: Vf = the forward voltage. If = the forward current. EQUATION 3: o T JA [ C ] = T J T A Where: TJ = the junction temperature. TA = the ambient temperature. LED manufacturers typically specify in their data sheets the thermal resistance from the diode junction to the ambient RtJA (solder point or LED case). Thermal resistances RtJC (Thermal Resistance from junction to case) and RtCA (Thermal Resistance from case to air) should be optimized for each application. DS01261A-page 3 AN1261 AN1261 Since RtJC is determined by the device construction, only RtCA may be optimized for thermal efficiency. RtJC typically ranges from 3°C/W to 4°C/W, depending on the LED manufacturer. Increasing the heat sink surface area will improve the heat dissipation. There is a dependence between the working junction temperature and the PCB or heat sink thickness. Thicker metal provides a lower working junction temperature. This dependence on thickness can be seen in Figure 4 for a typical 1W P3 series LED. · LED power dissipation (Equation 2) which is modeled as a current source · thermal resistance which is modeled as a resistor (Equation 1) · the difference between ambient temperature and junction temperature which is modeled as a voltage source (Equation 3) These are solved by Ohm's law following the model in Figure 3. The working junction temperature, TJ, must be kept lower than the TJmax of the LED. Temperature (°C) The typical thermal model of an LED package consists of: 35 34 33 32 31 30 29 28 27 26 25 Heat Sink Metal PCB Chip 1 2 3 4 5 6 7 8 Base Thickness (mm) FIGURE 4: Base Thickness Dependence of Temperature for Power LEDs. Pd = Vf X If The unit of measurement commonly used to describe the LED intensity is the millicandela (mcd). TJA RtJA FIGURE 3: LED. Typical Thermal Model of an RtJA is a sum of RtJC and RtCA (Equation 4). RtCA is the sum of the case-to-sink thermal resistance (RtCS) and the sink-to-air thermal resistance (RtSA). Substituting for RtCA and solving Equation 1, we obtain the minimum RtSA heat sink requirement for the application (Equation 4). There are manufacturers that offer spreadsheets with several heat sink models and their RtSAvalues. References for a few power LED manufacturers are listed in the References section [9; 10]. The manufacturers web sites offer additional information about thermal management. EQUATION 4: o R tJA [ C / W ] = R tJC + R tCA o R tJA [ C / W ] = R tJC + R tCS + R tSA Mounting a power LED ensemble on a heat sink may require a thermal adhesive such as tape or thermal grease. Thermal adhesive tape is recommended for wide and flat surfaces. Avoid any air pockets between the thermal adhesive and the attached face when applying the tape. DS01261A-page 4 Luminous Intensity. Viewing Angle 1000 mcd = 1 candela. Part of the SI system of measurement, one candela (cd) is the monochromatic radiation of 540 × 1012 Hz which has a radiant intensity of 1/683 Watt per steradian in the same direction. The unit of measurement commonly used for most other light sources is the Lumen. Lumens are units of Luminous Flux. The Luminous Flux (lumens) from a light source is equal to the Luminous Intensity (candelas) multiplied by the solid angle over which the light is emitted. The solid angle is the angle (here defined in 3D space) that an object subtends at a point. It is a measure of how big an object appears to an observer who is looking from that object. The Lumens measure how much light actually falls on a surface. Two optical parameters that are very important when we choose a power LED for a lighting application are the luminous intensity and the viewing angle. It may take some extra calculations to determine which manufacturer's power LED is right for your application, as each manufacturer tends to test their LEDs under different operating conditions. For lighting applications, an LED with a 100° to 130° viewing angle is typically recommended. Lumens per watt (lm/W) is a measure of efficiency in converting electrical energy to light. Multiply this by the watts dissipated in the LED to get lumens. © 2009 Microchip Technology Inc. AN1261 AN1261 There are applications that have the requirement to control the luminous intensity of LEDs. The modalities for adjusting the brightness of LEDs were summarized in the previous section: · Adjusting the forward current value · Dimming by Pulse-Width-Modulation (PWM) Adjusting the Forward Current Value Generally, there are two methods to drive power LEDs by constant current. One method is to use a constant current source and the other method is to use constant voltage source. The constant current source method can drive the LED with a programmed current at the expense of a few more circuit devices. Dimming is obtained by modifying the value of current supplied by the current source. The constant voltage source method is simply connecting the LED to the constant voltage power supply in series with a resistor chosen for the desired current. It is the simplest and lowest-cost solution and thus a popular way to drive LEDs when efficiency and color range are not critical. Dimming would require either stepping the input voltage or switching different resistor taps to obtain a new current through the LED. From an efficiency and performance standpoint, the best choice is a current source that has the ability to generate digitally programmable current levels as needed. A digitally programmable current source may use a current sense resistor in the control loop to monitor the LED current. The current sense would be used by the control loop to maintain regulation about the programmed current setpoint. The current sense resistor is part of the output loop in a SEPIC topology setup. The resistor senses the loop current of the SEPIC topology consisting of the secondary coil, rectifier and LED. The loop current of the SEPIC topology consisting of the primary coil, switch and source power supply is sensed by a separate resistor. The primary sense monitors peak current in the primary loop. The secondary sense monitors average current in the secondary loop. All these key features are covered by the MCP1631HV MCP1631HV Digitally Controlled Programmable Current Source Reference Design. Note that the relative luminosity is directly related to the driving current which is a quasi-constant linear function. The dimming method by variable current control has the disadvantage of a shift in color as the current level is changed. Most shift of color is around base color and under certain circumstances may be tolerated. The color of an LED at rated forward current will be different than a dimmed LED operating at 50% of rated forward current. © 2009 Microchip Technology Inc. Relative Luminous Flux POWER LED DIMMING SOLUTIONS 1.2 1.1 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 P3 Blue LED P3 White LED 0 50 100 150 200 250 300 350 400 Forward Current, If (mA) FIGURE 5: Relative Luminous Flux is Lineary Dependent on the Direct Forward Current. Dimming by PWM As explained in the previous section, luminous intensity can be modified by controlling the current to the LED. However, this causes a color shift that for some LED applications is not tolerated. The PWM control changes the luminous intensity without changing the color of the LED. PWM control consists of maintaining a constant current setpoint value to maintain LED color while varying the duty cycle to control the LED brightness. The forward current through the LED is kept at a constant value and only the duty cycle (D) is changed. When the current is flowing through the LED during the "ON" portion of the duty cycle, the LED color operating point is set. When the current flow is cut off for the "OFF" portion of the duty cycle, the LED is also off. The persistence of the human eye causes the appearance of brightness changes relative to duty cycle. The duty cycle expresses the ratio between pulse "ON" duration (tPULSE) and the pulse period (T). EQUATION 5: D = tPULSE / T The human eye typically does not notice the variation in light above 120 Hz. The eye integrates and interprets the light pulses in terms of brightness that can be changed by varying the duty cycle of the source. PWM control also reduces electrical power consumption because no series voltage dropping resistors are required. The brightness of the LED may also be changed linearly by varying the PWM duty cycle. The drawbacks of the PWM method are that it may produce switching spikes and the square pulses may electrically stress the die. DS01261A-page 5 AN1261 AN1261 Relative Luminous Flux High-Speed Analog PWM Operation The high-speed analog PWM is used to drive the SEPIC powertrain switch to regulate the output of the converter. Voltage or current may be regulated depending on what is being sensed. For the SEPIC LED driver application, the MCP1631HV MCP1631HV is always regulating current. A PIC microcontroller is providing the oscillator and current references required to obtain the desired output current. 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 10 20 30 40 50 60 70 80 90 100 Duty Cycle, D (%) FIGURE 6: Linearity of Brightness vs. Duty Cycle in PWM LED drive. MCP1631 MCP1631 PWM CONTROLLER The MCP1631/MCP1631V MCP1631/MCP1631V is a high-speed pulse width modulator (PWM) used to develop intelligent power systems. When combined with a microcontroller, the MCP1631/MCP1631V MCP1631/MCP1631V will control the powertrain duty cycle to provide output voltage or current regulation. A functional block diagram of the PWM controller is shown in Figure 7. The MCP1631/MCP1631V MCP1631/MCP1631V inputs were developed to be attached to the I/O pins of a microcontroller. By combining the MCP1631/MCP1631V MCP1631/MCP1631V with a low cost microcontroller, intelligent LED lighting designs can be easily developed. The microcontroller is used to adjust the output current, switching frequency and maximum duty cycle. It provides additional features that make the power system more intelligent, robust and adaptable. Additional features integrated into the MCP1631HV/ MCP1631HV/ MCP1631VHV MCP1631VHV provide signal conditioning and protection features for constant current source applications. The MCP1631 MCP1631 is available in a 20-Lead 4x4 mm QFN, 20-Lead TSSOP, or SSOP packages. Powering the MCP1631 MCP1631 For applications that operate from a high voltage input, the MCP1631HV MCP1631HV and MCP1631VHV MCP1631VHV device options may be used. They will operate directly from a +3.5V to +16V input. For these applications, an additional low drop out +5V or +3.3V regulated output is available on chip and can provide up to 250 mA of current to power a microcontroller and auxiliary circuits. DS01261A-page 6 The PWM signal starts with the PIC generated oscillator input. When the oscillator input is low, the VEXT driver output pin is pulled high, turning on the external N-Channel MOSFET switch. The current begins to ramp up in the primary coil current sense resistor until the voltage exceeds 1/3 of the VREF reference value supplied by the microcontroller. The VREF voltage is internally limited to 0.9V. The 0.9V limit is used as an overcurrent limit. A passive filter is used on the current sense input (CS) to remove the leading edge turn-on spike associated with the turn-on of the external power MOSFET. The MCP1631/MCP1631V MCP1631/MCP1631V internal P-Channel MOSFET output driver is powered using a separate PVDD pin to keep switching noise off of the analog AVDD pin and sensitive current sense circuitry. The error amplifier (A1 on datasheet diagram) is used to compare the switch current with the programmed reference current. When the switch current is less than the programmed current, the PWM switch driver duty cycle increases. When the switch current is greater than the programmed current, the PWM switch driver duty cycle decreases. The PWM duty cycle will track changes in output current and adjust the duty cycle accordingly. The external feedback (FB) and compensation (COMP) pins are used to control the speed of the error amplifiers output response. The MCP1631HV MCP1631HV contains a 10V/V inverting gain amplifier (A2) for general purpose use. The A2 current sense amplifier may be used to amplify the sense current in the secondary side of the SEPIC converter or freewheeling current in a Buck converter. Sensing Battery Voltage Using the microcontroller A/D converter to sense load voltage requires a low source impedance to perform accurate readings. Low source impedance requires low resistance values that would draw excessive current at the converter output, decreasing the efficiency. The MCP1631HV MCP1631HV integrates another amplifier (A3) configured as a unity gain buffer. The buffer provides a high impedance input to the voltage sense divider while also providing a low impedance source for the microcontroller A/D converter input. © 2009 Microchip Technology Inc. AN1261 AN1261 Overvoltage Protection Overvoltage (OV) protection is a common voltage convertor protection feature. It is used to protect the power switch from excessive voltage if the load is removed. OV protection also prevents accidental overvoltage at the load if the programmed output current exceeds the absorption capability of the load. OV protection is typically required for any current source application such as battery chargers and LED drivers. The MCP1631HV MCP1631HV integrates an internal high speed OV comparator (C2) that uses a 1.2V reference. When the voltage on the OVIN pin exceeds the 1.2V reference threshold, the VEXT output is immediately driven low. The VEXT output will be re-enabled once the OVIN voltage has dropped below the 1.2V reference by 50 mV. The 50 mV is the typical hysteresis of the OV comparator. OSC Disable Feature The oscillator disable input (OSCDIS) is used to asynchronously terminate the PWM VEXT output. This can be used along with the shutdown (SHDN) pin and a separate PWM input to modulate current into an LED for lighting applications. © 2009 Microchip Technology Inc. DS01261A-page 7 AN1261 AN1261 MCP1631HV/VHV MCP1631HV/VHV High Speed PIC PWM Internal Regulator for MCP1631HV MCP1631HV and MCP1631VHV MCP1631VHV Options Only; For MCP1631 MCP1631 and MCP1631V MCP1631V AVDD_IN is input +3.3V or +5.0V LDO 250 mA VIN VDD Internal 1.2V VREF VDD AVDD_OUT / AVDD_IN Shutdown Control A3 Remains On SHDN Overvoltage Comp w/ Hysteresis C2 + OVIN PVDD OSCDIS VDD 100 k 0.1 µA OT OSCIN VEXT UVLO S VDD PGND Q VDD + C1 - COMP Q R VDD VDD A1 + 2R R AGND Remove for MCP1631V MCP1631V and MCP1631VHV MCP1631VHV Options R ISIN R ISOUT VDD 2.7V Clamp A3 + VREF A2 + FB 100 k 10R - CS/VRAMP VSIN Note 1: On Shutdown, amplifier A3 remains functional. 2: For HV options, internal Low Drop Out Regulator provides +3.3V or +5.0V bias to VDD. FIGURE 7: DS01261A-page 8 VSOUT MCP1631 MCP1631 PWM Controller - Functional Block Diagram. © 2009 Microchip Technology Inc. AN1261 AN1261 Shutdown Feature The MCP1631/MCP1631V MCP1631/MCP1631V shutdown (SHDN) feature is used to disable the device and to minimize the quiescent current draw. While shutdown, amplifier A3 remains operational. During shutdown, the device typically draws 4.4 µA from the supply source. UnderVoltage Lockout and Thermal Shutdown The MCP1631/MCP1631V MCP1631/MCP1631V has built-in UnderVoltage Lockout (UVLO) that ensures the output VEXT pin is forced to a low state when the input voltage or AVDD is below a specified value. This prevents the main MOSFET switch from being turned on during a power-up or power-down sequence. The MCP1631/ MCP1631/ MCP1631V MCP1631V provides a thermal shutdown protection feature. If the internal junction temperature of the device exceeds the overtemperature setpoint limit, the overtemperature protection feature will pull the VEXT output low to turn off the MOSFET switch. We can visualize the waveforms for a better understanding of how the SEPIC works. We will consider a coupled inductor SEPIC operating in Continuous Current (CC) mode and refer to Figure 9 for this example. L1 and L2 are wound on the same core. The SEPIC switch (Q1) is turned on at the start of the cycle. The current in the primary winding L1 (IL1) will ramp up at a rate of VIN / L1. The current in the secondary winding L2 (IL2) ramps at VCc/L2. The DC voltage across the isolation capacitor CC (VCc) is equal to VIN. The switch current (Q1) is equal to the sum of IL1 and IL2 during the switch on time. The input current through L1 is continuous, minimizing the input ripple current compared to other topologies. SEPIC TOPOLOGY We shall examine the SEPIC topology and demonstrate the capability of the MCP1631 MCP1631 family in current control applications using the SEPIC topology. The SEPIC Topology (Single Ended Primary Inductive Converter) follows the flyback design, adding a coupling capacitor between the two windings of a transformer. The output voltage may be lower or higher than the input voltage, resulting in buck or boost operation. This topology can use two separate inductors or a single transformer with two coupled windings. The coupled inductor solution saves PCB space and reduces radiated EMI. Another big advantage of using coupled inductors is the fact that only half of the calculated inductance needs to be used if the inductors are coupled. A capacitor connected between the primary inductor and secondary inductor offers DC isolation and protection against a shorted load. The capacitor clamps the winding leakage inductance energy and eliminates the need for a snubber circuit. The inductor input smooths the current draw and reduces the required input filtering. A single low-side switch reduces MOSFET drive voltage requirements and current limit protection complexity. The switch current can be sensed using a ground referenced sense resistor connected to the MOSFET source pin. A typical SEPIC converter design that is used with the MCP1631HV MCP1631HV PWM controller is shown in Figure 8. FIGURE 8: SEPIC Topology. When Q1 turns off, the stored energy in L1 forces the current to continue flowing through the coupling cap (Cc) and the rectifier (D1) to the output. A second current flow exists due to L2 releasing it's stored energy. Current flows from L2 through the rectifier (D1) to the output. The total rectifier current is the sum of the currents flowing through L1 and L2. During the switch-off time, current flowing through the rectifier to the output must also replenish the output capacitor (COUT). Looking at the output capacitor current waveform (ICc), it can be seen that the output current of the SEPIC converter is supplied by the output capacitor when the switch is on and supplied by the inductors when the switch is off. The transfer function for the SEPIC converter is derived in a similar fashion as other switching power topologies. The volt-time product of the magnetics must be balanced and the charge-time product on all capacitors must be balanced for each switch period. The input block components L1 and Q1 act like a standard boost converter input stage. The output block components L2, D and COUT act like an inverted buck-boost converter. The goal is to determine the volt-time product on the magnetics during the switch on time and set that equal to the volt-time product on the magnetics during the switch off time. Basic definitions for design are: · TSW = Switching Period © 2009 Microchip Technology Inc. DS01261A-page 9 AN1261 AN1261 · · · · fSW = Switching Frequency tON = Switch on time tOFF = Switch off time Duty Cycle D = tON / TSW = tON / (tON + tOFF) As D can have values between 0 and 1, the previous equation can be written as: 1 - D = tOFF / (tON + tOFF). Balance the inductor volt-time product in the boost stage (L1). As mentioned previously, duty cycle D = tON / (tON + tOFF) or (1 - D) = tOFF / (tON + tOFF). If we multiply both sides of Equation 8 with 1 / (tON + tOFF), we will introduce D into the following equation: EQUATION 9: V IN × D = ( V Cc + V OUT V IN ) × ( 1 D ) For Q1 Turned on (+ Slope): EQUATION 10: EQUATION 6: I L1 / t ON = V IN / L 1 1 V Cc = V IN × - V OUT 1 D For Q1 Turned off (- Slope): The secondary (L2) inductor current area defined by the slopes must also be equal. The volt-time product is solved similar to the primary inductor volt-time product. EQUATION 7: For Q1 Turned on (+ Slope): V Cc + V OUT V IN I L1 / t OFF = -L1 The inductor current area defined by the slopes must be equal for volt-time balance. Solving Equation 6 and Equation 7 by extracting IL1, we will obtain VCc. EQUATION 11: V Cc I L2 - = -t ON L2 EQUATION 8: V IN × t ON = ( V Cc + V OUT V IN ) × t OFF FIGURE 9: DS01261A-page 10 SEPIC Converter Waveforms. © 2009 Microchip Technology Inc. AN1261 AN1261 For Q1 Turned off (- Slope): EQUATION 18: D max = ( V OUT + V D ) / ( V INmin + V OUT + V D ) EQUATION 12: V OUT I L2 - = -t OFF L2 As above, we'll solve Equation 11 and Equation 12 for VCc. Inductor slope's must be equal for volt-time balance, so: The first step in calculating the inductor current is to know the maximum output power required. An efficiency estimate of 85% for a SEPIC converter can be used to approximate the input current. The average input current is equal to the input power divided by the input voltage. EQUATION 19: EQUATION 13: t ON × V Cc = t OFF × V OUT As shown above, duty cycle D can be introduced in Equation 13 by multiplying both sides with 1 / (tON + tOFF): P OUT = V OUT × I OUT EQUATION 20: P IN = P OUT / ( Efficiency ) EQUATION 14: 1D V Cc = V OUT × - D EQUATION 21: I IN ( AVG ) = P IN / V IN Setting Equation 10 equal to Equation 14 yields: The inductor value is calculated by: EQUATION 15: 1 1D V Cc = V IN × - V OUT = V OUT × - 1 D D The solution for VOUT/VIN is the transfer function of the SEPIC converter in continuous mode: EQUATION 16: V OUT D - = - 1 D V IN EQUATION 22: L1 = L2 = ( V INmin × D max ) / ( I L × f SW ) IL is the desired inductor peak to peak ripple current. A good IL approximation is 20% of the output current. The approximate ripple current for a 1A output current would be 200 mA. By rearranging Equation 16 we get VIN = VOUT x (1-D)/ D. Substituting that result into Equation 14 results in: If L1 and L2 are wound on the same core, which is the case of this SEPIC design, the value of inductance in the equation above is replaced by (1/2)L due to mutual inductance. EQUATION 17: EQUATION 23: V Cc = V IN The voltage across the coupling capacitor (Cc) is equal to VIN. This occurs as long as the capacitance of COUT is adequate to supply the output current during the switch ON time and the system operates in continuous current mode. Until now, the diode forward voltage drop (VD) has been ignored at the output because of its low value. If the output voltage is low, the forward voltage drop of the diode may be significant. When the diode drop is considered, the maximum duty cycle will be: © 2009 Microchip Technology Inc. L - = ( V INmin × D max ) / ( 2 ( I L × f SW ) ) 2 The maximum inductor current (ripple and peaks for L1 and L2) can be calculated to avoid saturating the inductor. EQUATION 24: I L1ON = ( V IN × t ON ) / ( L / 2 ) DS01261A-page 11 AN1261 AN1261 EQUATION 25: I L1peak = I IN ( AVG ) + I L1ON / 2 EQUATION 26: I L2ON = ( V IN × t ON ) / ( L / 2 ) The selection of the SEPIC capacitor, Cc, depends on the RMS current, which is passing through it. The RMS current in the SEPIC coupling capacitor is mainly dependant upon output power with some influence by inductor ripple current. The RMS current in Cc can be calculated by solving Equation 31 for both states of switching, tON and tOFF. Equation 32 is the RMS expression of a trapezoid waveform. EQUATION 31: EQUATION 27: I CcRMS = 2 2 I CcRMS ON + I CcRMS OFF I L2peak = I OUT ( AVG ) + I L2ON / 2 EQUATION 32: The coupled inductor winding currents calculated above are used to determine the wire size and core of the inductor. High switching frequency has several advantages: smaller ripple current, lower peak and RMS current and lower volt-time product on the inductor core. This leads to smaller and lower-cost solutions. The switch current (IQ1) is equal to the combination of the winding currents during the switch on time. When the switch is turned on, it conducts the current from L1 and L2. EQUATION 28: I CcRMS ON ( OFF ) = where I1 is the lowest waveform current and I2 is the highest waveform current: I1=IAVG + (Iripple / 2) and I2=IAVG - (Iripple / 2). For Q1 turned on IAVG = IOUT and Iripple = tON x 2VIN / (4L). For Q1 turned off IAVG = -IIN and Iripple = tOFF x 2VIN / (4L). To estimate the size for the coupling capacitor, the capacitor derivative equation can be used. EQUATION 33: tC = I C × -V I switch ( Q1 ) = I L1 + I L2 The peak Q1 switch voltage is equal to VIN + VOUT for the SEPIC converter. Any leakage inductance voltage spike is clamped through the output diode by the output capacitor. A switch voltage rating for applications should be at least: EQUATION 29: V switch ( Q1 ) = V INmax + V OUTmax The maximum reverse voltage across the SEPIC diode occurs during the switch ON time. The cathode of the schottky diode is connected to VOUT, the anode of the schottky diode is connected to the SEPIC coupling capacitor. The voltage across the coupling capacitor voltage is equal to VIN. When Q1 is ON, the voltage across the diode is: EQUATION 30: V D = V OUT + V IN = ( V OUT + V Cc ) A schottky diode is recommended for low voltage applications because of the low forward voltage drop. The lower forward drop improves converter efficiency. DS01261A-page 12 2 2 D × ( I 1 + ( I1 × I2 ) + I2 ) / 3 For the SEPIC converter, the coupling capacitor voltage is approximated as a DC value when deriving the duty cycle. The ripple voltage should be no more than a few percent (5% in practice) of the voltage across the capacitor or the input voltage. The SEPIC capacitor must be rated for a large RMS current in relation to the output power. As the output power increases, the capacitor ripple current will increase as well. This makes the SEPIC converter better suited for lower power applications where the RMS current through the capacitor is relatively small. The worst case RMS current in the coupling capacitor will occur at maximum output power and minimum input voltage. EQUATION 34: D max I OUT C c = - × - V Cc f SW The same algorithm should to be applied to the output capacitor. Ripple voltage (V or Vripple) should be no more than a few percent of the voltage across the capacitor. When the switch is on (tON = D / fSW), the inductor L1 is charging and the output current is supplied by the output capacitor COUT. © 2009 Microchip Technology Inc. AN1261 AN1261 EQUATION 35: I OUT DC OUT = - × - V ripple f SW The input capacitor CIN should be capable of handling the input RMS current. The input current waveform is continuous and triangular. The inductive input ensures that the input capacitor sees low ripple currents from the power supply. The input capacitor provides a low impedance source for the SEPIC converter in cases where the power source is not immediately adjacent to the SEPIC powertrain. MCP1631HV MCP1631HV PROGRAMMED CURRENT SOURCE REFERENCE DESIGN FOR DIMMING POWER LEDS Microchip has developed a reference design for a dimmable power LED lighting application to demonstrate the capability of the MCP1631HV MCP1631HV PWM Controller. TABLE 1: The MCP1631HV MCP1631HV Digitally Controlled Programmable Current Source board (MCP1631RD-DCPC1 MCP1631RD-DCPC1) is used to drive and dim one or more power LEDs in series or parallel topology. The board uses the PIC16F616 PIC16F616 microcontroller to generate the proper dimming ratio. The default dimming ratio is set at 10:1. The dimming ratio and maximum current are selected before compiling the source code. The firmware on the development board is programmed for 700 mA of LED drive current. An LED load capable of handling 700 mA of current is required to use the supplied firmware. Lower drive currents may be obtained by downloading the firmware source code from Microchip's website and changing the drive current parameter in the header file. The source code is then compiled and downloaded to the development board. The minimum programmed current that the board can generate is 70 mA. An LED from XLamp® XR-E series (Cree®) can be used to evaluate the board. The LED can be supplied with 700 mA or 1000 mA, based on the selected model. As example, the XRWWHT-L1-0000-009E7 XRWWHT-L1-0000-009E7 warm white LED can be driven at 700 mA maximum. LED indicators on the reference design provide status and fault indication (i.e.: overvoltage, overtemperature, thermal shutdown). DEFAULT OUTPUT CAPABILITY OF MCP1631HV MCP1631HV LED DRIVER REFERENCE BOARD Programmed output current (Note 1) Dimming ratio Max. Output power (Note 1) Over voltage protection Thermal shutdown (Note 2) 700 mA 10:1 8.5W 9V 40°C Note 1: Maximum programmed output current in the source code is 1A. Total power output should not exceed 8.5W. 2: This option is not enabled in default compiled .hex file available on the Microchip website. The reference board is capable of driving 1A maximum @ 8.5W output power. Efficiency is typical 85% at maximum power. The default parameters are displayed in Table 1. An input terminal block is provided for connecting the input source voltage to the board. An output header is also provided for attaching the load LED and an external 10k thermistor. The thermistor should be mounted on the LED heat sink near the LED. The temperature monitoring feature must be enabled in the source code before compiling. The default value for overtemperature shutdown is 40oC. Temperature monitoring is not enabled in the default .hex file. The recommended thermistor is EPCOS Inc. PN B57703M0103G040 B57703M0103G040. A Microchip ICD2 / PICkit 2 compatible programming header is available for updating the reference board firmware contained within the PIC16F616 PIC16F616. The PIC16F616 PIC16F616 microcontroller is used to regulate output voltage, current, switching frequency and maximum duty cycle. The MCP1631HV MCP1631HV generates the required switch duty cycle and provides fast overcurrent protection based upon the various external inputs. External signals include the reference oscillator, the © 2009 Microchip Technology Inc. reference voltage, the feedback voltage and the current sense. The output drive signal is a square-wave pulse used to drive the gate of the powertrain MOSFET switch. The power train topology used for the MCP1631HV MCP1631HV Programmable Current Source is a Single-Ended Primary Inductive Converter (SEPIC). The MCP1631HV MCP1631HV Programmable Current Source has the following features: · Input Operating Voltage Range: +3.5V to +16V · Maximum output current 700 mA with dimming ratio 10:1 (70 mA/step for pre-compiled.hex file) · Drive one or more power LEDs. Limited by OVP and 8.5W power capability · Optional battery charger software on Microchip website for charging Li-Ion, NiMH, and NiCd battery packs. Charge 1 or 2 single cell Li-Ion batteries in series or 1 to 4 single cell NiMH or NiCd batteries in series · Maximum output capability for all modes of operation: 1A @ 8.5W · ON/OFF/Dimming switch · Status Indication · Hardware and software overvoltage shutdown set at 9.0V DS01261A-page 13 AN1261 AN1261 Output Current (A) 0.7 0.6 0.5 0.4 0.3 3W White LED @ 700mA 0.2 3W Amber LED @ 700mA 3W Amber LED @ 350mA 0.1 2 series 3W White LEDs @ 700mA 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Input Voltage (V) FIGURE 10: Output Current Regulation vs. Input Voltage in Driving LED Mode. Operation The MCP1631HV MCP1631HV Digitally Controlled Programmable Current Source Reference Design has a red/green dual color LED (D2) to indicate status and faults. The green LED will flash with a one second period when the system is activated and current is being supplied to the load. Press button S1 to enable the output and drive the LED with the minimum programmed current of 70 mA. Each additional press of S1 will increment the drive current by 10% of the final programmed value. Press and hold S1 for at least 2 seconds until the red LED indicator is activated to switch the output current off. If a fault condition such as no load, overvoltage, or overtemperature is present when attempting to turn the output on, the system will stay off and the fault condition will be indicated by the flashing red indicator LED. The faults are coded as following: · Red LED flashes at 1 Hz rate if an overtemperature of the LED case has been detected. The fault is Thermal Shutdown · Red LED flashes at 2 Hz rate if an overvoltage or a missing/open load has been detected. The fault is Overvoltage Shutdown An overvoltage/overtemperature fault condition will be verified 5 times by the microcontroller firmware before the fault is validated and the system shuts down. Two parallel resistors, R10 and R11, are used to sense the MOSFET switch (Q1) current (Figure 11). The current sense signal is applied to the CS comparator input of MCP1631HV MCP1631HV. The load current is equal to the current in the secondary inductor L1:B. Sense resistors R2 and R3 are used to sense the load current. The load sense signal is amplified by the ISin current sense amplifier before entering the feedback pin (FB). A reference voltage signal from the PIC16F616 PIC16F616 supplies the VREF current reference voltage for the MCP1631HV MCP1631HV. The pulse width modulated VEXT signal that drives the MOSFET switch is generated by the MCP1631HV MCP1631HV using the microcontroller current reference PWM signal and the load current feedback signal. The current feedback signal is integrated with the current reference signal. The integrated signal is DS01261A-page 14 compared with the switch current sense and an artificial compensation ramp to modulate the switch drive signal. The artificial compensation ramp is generated from the PIC16F616 PIC16F616 OSC output signal to prevent the system from switching between continuous and discontinuous operation. The bi-modal operation would cause the duty cycle to vary when D > 50%. The artificial ramp voltage supplements the switch current sense voltage to guarantee the CS signal rises above the reference signal before the end of the integrator period. When the CS signal rises above the reference signal, the MOSFET switch will be turned off, reseting the integrator. The artificial ramp slope for the SEPIC will be the same as the slope of the current during the OFF time of the oscillator. The artificial ramp circuit block consists of C10, R9, R13, and Q2 which is driven with the OSC signal. A resistor divider network composed of R5, R8, and R15 is used for load voltage sensing. R5 senses overvoltage conditions and feeds directly into the MCP1631HV MCP1631HV overvoltage input pin. R8 senses the load voltage. The load voltage tap at R8 is connected to the MCP1631HV MCP1631HV internal voltage follower amplifier via the VSIN pin. The corresponding VSout signal is fed to the PIC16F616 PIC16F616 A/D RA2 port. When a thermistor is used, it is placed across J2-4 and J2-5. The thermistor forms a voltage divider with R1, a 10 k resistor. The voltage across the thermistor is fed to the A/D port RA4 of the PIC16F616 PIC16F616. If an overtemperature condition is detected, the microcontroller will disable the PWM signal of MCP1631 MCP1631. The OSC signal is generated directly by the PIC16F616 PIC16F616 PWM hardware at port RC5. MCP1631HV MCP1631HV Digitally Controlled Programmable Current Source Reference Design Firmware The source code for Microchip's MCP1631HV MCP1631HV Digitally Controlled Programmable Current Source Reference Design was developed using mikroElektronica's MikroC Compiler for PIC Processors. The software has conditional compiler options for user selectable parameters and function. The LED driver is the default compiler option. The NiMH/NiCd and Li-Ion battery charger options are selectable at compile time by modifying a parameter in the header file. The mikroC compiler may be downloaded at: http:// www.mikroe.com. Please consult the mikroC website and compiler Help for more information about the compiler. © 2009 Microchip Technology Inc. M AN1261 AN1261 1 2 3 4 5 6 7 8 2 1 3 FIGURE 11: MCP1631HV MCP1631HV Programmable LED Current Source Reference Design Schematic. © 2009 Microchip Technology Inc. DS01261A-page 15 AN1261 AN1261 The C source code file is 00234R1 00234R1.c and the header file is 00234R1 00234R1.h. These two files are referenced by the mikroC project file: 00234R1 00234R1.ppc. To setup the parameters, the user starts with the 00234R1 00234R1.h file. Set the function of interest for the reference board as enabled. The example below is for an LED driver. /* Enable support for Lithium Ion batteries */ #define LION_SUPPORT DISABLED /* Enable support for Nickel Metal Hydride batteries */ #define NIMH_SUPPORT DISABLED FIGURE 12: Top Silk and Pads of Reference Design. FIGURE 13: Design. Top Layer of Reference /* Enable support for LED Driver */ #define LED_DRIVER_SUPPORT ENABLED The charging/driving current profile parameters are set in separate sections of the header file for the project. The LED driver overvoltage value is set to 9V by parameter LED_DRIVER_OVER_VOLTAGE. The LED driver starting current value is set to 70 mA by parameter LED_DRIVER_CONDITION_CURRENT. The LED maximum current value is set to 700 mA by parameter LED_DRIVER_CURRENT. To evaluate the board, a Cree XREWHT-L1-0000-009E7 XREWHT-L1-0000-009E7 with warm white LEDs that can be driven at 700 mA maximum should be used. The overtemperature setpoint is enabled by setting OVERTEMPERATURE_SUPPORT to ENABLED. The default overtemperature set point is +40°C. A 10k NTC thermistor must be connected between J2-4 and J2-5 of the J2 connector when overtemperature support is enabled. The thermistor should be placed as close as possible to the LED mounting area. The number of LEDs value is set to 1 by parameter NUMBER_OF_CELLS_DEFAULT. These default values are for a typical 3W power LED. #if (LED_DRIVER_SUPPORT = ENABLED) // define the LED Driver characteristics in millivolts and // milliamps). Default values are for one 3W/750mA Power LED // with max forward voltage 4.5V /* LED overvoltage */ #define LED_DRIVER_OVER_VOLTAGE (int)(9000.0/BATTERY_MV_PER_BIT) FIGURE 14: Design. Bottom Layer of Reference The reference board PIC16F616 PIC16F616 microcontroller has been pre-programmed with the LED driver option. The reference board may also be operated as a battery charger. The user may re-configure and compile the source code for Li-Ion or NiMH/NiCd battery charging instead of LED driving. The firmware packet has several files for LED dimming and battery charging. · · · · /* cell conditioning/startup current = 70 mA */ #define LED_DRIVER_CONDITION_CURRENT (int)(70.0/BATTERY_MA_PER_BIT) /* total charge current = 700 milliamps */ #define LED_DRIVER_CURRENT (int)(700.0/BATTERY_MA_PER_BIT) /* LED overtemperature limit = 40 deg C (40 / 0.1447) = 311 */ #define LED_DRIVER_OVTEMP_SETPOINT (float)(THERMISTOR_OHMS_40C) /* ENABLE or DISABLE the overtemperture detection */ #define OVERTEMPERATURE_SUPPORT DISABLED /* default number of LEDs in series topology */ #define NUMBER_OF_CELLS_DEFAULT 1 #endif /* LED_DRIVER_SUPPORT */ LED = 00234R1 00234R1.hex Li-Ion = 00234R1-LiIon_Charger.hex NiMH = 00234R1-NiMH_NiCd_Charger.hex NiCd = 00234R1-NiMH_NiCd_Charger.hex DS01261A-page 16 © 2009 Microchip Technology Inc. AN1261 AN1261 The OSC reference signal supplied to the MCP1631HV MCP1631HV PWM controller is set by the PIC16F616 PIC16F616. The frequency may be set to 200 kHz or 500 kHz. The parameters are set in the main C file 00234R1 00234R1.c. /* define Oscillator Output PWM frequency Prescale Value for PR2 */ #define OSC_500KHZ 500KHZ_PR2_REG 0x03 #define OSC_200KHZ 200KHZ_PR2_REG 0x09 #define OSC_PR2_REG OSC_500KHZ 500KHZ_PR2_REG The oscillator duty cycle is set to 25% if the SEPIC reference board must work in buck-boost mode. The 25% duty cycle allows the system to boost the output voltage. The parameter is in the 00234R1 00234R1.h header file. /* charge oscillator duty cycle */ #define OSCILLATOR_DUTY_CYCLE 25 The number of incremental LED current steps is set to 10 by the parameter IREF_INCREMENTS. Each S1 button press will increment the output current by a factor of (1 / IREF_INCREMENTS) times the programmed current value up to the programmed current value. /* define Reference Current Increments when ramping up current at startup */ /* rate is 1 increment every second in Charger Mode or every button push for LED Driver */ #define IREF_INCREMENTS 10 Example: The MCP1631RD-DCPC1 MCP1631RD-DCPC1 Reference Board needs to drive an LED string composed of 2 white LEDs in series topology with a 350 mA maximum forward current. The board is powered from a 12V source. Solution: The system will need to provide 1 LED x 350 mA = 350 mA of drive current, because the LEDs are connected in series topology. IREF_INCREMENTS is set to 10 to allow 10 incremental current steps. LED_DRIVER_CONDITION_CURRENT is set to the startup current value of 35 mA. LED_DRIVER_CURRENT is set to the final current of 350 mA. LED_DRIVER_OVER_VOLTAGE is set to 8V which is the sum of maximum forward voltages of the two white LEDs. The system will only need to operate in buck mode because the 12V power supply voltage is greater than the 8V load voltage. OSCILATOR_DUTY_CYCLE is set to 50% for buck mode. OVERTEMPERATURE_SUPORT is set to DISABLED because cooling the LED string is not an issue. The flowchart of the default source code is given in Figure 15. When powered on, the microcontroller initializes the ports and the default system parameters. If push-button S1 is pressed, the load is supplied with condition current. Each additional press of S1 will increase the current until the maximum programmed current is reached. Further presses will not increase the current beyond the maximum value. When S1 is pressed and held for more than 2 seconds, the red LED will turn on and the output will turn off. © 2009 Microchip Technology Inc. DS01261A-page 17 AN1261 AN1261 START Initialize: Processor, Parameters (ILEDmin = 70 mA, ILEDmax = 700 mA), Timers, Sample ADC() No S1 Pressed? Yes ILEDmin Yes OVP Test VOUT> 9.0V? No Shutdown S1 Pressed? No Yes No OVP time retries >5 S1 pressed > 2s? = Yes No Increment IREF(70 mA) Yes Shutdown Fault END FIGURE 15: DS01261A-page 18 Firmware Flow Diagram for LED Driver With Dimming. © 2009 Microchip Technology Inc. AN1261 AN1261 CONCLUSION REFERENCES For applications that require intelligent power management solutions like LED drivers, the combination of a microcontroller and the MCP1631 MCP1631 high-speed PWM is very powerful. It brings the programmability benefits of the microcontroller and adds the performance of a high speed analog PWM. The analog PWM will respond to changes in input voltage and output current very quickly. The microcontroller is used for programmability, for establishing LED current, for monitoring the circuit for fault conditions, and for taking the appropriate action in the event of a specific fault. 1. Terry Cleveland, "Using the MCP1631 MCP1631 Family to develop Low-Cost Battery Chargers", AN1137 AN1137, Microchip Technology Inc. 2. Terry Cleveland, "New components and design methods bring intelligence to battery chargers", AN960 AN960, Microchip Technology Inc. 3. *, "MCP1631/HV/MCP1631V/VHV MCP1631/HV/MCP1631V/VHV Data Sheet", DS22063 DS22063, Microchip Technology Inc. 4. Markus Hofmann, "Comparation of LED Circuits", Application Notes, OSRAM Opto Semiconductor. 5. *, "Controlling Luminous Intensity of LEDs", Application Notes, STS-KSE3692 STS-KSE3692, NIKIA. 6. Hubert Ott, Ludwig Plotz, "Dimming InGaN LEDs", Application Notes, OSRAM Opto Semiconductor. 7. J. Reill, M. Wicke, "Dimming LEDs with respect of grouping current", Application Notes, OSRAM Opto Semiconductor. 8. *, "Thermal design consideration for Luxeon 5W Power Light sources", AB23, Lumileds Lighting. 9. *, "Thermal Management guide", Application Notes, Seoul Semiconductor. Rev. 3, 10. Rainer Huber, "Thermal Management of SMT LED", Application Notes, OSRAM Opto Semiconductor. 11. *, "Electrical Drive Management", Rev. 1, Application Notes, Seoul Semiconductor. 12. *, The National Technology Laboratory, website: www.netl.doe.gov. © 2009 Microchip Technology Inc. DS01261A-page 19 AN1261 AN1261 NOTES: DS01261A-page 20 © 2009 Microchip Technology Inc. Note the following details of the code protection feature on Microchip devices: · Microchip products meet the specification contained in their particular Microchip Data Sheet. · Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. · There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip's Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. · Microchip is willing to work with the customer who is concerned about the integrity of their code. · Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as "unbreakable." Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip's code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. DS01261AInformation contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, rfPIC and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18 PICC-18, PICkit, PICDEM, PICDEM.net, PICtail, PIC32 PIC32 logo, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. © 2009, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. Microchip received ISO/TS-16949 ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company's quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip's quality system for the design and manufacture of development systems is ISO 9001:2000 certified. © 2009 Microchip Technology Inc. DS01261A-page 21 WORLDWIDE SALES AND SERVICE AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://support.microchip.com Web Address: www.microchip.com Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4080 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 India - Pune Tel: 91-20-2566-1512 Fax: 91-20-2566-1513 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Japan - Yokohama Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Farmington Hills, MI Tel: 248-538-2250 Fax: 248-538-2260 Kokomo Kokomo, IN Tel: 765-864-8360 Fax: 765-864-8387 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 Santa Clara Santa Clara, CA Tel: 408-961-6444 Fax: 408-961-6445 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 China - Hong Kong SAR Tel: 852-2401-1200 Fax: 852-2401-3431 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 China - Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 Taiwan - Hsin Chu Tel: 886-3-6578-300 Fax: 886-3-6578-370 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 UK - Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 03/26/09 DS01261A-page 22 © 2009 Microchip Technology Inc.