Patent ID: 8761631

Claim:
A power supply comprising: a first capacitor provided between lines to which an AC voltage is input from an AC power supply; a zero-cross detection resistor for discharging an electric charge of the first capacitor and for detecting zero crossing of the AC voltage input from the AC power supply; a zero-cross detection unit configured to detect the timing of the zero crossing of the AC voltage input from the AC power supply based on a detection signal from the zero-cross detection resistor; a second capacitor provided between a line to which a voltage obtained by full-wave rectifying the AC voltage that is input from the AC power supply is output, and a frame ground of an image forming apparatus; a discharge resistor having a resistance value smaller than the zero-cross detection resistor and configured to discharge an electric charge of the second capacitor; and a first switch configured to switch between a first state where a current to the discharge resistor is cut off and a second state where a current flows through the discharge resistor.