# Patent

## Title
Integrated circuit switching power supply controller with selectable buck mode operation

## Abstract

An integrated circuit (IC) controller for a switching power supply has a selectable operating mode for supporting multiple switching power supply topologies. The IC controls current by controlling a cycle rate of the switching power supply to provide a constant or variable output current, which may be provided to lighting devices such as light-emitting diodes (LEDs). The selectable operating mode includes at least a buck converter operating mode and another operating mode, which may be a flyback converter operating mode.

## Background
The present U.S. Patent Application claims priority under 35 U.S.C. §119(e) to U.S. Provisional Patent Application Ser. No. 61/369,202 filed on Jul. 30, 2010.


BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates generally to switching power supply circuits, and in particular to an integrated circuit controller for controlling a switching power supply circuit and having selectable buck mode operation.
2. Background of the Invention
Lighting control and power supply integrated circuits (ICs) are in common use in both electronic systems and in replaceable consumer lighting devices, e.g., light-emitting-diode (LED) and compact fluorescent lamp (CFL) replacements for traditional incandescent light bulbs. In order to provide a constant or variable level of intensity, the current supplied to the lighting devices must typically be controlled. Additionally, other applications require controlled-current power supplies.
Depending on conditions such as input voltage range, cost factors, and isolation requirements, different topologies are desirable for implementing switching power supplies in each particular set of conditions. However, when the control of the switching power supply is provided from an integrated circuit controller (IC), producing an IC switching power supply controller for each different topology increases the cost, inventories and management requirements for both the IC and the end product.
Therefore, it would be desirable to provide an IC controller for a controlled-current power supply that can support multiple power supply topologies.
SUMMARY OF THE INVENTION
The invention is embodied in an integrated circuit (IC) and its method of operation. The IC is a controlled-current switching power supply controller.
The IC has multiple selectable operating modes, including a buck converter operating mode and another operating mode, which may be a flyback converter operating mode. The IC controller controls the cycle rate of the converter by controlling one or more switching devices that may be internal to, or external to the IC, in order to maintain a fixed or variable output current level.
The foregoing and other objectives, features, and advantages of the invention will be apparent from the following, more particular, description of the preferred embodiment of the invention, as illustrated in the accompanying drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram depicting a flyback converter power supply circuit including a switching power supply controller IC 10 in accordance with an embodiment of the present invention.
FIG. 2 is a timing diagram illustrating signals within the circuit of FIG. 1.
FIG. 3 is a block diagram depicting a buck converter power supply circuit including switching power supply controller IC 10 in accordance with another embodiment of the present invention.
FIG. 4 is a timing diagram illustrating signals within the circuit of FIG. 3.
FIG. 5 is a block diagram depicting details of switching power supply controller IC 10 in accordance with an embodiment of the present invention.



DESCRIPTION OF ILLUSTRATIVE EMBODIMENT
The present invention encompasses power supply controller integrated circuits (ICs) and their methods of operation. In particular embodiments, power supplies implemented using the controller ICs provide constant or variable output current levels to lighting devices such as light-emitting diodes (LEDs). The brightness of the LEDs may be controlled by changing the output current level according to a dimming value. The ICs have a selectable mode of operation, including a buck converter mode and one other mode. The one other mode may be a flyback converter operating mode or a mode supporting another topology. The ICs thereby support multiple switching power supply topologies.
Referring now to FIG. 1, a flyback switching power supply circuit 5 in accordance with an embodiment of the invention is shown. A transformer T1, provides a magnetic storage element through which energy is transferred to an LED LED1 through diode D1 and to charge capacitor C1, which provides filtering of the ripple voltage produced by the switching action of the power supply circuit 5. Transformer T1 further provides isolation between a primary side circuit coupled to a rectified line voltage source +VS and LED LED1, which may be a string of series connected LEDs. While the exemplary lighting devices are LEDs in the Figure, lighting device LED1 can alternatively be another type of lighting device, in accordance with other embodiments of the invention. Further, the techniques of the present invention may be used in other applications requiring controlled-current power supplies, such as motor control applications.
An integrated circuit (IC) 10 provides a primary-side controller that operates a switching transistor N1, which is illustrated as external to IC 10, but that alternatively may be included within IC 10. A switching controller 12 provides a pulse frequency modulated (PFM) gate control signal drive to vary the cycle rate of the switching power supply circuit. Switching controller also receives an indication of the selected operating mode of integrated circuit 10, which in the illustration is a logical input signal provided from a terminal of integrated circuit 10, that when in a logic low condition (ground) selects a flyback operating mode, as shown. The gate of switching transistor N1 is controlled by the PFM switching signal to control the amount of energy applied to the primary winding of transformer T1, according to dimming values DIM, which may be provided by a source internal or external to integrated circuit 10. The current supplied to LED LED1 is thereby controlled by switching controller 12, according to feedback values provided by a current sense circuit 16, which senses the magnitude of primary winding current IPRI of transformer T1 while switching transistor N1 is conducting, and from a voltage sensing circuit 14 that senses a voltage across the primary winding of transformer T1, so that the end of the flyback interval (when switching transistor N1 is not conducting and secondary winding current ISEC is non-zero) can be determined.
In the illustrated example, primary winding current IPRI is measured by including a sense resistor R1 connected between the source of transistor N1 and ground. Current sense circuit 16 determines an indication of the peak current IPEAK through the primary winding of transformer T1, by detecting the peak value of a voltage Vsense generated across sense resistor R1 at each cycle. The value of peak current IPEAK is retained (sampled) to use in controlling the next switching cycle(s) of switching controller 12.
Also in the illustrated example, the duration of the flyback interval, during which secondary winding current ISEC is non-zero and capacitor C1 is being charged, is determined by voltage sensing circuit 14, which determines when the voltage across the primary winding of transformer T1 is negative and non-zero, i.e., the duration of the period tfly extending from the turn-off time of transistor N1 until diode D1 ceases conduction. Voltage sensing circuit 14 generates logic signal z, which is active only during flyback interval tfly. Both the sampled peak primary winding current Ipeak and the duration of the flyback interval tfly, will be used in determining the cycle rate of the next switching cycle(s) of gate control signal drive.
Referring additionally now to FIG. 2, exemplary signals within the circuit of FIG. 1 are illustrated in a timing diagram. A first charging interval tchg between times t0 and t1 stores energy in transformer T1 determined by the peak current Ipeak of primary winding current IPRI at time t1. The rising value of primary winding current IPRI is caused by activation of switching transistor N1 according to gate drive signal drive. During flyback interval tfly between times t1 and t2 the flyback secondary current ISEC from the secondary winding of transformer T1 passes through diode D1 to charge capacitor C1, to power LED LED1. The switching cycle repeats after the cycle time tcyc has elapsed, which determines the cycle rate of the switching power supply circuit. In order to maintain a constant current IOUT through LED LED1, or a particular current level IOUT for a particular dimming value DIM, where the current supplied is variable according to dimming value DIM, the cycle time tcyc to generate particular current level IOUT in the flyback converter mode is given by:

tcyc=0.5*N*Ipeak/IOUT*tfly,

where N is the turns ratio (secondary windings/primary windings) of transformer T1. In the buck operating mode, the cycle time formula to generate particular current level IOUT is different, as will be illustrated below. For the control algorithm, the cycle time can be controlled according to:

tcyc=K*Ipeak*tfly,

since only Ipeak and tfly should vary in the equation above. In order to provide proper operation, integrated circuit 10 must be operated in the mode that corresponds to the topology of the switching power supply circuit in which integrated circuit 10 is installed, and the component values provided in the circuit must be determined for proper operation, e.g., the core of transformer T1 (or inductor L1 used in the non-isolated buck converter topology illustrated below) must be sized to avoid saturation during charging interval tchg, along with other usual considerations in switching power supply design and component selection.

Referring now to FIG. 3, a buck switching power supply circuit 5A in accordance with another embodiment of the invention is shown. Buck switching power supply circuit 5A is similar to flyback switching power supply circuit 5 of FIG. 1, so only differences between them will be described below. The buck operating mode of integrated circuit 10 is selected by strapping input terminal BUCK to power supply voltage +VDD. An inductor L1, provides the magnetic storage element through which energy is transferred to LED LED1. In buck switching power supply circuit 5A, current is supplied through LED LED1 when transistor N1 is conducting by conduction of diode D10, and also during the flyback interval by conduction of diode D11. Therefore, the control equation for providing a constant output current IOUT differs from that of flyback switching power supply circuit 5 of FIG. 1, and for the buck operating mode selected in buck switching power supply circuit 5A is given by:

tcyc=0.5*Ipeak/IOUT*(tchg+tfly).

For the buck control algorithm, the cycle time can be controlled according to:

tcyc=K*Ipeak*(tchg+tfly).

Another difference in buck switching power supply circuit 5A from flyback switching power supply circuit 5 of FIG. 1, is in the detection of the flyback interval duration tfly. An auxiliary winding is provided on inductor L1 and is used to provide a power supply voltage +VDD for powering integrated circuit 10 through rectifier diode D12, filter resistor R2 and filter capacitor C10. A voltage divider formed by resistors R3 and R4 provides an input voltage signal to voltage sense circuit 14A, which is a scaled version of auxiliary winding voltage Vaux. Just as in flyback switching power supply circuit 5 of FIG. 1, voltage sense circuit 14A, which may be identical to voltage sense circuit 14 of FIG. 1 and may receive input from the same terminal as in the flyback converter configuration, detection of a negative voltage pulse duration across the auxiliary winding of inductor L1 provides a measure of the flyback interval duration tfly. The auxiliary winding circuit shown in FIG. 3 can be used as an alternative to detection of primary winding voltage VPRI in the circuit of FIG. 1, in accordance with another embodiment of the present invention, by providing an auxiliary winding on transformer T1, which may also be used to provide a power supply voltage +VDD for powering integrated circuit 10, as in the circuit of FIG. 3.
Referring additionally now to FIG. 4, exemplary signals within the circuit of FIG. 3 are illustrated in a timing diagram. The timing diagram of FIG. 4 is similar to that of FIG. 2, so only differences between them will be described below. Rather than separate primary and secondary current waveforms, inductor current IL has both positive and negative portions, the positive portion corresponding to the time when gate control signal drive is active, and the negative portion corresponding to flyback interval tfly. Charging interval tchg between times t0 and t1 stores energy in inductor L1 determined by the peak current Ipeak of inductor current IL at time t1. The current through inductor L1 is also the same as charging current ICHG that charges capacitor C1 during charging interval tchg. Charging current ICHG also charges capacitor C1 during flyback interval tfly due to conduction of diode D11, leading to the triangular shape of the waveform of charging current ICHG.
Referring now to FIG. 5, details of switching controller 12 within integrated circuit 10 are shown in accordance with an embodiment of the present invention. The depicted circuit is exemplary, and provides only one particular example of a circuit that may be used to implement switching controller 12. In the depicted example, current sensing circuit 16 is subsumed in switching controller 12 and is provided by an analog-to-digital converter (ADC) 52 and logic or a program within pulse frequency modulator (PFM) 50 that detects the peak current level IPEAK. Voltage sensing circuit 14 is also subsumed in switching controller 12, the function of which is provided by a comparator K1 that generates logic signal z, indicative of the polarity of the auxiliary (or primary) winding voltage. PFM 50 then determines the duration of flyback interval tfly. Depending on the state of the operating mode selection signal BUCK, one of buck converter algorithm 54A or flyback converter algorithm 54B is selected to generate gate control signal drive.
While the invention has been particularly shown and described with reference to the preferred embodiments thereof, it will be understood by those skilled in the art that the foregoing and other changes in form, and details may be made therein without departing from the spirit and scope of the invention.

## Claims

1. An integrated circuit for controlling a power supply circuit that generates an output current, the integrated circuit comprising:
an input for receiving a signal from a winding of a magnetic storage element of the power supply circuit;
a detection circuit coupled to the input for processing the signal from the winding of the magnetic storage element to detect a duration of a flyback interval during which the magnetic storage element of the power supply circuit is supplying current to an output of the power supply circuit and for determining an indication of a peak current in the magnetic storage element at the end of a charging interval during which the magnetic storage element is storing energy supplied from the power supply circuit; and
a control circuit for generating a switching control signal to control a cycle rate of the power supply circuit according to a selectable operating mode of the integrated circuit that is selectable between a buck operating mode and another operating mode, wherein in the buck operating mode the cycle rate is controlled according to a first value computed according to a first algorithm from the indication of the peak current and the detected duration of the flyback interval to maintain the output current at a constant value, and wherein in the another operating mode the cycle rate is controlled according to a second value computed according to a second algorithm from the peak current and the detected duration of the flyback interval to maintain the output current at the constant value, wherein the second algorithm differs from the first algorithm.

2. The integrated circuit of claim 1, wherein in the buck operating mode, the control circuit controls the cycle rate of the power supply circuit to hold constant a product of the indication of the peak current with a sum of the duration of the flyback interval and a duration of the charging interval.

3. The integrated circuit of claim 2, wherein the control circuit determines a cycle time of the switching control signal according to the formula:


tcyc=K*Ipeak*(tchg+tfly),

where K is a constant, tcyc is the cycle time, Ipeak is the indication of the peak current, tchg is the duration of the charging interval and tfly is the duration of the flyback interval.

4. The integrated circuit of claim 1, wherein the another operating mode is a flyback operating mode in which the control circuit controls the cycle rate of the power supply circuit to hold constant a product of the indication of the peak current with a duration of the flyback interval.

5. The integrated circuit of claim 4, wherein the control circuit determines a cycle time of the switching control signal according to the formula:


tcyc=K*Ipeak*tfly,

where K is a constant, tcyc, is the cycle time, Ipeak is the indication of the peak current and tfly is the duration of the flyback interval.

6. The integrated circuit of claim 1, wherein the control circuit receives a dimming value from a dimming input, and wherein the control circuit scales the cycle rate by the dimming value to control an output current of the power supply circuit according to the dimming value.

7. The integrated circuit of claim 1, further comprising an input terminal for coupling to a winding of the magnetic storage element and wherein the detection circuit is coupled to the input terminal and detects a change in voltage across the winding that indicates an end of the flyback interval.

8. The integrated circuit of claim 1, wherein the power supply comprises a resistor coupled in series with a switching circuit and a winding of the magnetic storage element, and wherein the integrated circuit further comprises a current sensing circuit coupled to an input terminal of the integrated circuit for coupling to the resistor and sensing a voltage across the resistor to determine the peak current.

9. The integrated circuit of claim 1, further comprising a switching transistor having a gate coupled to the switching control signal, and wherein the integrated circuit further comprises a terminal for coupling a winding of the magnetic storage element.

10. The integrated circuit of claim 9, wherein the detection circuit is coupled to the terminal and detects a change in voltage across the winding that indicates an end of the flyback interval.

11. The integrated circuit of claim 9, further comprising a resistor coupled in series with the drain-source connections of the transistor and the terminal, and further comprising a current sensing circuit having an input coupled to the resistor and that senses a voltage across the resistor to determine the peak current.

12. A method of operating an integrated circuit controller capable of controlling a power supply circuit having either a buck topology or alternatively another topology to generate a constant output current, the method comprising:
receiving an indication of whether the integrated circuit controller is installed in a buck converter circuit or alternatively another converter circuit having another topology;
selecting a buck operating mode if the indication indicates that the integrated circuit controller is installed in a buck converter circuit;
selecting another operating mode if the indication indicates that the integrated circuit controller is installed in the another converter circuit;
detecting a duration of a flyback interval of the power supply;
determining an indication of a peak current supplied to a magnetic storage element of the power supply during a charging interval of the power supply;
responsive to selecting the buck operating mode, controlling a cycle rate of the buck converter circuit to maintain the output current at a constant value according to a first value computed by first control algorithm from the indication of peak current; and
responsive to selecting the another operating mode, controlling the cycle rate of the another converter circuit to maintain the output current at the constant value according to a second control value computed by a second control algorithm from the peak current and that differs from the first control algorithm.

13. The method of claim 12, wherein responsive to selecting the buck operating mode, the controlling controls the cycle rate of the power supply circuit to hold constant a product of the indication of the peak current with a sum of the duration of the flyback interval and a duration of the charging interval.

14. The method of claim 13, wherein the responsive to selecting the buck operating mode, the controlling determines a cycle time of the power supply circuit according to the formula:


tcyc=K*Ipeak*(tchg+tfly),

where K is a constant, tcyc is the cycle time, Ipeak is the indication of the peak current, tchg is the duration of the charging interval and tfly is the duration of the flyback interval.

15. The method of claim 12, wherein the another operating mode is a flyback operating mode in which the controlling controls the cycle rate of the power supply circuit to hold constant a product of the indication of the peak current with a duration of the flyback interval.

16. The method of claim 15, wherein responsive to selecting the flyback operating mode, the controlling determines a cycle time of the switching control signal according to the formula:


tcyc=K*Ipeak*tfly,

where K is a constant, tcyc is the cycle time, Ipeak is the indication of the peak current and tfly is the duration of the flyback interval.

17. The method of claim 12, further comprising receiving a dimming value from a dimming input, and wherein the controlling scales the cycle rate by the dimming value to control an output current of the power supply circuit according to the dimming value.

18. An integrated circuit for controlling a power supply circuit, the integrated circuit comprising a control circuit for controlling a cycle rate of the power supply circuit according to a selectable operating mode of the integrated circuit that is selectable between a buck operating mode and another operating mode to generate an output current of the power supply circuit, wherein in the buck operating mode the cycle rate is determined to maintain the output current at the constant value according to a first value computed by a first algorithm from a peak current through a winding of a magnetic storage element of the power supply circuit, and wherein in the another operating mode the cycle rate is determined to maintain the output current at the constant value according to a second value computed by a second algorithm differing from the first algorithm from the peak current through the winding of the magnetic storage element during the switching cycle.

19. A method of controlling a power supply circuit from an integrated circuit controller, the method comprising:
selecting an operating mode of the integrated circuit controller, wherein the operating mode is selectable between a buck operating mode and another operating mode;
controlling a cycle rate of the power supply circuit according to the selected operating mode to generate an output current of the power supply circuit, wherein in the buck operating mode the cycle rate is determined to maintain the output current at a constant value according to a first value computed by a first algorithm from a peak current through a winding of a magnetic storage element of the power supply circuit during a switching cycle of the power supply circuit, and wherein in the another operating mode the cycle rate is determined in order to maintain the output current at the constant value according to a second value computed by a second algorithm differing from the first algorithm from the peak current through the winding of the magnetic storage element during the switching cycle.