Patent ID: 12215988

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

First Embodiment

Preferred embodiments of the present invention will now be described in detail with reference to the drawings. Initially, a position detection device according to a first embodiment of the invention will be outlined with reference toFIGS.1and2. As shown inFIGS.1and2, a position detection device1according to the present embodiment includes a magnetic field generator2that generates a magnetic field to be detected and a magnetic sensor3. The magnetic sensor3detects the magnetic field to be detected and generates a detection value θs corresponding to a relative position of the magnetic field generator2with respect to the magnetic sensor3. In particular, in the present embodiment, the magnetic field generator2is a magnet. The magnet will hereinafter be also denoted by the reference numeral2. A description of the magnet2applies to the magnetic field generator2as well.

As will be described in detail later, the magnetic sensor3includes at least one magnetoresistive element (hereinafter, referred to as an MR element) and a substrate that supports the at least one MR element. The substrate includes a main surface including a flat surface and at least one slope oblique to the main surface.

X, Y, and Z directions are defined here as shown inFIGS.1and2. The X, Y and Z directions are mutually orthogonal directions. In the present embodiment, the Z direction is a direction perpendicular to the main surface of the substrate in the upward direction inFIGS.1and2. The X and Y directions are both parallel to the main surface of the substrate. The opposite directions to the X, Y, and Z directions are defined as −X, −Y, and −Z directions, respectively. As used hereinafter, the term “above” refers to positions located forward of a reference position in the Z direction, and “below” refers to positions opposite from the “above” positions with respect to the reference position. The magnet2lies above the magnetic sensor3.

A relative position of the magnet2with respect to the magnetic sensor3can change so that a predetermined point in the magnet2moves within a linear range of movement RM. The relative position of the magnet2with respect to the magnetic sensor3will hereinafter be referred to simply as the position of the magnet2. The predetermined point in the magnet2will be referred to as a position reference point and denoted by the reference numeral2C. In particular, in the present embodiment, the position of the magnet2can change so that a distance between the magnetic sensor3and the magnet2changes. For example, the position reference point2C may be a point inside the magnet2like the center of gravity of the magnet2, or a point on the surface of the magnet2. In the following description, the center of gravity of the magnet2is assumed as the position reference point2C.

The range of movement RM lies in a vertical plane VP perpendicular to the main surface. The vertical plane VP is shown inFIG.1.FIG.2shows a cross section taken along the vertical plane VP. In particular, in the present embodiment, the vertical plane VP refers to a YZ plane. The range of movement RM is represented by a line segment parallel to the Y direction. The magnet2is magnetized in a direction parallel to the vertical plane VP. In particular, in the present embodiment, the magnet2is magnetized in the Y direction. InFIGS.1and2, the arrow denoted by the reference numeral2M indicates the direction of magnetization of the magnet2. InFIG.2, the dotted line represents a part of a magnetic flux corresponding to the magnetic field to be detected.

The magnetic field to be detected has a first direction at a reference position within a first plane. The magnet2and the magnetic sensor3are configured such that, as the position of the magnet2changes, the first direction changes within a predetermined variable range in the first plane. In the present embodiment, the first plane refers to a YZ plane intersecting the magnet2and the magnetic sensor3. The first plane may coincide with the vertical plane VP. In the following description, the first plane is assumed to coincide with the vertical plane VP.

Next, an example configuration of the magnetic sensor3will now be described with reference toFIGS.3and4.FIG.3is a perspective view showing the example configuration of the magnetic sensor3.FIG.4is a circuit diagram showing an example circuit configuration of the magnetic sensor3. In this example, as shown inFIG.3, the magnetic sensor3includes four MR elements R1, R2, R3and R4, and a substrate10that supports the four MR elements R1, R2, R3and R4. The substrate10includes a flat-shaped main body10M and four protrusions11,12,13, and14. The main body10M has a top surface10Ma and a bottom surface10Mb that are flat surfaces. The top surface10Ma lies at the end of the main body10M in the Z direction. The bottom surface10Mb lies at the end of the main body10M in the −Z direction. Both the top surface10Ma and the bottom surface10Mb are the XY plane, and correspond to the foregoing main surface.

The four protrusions11,12,13, and14are provided so as to protrude upward from the top surface10Ma. Each of the protrusions11,12,13, and14includes a slope11a,12a,13a, and14aoblique to the top surface10Ma that is the main surface.

Suppose here that α is an angle greater than 0° and smaller than 90°. A direction rotated from the Z direction toward the −X direction by α will be referred to as a U direction. The direction opposite to the U direction will be referred to as a −U direction. A direction rotated from the Z direction toward the X direction by α will be referred to as a V direction. The direction opposite to the V direction will be referred to as a −V direction.

Both the slopes11aand14aare planes parallel to the U direction and the Y direction, i.e., UY planes. Both the slopes12aand13a, are planes parallel to the V direction and the Y direction, VY planes.

The MR elements R1, R2, R3, and R4are located on the slopes11a,12a,13a, and14a, respectively. In describing an arbitrary one of the MR elements R1, R2, R3, and R4, the MR element will hereinafter be denoted by the symbol R. An MR element R includes a first magnetic layer having first magnetization that can change in direction within a corresponding second plane. The magnetic field to be detected received by the MR element R can be divided into an in-plane component parallel to the second plane and a perpendicular component perpendicular to the second plane. The foregoing first and second planes intersect at a dihedral angle other than 90°. In the present embodiment, the dihedral angle is represented by the foregoing α.

In the present embodiment, the second plane is also referred to as a reference plane. There is a reference plane for each of the respective MR elements R. In terms of the reference plane, the first magnetic layer of an MR element R can be said to have first magnetization that can change in direction within the reference plane corresponding to the MR element R. The foregoing vertical plane VP and the reference plane intersect at a dihedral angle of α.

The MR element R may be a spin valve MR element or an anisotropic MR element. In particular, in the present embodiment, the MR element R is a spin valve MR element. In this case, the MR element R includes a second magnetic layer and a gap layer aside from the foregoing first magnetic layer. The second magnetic layer has second magnetization in a direction parallel to the second plane corresponding to each of the MR elements R. The gap layer is located between the first and second magnetic layers. The direction of the second magnetization does not change. The spin-valve MR element may be a tunneling magnetoresistive (TMR) element or a giant magnetoresistive (GMR) element. In the TMR element, the gap layer is a tunnel barrier layer. In the GMR element, the gap layer is a nonmagnetic conductive layer. The resistance of the MR element R changes with an angle that the direction of the first magnetization of the first magnetic layer forms with respect to the direction of the second magnetization of the second magnetic layer. The resistance is minimized if the angle is 0°. The resistance is maximized if the angle is 180°. InFIGS.3and4, the thick arrow indicates the direction of the second magnetization.

In the present embodiment, the directions of the second magnetization in the MR elements R1and R4are the −U direction. The directions of the second magnetization in the MR elements R2and R3are the V direction. From the viewpoint of the manufacturing accuracy of the MR element R, the directions of the second magnetization may be slightly different from the foregoing direction.

The second plane corresponding to the MR element R1is parallel to the slope11aon which the MR element R1is located. The second plane corresponding to the MR element R2is parallel to the slope12aon which the MR element R2is located. The second plane corresponding to the MR element R3is parallel to the slope13aon which the MR element R3is located. The second plane corresponding to the MR element R4is parallel to the slope14aon which the MR element R4is located. A relationship between the second planes corresponding to the respective MR elements R1, R2, R3, and R4and the first plane will be described in more detail later.

The substrate10may include four grooves in the top surface10Ma instead of the four protrusions11,12,13, and14. The four grooves include the respective slopes11a,12a,13a, and14a.

As shown inFIG.4, the magnetic sensor3further includes a power supply node V1, a ground node G a first signal output node E1and a second signal output node E2. The MR element R1and the MR element R2are connected in series via the first signal output node E1. The UR element R1is arranged between the power supply node V1and the first signal output node E1. The MR element R2is arranged between the first signal output node E1and the ground node G. The MR element R3and the UR element R4are connected in series via the second signal output node E2. The MR element R3is arranged between the power supply node V1and the second signal output node E2. The MR element R4is arranged between the second signal output node E2and the ground node G. A predetermined magnitude of power supply voltage is applied to the power supply node V1. The ground node G is grounded.

The magnetic sensor3further includes a differential detector21and a detection value generation unit22. The differential detector21outputs a detection signal S1corresponding to a potential difference between the signal output nodes E1and E2. The detection value generation unit22generates the detection value θs on the basis of the detection signal S1. The detection value generation unit22includes an application specific integrated circuit (ASIC) or a microcomputer, for example.

An example of the configuration of the MR element R will now be described with reference toFIG.5.FIG.5is a perspective view showing a part of the MR element R. In this example, the MR element R includes a plurality of lower electrodes41, a plurality of MR films50and a plurality of upper electrodes42. The plurality of lower electrodes41are located on the slope on which the MR element R is located. Each of the lower electrodes41has a long slender shape. Every two lower electrodes41adjacent to each other in the longitudinal direction of the lower electrodes41have a gap therebetween. As shown inFIG.5, MR films50are provided on the top surfaces of the lower electrodes41, near opposite ends in the longitudinal direction. Each of the MR films50includes a first magnetic layer51, a gap layer52, a second magnetic layer53, and an antiferromagnetic layer54which are stacked in this order, the first magnetic layer51being closest to the lower electrode41. The first magnetic layer51is electrically connected to the lower electrode41. The antiferromagnetic layer54is formed of an antiferromagnetic material. The antiferromagnetic layer54is in exchange coupling with the second magnetic layer53so as to pin the magnetization direction of the second magnetic layer53. The plurality of upper electrodes42are arranged over the plurality of MR films50. Each of the upper electrodes42has a long slender shape, and establishes electrical connection between the respective antiferromagnetic layers54of two adjacent MR films50that are arranged on two lower electrodes41adjacent in the longitudinal direction of the lower electrodes41. With such a configuration, the plurality of MR films50in the MR element R shown inFIG.5are connected in series by the plurality of lower electrodes41and the plurality of upper electrodes42. It should be appreciated that the layers51to54of the MR films50may be stacked in an order reverse to that shown inFIG.5.

Next, the relationship between the position of the magnet2and the magnetic field to be detected will be described with reference toFIGS.2,6, and7. In the following description, the position of the magnet2will be represented by the position of the position reference point2C. In such a case, the range of movement RM can be said to be the range of movement of the position of the magnet2.FIG.2shows a state where the magnet2lies at the center of the range of movement RM.FIG.6shows a state where the magnet2lies at the end in the −Y direction of the range of movement RM.FIG.7shows a state where the magnet2lies at the end in the Y direction of the range of movement RM.

The reference position in the first plane will hereinafter be denoted by the symbol P0, and the magnetic field to be detected at the reference position P0will be denoted by the symbol H. As shown inFIG.2, in the present embodiment, the center point in the range of movement RM falls on a virtual line L1that passes through the reference position P0and is parallel to the Z direction.

As shown inFIGS.2,6, and7, the magnetic field to be detected H can be divided into a first component Hz in a direction parallel to the Z direction and a second component Hy in a direction parallel to the Y direction. In the state shown inFIG.2, the first component Hz is 0 and the second component Hy is equal to the magnetic field to be detected H. As the position of the magnet2changes, the direction of the magnetic field to be detected i.e., the first direction changes. The first direction will hereinafter be denoted by the symbol D1. An angle that the first direction D1forms with respect to a predetermined reference direction will be referred to as a first angle and denoted by the symbol θ1. In the present embodiment, the reference direction is the Z direction. The first angle ƒ1is expressed in positive values when seen in a direction of rotation from the Z direction to the Y direction, and expressed in negative values when seen in a direction of rotation from the Z direction to the −Y direction. As the position of the magnet2changes, the first angle θ1changes. The first angle θ1thus has a correlation with the position of the magnet2.

Next, the relationship between the second planes corresponding to the respective MR elements R1, R2, R3, and R4and the first plane will be described with reference toFIGS.8to12. The first plane will hereinafter be denoted by the symbol PL1. The second planes corresponding to the MR elements R1and R4will be both denoted by the symbol PL21. The second planes corresponding to the MR elements R2and R3will be both denoted by the symbol PL22.FIG.8shows the first plane PL1and a second plane PL21.FIG.9shows the first plane PL1and a second plane PL22. For the sake of convenience, inFIGS.8and9, the second planes PL21and PL22are shown to pass the reference position P0. However, the second planes PL21and PL22do not necessarily pass the reference position P0. InFIGS.8and9, a plane denoted by the symbol PL3represents an XY plane passing the reference position P0. This plane will hereinafter be referred to as a third plane.

The MR elements R1, R2, R3and R4are located within an area where no substantial difference occurs in the direction of the magnetic field to be detected depending on the positions where the plurality of MR elements receive the magnetic field to be detected. The directions of the magnetic field to be detected received by the MR elements R1, R2, R3and R4are thus substantially the same as the direction of the magnetic field to be detected H at the reference position P0, i.e., the first direction D1.

As the position of the magnet2changes within the range of movement RM, the first direction D1changes within a predetermined variable range in the first plane PL1. InFIGS.8and9, the arrow denoted by the symbol D1represents the first direction D1and the strength of the magnetic field to be detected H at the reference position P0. The end of the arrow denoted by the symbol D1moves along a circle denoted by the symbol C1. In the present embodiment, the variable range of the first direction D is 180° or less in size. The variable range of the first angle θ1is from −180° to 0° at maximum.

As shown inFIG.8, the second plane PL21is a plane parallel to the U direction and the Y direction, i.e., a UY plane. The second plane PL21is oblique to both the first plane PL1and the third plane PL3. The first plane PL1and the second plane PL21intersect at a dihedral angle α other than 90°. The second plane PL21is a plane obtained by rotating the XY plane about an axis in the Y direction by an angle of 90°−α.

In the present embodiment, the first plane PL1coincides with the vertical plane VP shown inFIG.1. The second plane PL21represents the reference plane corresponding to each of the MR elements R1and R4. Hereinafter, a reference plane will be denoted by the symbol RP. As shown inFIG.8, the vertical plane VP and the reference plane RP corresponding to each of the MR elements R1and R4intersect at a dihedral angle of α.

The in-plane component on the second plane PL21has a second direction D21that changes with a change in the first direction D1. InFIG.8, the arrow denoted by the symbol D21represents the second direction D21and the strength of the in-plane component on the second plane PL21. The end of the arrow denoted by the symbol D21moves along an ellipse denoted by the symbol C21. The second direction D21and the ellipse C21are orthogonal projections of the first direction D1and the circle C1upon the second plane PL21, respectively.

As shown in9, the second plane PL22is a plane parallel to the V direction and the Y direction, i.e., a VY plane. The second plane PL22is oblique to both the first plane PL1and the third plane PL3. The first plane PL1and the second plane PL22intersect at a dihedral angle α other than 90°. The second plane PL22is a plane obtained by rotating the XY plane about an axis in the Y direction by an angle of 90°−α. The second plane PL22is symmetrical with the second plane PL21about the YZ plane.

In the present embodiment, the second plane PL22represents the reference plane RP corresponding to each of the MR elements R2and R3. As shown inFIG.9, the vertical plane VP and the reference plane RP corresponding to each of the MR elements R2and R3intersect at a dihedral angle of α.

The in-plane component on the second plane PL22has a second direction D22that changes with a change in the first direction D1. InFIG.9, the arrow denoted by the symbol D22represents the second direction D22and the strength of the in-plane component on the second plane PL22. The end of the arrow denoted by the symbol D22moves along an ellipse denoted by the symbol C22. The second direction D22and the ellipse C22are orthogonal projections of the first direction D1and the circle C1upon the second plane PL22, respectively.

An angle θ21that the second direction D21forms with respect to the U direction is equal to an angle θ22that the second direction D22forms with respect to the V direction, Both the angles θ21and θ22will hereinafter be referred to as a second angle.

FIG.10shows the first direction D1, the first angle θ1, and the circle C1.FIG.11shows the second direction D21, the second angle θ21, and the ellipse C21.FIG.12shows the second direction122, the second angle θ22, and the ellipse C22.

The second angle θ21is expressed in positive values when seen in a direction of rotation from the U direction to the Y direction, and expressed in negative values when seen in a direction of rotation from the U direction to the −Y direction. The second angle θ22is expressed in positive values when seen in a direction of rotation from the V direction to the Y direction, and expressed in negative values when seen in a direction of rotation from the V direction to the −Y direction. The second angles θ21and θ22have a correlation with the first angle θ1. In the present embodiment, the variable range of the second directions D21and D22is 180° or less in size. The variable range of the second angles θ21and θ22is from −180° to 0° at maximum.

If the first angle θ1is −180°, the second angles θ21and θ22are also −180°. If the first angle θ1is −90°, the second angles θ21and θ22are also −90°. If the first angle θ1is 0°, the second angles θ21and θ22are also 0°.

Next, a relationship between the first angle θ1, the second angles θ21and θ22, and the detection signal S1will be described. The directions of the first magnetization in the first magnetic lavers of the respective MR elements R1and R4change with a change in the second direction D21, i.e., a change in the second angle θ21. The resistances of the respective MR elements R1and R4depend on the directions of the first magnetization. The resistances of the respective MR elements R1and R4therefore change with a change in the second angle θ21. The resistances of the MR elements R1and R4thus depend on the directions of the first magnetization in first magnetic layers of the respective MR elements R1and R4and the second angle θ21.

The directions of the first magnetization in the first magnetic layers of the respective MR elements R2and R3change with a change in the second direction D22, i.e., a change in the second angle θ22. The resistances of the respective MR elements R2and R3depend on the directions of the first magnetization. The resistances of the respective MR elements R2and R3therefore change with a change in the second angle θ22. The resistances of the MR elements R2and R3thus depend on the directions of the first magnetization in the first magnetic layers of the respective MR elements R2and R3and the second angle θ22.

In the magnetic sensor3shown inFIGS.3and4, the resistances of the MR elements R1and R4are minimized and the resistances of the MR elements R2and R3are maximized if the second angles θ21and θ22are −180°. The resistances of the MR elements R1and R4are maximized and the resistances of the MR elements R2and R3are minimized if the second angles θ21and θ22are 0°.

As described above, the second angles θ21and θ22have a correlation with the first angle θ1. The resistances of the MR elements R1, R2, R3, and R4therefore depend on the first angle θ1as well.

The detection signal S1corresponds to the potential difference between the signal output nodes E1and E2. The potential of the signal output node E1depends on the resistances of the MR elements R1and R2. The potential of the signal output node E2depends on the resistances of the MR elements R3and R4. The detection signal S1thus depends on the resistances of the MR elements R1, R2, R3, and R4.

Consequently, the detection signal S1depends on the directions of the first magnetization in the first magnetic layers of the respective MR elements R1, R2, R3, and R4, the first angle θ1, and the second angles θ21and θ22.

The configuration of the magnetic sensor3is not limited to that shown inFIGS.3and4. For example, the magnetic sensor3may include the MR elements R1and R2without the MR elements R3and R4. In such a case, a signal corresponding to the potential of the signal output node E1may be used as the detection signal S1. The detection signal S1here also depends on the directions of the first magnetization, the first angle θ1, and the second angles θ21and θ22.

The magnetic sensor3may include a resistor having a constant resistance instead of the MR element R1, without the MR elements R3and R4. In such a case also, a signal corresponding to the potential of the signal output node E1may be used as the detection signal S1. The detection signal S1here also depends on the directions of the first magnetization, the first angle θ1, and the second angles θ21and θ22.

Next, the detection value θs generated by the detection value generation unit22will be described. The detection value θs depends on the detection signal S1. As described above, the detection signal S1depends on the directions of the first magnetization, the first angle θ1, and the second angles θ21and θ22. The detection value θs thus depends on the directions of the first magnetization, the first angle θ1, and the second angles θ21and θ22.

In particular, in the present embodiment, the detection value θs is a value indicating the first angle θ1. As described above, the first angle θ1has a correlation with the position of the magnet2. The detection value θs thus corresponds to the position of the magnet2. The detection signal θs may be a value indicating the position of the magnet2itself, or a value indicating the second angle θ21or θ22. As described above, the second angles θ21and θ22have a correlation with the first angle θ1, and the first angle θ1has a correlation with the position of the magnet2. The second angles θ21and θ22thus have a correlation with the position of the magnet2, and the detection value θs indicating the second angle θ21or θ22also has a correlation with the position of the magnet2.

The method for generating the detection value θs will be specifically described below. Initially, the method for generating the detection value θs will be outlined. The arrow indicating the first direction D1shown inFIG.10can be said to represent a vector representing the direction and strength of the magnetic field to be detected received by the MR element R in the YZ coordinate system with the reference position P0as the origin. Such a vector will hereinafter be referred to as a first vector D1. The Y component and the Z component of the first vector D1will be denoted by Y1and Z1, respectively.

The arrow indicating the second direction D21shown inFIG.11can be said to represent a vector representing the direction and strength of the in-plane component received by each of the MR elements R1and R4in the YU coordinate system with the reference position P0as the origin. Such a vector will hereinafter be referred to as a second vector D21. The second vector D21is an orthogonal projection of the first vector D1on the second plane PL21. The Y component of the second vector D21has the same value as that of the Y component of the first vector D1i.e., Y1. The Y and U components of the second vector D21will hereinafter be denoted by Y1and U1, respectively.

The arrow indicating the second direction D22shown inFIG.12can be said to represent a vector representing the direction and strength of the in-plane component received by each of the MR elements R2and R3in the YV coordinate system with the reference position P0as the origin. Such a vector will hereinafter be referred to as a second vector D22. The second vector D22is an orthogonal projection of the first vector D1on the second plane PL22. The Y component of the second vector D22has the same value as that of the Y component of the first vector D1, i.e., Y1. The Y and U components of the second vector D22will hereinafter be denoted by Y1and V1, respectively.

Z1can be expressed by using U1and the dihedral angle α. The ratio Y1/Z1can thus be expressed by using the ratio Y1/U1and the dihedral angle α. The ratio Y1/V1is equal to the ratio Y1/U1. An equation representing a relationship between the first angle θ1and the second angle θ21can be obtained by using a relationship between the ratio Y1/Z1and the first angle θ1, a relationship between the ratio Y1/U1and the second angle θ21, and a relationship between the ratio Y1/Z1and the ratio Y1/U1.

A value θ2srepresenting the second angle θ21can be determined by using the first detection signal S1. In the present embodiment, the detection value generation unit22generates the detection value θs by determining θ2sand substituting θ2sinto the equation representing the relationship between the first angle θ1and the second angle θ21.

Next, a specific method for calculating the detection value θs will be described. The ratio Y1/Z1and the ratio Y1/Z1are represented by the following Eqs. (1) and (2), respectively:
Y1/Z1=tan θ1,  (1) and
Y1/U1=tan θ21.  (2)

Z1is represented by the following Eq. (3):
Z1=U1/cos α.  (3)

Transforming Eq. (1) and substituting Eqs. (2) and (3) into the transformed equation yields the following (4):

θ1=atan⁡(Y⁢1/Z⁢1)=atan⁡(Y⁢1/(U⁢1/cos⁢α))=atan⁡(cos⁢α·Y⁢1/U⁢1)=atan⁡(cos⁢α·tan⁢θ21).(4)
Eq. (4) represents the relationship between the first angle θ1and the second angle θ21. The symbol “atan” represents the arctangent.

In the magnetic sensor3shown inFIGS.3and4, the detection signal S1is maximized if the second angles θ21and θ22are −180°. The detection signal S1is minimized if the second angles θ21and θ22are 0°.

The detection signal S1can be normalized such that the detection signal S1has a value of 1 if the second angle θ21is −180°, a value of 0 if the second angle θ21is −90°, and a value of −1 if the second angle θ21is 0°. In such a case, the detection signal S1can be represented by the following Eq. (5):
S1=−cos θ21.  (5)

Now, first and second examples where the first angle θ1has different variable ranges will be described. In the first example, the variable range of the first angle θ1is from −180° to 0°. In the second example, the variable range is greater than −180° and smaller than 0°.

In both the first and second examples, the detection value generation unit22calculates the value θ2sby the following Eq. (6):
θ2s=acos(−S1).  (6)
In the first example, the range of the value θ2sis from −180° to 0°. In the second example, the range of the value θ2sis greater than −180° and smaller than 0°, Eq. (6) is obtained by replacing θ21in Eq. (5) with θ2sand transforming the resultant. The symbol “acos” represents the arccosine.

In the first example, the detection value generation unit22calculates the detection value θs by the following Eq. (7) excluding the exceptions to be described later:
θs=atan(cos α·tan θ2s).  (7)
The range of the detection value θs is from −180° to 0°. Eq. (7) is obtained by replacing θ1and θ21in Eq. (4) with θs and θ2srespectively and transforming the resultant.

The foregoing exceptions refer to situations where the value θ2sis −180° or 0°. If the value θ2sis −180° or 0°, θs in Eq. (7) has two solutions, −180° or 0°. The detection value generation unit22then simply uses the value θ2sitself as the detection value θs if the value θ2sis −180° or 0°. Such exception handling uses the fact that if the first angle θ1is −180°, the second angles θ21and θ22are also −180°, and if the first angle θ1is 0°, the second angles θ21and θ22are also 0°.

In the second example, there is no such exception, and the detection value generation unit22always calculates the detection value θs by Eq. (7).

The processing content of the detection value generation unit22is not limited to the foregoing example. For example, the detection value generation unit22may retain a table indicating the correspondence between the detection signal S1and the detection value θs, and generate the detection value θs from the detection signal S1by referring to the table. The correspondence between the detection signal S1and the detection value θs in the foregoing table may be theoretically determined as described above, or determined by experiment.

Next, the operation and effect of the position detection device1according to the present embodiment will be described. The magnetic sensor3of the position detection device1includes at least one MR element R. Each MR element R includes the first magnetic layer having the first magnetization that can change in direction within a predetermined plane, namely, the second plane PL21or PL22. Each MR element R is thus suitable to detect the magnetic field that changes in direction within the predetermined plane, i.e., the second plane PL21or PL22.

Meanwhile, the magnetic field to be detected generated by the magnet2has the first direction D1at the reference position P0in the first plane PL1(YZ plane). As the position of the magnet2changes, the first direction D1changes within a predetermined variable range in the first plane PL1. In other words, as the position of the magnet2changes, the first direction D1changes within a variable range including a direction outside the foregoing predetermined plane. According to the present embodiment, the detection value θs corresponding to the position of the magnet2can be generated while suppressing a drop in the detection accuracy even if the magnetic sensor3includes the MR elements R suitable to detect a magnetic field that changes in direction within a predetermined plane and the direction of the magnetic field to be detected at the reference position P0changes within a variable range including a direction outside the predetermined plane in the following manner.

In the present embodiment, each MR element R is located on the slope of the substrate10, and the second plane PL21or PL22corresponding to each MR element R is tilted to form a dihedral angle α with respect to the first plane PL1. Each MR element R can thus detect the in-plane component that is a component of the magnetic field to be detected. The second directions D21and D22that are the directions of the in-plane component change with a change in the first direction D1that is the direction of the magnetic field to be detected at the reference position P0. The first direction D1changes with a change in the position of the magnet2. Therefore, the second directions D21and D22also change with the change in the position of the magnet2.

In each MR element R, the direction of the first magnetization changes with a change in the second direction D21or D22. The detection value θs depends on the direction of the first magnetization. Consequently, the detection value θs depends on the first direction D1and the second directions D21and D22, and corresponds to the position of the magnet2.

Now, if the second plane is a plane perpendicular to the first plane PL1, the strength of the in-plane component may have a value of 0 or near 0 depending on the first direction D1. An example of the case where the second plane is perpendicular to the first plane PL1is where the second plane is a plane obtained by rotating the XY plane about an axis in the X direction by an angle greater than 0° and smaller than 90°. In this case, the strength of the in-plane component has a value of 0 if the first direction D1is perpendicular to the second plane, and has a value near 0 if the first direction D1is almost perpendicular to the second plane. If the strength of the in-plane component has a value of 0 or near 0, the detection accuracy of the magnetic sensor3drops greatly with respect to variations in the strength of the magnetic field to be detected.

In the present embodiment, each of the second planes PL21and PL22intersects with the first plane PL1at a dihedral angle α other than 90°. This prevents the strength of the in-plane component from becoming zero regardless of the first direction D1within the variable range as long as there is a magnetic field to be detected. According to the position detection device1of the present embodiment, the detection value θs corresponding to the position of the magnet2can be generated while suppressing a drop in the detection accuracy even if the magnetic sensor3includes the MR elements R suitable to detect a magnetic field that changes in direction within a predetermined plane and the direction of the magnetic field to be detected at the reference position P0changes within the variable range including the direction outside the predetermined plane.

In the present embodiment, the position of the magnet2can change to move within the linear range of movement RM. The range of movement RM lies in the vertical plane VP perpendicular to the main surface. The magnet2is magnetized in a direction parallel to the vertical plane VP. The vertical plane VP and the reference plane RP of each MR element R intersect at a dihedral angle α other than 90°. Such a configuration prevents the strength of the component of the magnetic field to be detected parallel to the reference plane RP, i.e., the in-plane component from becoming zero regardless of the first direction D1within the variable range as long as the magnetic field to be detected exists. This provides the foregoing effects.

In e present embodiment, the first plane PL1is perpendicular to the top surface10Ma and the bottom surface10Mb that are the main surfaces of the substrate10. According to the present embodiment, the positional relationship between the magnetic sensor3and the magnet2can therefore be easily defined.

A favorable range of the dihedral angle α will now be described. Assuming that the magnetic field to be detected has a strength of H1, the minimum value of the strength of the in-plane component is H1·cos α. The minimum value of the strength of the in-plane component is preferably 10% or more of H1, more preferably 30% or more. The dihedral angle α is thus preferably 84° or less, more preferably 73° or less. Too small the dihedral angle α can make it difficult to form the MR element R on the slope of the substrate10. The dihedral angle α is therefore preferably 30° or greater, more preferably 45° or greater. In summary, the dihedral angle α is preferably in the range of 30° to 84°, more preferably in the of 45° to 73°.

The direction of the first magnetization in the first magnetic layer of the MR element R preferably follows a change in the second direction D21or D22of the in-plane component with high accuracy. For that purpose, the first magnetic layer preferably has a characteristic that the first magnetization is saturated by the magnetic field to be detected if the first direction D1of the magnetic field to be detected is in at least a part of the variable range. The first magnetic layer more preferably has a characteristic that the first magnetization is saturated by the magnetic field to be detected regardless of what direction within the variable range the first direction D1is.

If the MR element R is a spin valve MR element, the first magnetic layer preferably has a small uniaxial magnetic anisotropy in order for the direction of the first magnetization of the first magnetic layer to follow a change in the second direction D21or D22with high accuracy.

The first magnetic layer of the MR element R may have a characteristic that the first, magnetization is saturated by the magnetic field to be detected regardless of what direction within the variable range the first direction D1is. In this case, the direction of the first magnetization of the first magnetic layer does not vary depending on variations in the strength of the magnetic field to be detected. This can reduce variations in the detection value θs due to variations in the strength of the magnetic field to be detected. The strength of the magnetic field to be detected can vary, for example, due to a change in the ambient temperature and variations in the positional relationship between the magnetic sensor3and the magnet2.

The position detection device1according to the present embodiment can be used as an device for detecting the position of various types of objects if the position detection device is configured such that the magnet2moves with the movement of the objects to detect the position thereof. For example, the position detection device1can be applied to a camera module including the following optical image stabilization mechanism. The camera module includes a lens, a support mechanism, and a driving unit. The optical axis direction of the lens is parallel to the Z direction in the present embodiment. The support mechanism supports the lens such that the lens can move in first and second directions perpendicular to the Z direction. The driving unit is a unit for moving the lens in the first and second directions.

In such a camera module, the position of the lens in the first direction and the position of the lens in the second direction need to be detected. The position detection device1according to the present embodiment can be used to detect the position of the lens. If the position detection device1is used to detect the position of the lens in the first direction, the position detection device1can be configured such that the magnet2moves in a direction parallel to the Y direction in the present embodiment along with the movement of the lens in the first direction. Similarly, if the position detection device1is used to detect the position of the lens in the second direction, the position detection device1can be configured such that the magnet2moves in a direction parallel to the Y direction in the present embodiment along with the movement of the lens in the second direction.

Next, a result of a simulation for demonstrating that the detection value θs corresponding to the position of the magnet2can be generated by the position detection device1will be described. In the simulation, the direction of magnetization of the magnet2is set to the Y direction. The range of movement RM is represented by a segment parallel to the Y direction. In the simulation, the position of the magnet2is expressed by a value whose absolute value is the distance between the position reference point2C and the center of the range of movement RM. The position of the magnet2is expressed in negative values if the position reference point2C is on the −Y direction side with respect to the center of the range of movement RM. The position of the magnet2is expressed in positive values if the position reference point2C is on the Y direction side with respect to the center of the range of movement RM.

In the simulation, a magnetic flux density By corresponding to the second component Hy of the magnetic field to be detected H in the direction parallel to the Y direction and a magnetic flux density Bz corresponding to the first component Hz of the magnetic field to be detected H in the direction parallel to the Z direction were determined. In the simulation, a magnetic flux density Bu corresponding to a component Hu of the in-plane component on the second plane PL21is further determined. The component Hu is a component in a direction parallel to the U direction. The magnetic flux density Bz is expressed in negative values if the direction of the first component Hz is the −Z direction, and expressed in positive values if the direction of the first component Hz is the Z direction. The magnetic flux density By is expressed in negative values if the direction of the second component Hy is the −Y direction, and expressed in positive values if the direction of the second component Hy is the Y direction. The magnetic flux density Bu is expressed in negative values if the direction of the component Hu is the −U direction, and expressed in positive values if the direction of the component Hu is the U direction.

FIG.13shows a relationship between the position of the magnet2and the magnetic flux densities By, Bz, and Bu determined by the simulation. InFIG.13, the horizontal axis indicates the position of the magnet2, and the vertical axis the magnetic flux densities By, Bz, and Bu.

In the simulation, the first angle θ1shown inFIG.10and the second angle θ21shown inFIG.11were determined by using the result shown inFIG.13.FIG.14shows a relationship between the position of the magnet2and the angles θ1and θ21determined by the simulation. InFIG.14, the horizontal axis indicates the position of the magnet2, and the vertical axis the angles θ1and θ21.

As can be seen fromFIG.14, both the first and second angles θ1and θ21have a correlation with the position of the magnet2, and the second angle θ21has a correlation with the first angle θ1. As described above, the detection value θs in the present embodiment may be a value indicating the first angle θ1or a value indicating the second angle θ21. From the result of the simulation, it can be seen that the detection value θs corresponding to the position of the magnet2can be generated according to the present embodiment.

Second Embodiment

A second embodiment of the invention will now be described.FIG.15is a perspective view of a position detection device1according to the present embodiment.FIG.16is a sectional view of the position detection device1according to the present embodiment. Differences of the position detection device1according to the present embodiment from the position detection device1according to the first embodiment will be described below. The position detection device1according to the present embodiment includes a magnetic field generator62instead of the magnetic field generator2of the first embodiment. In particular, in the present embodiment, the magnetic field generator62is a magnet. The magnet will hereinafter be also denoted by the reference numeral62. A description of the magnet62applies to the magnetic field generator62as well.

The magnet62lies above the magnetic sensor3. Like the first embodiment, the magnet62is magnetized in a direction parallel to the vertical plane VP. In particular, in the present embodiment, the magnet62is magnetized in the Z direction. InFIGS.15and16, the arrow denoted by the reference numeral62M indicates the direction of magnetization of the magnet62. InFIG.16, a plurality of dotted lines represent a part of a magnetic flux corresponding to the magnetic field to be detected.

Like the first embodiment, the relative position of the magnet62with respect to the magnetic sensor3will be referred to simply as the position of the magnet62. The relative position of the magnet62can change so that a position reference point62C in the magnet62moves within a linear range of movement RM. An example of the position reference point62C is the center of gravity of the magnet62.

The range of movement RM of the present embodiment is the same as that of the first embodiment. More specifically, the range of movement RM lies in a vertical plane VP shown inFIG.15.FIG.16shows a cross section taken along the vertical plane VP. In particular, in the present embodiment, the vertical plane VP refers to a YZ plane. The range of movement RM is represented by a line segment parallel to the Y direction.

In the present embodiment, a first plane PL1, a reference position P0, a first direction a first angle θ1, second planes PL21and PL22, second directions D21and D22, and second angles θ21and θ22are defined as in the first embodiment.FIG.16shows the first plane PL1that coincides with the vertical plane VP.

As the position of the magnet62changes within the range of movement RM, the first direction D1that is the direction of the magnetic field to be detected H at the reference position P0changes within a predetermined variable range in the first plane PL1. This can easily be seen fromFIG.16. More specifically, as the position of the magnet62changes within the range of movement RM, the direction of the magnetic flux passing through the reference position P0, i.e., the first direction D1changes.

In the present embodiment, the first angle θ1, and the second angles θ21and θ22have a correlation with the position of the magnet62as in the first embodiment.

In the present embodiment, the variable range of the first direction D1is 180° or less in size. The variable range of the first angle θ1is from −90° to 90° at maximum. The variable range of the second directions D21and D22is 180° or less in size. The variable range of the second angles θ21and θ22is from −90° to 90° at maximum.

In the present embodiment, the directions of the second magnetization in the MR elements R1and R4are the Y direction. The directions of the second magnetization in the MR elements R2and R3are the −Y direction. The detection signal S1can be normalized so that the detection signal S1has a value of −1 if the second angle θ21is −90°, a value of 0 if the second angle θ21is 0°, and a value of 1 if the second angle θ21is 90°. In this case, instead of Eq. (5) in the first embodiment, the detection signal S1can be represented by the following Eq. (8):
S1=sin θ21.  (8)

Instead of Eq. (6) in the first embodiment, the detection value generation unit22of the present embodiment calculates the value θ2sby the following Eq. (9):
θ2s=asinS1.  (9)
Here, the symbol “asin” represents the arcsine.

The configuration, operation and effects of the present embodiment are otherwise the same as those of the first embodiment.

Third Embodiment

A third embodiment of the invention will now be described.FIG.17is a perspective view of a position detection device1according to the present embodiment.FIG.18is a sectional view of the position detection device1according to the present embodiment. Differences of the position detection device1according to the present embodiment from the position detection device1according to the first embodiment will be described below.

The position detection device1according to the present embodiment differs from the position detection device1according to the first embodiment in the range of movement RM of the magnet2. The range of movement RM in the present embodiment is represented by a segment parallel to the Z direction. The range of movement RM lies in the vertical plane VP illustrated inFIG.17. The vertical plane VP is a YZ plane.FIG.18shows a cross section taken along the vertical plane VP.

As shown inFIG.18, in the present embodiment, the position reference point2C that is the center of gravity of the magnet2is located at a position off the virtual line L1in the Y direction. The virtual line L1passes through the reference position P0and is parallel to the Z direction.

Like the first embodiment, the direction of magnetization2M of the magnet2of the present embodiment is the Y direction. InFIG.18, a plurality of dotted lines represent a part of a magnetic flux corresponding to the magnetic field to be detected generated by the magnet2.

In the present embodiment, a first plane PL1, a reference position P0, a first direction D1, a first angle θ1, second planes PL21and PL22, second directions D21and D22, and second angles θ21and θ22are defined as in the first embodiment.FIG.18shows the first plane PL1that coincides with the vertical plane VP.

As the position of the magnet2changes within the range of movement RM, the first direction D1that is the direction of the magnetic field to be detected H at the reference position P0changes within a predetermined variable range in the first plane PL1. This can easily be seen fromFIG.18, More specifically, as the position of the magnet2changes within the range of movement RM, the direction of the magnetic flux passing through the reference position P0, i.e., the first direction D1changes.

In the present embodiment, the first angle θ1, and the second angles θ21and θ22have a correlation with the position of the magnet2as in the first embodiment.

In the present embodiment, the variable range of the first direction D1is 90° or less in size. The variable range of the first angle θ1is from −90° to 0° at maximum. The variable range of the second directions D21and D22is 90° or less in size. The variable range of the second angles θ21and θ22is from −90° to 0° at maximum.

The position detection device1according to the present embodiment can be applied to a camera module including the following autofocus mechanism. The camera module includes a lens, a support mechanism, and a driving unit. The optical axis direction of the lens is parallel to the Z direction in the present embodiment. The support mechanism supports the lens such that the lens can move in a direction parallel to the Z direction. The driving unit is a unit for moving the lens in the direction parallel to the Z direction.

In such a camera module, the position of the lens in the direction parallel to the Z direction need to be detected. The position detection device1according to the present embodiment can be used to detect the position of the lens. In this case, the position detection device1can be configured such that the magnet2moves in a direction parallel to the Z direction along with the movement of the lens.

The configuration, operation and effects of the present embodiment are otherwise the same as those of the first embodiment.

Fourth Embodiment

A fourth embodiment of the invention will now be described.FIG.19is a perspective view of a position detection device1according to the present embodiment.FIG.20is a sectional view of the position detection device1according to the present embodiment. Differences of the position detection device1according to the present embodiment from the position detection device1according to the second embodiment will be described below.

The range of movement RM of the magnet62in the present embodiment differs from that in the second embodiment. The range of movement RM in the present embodiment is represented by a segment parallel to the Z direction. The range of movement RM lies in the vertical plane VP illustrated inFIG.19. The vertical plane VP is a YZ plane.FIG.20shows a cross section taken along the vertical plane VP.

As shown inFIG.20, in the present embodiment, the position reference point62C that is the center of gravity of the magnet62is located at a position off the virtual line L1in the Y direction. The virtual line L1passes through the reference position P0and is parallel to the Z direction.

Like the second embodiment, the direction of magnetization62M of the magnet62of the present embodiment is the Z direction. InFIG.20, a plurality of dotted lines represent a part of a magnetic flux corresponding to the magnetic field to be detected generated by the magnet62.

In the present embodiment, a first plane PL1, a reference position P0, a first direction D1, a first angle θ1, second planes PL21and PL22, second directions D21and D22, and second angles θ21and θ22are defined as in the second embodiment.FIG.20shows the first plane PL1that coincides with the vertical plane VP.

As the position of the magnet62changes within the range of movement RM, the first direction D1that is the direction of the magnetic field to be detected H at the reference position P0changes within a predetermined variable range in the first plane PL1. This can easily be seen fromFIG.20. More specifically, as the position of the magnet62changes within the range of movement RM, the direction of the magnetic flux passing through the reference position P0, i.e., the first direction D1changes.

In the present embodiment, the first angle θ1, and the second angles θ21and θ22have a correlation with the position of the magnet62as in the second embodiment.

In the present embodiment, the variable range of the first direction D1is 90° or less in size. The variable range of the first angle θ1is from 0° to 90° at maximum. The variable range of the second directions D21and D22is 90° or less in size. The variable range of the second angles θ21and θ22is from 0° to 90° at maximum.

The configuration, operation and effects of the present embodiment are otherwise the same as those of the second embodiment.

Fifth Embodiment

A fifth embodiment of the invention will now be described. A position detection device according to the present embodiment is included in a haptic device100shown inFIGS.21and22. The haptic device100is a device that can cause mechanical changes, such as vibrations, and give the user virtual force sensation.FIG.21is a perspective view showing a schematic configuration of the haptic device100including the position detection device according to the present embodiment.FIG.22is a sectional view showing the schematic configuration of the haptic device100shown inFIG.21.

As shown inFIGS.21and22, the haptic device100includes a housing101, a moving unit102, a support unit103, a first coil111, a second coil112, and a magnetic sensor3. The moving unit102, the support unit103, the first coil111, the second coil112, and the magnetic sensor3are located in the housing101.

In the present embodiment, mutually orthogonal X, Y, and Z directions are defined as shown inFIGS.21and22.

The housing101has a top surface at the end in the Z direction, a bottom surface at the end in the −Z direction, and a connection surface connecting the top and bottom surfaces. Of the dimensions of the housing101in the X, Y, and Z directions, the dimension in the Y direction is the largest and the dimension in the Z direction is the smallest.

The moving unit102includes a case120, and a first magnet121and a second magnet122accommodated in the case120. The first magnet121is arranged on a tip side in the −Y direction with respect to a center position of the case120in the Y direction. The second magnet122is arranged on a tip side in the Y direction with respect to the center position of the case120in the Y direction.

The first magnet121is magnetized in the Z direction. InFIG.22, the arrow denoted by the reference numeral121M indicates the direction of magnetization of the first magnet121. The second magnet122is magnetized in the −Z direction. InFIG.22, the arrow denoted by the reference numeral122M indicates the direction of magnetization of the second magnet122.

The support unit103includes two springs103A and103B. The spring103A connects a part of the inner surface of the housing101at the end in the −Y direction and a part of the outer surface of the case120at the end in the −Y direction. The spring103B connects a part of the inner surface of the housing101at the end in the Y direction and a part of the outer surface of the case120at the end in the Y direction. The support unit103supports the moving unit102such that the moving unit102can move in a direction parallel to the Y direction.

The first coil111is bonded to a part of the inner surface of the housing101at the end in the Z direction. The second coil112is bonded to a part of the inner surface of the housing101at the end in the −Z direction. Both the first and second coils111and112are wound about a virtual center line extending in the Z direction. The first and second coils111and112each form a space inside.

The magnetic sensor3is located in the space inside the first coil111. The magnetic sensor3of the present embodiment has the same configuration as that of the magnetic sensor3of the first embodiment.

The first and second magnets121and122and the magnetic sensor3constitute the position detection device according to the present embodiment. The first and second magnets121and122constitute the magnetic field generator of the present embodiment.

Next, an operation of the haptic device100will be described. The first and second coils111and112are supplied with alternating currents from a not-shown control unit. The direction of the current flowing through the first coil111and that of the current flowing through the second coil112at the same time are the same. The first and second coils111and112supplied with the alternating currents generate a magnetic field. By the action of the magnetic field generated by the first and second coils111and112and a magnetic field generated by the first and second magnets121and122, the moving unit102including the first and second magnets121and122makes mechanical changes in a direction parallel to the Y direction. The mechanical changes of the moving unit102give the user virtual force sensation. The mechanical changes of the moving unit102include vibrations of the moving unit102.

The position detection device according to the present embodiment generates a detection value corresponding to each of the relative positions of the first and second magnets121and122with respect to the magnetic sensor3. The relative position of the first and second magnets121and122with respect to the magnetic sensor3corresponds to the relative position of the moving unit102with respect to the magnetic sensor3. From the detection value, for example, the relative position of the moving unit102with respect to the magnetic sensor3and the magnitude of the amplitude of vibrations of the moving unit102can thus be found out. The detection value is used, for example, for the control unit to control the operation of the moving unit102.

The magnetic field to be detected in the present embodiment refers to the magnetic field generated by the first and second magnets121and122. The magnetic field to be detected is applied to the magnetic sensor3. The magnetic sensor3also undergoes the magnetic field generated by the first and second coils111and112in addition to the magnetic field to be detected. However, the strength of the magnetic field generated by the first and second coils111and112is sufficiently lower than that of the magnetic field generated by the first and second magnets121and122. The magnetic field generated by the first and second coils111and112therefore does not have much effect on the detection value of the magnetic sensor3, and the magnetic sensor3substantially detects the magnetic field to be detected.

A relative position of the magnet121with respect to the magnetic sensor3can change so that a distance between the magnetic sensor3and the magnet121changes. A relative position of the magnet122with respect to the magnetic sensor3can change so that a distance between the magnetic sensor3and the magnet122changes.

The relative positions of the first and second magnets121and122with respect to the magnetic sensor3will hereinafter be referred to simply as the positions of the magnets121and122. The predetermined point in each of the magnets121and122will be referred to as a position reference point and each of the positions of the magnets121and122is represented by the position of the position reference point. The position reference point may be the center of gravity of the magnet121or the center of gravity of the magnet122.

The positions of the magnets121and122can change so that the position reference point moves within a linear range of movement. The range of movement is represented by a line segment parallel to the Y direction.

In the present embodiment, a vertical plane VP, a first plane PL1, a reference position P0, a first direction D1, a first angle θ1, second planes PL21and PL22, second directions D21and D22, and second angles θ21and θ22are defined as in the first embodiment.FIG.22shows the vertical plane VP and the first plane PL1. The vertical plane VP and the first plane PL1are YZ planes.

The directions of magnetization121M and122M of the magnets121and122are parallel to the vertical plane VP. The range of movement lies in the vertical plane VP.

As the positions of the magnets121and122change within the range of movement, the first direction D1that is the direction of the magnetic field to be detected H at the reference position P0changes within a predetermined variable range in the first plane PL1.FIG.22shows a state where the magnets121and122lie at the center of the range of movement. In such a state, the first direction D1is the Y direction. If the magnets121and122move in the −Y direction from the state shown inFIG.22, the first direction D1rotates from the Y direction toward the −Z direction. If the magnets121and122move in the Y direction from the state shown inFIG.22, the first direction D1rotates from the Y direction toward the Z direction.

In the present embodiment, the first angle θ1, and the second angles θ21and θ22have a correlation with the positions of the magnets121and122as in the first embodiment.

In the present embodiment, the variable range of the first direction D1is 180° or less in size. The variable range of the first angle θ1is from 0° to 180° at maximum. The variable range of the second directions D21and D22is 180° or less in size. The variable range of the second angles θ21and θ22is from 0° to 180° at maximum.

A specific method for calculating the detection value θs in the present embodiment is the same as that of the first embodiment. The angles θ1, θ21, and θ22of −180° in the first embodiment are equivalent to the angles θ1, θ21, and θ22of 180° according to the present embodiment.

The configuration, operation and effects of the position detection device according to the present embodiment are otherwise the same as those of the first embodiment.

The present invention is not limited to the foregoing embodiments, and various modifications may be made thereto. For example, in the present invention, the relative position of the magnetic field generator with respect to the magnetic sensor may change while the distance between the magnetic sensor and the magnetic field generator remains constant.

Obviously, many modifications and variations of the present invention are possible in the light of the above teachings. Thus, it is to be understood that, within the scope of the appended claims and equivalents thereof, the invention may be practiced in other embodiments than the foregoing most preferable embodiments.