A method of recycling energy for a flyback circuit, the flyback circuit has a primary winding of a transformer, the method comprising:
- coupling an energy recycle branch in parallel with the primary winding, wherein the energy recycle branch comprises an auxiliary switch and a clamp capacitor coupled in series;
- controlling the auxiliary switch via a first pin of a control circuit implemented as an integrated circuit;
- setting a maximum ON-time threshold of the auxiliary switch by connecting a resistor external to a second pin of the integrated circuit;
- sensing a branch current flowing through the branch via a third pin of the integrated circuit;
- turning ON the auxiliary switch in response to detecting the branch current increasing to a first value;
- starting timing after the auxiliary switch is turned ON;
- and
- generating a maximum ON-time control signal when a timing period reaches the maximum ON-time threshold;
- wherein the auxiliary switch is turned OFF in response to detecting the branch current decreasing to a second value, wherein the first value is less than the second value;
- wherein the integrated circuit further comprising:
- a first comparison circuit coupled to the third pin, wherein the first comparison circuit compares a voltage on the third pin with a first voltage threshold and generates a first comparison signal;
- a second comparison circuit coupled to the third pin, wherein the second comparison circuit compares the voltage on the third pin with a second voltage threshold and generates a second comparison signal;
- a maximum ON-time control circuit coupled to the first pin and the second pin, wherein the maximum ON-time control circuit generates the maximum ON-time control signal when the timing period after the auxiliary switch is turned ON reaches the maximum ON-time threshold;
- and
- a logic circuit coupled to the first comparison circuit, the second comparison circuit and the maximum ON-time control circuit, wherein the logic circuit turns ON the auxiliary switch based on the first comparison signal, and turns OFF the auxiliary switch based on the second comparison signal or the maximum ON-time control signal;
- and
- wherein the maximum ON-time control circuit comprising:
- a first current source having a first terminal that is coupled to a supply voltage and a second terminal that is coupled to the second pin, wherein the first current source provides a first current at the second terminal, the resistor is arranged outside of the integrated circuit and is coupled between a fourth pin and the second pin;
- a second current source having a first terminal coupled to the supply voltage and a second terminal, wherein the second current source provides a second current at the second terminal, and the second current is proportional to the first current;
- a first capacitor having a first terminal and a second terminal, wherein the first terminal is coupled to the second terminal of the second current source, the second terminal is coupled to the fourth pin;
- a first transistor having a first terminal, a second terminal and a control terminal, wherein the first terminal is coupled to the first terminal of the first capacitor, the second terminal is coupled to the fourth pin, and the control terminal is coupled to the first pin through a one-shot circuit;
- and
- a third comparison circuit having a first input terminal, a second input terminal and an output terminal, wherein the first input terminal is coupled to the second pin, the second input terminal is coupled to the first terminal of the first capacitor, and the third comparison circuit generates the maximum ON-time control signal at the output terminal.