Patent ID: 8102172

Claim:
A position detector comprising: a fixed part; a movable part configured to face the fixed part and to move within a plane; a magnet provided on one of the fixed part and the movable part; and a detector provided on the other of the fixed part and the movable part and configured to detect a magnetic field generated from the magnet, wherein the magnet has a top surface facing the detector, and the top surface and a back surface of the magnet are magnetized to magnetic poles different from each other, the detector includes a first X-direction detecting element and a second X-direction detecting element each configured to detect the direction and intensity of the magnetic field parallel to an X axis, and a first Y-direction detecting element and a second Y-direction detecting element each configured to detect the direction and intensity of the magnetic field parallel to a Y axis, the X axis and the Y axis being orthogonal to each other within the plane on which the movable part moves, each of the first X-direction detecting element, the second X-direction detecting element, the first Y-direction detecting element, and the second Y-direction detecting element is a magnetoresistive element whose electrical resistance changes on the basis of the relationship between the direction of the magnetization of a pinned magnetic layer and the direction of the magnetization of a free magnetic layer, in the first X-direction detecting element and the second X-direction detecting element, bias magnetic fields provided to the free magnetic layers act in opposite directions parallel to the Y axis, and in the first Y-direction detecting element and the second Y-direction detecting element, bias magnetic fields provided to the free magnetic layers act in opposite directions parallel to the X axis, a movement position of the movable part in a direction parallel to the X axis can be determined from an output obtained from a change in the resistance of the first X-direction detecting element and an output obtained from a change in the resistance of the second X-direction detecting element, and a movement position of the movable part in a direction parallel to the Y axis can be determined from an output obtained from a change in the resistance of the first Y-direction detecting element and an output obtained from a change in the resistance of the second Y-direction detecting element.