Patent ID: 8901835

Claim:
A light emitting diode (LED) controller, suitable for controlling a string of LEDs, wherein the LEDs are divided into LED groups electrically connected in series between a power source and a ground, the LED controller comprising: path switches, each for coupling a corresponding LED group to the ground; a management center for controlling the path switches, wherein when turning off an upstream path switch, the management center controls a downstream path switch for a downstream LED group to make the driving current passing the upstream LED group substantially approach a target value; a constant-power sense pin; a line waveform sensor coupled to the power source through the constant-power sense pin, for detecting a sense current flowing into the constant-power sense pin so as to sense the waveform of an input voltage of the power source and determine the target value according to waveform of the input voltage of the power source; and a reference voltage source for providing a reference voltage; wherein the LED controller is coupled to the power source through a sense resistor, the sense current flows though the sense resistor, and the line waveform sensor is configured to decrease the target value when the input voltage is greater than the reference voltage.