A constant current regulator includes a current sensing circuit loop
connected to a switch unit of the constant current regulator to detect a
current flowing through the switch unit and to generate a detection
current that is in proportion to the current flowing through the switch
unit. The detection current flows through a detection resistor to induce
a detection voltage. A differential amplifier bases on a set voltage and
the received detection voltage to generate an error voltage to a pulse
width modulation controller, which in turn causes a gate driver circuit
to control the switching operation of the switch unit thereby supplying a
constant current to a load connected to an output voltage of the
regulator.