Patent ID: 8013596

Claim:
A position detector, comprising: a magnetic field generating member comprising an N-pole portion magnetized to be north pole; an S-pole portion magnetized to be south pole located side by side with the N-pole portion in a movable direction; and a non-magnetized portion which is not magnetized and which is located between the N-pole portion and the S-pole portion, and attached to a movable member movable in the movable direction; a magnetic field detector having two magnetic field detecting elements juxtaposed in the movable direction for detecting a change of magnetic field caused by movement of the magnetic field generating member; and an operation device which carries out an operation of: (A−B)/(A+B)+2 if A>0; (A−B)/(A+B)−2 if B<0; and (B+A)/(B−A) if A≦0 and B≧0, wherein A represents a smaller detection signal and B represents a larger detection signal in a linear range, out of detection signals by the two magnetic field detecting elements.