An apparatus for detecting the displacement of a
magnet is to be provided. The errors on the detected value due to the variation of temperature or that with time are hardly caused in the apparatus. The apparatus can detect the displacement in
high resolution and precision. The apparatus is simple in its structure, and it can be expected that the apparatus can be manufactured in low cost. The apparatus is not limited in its application by the range of the displacement of the
magnet. Further, a method for detecting the displacement of a
magnet will be provided. An apparatus for detecting the displacement of a magnet M, the apparatus being characterized in that it further comprises a plurality of hall devices H0-H7 disposed in a predetermined spacing DP along a displacing path of the magnet in parallel thereto, wherein each of said hall devices includes a magnetically sensitive surface HS through which a
magnetic flux from said magnet M permeate to generate an output the polarity and the
voltage of which are depend on the direction and the density of the
magnetic flux, and said magnetically sensitive surface HS of each hall device is disposed in a predetermined distance from the displacing path of the magnet M in parallel with the direction defined by the
magnetic poles, and wherein two adjacent hall devices inverted in the polarity of their output voltages are detected to determine the general position of the magnet, and the precise position of the magnet between these two hall devices is determined on the basis of the output voltages.