The invention discloses a primary power supply scrambler of which the circuit structure comprises a power supply module A, a power supply module B, a power supply module C, a diode D1, a diode D2, a diode D3, an MOS tube Q1, an MOS tube Q2, an MOS tube Q3, a singlechip control module, a driving module, a potentiometer, an LCD liquid crystal display module and a keyboard. In the primary power supply scrambler, the diodes and electronic switches are respectively connected in series on the output of the power supply modules (A / B / C) to provide power output for an electronic system, the voltage of A / B / C as well as the on / off time of K1 / K2 / K3 are respectively set, so that a voltage jump of which the duration can be set is obtained at the common output end of the two electronic switches, thereby simulating the functions of overvoltage surging, undervoltage surging and micro power-down. The technology has the advantages of skillful consideration, simple circuit and reliable control. At present, the technology is used to produce multiple surge voltage generators meeting the requirements of aerospace military standard and can simulate the functions of overvoltage surging, undervoltage surging, micro power-down and the like.