Patent ID: 8274281

Claim:
A magnetic sensor circuit for detecting a magnetic field, comprising: a Hall element including a first pair of electrodes arranged in a diagonal line and a second pair of electrodes arranged in a diagonal line different from the diagonal line of the first pair of electrodes, for generating Hall voltages corresponding to magnetic fluxes passing through the Hall element; a first switch circuit connected with the first pair of electrodes and the second pair of electrodes of the Hall element, for selectively switching between and outputting a first Hall voltage output from the first pair of electrodes and a second Hall voltage output from the second pair of electrodes; an amplifier having inputs connected with outputs of the first switch circuit, for amplifying and outputting the first Hall voltage and the second Hall voltage; a second switch circuit having inputs connected with outputs of the amplifier, the second switch circuit including a first storage circuit for storing the amplified first Hall voltage, a second storage circuit for storing the amplified second Hall voltage, a first switch for controlling an output of the first storage circuit, and a second switch for controlling an output of the second storage circuit, for outputting a detection voltage determined by averaging the amplified first Hall voltage and the amplified second Hall voltage when the switch for controlling the output of the first storage circuit and the switch for controlling the output of the second storage circuit are closed; a threshold voltage source for generating a threshold voltage; a comparator having a non-inverting input connected with an output of the second switch circuit and an inverting input connected to an output of the threshold voltage source, for comparing the detection voltage with the threshold voltage; and a reference voltage source connected through a third switch circuit to the non-inverting input of the comparator which is connected with the output of the second switch circuit, for charging, to a reference voltage comprising one half of a supply voltage, an input capacitor in the non-inverting input while the switch for controlling the output of the second switch circuit is open.