Patent ID: 7868613

Claim:
A magnetic sensor comprising first and second magneto-resistive elements each having a stacked structure, wherein the stacked structure includes a pinned layer having a magnetization direction pinned in a certain direction, a non-magnetic intermediate layer, and a free layer changing its magnetization direction depending on an external magnetic field and generating an anisotropic magnetic field in a direction different from the magnetization direction of the pinned layer, the pinned layer, the intermediate layer and the free layer in the first magneto-resistive element and the pinned layer, the intermediate layer and the free layer in the second magneto-resistive element come coincident with each other, respectively, when performing a rotational operation around a central axis of rotation parallel to stacked surfaces of the stacked structure or performing both of the rotational operation and a parallel shift operation, and a direction of the anisotropic magnetic field of the free layer in the first magneto-resistive element and a direction of the anisotropic magnetic field of the free layer in the second magneto-resistive element come coincident with each other when performing the rotational operation or both of the rotational operation and the parallel shift operation, the magnetic sensor further comprising: a refresh magnetic field applying means for applying a refresh magnetic field having at least a magnitude of a magnetization saturation magnetic field of the free layer, to each of the first and the second magneto-resistive elements, along the central axis of rotation, and configured to apply the refresh magnetic field to each magneto-resistive element as needed, the refresh magnetic field applying means being switchable between an application state and a non-application state, wherein the rotational operation is a rotation of one magneto-resistive element substantially equal to 180° around the central axis of rotation, and before performing the rotational operation or both of the rotational operation and the parallel shift operation, a planar surface of the first magneto-resistive element does not overlap a planar surface of the second magneto-resistive element in a direction normal to the planar surface of the first magneto-resistive element.