The invention discloses a constant-current and constant-
voltage fly-back converter based on primary side feedback. The constant-current and constant-
voltage fly-back converter comprises a rectifying bridge, an
inverted U-shaped filter, a
transformer, an auxiliary power supply circuit, a constant-current and constant-
voltage controller and a switch tube, wherein the
transformer consists of a primary winding, a secondary winding and an auxiliary winding; the constant-current and constant-
voltage controller comprises a constant-voltage module, a frequency generator, a constant-current module, a joint gate, an RS trigger and a driving module; the output end of the constant-voltage module and the first and second output ends of the constant-current module are connected with three input ends of the joint gate; the input end of the constant-current module is connected with the emitting
electrode of the switch tube, and is used for sampling a current
signal of the primary winding; the output end of the joint gate is connected with the R end of the RS trigger, and is used for transmitting a switch-off
signal generated by the joint gate to the R end of the RS trigger; the switch-on
signal of the frequency generator is output to the S end of the RS trigger; the RS trigger is used for receiving the switch-on signal and the switch-off signal to generate a modulating signal; and the Q end of the RS trigger is connected with the input end of the driving module.