Patent ID: 8780590

Claim:
A current controller comprising: an oscillator that generates an oscillator signal having a frequency that is related to a frequency signal; a peak-current reference generator that generates a feedback signal indicating a target voltage, the target voltage being a target of a peak of a primary sensing voltage, wherein the primary sensing voltage is generated by a primary current from a primary winding of a transformer; wherein the primary current is switched at the frequency of the oscillator signal; a target comparator that compares the primary sensing voltage to the target voltage and causes the primary current to switch off when the primary sensing voltage reaches the target voltage; an output current estimator that generates an estimate signal, the estimate signal being an estimate of an average secondary current from a secondary winding of the transformer; a knee-point sampler that samples an auxiliary voltage generated by an auxiliary current from a third winding of the transformer to generate a knee-point voltage when the auxiliary current stops flowing, the knee-point sampler also generating a discharge time signal, the discharge time signal being active when the auxiliary current is flowing and being inactive when the auxiliary current is not flowing; a Constant-Current (CC) error amp that compares the estimate signal from the output current estimator to a CC reference to generate a CC control signal; and a CC controller, activated by the CC control signal, for adjusting the target voltage generated by the peak-current reference generator during the Pulse-Width-Modulation (PWM) mode, and for adjusting the frequency of the oscillator during the Pulse-Frequency-Modulation (PFM) mode; wherein the output current estimator generates the estimate signal as a function of the discharge time signal, the frequency signal, and the primary sensing voltage, whereby the average secondary current is estimated from the discharge time signal, the frequency signal, and the primary sensing voltage.