A grounding detector includes a coupling capacitor connected at one end to
an output terminal of a power supply and at another end to a measuring
point, a voltage detector to detect a voltage amplitude generated at the
measuring point, a pulse generator to generate a pulse signal at a
prescribed frequency, to apply the pulse signal to the measuring point,
and to generate a modified pulse signal having a modified frequency when
the detected voltage amplitude is outside of a prescribed voltage range,
the modified frequency being set below the prescribed frequency that
existed when the voltage amplitude detected by the voltage detector is
within the prescribed voltage range, and a grounding occurrence detection
unit that detects the occurrence of grounding of the circuit based on the
voltage amplitude detected at the measuring point during the application
of the pulse signal to the measuring point.