A power adapter, comprising: a first rectifier, configured to rectify an input alternating current and output a first voltage with a first ripple waveform; a switch unit, configured to modulate the first voltage according to a control signal and output a modulated first voltage; a transformer, having a primary winding and a secondary winding, and configured to output a second voltage with a second ripple waveform according to the modulated first voltage; a second rectifier, coupled to the secondary winding, and configured to rectify the second voltage to output a third voltage with a third ripple waveform, wherein the third voltage is configured to be introduced into a terminal to charge a battery in the terminal when the power adapter is coupled to the terminal; a sampling unit, arranged at a primary side of the transformer, configured to sample voltage and/or current at the primary winding; a control unit, arranged at a secondary side of the transformer, coupled to the sampling unit and the switch unit respectively, and configured to output the control signal to the switch unit, wherein the control unit is further configured to change an output of the second rectifier by adjusting a duty ratio of the control signal according to the current sampling value and/or the voltage sampling value such that the third voltage meets a charging requirement of the battery of the terminal when the power adapter is coupled to the terminal, and the control unit is further configured to adjust a frequency of the control signal according to the voltage sampling value and/or the current sampling value; and a first isolation, arranged between the control unit and the sampling unit, and configured to prevent high voltages from affecting the control unit at the secondary side of the transformer receiving signals sent by the sampling unit at the primary side of the transformer. a first rectifier, configured to rectify an input alternating current and output a first voltage with a first ripple waveform; a switch unit, configured to modulate the first voltage according to a control signal and output a modulated first voltage; a transformer, having a primary winding and a secondary winding, and configured to output a second voltage with a second ripple waveform according to the modulated first voltage; a second rectifier, coupled to the secondary winding, and configured to rectify the second voltage to output a third voltage with a third ripple waveform, wherein the third voltage is configured to be introduced into a terminal to charge a battery in the terminal when the power adapter is coupled to the terminal; a sampling unit, arranged at a primary side of the transformer, configured to sample voltage and/or current at the primary winding; a control unit, arranged at a secondary side of the transformer, coupled to the sampling unit and the switch unit respectively, and configured to output the control signal to the switch unit, wherein the control unit is further configured to change an output of the second rectifier by adjusting a duty ratio of the control signal according to the current sampling value and/or the voltage sampling value such that the third voltage meets a charging requirement of the battery of the terminal when the power adapter is coupled to the terminal, and the control unit is further configured to adjust a frequency of the control signal according to the voltage sampling value and/or the current sampling value; and a first isolation, arranged between the control unit and the sampling unit, and configured to prevent high voltages from affecting the control unit at the secondary side of the transformer receiving signals sent by the sampling unit at the primary side of the transformer.