Magnetic sensor system and lens position detection device

By using multiple magnetoresistive effect elements and bias magnetic fields in the magnetic sensor system, combined with magnetic field amplifiers and soft magnetic layers, the problems of detection signal saturation and accuracy degradation of the magnetic sensor system under reduced intervals and physical impacts are solved, achieving stability. and high-precision magnetic field detection.

CN114063172BActive Publication Date: 2024-09-27TDK CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110891138.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-08-04
Filing Date
2021-08-04
Publication Date
2024-09-27
Estimated Expiration
2041-08-04

AI Technical Summary

Technical Problem

In the existing magnetic sensor system, when the distance between the magnetic field generator and the magnetic sensor is reduced, the detection signal is easily saturated, resulting in poor detection accuracy, and the distance is deviated due to physical impact, resulting in detection signal distortion and reduced accuracy.

Method used

Using multiple magnetoresistance effect elements, by applying a bias magnetic field on the free layer, the resistance value changes according to the intensity of the magnetic field component, and through the magnetic field amplifier and soft magnetic layer, the magnetic detection sensitivity is improved, the error component is reduced, and the detection signal is ensured to be in the appropriate state. within the range.

Benefits of technology

It effectively suppresses changes in the detection signal caused by the deviation of the distance between the magnetic sensor and the magnetic field generator, keeps the detection signal within an appropriate range, improves detection accuracy and stability, and reduces high-order harmonic distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114063172B_ABST
    Figure CN114063172B_ABST
Patent Text Reader

Abstract

The magnetic sensor system of the present invention comprises: a magnetic field generator and a magnetic sensor. The magnetic sensor comprises a plurality of MR elements. Each of the plurality of MR elements is configured such that a bias magnetic field in a second direction orthogonal to a first direction is applied to a free layer, and a resistance value changes according to the strength of a magnetic field component. The maximum strength of each magnetic field component applied to the plurality of MR elements is at least 1.2 times the strength of the bias magnetic field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a magnetic sensor system and a lens position detection device using the magnetic sensor system. Background Art

[0002] As a magnetic sensor system using a magnetic sensor, there is known a magnetic sensor system that is configured in a manner that changes the relative position of a magnetic field generator such as a magnetic ruler relative to the magnetic sensor within a specified range. If the relative position of the magnetic field generator relative to the magnetic sensor changes, the intensity of the component in one direction of the target magnetic field generated by the magnetic field generator and applied to the magnetic sensor will change. The magnetic sensor, for example, detects the intensity of the component in one direction of the target magnetic field, thereby generating two detection signals corresponding to the intensity of the component in one direction and having different phases. Based on the two detection signals, the magnetic sensor system generates a detection value that corresponds to the relative position of the magnetic field generator and the magnetic sensor.

[0003] The magnetic sensor system includes a detection value generation circuit that generates a detection value. Generally speaking, the main part of the detection value generation circuit is composed of a digital signal processor (DSP), an application-specific integrated circuit (ASIC) or a microcomputer. The detection value generation circuit generates a detection value based on the detection signal of the magnetic sensor converted into a digital signal by an analog-to-digital converter (hereinafter also referred to as an A / D converter).

[0004] The magnetic sensor system can be used, for example, in a position detection device for detecting the position of a movable object whose position changes in a predetermined direction. Hereinafter, the position detection device using the magnetic sensor system is referred to as a magnetic position detection device. In the magnetic position detection device, the relative position of the magnetic field generator with respect to the magnetic sensor changes in accordance with the position change of the movable object. The predetermined direction is a linear direction or a rotational direction.

[0005] Magnetic position detection devices are described in, for example, Japanese Patent Application Publication No. 6-207834, Chinese Patent Application Publication No. 105277108A, and Chinese Patent Application Publication No. 104913792A. In the position detection devices described in the above-mentioned publications, magnetoresistive effect elements (hereinafter also referred to as MR elements) are used as magnetic detection elements. The MR elements are arranged at a predetermined interval relative to a magnetic recording medium or a magnetic scale.

[0006] However, in magnetic sensor systems and magnetic position detection devices, it is known that the waveform of the detection signal of the magnetic sensor is distorted due to high-order harmonics. If the output waveform of the detection signal of the magnetic sensor is distorted, the relative position of the magnetic field generator with respect to the magnetic sensor cannot be accurately detected. In contrast, in the position detection device described in Japanese Patent Application Publication No. 6-207834, a bias magnet for applying a bias magnetic field is provided relative to the MR element, thereby removing the distortion component caused by the high-order harmonics of the detection signal.

[0007] In addition, in the position detection device described in the specification of Chinese Patent Application Publication No. 104913792A, multiple MR elements (TMR elements) are arranged along the long side direction of the magnetic scale at a pitch P based on the wavelength λ or 1 / 2 of λ of the recording signal of the magnetic scale, thereby eliminating odd-order harmonic distortion of the detection signal.

[0008] International Publication No. 2008 / 072610A1 describes a magnetic encoder having a magnetic sensor and a rod-shaped magnet. In this magnetic encoder, a soft magnetic layer is provided near the MR element to amplify the external magnetic field applied to the MR element, thereby improving the magnetic detection sensitivity of the MR element.

[0009] As in the position detection devices described in Japanese Patent Application Publication No. 6-207834, Chinese Patent Application Publication No. 105277108A, Chinese Patent Application Publication No. 104913792A, and the magnetic encoder described in International Publication No. 2008 / 072610A1, in a magnetic sensor system in which a magnetic sensor is arranged at a predetermined interval relative to a magnetic field generator, the interval between the magnetic sensor and the magnetic field generator may deviate due to the setting accuracy of the magnetic sensor. If the interval deviates, the size of the detection signal of the magnetic sensor input to the detection value generating circuit will deviate. Therefore, the detection signal must be calibrated for each batch or each product, which is time-consuming and labor-intensive.

[0010] In addition, as the distance between the magnetic sensor and the magnetic field generator decreases, the intensity of the target magnetic field applied to the magnetic sensor increases. As a result, the maximum value of the detection signal of the magnetic sensor input to the detection value generation circuit increases. As a result, the size of the detection signal sometimes exceeds the input range of the A / D converter, and the detection signal input to the detection value generation circuit is saturated. If the detection signal is saturated, problems such as poor detection accuracy of the magnetic sensor system will occur.

[0011] The detection signal is generally multiplied by a specified gain using an amplifier and then input into an A / D converter. In order to prevent saturation of the detection signal, it is considered to set the gain by assuming the minimum distance between the magnetic sensor and the magnetic field generator. However, in this case, the entire input range of the A / D converter cannot be used, and the resolution will decrease, resulting in poor detection accuracy.

[0012] In addition, the distance between the magnetic sensor and the magnetic field generator may be shifted due to physical impact during use, which may cause the detection signal to be saturated, thereby causing problems such as deterioration in the detection accuracy of the magnetic sensor system. Summary of the invention

[0013] An object of the present invention is to provide a magnetic sensor system capable of controlling a change in a detection signal caused by a deviation in the interval between a magnetic sensor and a magnetic field generator, and a lens position detection device using the magnetic sensor system.

[0014] The magnetic sensor system of the present invention comprises: a magnetic field generator for generating a target magnetic field; and a magnetic sensor for detecting the target magnetic field. The magnetic sensor and the magnetic field generator are configured such that when the relative position of the magnetic field generator with respect to the magnetic sensor changes, the intensity of the magnetic field component in the first direction of the target magnetic field detected by the magnetic sensor changes.

[0015] The magnetic sensor includes a plurality of magnetoresistance effect elements. Each of the plurality of magnetoresistance effect elements includes: a magnetization fixed layer having magnetization with a fixed direction; a free layer having magnetization whose direction can be changed according to the direction and strength of a magnetic field component; and a spacer layer arranged between the magnetization fixed layer and the free layer, and is configured so that a bias magnetic field in a second direction orthogonal to a first direction is applied to the free layer, and the resistance value changes according to the strength of the magnetic field component. The maximum strength of each magnetic field component applied to the plurality of magnetoresistance effect elements is at least 1.2 times the strength of the bias magnetic field.

[0016] In the magnetic sensor system of the present invention, the maximum intensity of each magnetic field component applied to the plurality of magnetoresistive effect elements may be 15.6 times or less of the bias magnetic field intensity.

[0017] In the magnetic sensor system of the present invention, the bias magnetic field may be generated by one or both of an external magnetic field applied to the free layer from the outside and an anisotropic magnetic field caused by anisotropy of the free layer.

[0018] In addition, in the magnetic sensor system of the present invention, the magnetic sensor may further include a bias magnetic field generator that generates an external magnetic field applied to the free layer. In this case, the bias magnetic field is at least generated by an external magnetic field. In addition, the bias magnetic field generator may include a plurality of magnet pairs each consisting of a first magnet and a second magnet. In this case, in each of the plurality of magnet pairs, the first magnet and the second magnet may be arranged at a predetermined interval in the second direction so that an external magnetic field is applied to the entire free layer of at least one magnetoresistance effect element among the plurality of magnetoresistance effect elements. In addition, in this case, the magnetization fixed layer, the free layer, and the spacer layer may also constitute a laminated film. The laminated film has a width that is a dimension in a direction parallel to the first direction. The width of the laminated film may also be less than the interval between the first magnet and the second magnet in each of the plurality of magnet pairs.

[0019] In addition, in the magnetic sensor system of the present invention, the free layer may have shape magnetic anisotropy. In this case, the bias magnetic field may also be generated at least by the shape magnetic anisotropy.

[0020] In addition, in the magnetic sensor system of the present invention, the magnetic sensor may further include: a magnetic field amplifier for amplifying the magnetic field components applied to the plurality of magnetoresistance effect elements. In this case, the magnetic field amplifier may further include a plurality of soft magnetic layers. When viewed from a third direction orthogonal to the first direction and the second direction, each of the plurality of soft magnetic layers may be arranged at a position overlapping at least one of the plurality of magnetoresistance effect elements.

[0021] In the magnetic sensor system of the present invention, the spacer layer may also be a tunnel barrier layer.

[0022] In the magnetic sensor system of the present invention, the magnetic field generator may also be a magnetic scale in which multiple groups of N poles and S poles are alternately arranged at a specified interval in a specified direction. In this case, the magnetic sensor may also generate a detection signal having a corresponding relationship with the resistance value of each of the multiple magnetoresistance effect elements. The detection signal includes: an ideal component that changes periodically in a manner that depicts an ideal sine curve; and an error component composed of multiple harmonics of the ideal component. Multiple magnetoresistance effect elements may also be configured according to a specified pattern based on a specified interval to reduce the error component. In this case, the multiple magnetoresistance effect elements may be configured in a manner that reduces the component equivalent to odd harmonics of at least 7 times or less contained in the error component.

[0023] In addition, the magnetic sensor system of the present invention may further include a detection value generating circuit that generates a detection value corresponding to a relative position of the magnetic field generator with respect to the magnetic sensor based on the resistance values ​​of each of the plurality of magnetoresistive effect elements.

[0024] The lens position detection device of the present invention is used to detect the position of a variable position lens. The lens position detection device includes the magnetic sensor system of the present invention. The lens is configured to be movable in a first direction. The magnetic sensor and the magnetic field generator are configured such that when the position of the lens changes, the intensity of the magnetic field component changes.

[0025] The lens position detection device of the present invention may further include a detection value generation circuit that generates a detection value corresponding to the position of the lens based on the resistance values ​​of each of the plurality of magnetoresistive effect elements.

[0026] In the magnetic sensor system and lens position detection device of the present invention, each of the plurality of magnetoresistive effect elements is configured so that a bias magnetic field in a second direction orthogonal to the first direction is applied to the free layer, and the resistance value changes according to the intensity of the magnetic field component. The maximum intensity of the magnetic field component applied to each of the plurality of magnetoresistive effect elements is at least 1.2 times the intensity of the bias magnetic field. Thus, the present invention can suppress the change of the detection signal caused by the deviation of the interval between the magnetic sensor and the magnetic field generator.

[0027] Other objects, features and advantages of the present invention will become apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a perspective view showing a magnetic sensor system according to one embodiment of the present invention.

[0029] Figure 2 It is a front view showing a magnetic sensor system according to one embodiment of the present invention.

[0030] Figure 3 This is a circuit diagram showing the configuration of a magnetic sensor in one embodiment of the present invention.

[0031] Figure 4 Yes means Figure 3 A block diagram showing an example of the configuration of a detection value generating circuit shown in FIG.

[0032] Figure 5 It is a plan view showing a magnetic sensor according to one embodiment of the present invention.

[0033] Figure 6 It is a plan view showing a first resistor in one embodiment of the present invention.

[0034] Figure 7 This is a perspective view showing a magnetoresistance effect element according to one embodiment of the present invention.

[0035] Figure 8 It is a plan view showing a magnetoresistance effect element according to one embodiment of the present invention.

[0036] Fig. 9 This is an explanatory diagram for explaining a bias magnetic field applied to a free layer in one embodiment of the present invention.

[0037] Fig.10 This is a characteristic diagram showing an example of the relationship between the interval and the magnetic field component in one embodiment of the present invention.

[0038] Fig.11 This is a characteristic diagram showing an example of the relationship between the interval and the detection signal in one embodiment of the present invention.

[0039] Fig.12 : is a characteristic diagram showing an example of the relationship between the magnetic field component and the detection signal in one embodiment of the present invention.

[0040] Fig.13 This is a characteristic diagram showing the relationship between the interval obtained by the first simulation and the peak value of the first detection signal.

[0041] Fig.14 This is a characteristic diagram showing the relationship between the intensity of the magnetic field component and the output variation rate obtained by the first simulation.

[0042] Fig.15 This is a characteristic diagram showing the relationship between the intensity of the magnetic field component and the 13th harmonic obtained by the second simulation.

[0043] Fig.16 This is a characteristic diagram showing the relationship between the magnetic field magnification and the angle error obtained by the second simulation.

[0044] Fig.17 It is a characteristic diagram showing the relationship between the magnetic field component and the first detection signal obtained by the third simulation.

[0045] Fig.18 This is a characteristic diagram showing the relationship between the bias magnetic field and the hysteresis obtained by the third simulation.

[0046] Fig.19 It is a perspective view showing a lens module including a position detection device according to an embodiment of the present invention.

[0047] Fig. 20 It is a perspective view showing a position detection device according to one embodiment of the present invention.

[0048] Fig.21 It is a perspective view showing a first modified example of the magnetoresistive effect element in one embodiment of the present invention.

[0049] Fig. 22 It is a plan view showing a second modified example of the magnetoresistive effect element in one embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following describes the embodiments of the present invention in detail with reference to the accompanying drawings. Figure 1 and Figure 2 , a general structure of a magnetic sensor system according to an embodiment of the present invention is described. Figure 1 It is a perspective view showing the magnetic sensor system 1 . Figure 2 2 is a front view of the magnetic sensor system 1. The magnetic sensor system 1 of this embodiment includes the magnetic sensor 2 of this embodiment and a magnetic field generator 3.

[0051] The magnetic field generator 3 generates a target magnetic field MF as a magnetic field (detection target magnetic field) to be detected by the magnetic sensor 2. The target magnetic field MF includes a magnetic field component in a direction parallel to the imaginary straight line. The magnetic sensor 2 and the magnetic field generator 3 are configured such that when the relative position of the magnetic field generator 3 relative to the magnetic sensor 2 changes, the intensity of the magnetic field component of the target magnetic field MF detected by the magnetic sensor 2 changes. The magnetic sensor 2 detects the target magnetic field MF including the magnetic field component, thereby generating at least one detection signal corresponding to the intensity of the magnetic field component.

[0052] The magnetic field generator 3 may also be a magnetic scale in which a plurality of groups of N poles and S poles are alternately arranged in a specified direction. The magnetic scale may be a magnetic scale in which a plurality of groups of N poles and S poles are alternately magnetized relative to a magnetic medium such as a magnetic tape, or a magnetic scale in which a plurality of magnets are arranged along the above-mentioned specified direction. In addition, the magnetic sensor 2 or the magnetic field generator 3 can move within a specified range along a specified direction. By moving the magnetic sensor 2 or the magnetic field generator 3, the relative position of the magnetic field generator 3 relative to the magnetic sensor 2 changes. The specified direction may be a linear direction or a rotational direction.

[0053] In this embodiment, the magnetic field generator 3 is a linear scale that magnetizes multiple groups of N poles and S poles in a straight line direction. The magnetic sensor 2 or the magnetic field generator 3 can move along the long side direction of the magnetic field generator 3. In the magnetic field generator 3, multiple groups of N poles and S poles are alternately arranged at a predetermined interval. Figure 2 As shown, the distance between two adjacent N poles in the long side direction of the magnetic field generator 3 (the same as the distance between two adjacent S poles in the long side direction of the magnetic field generator 3) is called a pitch, and the symbol Lp represents the size of a pitch.

[0054] Here, if Figure 1 and Figure 2 As shown in FIG. 1 , the X direction, the Y direction, and the Z direction are defined. In this embodiment, a direction parallel to the long side direction of the magnetic field generator 3 is set as the X direction. In addition, two directions perpendicular to the X direction and orthogonal to each other are set as the Y direction and the Z direction. Figure 2 In the example, the Y direction is represented as Figure 2In addition, the direction opposite to the X direction is referred to as -X direction, the direction opposite to the Y direction is referred to as -Y direction, and the direction opposite to the Z direction is referred to as -Z direction.

[0055] The direction parallel to the X direction corresponds to the first direction of the present invention. The Y direction or -Y direction corresponds to the second direction of the present invention. The Z direction or -Z direction corresponds to the third direction of the present invention.

[0056] The magnetic sensor 2 is arranged at a position separated from the magnetic field generator 3 in the Z direction. The magnetic sensor 2 is configured to detect the intensity of the magnetic field component MFx in the direction parallel to the X direction of the target magnetic field MF at the predetermined position. If the magnetic sensor 2 or the magnetic field generator 3 moves in the direction parallel to the X direction, the intensity of the magnetic field component MFx changes periodically.

[0057] For the intensity of the magnetic field component MFx, for example, when the direction of the magnetic field component MFx is the X direction, it is represented by a positive value, and when the direction of the magnetic field component MFx is the -X direction, it is represented by a negative value. The magnetic sensor 2 can detect whether the intensity of the magnetic field component MFx is a positive value or a negative value. Therefore, the magnetic sensor 2 can actually detect the direction of the magnetic field component MFx (the X direction or the -X direction). In the following description, unless otherwise specified, the intensity of the magnetic field component MFx includes positive and negative values.

[0058] Below, refer to Figure 3 , the structure of the magnetic sensor 2 is described. Figure 3 : is a circuit diagram showing the structure of the magnetic sensor 2. The magnetic sensor 2 includes a first resistor R11, a second resistor R12, a third resistor R21, and a fourth resistor R22, each of which is configured so that the resistance value changes according to the intensity of the magnetic field component MFx. Each of the first to fourth resistors R11, R12, R21, and R22 includes a plurality of magnetoresistive effect elements (hereinafter referred to as MR elements) 50.

[0059] The magnetic sensor 2 further comprises: a power port V1, a ground port G1, a first output port E1, and a second output port E2. The first resistor R11 is disposed between the power port V1 and the first output port E1. The second resistor R12 is disposed between the ground port G1 and the first output port E1. The third resistor R21 is disposed between the power port V1 and the second output port E2. The fourth resistor R22 is disposed between the ground port G1 and the second output port E2. A voltage of a predetermined magnitude is applied to the power port V1. The ground port G1 is grounded. The magnetic sensor 2 is preferably driven by a constant voltage.

[0060] The magnetic sensor 2 generates a signal corresponding to the potential of the first output port E1 as the first detection signal S1 , and generates a signal corresponding to the potential of the second output port E2 as the second detection signal S2 .

[0061] like Figure 3 As shown, the magnetic sensor system 1 further includes a detection value generation circuit 4. The detection value generation circuit 4 generates a detection value Vs corresponding to the relative position of the magnetic field generator 3 with respect to the magnetic sensor 2 based on the first and second detection signals S1 and S2.

[0062] Here, refer to Figure 4 , an example of the structure of the detection value generating circuit 4 is described. Figure 4 Yes means Figure 3 FIG. 4 is a block diagram showing an example of the structure of the detection value generating circuit 4. Figure 4 In the example shown, the detection value generating circuit 4 includes: two low-pass filters 41, 42 for removing high-frequency components; two amplifiers 43, 44 for amplifying signals; two analog-to-digital converters (hereinafter referred to as A / D converters) 45, 46 for converting analog signals into digital signals; and an operation circuit 47.

[0063] The calculation circuit 47 generates the detection value Vs based on the first and second detection signals S1 and S2 converted into digital signals by the A / D converters 45 and 46. The calculation circuit 47 can be realized by, for example, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or a microcomputer.

[0064] In addition, the detection value generation circuit 4 can also correct the offset of the first and second detection signals S1 and S2. Specifically, for example, the detection value generation circuit 4 can also be configured to add an offset correction signal Sc1 to the first detection signal S1 and add an offset correction signal Sc2 to the second detection signal S2. The offset correction signals Sc1 and Sc2 can also be signals converted into analog signals by a digital-to-analog converter (not shown), for example.

[0065] Below, refer to Figure 5 , the structure of the magnetic sensor 2 is described in more detail. Figure 5 As shown, the magnetic sensor 2 further includes: a substrate 10, a power terminal 11, a ground terminal 12, a first output terminal 13 and a second output terminal 14 arranged on the substrate 10. The power terminal 11 constitutes a power port V1. The ground terminal 12 constitutes a ground port G1. The first and second output terminals 13 and 14 constitute the first and second output ports E1 and E2, respectively.

[0066] The first to fourth resistors R11, R12, R21, and R22 are arranged on the substrate 10 as follows. In the following description, when the arrangement of the first to fourth resistors R11, R12, R21, and R22 is described, the description is based on the center of gravity of the resistors when viewed from the Z direction (hereinafter referred to as the center of gravity). The second resistor R12 is arranged at the same position as the first resistor R11 in the X direction. In addition, the second resistor R12 is arranged in front of the first resistor R11 in the -Y direction.

[0067] The third resistor R21 is arranged at a distance Lp / 4 from the first resistor R11 in the X direction (see Figure 2 ) position. In addition, the third resistor R21 is arranged in front of the first resistor R11 in the Y direction.

[0068] The fourth resistor R22 is arranged at a distance Lp / 4 from the second resistor R12 in the X direction (see Figure 2 ). In addition, the fourth resistor R22 is arranged at the same position as the third resistor R21 in the X direction. In addition, the fourth resistor R22 is arranged in front of the second resistor R12 in the -Y direction.

[0069] In addition, Figure 5 In FIG. 1 , the symbol L represents an imaginary straight line parallel to the X direction. In the present embodiment, the center of gravity of the first resistor R11 and the center of gravity of the second resistor R12 are located at positions symmetrical to each other with respect to the imaginary straight line L. In addition, the center of gravity of the third resistor R21 and the center of gravity of the fourth resistor R22 are located at positions symmetrical to each other with respect to the imaginary straight line L.

[0070] Next, the configuration of the first to fourth resistors R11, R12, R21, and R22 will be described. The first and second detection signals S1 and S2 each include an ideal component that periodically changes in a predetermined signal period in a manner that draws an ideal sinusoidal curve (including a Sine waveform and a Cosine waveform). Figure 2 The size Lp of one pitch shown is equivalent to one cycle of the ideal component, that is, 360° of electrical angle. In addition, each of the first and second detection signals S1 and S2 includes an error component composed of higher harmonics of the ideal component in addition to the ideal component. In this embodiment, in order to reduce the error component, the first to fourth resistors R11, R12, R21, and R22 are configured.

[0071] Next, the structure of the first to fourth resistors R11, R12, R21, and R22 will be described in detail. First, the structure of the MR element 50 will be described. Each of the plurality of MR elements 50 is configured such that the resistance value changes according to the strength of the magnetic field component MFx. In the present embodiment, the MR element 50 is a spin bulb type MR element. The spin bulb type MR element includes: a magnetization fixed layer having magnetization with a fixed direction; a free layer having magnetization whose direction can change according to the magnetic field component MFx; and a spacer layer arranged between the magnetization fixed layer and the free layer. The spin bulb type MR element can be either a TMR (tunnel magnetoresistance effect) element or a GMR (giant magnetoresistance effect) element. In the present embodiment, in order to reduce the size of the magnetic sensor 2, the MR element 50 preferably adopts a TMR element. In the TMR element, the spacer layer is a tunnel barrier layer. In the GMR element, the spacer layer is a non-magnetic conductive layer. In a spin-ball type MR element, the resistance value changes according to the angle between the magnetization direction of the free layer and the magnetization direction of the fixed layer. The resistance value is minimum when the angle is 0° and maximum when the angle is 180°.

[0072] exist Figure 3 In FIG. 1 , arrows drawn in the first to fourth resistors R11, R12, R21, and R22 indicate the magnetization directions of the respective magnetization fixed layers of the plurality of MR elements 50 included in the resistors. The magnetization directions of the respective magnetization fixed layers of the plurality of MR elements 50 included in the first and third resistors R11 and R21 are the first magnetization directions. The magnetization directions of the respective magnetization fixed layers of the plurality of MR elements 50 included in the second and fourth resistors R12 and R22 are the second magnetization directions opposite to the first magnetization directions.

[0073] In the present embodiment, the first magnetization direction is the -X direction, and the second magnetization direction is the X direction. In this case, the magnetization directions of the free layers of the plurality of MR elements 50 change in the XY plane according to the strength of the magnetic field component MFx. Thus, the resistance values ​​of the plurality of MR elements 50 change according to the strength of the magnetic field component MFx. As a result, the potentials of the first and second output ports E1 and E2 change according to the strength of the magnetic field component MFx. As described above, the first detection signal S1 has a corresponding relationship with the potential of the first output port E1, and the second detection signal S2 has a corresponding relationship with the potential of the second output port E2. Therefore, the first and second detection signals S1 and S2 change according to the strength of the magnetic field component MFx.

[0074] In addition, the potential of the first output port E1 depends on the resistance values ​​of the first and second resistors R11 and R12, respectively, and the resistance values ​​of the first and second resistors R11 and R12 depend on the resistance values ​​of the plurality of MR elements 50 of the first and second resistors R11 and R12. Therefore, the first detection signal S1 corresponds to the resistance values ​​of the plurality of MR elements 50 of the first and second resistors R11 and R12.

[0075] Similarly, the potential of the second output port E2 depends on the resistance values ​​of the third and fourth resistors R21 and R22, respectively, and the resistance values ​​of the third and fourth resistors R21 and R22 depend on the resistance values ​​of the plurality of MR elements 50 of the third and fourth resistors R21 and R22. Therefore, the second detection signal S2 corresponds to the resistance values ​​of the plurality of MR elements 50 of the third and fourth resistors R21 and R22.

[0076] Next, the configuration of the plurality of MR elements 50 in each of the first to fourth resistors R11, R12, R21, and R22 is described. The plurality of MR elements 50 are configured in a prescribed pattern based on a size Lp of a pitch to reduce error components. Here, a collection of more than one MR element 50 is referred to as an element group. Each of the first to fourth resistors R11, R12, R21, and R22 includes a plurality of element groups. In the present embodiment, the positions of the plurality of MR elements 50 are specified in element group units. The plurality of element groups are configured at prescribed intervals based on a size Lp of a pitch to reduce error components. In addition, in the following description, when the configuration of the plurality of element groups is described, the description is based on the prescribed positions of the element groups. The prescribed position is, for example, the center of gravity of the element group when viewed from the Z direction.

[0077] Here, it is assumed that n and m are integers greater than 1 and different from each other. For example, in the case of reducing the component equivalent to the 2n+1th harmonic in the error component, the first element group is configured at a position Lp / (4n+2) away from the second element group in the X direction. In addition, in the case of reducing the component equivalent to the 2m+1th harmonic in the error component, the third element group is configured at a position Lp / (4m+2) away from the first element group in the X direction, and the fourth element group is configured at a position Lp / (4m+2) away from the second element group in the X direction. Like this, in the case of reducing the component equivalent to multiple harmonics contained in the error component, each of the multiple element groups used to reduce the component equivalent to a certain harmonic is configured at a position of a prescribed interval based on 1 spacing size Lp in the X direction with the corresponding element group in each of the multiple element groups used to reduce the component equivalent to other harmonics.

[0078] The plurality of element groups (plurality of MR elements 50) are arranged in such a manner that components corresponding to at least the seventh-order odd harmonics included in the error components are reduced. In addition, by increasing the number of element groups, components corresponding to higher harmonics can be reduced. The reduced components are preferably components corresponding to the 11th-order odd harmonics and more preferably components corresponding to the 13th-order odd harmonics.

[0079] In the present embodiment, the plurality of element groups (plurality of MR elements 50 ) of the first to fourth resistors R11 , R12 , R21 , and R22 are arranged so as to reduce components corresponding to odd-order harmonics of the 11th or lower order included in the error components. Figure 6 1 is a plan view showing the first resistor R11. The first resistor R11 includes 16 element groups 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, and 516. Each of the element groups 501 to 506 is divided into four regions. One or more MR elements 50 are arranged in each region. Therefore, each element group includes four or more MR elements 50. Multiple MR elements 50 can be connected in series in each element group. In this case, multiple element groups can also be connected in series. Alternatively, multiple MR elements 50 can also be connected in series without being affected by the element groups.

[0080] The first resistor R11 is provided with element groups 501 to 516 to reduce the third harmonic component (third harmonic) equivalent to the ideal component, the fifth harmonic component (fifth harmonic) equivalent to the ideal component, the seventh harmonic component (seventh harmonic) equivalent to the ideal component, and the eleventh harmonic component (eleventh harmonic) equivalent to the ideal component, which are included in the error component. Figure 6 As shown, the element groups 501 to 504 are arranged along the X direction. The element group 502 is arranged at a position Lp / 10 away from the element group 501 in the X direction. The element group 503 is arranged at a position Lp / 6 away from the element group 501 in the X direction. The element group 504 is arranged at a position Lp / 10+Lp / 6 away from the element group 501 in the X direction (a position Lp / 6 away from the element group 502 in the X direction).

[0081] In addition, if Figure 6As shown, component groups 505 to 508 are arranged in front of component groups 501 to 504 in the -Y direction along the X direction. Component group 505 is arranged at a position Lp / 22 away from component group 501 in the X direction. Component group 506 is arranged at a position Lp / 22+Lp / 10 away from component group 501 in the X direction. Component group 507 is arranged at a position Lp / 22+Lp / 6 away from component group 501 in the X direction. Component group 508 is arranged at a position Lp / 22+Lp / 10+Lp / 6 away from component group 501 in the X direction. In addition, component groups 505 to 508 are respectively arranged at a position Lp / 22 away from component groups 501 to 504 in the X direction.

[0082] In addition, if Figure 6 As shown, component groups 509 to 512 are arranged in front of component groups 505 to 508 in the -Y direction along the X direction. Component group 509 is arranged at a position Lp / 14 away from component group 501 in the X direction. Component group 510 is arranged at a position Lp / 14+Lp / 10 away from component group 501 in the X direction. Component group 511 is arranged at a position Lp / 14+Lp / 6 away from component group 501 in the X direction. Component group 512 is arranged at a position Lp / 14+Lp / 10+Lp / 6 away from component group 501 in the X direction. In addition, component groups 509 to 512 are respectively arranged at a position Lp / 14 away from component groups 501 to 504 in the X direction.

[0083] like Figure 6 As shown, component groups 513 to 516 are arranged in front of component groups 509 to 512 in the -Y direction along the X direction. Component group 513 is arranged at a position Lp / 14+Lp / 22 away from component group 501 in the X direction. Component group 514 is arranged at a position Lp / 14+Lp / 22+Lp / 10 away from component group 501 in the X direction. Component group 515 is arranged at a position Lp / 14+Lp / 22+Lp / 6 away from component group 501 in the X direction. Component group 516 is arranged at a position Lp / 14+Lp / 22+Lp / 10+Lp / 6 away from component group 501 in the X direction. In addition, component groups 513 to 516 are respectively arranged at a position Lp / 14 away from component groups 505 to 508 in the X direction.

[0084] In this embodiment, the configuration of the plurality of element groups in each of the second to fourth resistors R12, R21, and R22 is the same as the configuration of the plurality of element groups in the first resistor R11. That is, each of the second to fourth resistors R12, R21, and R22 includes Figure 6The 16 element groups 501 to 516 are configured as shown. The element groups 501 to 516 of the first resistor R11 and the element groups 501 to 516 of the second resistor R12 are arranged at positions symmetrical with respect to the imaginary straight line L. The element groups 501 to 516 of the second resistor R12 are arranged at the same positions as the element groups 501 to 516 of the first resistor R11 in the X direction.

[0085] The element group 501 of the third resistor R21 is arranged at a position Lp / 4 away from the element group 501 of the first resistor R11 in the X direction. The arrangement of the element groups 501 to 516 in the third resistor R21 is the same as that of the element groups 501 to 516 in the first resistor R11.

[0086] The element groups 501 to 516 of the third resistor R21 and the element groups 501 to 516 of the fourth resistor R22 are arranged symmetrically about the imaginary line L. The element groups 501 to 516 of the fourth resistor R22 are arranged at the same positions as the element groups 501 to 516 of the third resistor R21 in the X direction.

[0087] According to the configuration of the 1st to 4th resistors R11, R12, R21, and R22 described above, the phase difference between the ideal component of the 2nd detection signal S2 and the ideal component of the 1st detection signal S1 becomes an odd multiple of 1 / 4 of the specified signal period (signal period of the ideal component), and the error components of each of the 1st and 2nd detection signals S1 and S2 are reduced.

[0088] In view of the manufacturing accuracy of the MR element 50, the magnetization direction of the magnetization fixed layer, the positions of the first to fourth resistors R11, R12, R21, R22, and the positions of the element groups 501 to 516 may be slightly deviated from the above directions and positions.

[0089] Below, refer to Figure 7 as well as Figure 8 , the structure of the MR element 50 is described. Figure 7 It is a perspective view showing the MR element 50 . Figure 8 is a plan view showing the MR element 50. The MR element 50 includes a stacked film 50A including a magnetization fixed layer 51, a spacer layer 52, and a free layer 53 stacked in sequence in the Z direction. The planar shape of the stacked film 50A viewed from the Z direction is rectangular or nearly rectangular.

[0090] The lower surface of the laminated film 50A of the MR element 50 is electrically connected to the lower surface of the laminated film 50A of other MR elements 50 via a lower electrode (not shown), and the upper surface of the laminated film 50A of the MR element 50 is further electrically connected to the upper surface of the laminated film 50A of other MR elements 50 via an upper electrode (not shown). Thus, a plurality of MR elements 50 are connected in series. In addition, the arrangement of the layers 51 to 53 in the laminated film 50A may be different from that in FIG. Figure 7 The configuration shown is upside down.

[0091] The magnetic sensor 2 includes: a bias magnetic field generator 50B for generating an external magnetic field applied to the respective free layers 53 of the plurality of MR elements 50; and a magnetic field amplifier 50D for amplifying the respective magnetic field components MFx applied to the plurality of MR elements 50. In the present embodiment, in particular, the bias magnetic field generator 50B includes a plurality of magnet pairs 50C, and the magnetic field amplifier 50D includes a plurality of soft magnetic layers 50E.

[0092] Each of the plurality of magnet pairs 50C is composed of a first magnet 54 and a second magnet 55. In each of the plurality of magnet pairs 50C, the first magnet 54 and the second magnet 55 are arranged at a predetermined interval in the Y direction so that an external magnetic field is applied to the entire free layer 53 of at least one MR element 50 among the plurality of MR elements 50. Figure 7 As shown in FIG. 1 , the first magnet 54 and the second magnet 55 are arranged in front of the stacked film 50A in the Z direction. Figure 7 as well as Figure 8 As shown, the first magnet 54 is located near one end of the laminate film 50A in the -Y direction, and the second magnet 55 is located near one end of the laminate film 50A in the Y direction. The first and second magnets 54 and 55 have a planar shape that is long in the X direction (the shape viewed from the Z direction). Figure 7 In FIG. 1 , arrows in the first and second magnets 54 and 55 indicate the magnetization directions of the first and second magnets 54 and 55. The direction of the external magnetic field applied to the free layer 53 by the first and second magnets 54 and 55 is the Y direction.

[0093] In addition, Figure 8 In the embodiment, the first magnet 54 overlaps with a portion including one end of the laminate film 50A in the -Y direction when viewed from the Z direction. However, the first magnet 54 may be arranged in front of the laminate film 50A in the -Y direction. Similarly, the second magnet 55 overlaps with a portion including one end of the laminate film 50A in the Y direction when viewed from the Z direction. However, the second magnet 55 may be arranged in front of the laminate film 50A in the Y direction.

[0094] Each of the plurality of soft magnetic layers 50E is disposed at a position overlapping at least one MR element 50 among the plurality of MR elements 50 as viewed in the Z direction. Figure 7In the example shown, the soft magnetic layer 50E is arranged at a position overlapping with one MR element 50. In addition, the soft magnetic layer 50E is arranged between the laminated film 50A and the magnet pair 50C (the first and second magnets 54 and 55). The soft magnetic layer 50E has a planar shape that is long in the Y direction. The soft magnetic layer 50E may also overlap with each of the first and second magnets 54 and 55 when viewed from the Z direction.

[0095] Below, refer to Fig. 9 , the bias magnetic field applied to the free layer 53 of each of the plurality of MR elements 50 will be described. Fig. 9 : is an explanatory diagram for explaining the bias magnetic field MFb applied to the free layer 53. In this embodiment, the following first and second conditions are specified for the bias magnetic field MFb. The first condition is that each of the plurality of MR elements 50 is configured so that the bias magnetic field MFb in the Y direction or the -Y direction is applied to the free layer 53, and the resistance value changes according to the intensity of the magnetic field component MFx. The second condition is that the maximum intensity of the magnetic field component MFx applied to the MR element 50 is 1.2 times the intensity of the bias magnetic field MFb.

[0096] The first condition specifies the direction of the bias magnetic field MFb and specifies the strength of the bias magnetic field MFb. That is, if the bias magnetic field MFb is too large, the resistance value of the MR element 50 does not change according to the strength of the magnetic field component MFx. On the other hand, if the bias magnetic field MFb is too small, the resistance value of the MR element 50 is saturated within the range of the strength of the magnetic field component MFx. If the resistance value of the MR element 50 is saturated, the resistance value of the MR element 50 does not change according to the strength of the magnetic field component MFx. Therefore, the first condition specifies that the strength of the bias magnetic field MFb is within the strength range in which the resistance value changes according to the strength of the magnetic field component MFx.

[0097] In other words, the second condition stipulates that the intensity of the bias magnetic field MFb is 0.83 times or less of the maximum intensity of the magnetic field component MFx applied to the MR element 50. Therefore, the first and second conditions are summarized as stipulating that the intensity of the bias magnetic field MFb is within the intensity range in which the resistance value changes according to the intensity of the magnetic field component MFx, and is 0.83 times or less of the maximum intensity of the magnetic field component MFx applied to the MR element 50 within the intensity range.

[0098] The bias magnetic field MFb is generated by one or both of an external magnetic field applied to the free layer 53 from the outside and an anisotropic magnetic field caused by the anisotropy of the free layer 53. In the present embodiment, in particular, as the above-mentioned external magnetic field, the external magnetic field generated by the bias magnetic field generator 50B (magnet pair 50C) is applied to the free layer 53. That is, the external magnetic field acts as the bias magnetic field MFb. As mentioned above, the direction of the external magnetic field is the Y direction. Therefore, when the bias magnetic field MFb is generated by the external magnetic field, the direction of the bias magnetic field MFb also becomes the Y direction.

[0099] The bias magnetic field MFb applied to the free layer 53 may be generated by an anisotropic magnetic field together with or instead of the external magnetic field. For example, the free layer 53 may also have a shape magnetic anisotropy in which the easy magnetization axis direction is parallel to the Y direction. In this case, the anisotropic magnetic field generated by the shape magnetic anisotropy acts as the bias magnetic field MFb.

[0100] Here, if Figure 8 As shown in the figure, the interval between the first magnet 54 and the second magnet 55 is represented by the symbol D, and the width which is the dimension in the direction parallel to the X direction of the stacked film 50A is represented by the symbol W. The width W is less than the dimension in the Y direction of the stacked film 50A. In addition, the width W is preferably less than the interval D. Thus, both the external magnetic field and the anisotropic magnetic field act as the bias magnetic field MFb.

[0101] In addition, as long as the bias magnetic field MFb in the Y direction or the -Y direction is applied to the free layer 53, the direction of the external magnetic field may be inclined relative to the Y direction or the -Y direction, and the direction of the easy magnetization axis may be inclined relative to the direction parallel to the Y direction. In addition, the anisotropic magnetic field may be generated by uniaxial magnetic anisotropy other than shape magnetic anisotropy such as magnetocrystalline anisotropy.

[0102] Next, the method for generating the detection value Vs in the present embodiment is described. The detection value generating circuit 4 generates the detection value Vs as follows. The calculation circuit 47 of the detection value generating circuit 4 calculates the inverse trigonometric function of the ratio of the second detection signal S2 to the first detection signal S1, i.e., atan(S2 / S1), thereby obtaining an initial detection value within a range of 0° to less than 360°. The initial detection value may be the value of the inverse trigonometric function itself or a value obtained by adding a predetermined angle to the value of the inverse trigonometric function.

[0103] When the value of the inverse trigonometric function is 0°, the position of the S pole of the magnetic field generator 3 coincides with the position of the first and second resistors R11 and R12 in the X direction. When the value of the inverse trigonometric function is 180°, the position of the N pole of the magnetic field generator 3 coincides with the position of the first and second resistors R11 and R12 in the X direction. Therefore, the initial detection value magnetic field generator 3 has a corresponding relationship with the relative position of the magnetic sensor 2 within one pitch (hereinafter also referred to as relative position).

[0104] In addition, the calculation circuit 47 of the detection value generation circuit 4 counts the number of electrical angle rotations from the reference position, with one cycle of the initial detection value being 360° of the electrical angle. One electrical angle rotation is equivalent to the movement amount of one pitch of the relative position. The calculation circuit 47 of the detection value generation circuit 4 generates the detection value Vs having a corresponding relationship with the relative position based on the initial detection value and the number of electrical angle rotations.

[0105] Furthermore, as described above, the first and second detection signals S1 and S2 correspond to the resistance values ​​of the MR elements 50. Therefore, it can be said that the operation circuit 47 of the detection value generation circuit 4 generates the detection value Vs based on the resistance values ​​of the MR elements 50 of the first to fourth resistors R11, R12, R21, and R22.

[0106] Next, the functions and effects of the magnetic sensor system 1 and the magnetic sensor 2 of the present embodiment are described. In the present embodiment, the MR element 50 is configured to apply a bias magnetic field MFb to the free layer 53. As described above, in the present embodiment, the first and second conditions are specified for the bias magnetic field MFb. According to the present embodiment, by satisfying the first and second conditions, the changes in the first and second detection signals S1 and S2 caused by the deviation of the interval between the magnetic sensor 2 and the magnetic field generator 3 can be suppressed. This is described in detail below.

[0107] First, the relationship between the distance between the magnetic sensor 2 and the magnetic field generator 3 and the influence of the magnetic field component MFx and the first and second detection signals S1 and S2 will be described. Figure 1 as well as Figure 2 As shown, the magnetic sensor 2 is arranged at a predetermined distance from the magnetic field generator 3. Hereinafter, the distance between the magnetic sensor 2 and the magnetic field generator 3 is referred to as a gap (GAP) and is represented by symbol AG.

[0108] Fig.10 3 is a characteristic diagram showing an example of the relationship between the interval AG and the magnetic field component MFx. Fig.11 is a characteristic diagram showing an example of the relationship between the interval AG and the detection signal. Fig.10 as well as Fig.11In , the horizontal axis represents the interval AG. Fig.10 In FIG. 1 , the ordinate represents the magnitude of the magnetic flux density Bx corresponding to the maximum intensity of the magnetic field component MFx that can be detected by the magnetic sensor 2. Fig.11 In FIG. 1 , the ordinate represents the peak value Vpp of the first detection signal S1 when the relative position between the magnetic field generator 3 and the magnetic sensor 2 is changed. Fig.10 The curve 71 shows the magnetic flux density Bx when the magnetic field generator 3 with a pitch Lp of 1000 μm is used. The curve 72 shows the magnetic flux density Bx when the magnetic field generator 3 with a pitch Lp of 750 μm is used.

[0109] Depend on Fig.10 It can be understood that the magnetic flux density Bx, i.e., the intensity of the magnetic field component MFx, decreases as the interval AG increases. Fig.11 It can be understood that the peak value Vpp, i.e., the size of the first detection signal S1, decreases as the interval AG increases. In addition, although not shown, the relationship between the interval AG and the first detection signal S1 also applies to the relationship between the interval AG and the second detection signal S2. Therefore, the second detection signal S2 also decreases as the interval AG increases.

[0110] Fig.12 is a characteristic diagram showing an example of the relationship between the magnetic field component MFx and the detection signal. Fig.12 In FIG. 1 , the horizontal axis represents the magnitude of the magnetic flux density Bx corresponding to the magnetic field component MFx, and the vertical axis represents the magnitude of the first detection signal S1. Fig.12 In the equation, a positive value is used to represent the magnetic flux density Bx when the direction of the magnetic field component MFx is in the X direction, and a negative value is used to represent the magnetic flux density Bx when the direction of the magnetic field component MFx is in the -X direction. Fig.12 In the example, the first detection signal S1 is normalized so that the maximum value of the first detection signal S1 is 1 and the minimum value of the first detection signal S1 is −1.

[0111] Depend on Fig.12 It can be understood that when the intensity (magnetic flux density Bx) of the magnetic field component MFx varies within a range of 0 and is relatively narrow (e.g., ±7 mT), the first detection signal S1 varies significantly relative to the intensity variation of the magnetic field component MFx. Therefore, the maximum value of the first detection signal S1 also varies significantly relative to the intensity variation of the magnetic field component MFx. In this case, if the interval AG deviates and the maximum intensity of the magnetic field component MFx deviates, the maximum value of the first detection signal S1 varies significantly.

[0112] In contrast, in the present embodiment, the maximum intensity of each magnetic field component MFx applied to the MR element 50 is set to be 1.2 times or more of the intensity of the bias magnetic field MFb according to the second condition. Thus, in the present embodiment, the variation range of the first detection signal S1 is expanded so that the maximum value of the first detection signal S1 does not change significantly with respect to the variation of the maximum intensity of the magnetic field component MFx. Thus, according to the present embodiment, the variation of the maximum value of the first detection signal S1 when the interval AG deviates and the maximum intensity of the magnetic field component MFx deviates can be suppressed.

[0113] The above description of the first detection signal S1 also applies to the second detection signal S2. According to this embodiment, as with the first detection signal S1, it is possible to suppress the variation in the maximum value of the second detection signal S2 when the interval AG deviates and the maximum intensity of the magnetic field component MFx deviates.

[0114] The relationship between the maximum intensity of the magnetic field component MFx and the intensity of the bias magnetic field MFb is described in detail below with reference to the first and second simulation results. In the following description, unless otherwise specified, the intensity of the magnetic field component MFx is the maximum intensity of the magnetic field component MFx.

[0115] First, the first simulation will be described. In the first simulation, a model of the magnetic sensor system 1 was used. The size Lp of one pitch of the magnetic field generator 3 was 1000 μm.

[0116] In the first simulation, the relationship between the interval AG and the peak value Vpp of the first detection signal S1 is obtained by changing the interval AG. In addition, in the first simulation, the magnetic flux density Bb corresponding to the intensity of the bias magnetic field MFb is changed to 0.1mT, 2mT, 5mT, 10mT, and 15mT. The relationship between the interval AG and the peak value Vpp of the first detection signal S1 is obtained for each intensity of the bias magnetic field MFb (each magnetic flux density Bb).

[0117] In addition, in the first simulation, the rate of change of the first detection signal S1 when the interval AG changes (hereinafter referred to as the output rate of change) is calculated. Here, the peak value Vpp when the interval AG is the first value is called the first peak, and the peak value Vpp when the interval AG is the second value that is 50 μm greater than the first value is called the second peak. In the first simulation, the value obtained by dividing the difference between the first peak and the second peak by the first peak is taken as the output rate of change when the interval AG is the first value. Then, from the relationship between the interval AG and the intensity of the magnetic field component MFx, the relationship between the intensity of the magnetic field component MFx and the output rate of change is calculated. For each intensity of the bias magnetic field MFb (each magnetic flux density Bb), the relationship between the intensity of the magnetic field component MFx and the output rate of change is calculated.

[0118] Fig.13AG is a characteristic diagram showing the relationship between the interval AG and the peak value Vpp of the first detection signal S1. Fig.13 In the figure, the horizontal axis represents the interval AG and the vertical axis represents the peak value Vpp. Fig.13 In the figure, the curve shown by symbol 73 represents the peak Vpp when the magnetic flux density Bb is 0.1mT, the curve shown by symbol 74 represents the peak Vpp when the magnetic flux density Bb is 2mT, the curve shown by symbol 75 represents the peak Vpp when the magnetic flux density Bb is 5mT, the curve shown by symbol 76 represents the peak Vpp when the magnetic flux density Bb is 10mT, and the curve shown by symbol 77 represents the peak Vpp when the magnetic flux density Bb is 15mT.

[0119] Depend on Fig.13 It can be seen that when the magnetic flux density Bb is other than 0.1 mT, the peak value Vpp, that is, the magnitude of the first detection signal S1, decreases as the interval AG increases. Fig.13 It can also be seen that the amount of change in the first detection signal S1 when the interval AG changes becomes smaller as the intensity of the bias magnetic field MFb (magnetic flux density Bb) decreases.

[0120] Fig.14 This is a characteristic diagram showing the relationship between the intensity of the magnetic field component MFx and the output change rate. Fig.14 In the figure, the horizontal axis represents the magnitude of the magnetic flux density Bx corresponding to the intensity of the magnetic field component MFx, and the vertical axis represents the output change rate. Fig.14 In the figure, the curve shown by symbol 78 represents the output variation rate when the magnetic flux density Bb is 2mT, the curve shown by symbol 79 represents the output variation rate when the magnetic flux density Bb is 5mT, the curve shown by symbol 80 represents the output variation rate when the magnetic flux density Bb is 10mT, and the curve shown by symbol 81 represents the output variation rate when the magnetic flux density Bb is 15mT.

[0121] Depend on Fig.14 It can be seen that the output variation rate decreases as the intensity of the magnetic field component MFx (magnetic flux density Bx) increases. Fig.14 It can also be seen that the output variation rate decreases as the intensity of the bias magnetic field MFb (magnetic flux density Bb) decreases.

[0122] The results of the first simulation show that the output variation rate can be reduced by increasing the intensity of the magnetic field component MFx or reducing the intensity of the bias magnetic field MFb. The upper limit of the output variation rate that can be judged as a small variation of the detection signal is, for example, 15%. Fig.14It can be seen that the magnetic flux density Bx at which the output variation rate becomes 15% is 6 mT when the magnetic flux density Bb is 5 mT, 12 mT when the magnetic flux density Bb is 10 mT, and 18 mT when the magnetic flux density Bb is 15 mT. Therefore, when the magnetic flux density Bx is 1.2 times the magnetic flux density Bb, the output variation rate becomes 15%.

[0123] The magnetic flux density Bx corresponds to the maximum intensity of each magnetic field component MFx applied to the MR element 50, and the magnetic flux density Bb corresponds to the intensity of the bias magnetic field MFb. In the present embodiment, the maximum intensity of each magnetic field component MFx applied to the MR element 50 is set to be 1.2 times or more of the intensity of the bias magnetic field MFb. Thus, according to the present embodiment, the output variation rate can be controlled to be less than 15%.

[0124] In addition, the output variation rate is preferably 10% or less, and more preferably 8% or less. Fig.14 It can be seen that the magnetic flux density Bx at which the output variation rate becomes 10% is 8.5 mT when the magnetic flux density Bb is 5 mT, 17 mT when the magnetic flux density Bb is 10 mT, and 25.5 mT when the magnetic flux density Bb is 15 mT. Therefore, when the magnetic flux density Bx is 1.7 times the magnetic flux density Bb, the output variation rate becomes 10%.

[0125] In addition, by Fig.14 It can be seen that the magnetic flux density Bx at which the output fluctuation rate becomes 8% is 10mT when the magnetic flux density Bb is 5mT, 20mT when the magnetic flux density Bb is 10mT, and 30mT when the magnetic flux density Bb is 15mT. Therefore, when the magnetic flux density Bx is twice the magnetic flux density Bb, the output fluctuation rate becomes 8%.

[0126] As can be seen from the above, the maximum intensity of each magnetic field component MFx applied to the MR element 50 is preferably 1.7 times or more, and more preferably 2 times or more, the intensity of the bias magnetic field MFb.

[0127] Next, the second simulation will be described. As in the first simulation, the module of the magnetic sensor system 1 is used in the second simulation. In addition, the magnetic flux density Bb corresponding to the bias magnetic field MFb is 5 mT.

[0128] Here, the ratio of the maximum intensity of each magnetic field component MFx applied to the MR element 50 to the intensity of the bias magnetic field MFb is referred to as the magnetic field ratio. In the second simulation, the intensity of the magnetic field component MFx is changed to investigate the influence of the magnetic field ratio on the detection signal and the detection value Vs. Specifically, the component of the 13th harmonic (13th harmonic) equivalent to the ideal component of the error component included in the first detection signal S1 is obtained, and the relationship between the intensity of the magnetic field component MFx and the 13th harmonic is obtained.

[0129] In addition, in the second simulation, the aforementioned initial detection value is obtained based on the first and second detection signals S1 and S2. In addition, the ideal angle corresponding to the initial detection value is obtained based on the respective ideal components of the first and second detection signals S1 and S2, and the difference between the initial detection value and the ideal angle (hereinafter referred to as the angle error) is obtained. Then, the relationship between the magnetic field magnification and the angle error is obtained.

[0130] Fig.15 This is a characteristic diagram showing the relationship between the intensity of the magnetic field component MFx and the 13th harmonic. Fig.15 In the figure, the horizontal axis represents the magnetic flux density Bx corresponding to the intensity of the magnetic field component MFx. Fig.15 In FIG. 1 , the ordinate represents the ratio of the amplitude of the 13th harmonic to the amplitude of the ideal component, V13th / V1st. Fig.15 It can be seen that the ratio V13th / V1st increases as the magnetic flux density Bx increases. From this result, it can be seen that if the magnetic field magnification increases, the amplitude of the 13th harmonic increases.

[0131] In the magnetic sensor 2 of the magnetic sensor system 1, a plurality of MR elements 50 are arranged in order to reduce the components of odd-order harmonics of the 11th order or less contained in the error components. In other words, the magnetic sensor 2 is not configured in such a way as to reduce the components of odd-order harmonics of the 13th order or more contained in the error components. Fig.15 As shown in FIG. 1 , if the magnetic flux density Bx increases, the amplitude of the 13th harmonic increases. Therefore, if the magnetic field magnification increases, the component corresponding to the 13th harmonic included in the error component increases.

[0132] Fig.16 This is a characteristic diagram showing the relationship between the magnetic field magnification and the angle error. Fig.16 In the figure, the horizontal axis represents the magnetic field ratio, and the vertical axis represents the angle error. Fig.16 It is known that the angle error increases as the magnetic field magnification increases. This is because, as described above, the component corresponding to the 13th harmonic in the error component increases as the magnetic field magnification increases.

[0133] If the angle error increases, the error of the detection value Vs increases. Fig.16 It can be seen that if the magnetic field magnification increases, the error of the detection value Vs increases.

[0134] The upper limit of the angular error that can be tolerated for the detection value Vs error is, for example, 3°. Fig.16It can be seen that the magnetic field magnification for an angle error of 3° is 15.6. The magnetic field magnification corresponds to the magnification of the maximum intensity of each magnetic field component MFx applied to the MR element 50 relative to the intensity of the bias magnetic field MFb. Therefore, by controlling the maximum intensity of each magnetic field component MFx applied to the MR element 50 to be 15.6 times or less of the intensity of the bias magnetic field MFb, the angle error can be controlled to be less than 3°.

[0135] In addition, the angle error is preferably 2° or less, and more preferably 1° or less. Fig.16 It can be seen that the magnetic field magnification for an angle error of 2° is 9.2, and the magnetic field magnification for an angle error of 1° is 5.6. Therefore, the maximum intensity of each magnetic field component MFx applied to the MR element 50 is preferably 9.2 times or less, more preferably 5.6 times or less, the intensity of the bias magnetic field MFb.

[0136] In the present embodiment, a detection value generation circuit 4 is provided in the magnetic sensor system 1. When the magnetic sensor 2 in the present embodiment is used, the error caused by the angle error can be reduced by correcting the first and second detection signals S1, S2 or the detection value Vs in the detection value generation circuit 4 or the operation circuit 47. As described above, by reducing the angle error to a certain extent to control the magnetic field magnification, the correction of the first and second detection signals S1, S2 or the detection value Vs becomes easy.

[0137] Next, the intensity of the bias magnetic field MFb will be described with reference to the results of the third simulation. As in the first and second simulations, the model of the magnetic sensor system 1 was used in the third simulation.

[0138] In the third simulation, the relationship between the magnetic field component MFx and the detection signal is obtained when the intensity of the bias magnetic field MFb is changed. In the third simulation, the first detection signal S1 is used as the detection signal. In addition, in the third simulation, the magnetic flux density Bb corresponding to the intensity of the bias magnetic field MFb is changed to 0mT, 2mT, 5mT, 8mT, 10mT, 15mT, and 20mT, respectively. For each intensity of the bias magnetic field MFb (each magnetic flux density Bb), the relationship between the magnetic field component MFx and the first detection signal S1 is obtained.

[0139] Fig.17 is a characteristic diagram showing the relationship between the magnetic field component MFx and the first detection signal S1. Fig.17 In FIG. 1 , the horizontal axis represents the magnetic flux density Bx corresponding to the intensity of the magnetic field component MFx, and the vertical axis represents the first detection signal S1. Fig.17In the figure, the curve shown by symbol 82 represents the first detection signal S1 when the magnetic flux density Bb is 0mT, the curve shown by symbol 83 represents the first detection signal S1 when the magnetic flux density Bb is 2mT, the curve shown by symbol 84 represents the first detection signal S1 when the magnetic flux density Bb is 5mT, the curve shown by symbol 85 represents the first detection signal S1 when the magnetic flux density Bb is 8mT, the curve shown by symbol 86 represents the first detection signal S1 when the magnetic flux density Bb is 10mT, the curve shown by symbol 87 represents the first detection signal S1 when the magnetic flux density Bb is 15mT, and the curve shown by symbol 88 represents the first detection signal S1 when the magnetic flux density Bb is 20mT.

[0140] exist Fig.17 In the example shown, the ideal value of the first detection signal S1 (bias of the first detection signal S1) when the magnetic flux density Bx is 0 is 1.4 V. Here, when the magnetic flux density Bx increases from a negative value, the value of the magnetic flux density Bx at which the first detection signal S1 becomes 1.4 V is referred to as the first value, and when the magnetic flux density Bx decreases from a positive value, the value of the magnetic flux density Bx at which the first detection signal S1 becomes 1.4 V is referred to as the second value. In addition, the absolute value of the difference between the first value and the second value is referred to as hysteresis Hys.

[0141] Fig.18 is a characteristic diagram showing the relationship between the bias magnetic field MFb and the hysteresis Hys. Fig.18 In the figure, the horizontal axis represents the magnetic flux density Bb corresponding to the intensity of the bias magnetic field MFb, and the vertical axis represents the hysteresis Hys. Fig.18 It can be seen that as the intensity of the bias magnetic field MFb (magnetic flux density Bb) decreases, the hysteresis Hys decreases.

[0142] In addition to the aforementioned angle error, the error of the detection value Vs may also occur due to the hysteresis Hys. The upper limit of the hysteresis Hys that can allow the error of the detection value Vs is, for example, 1 mT. Fig.18 It is known that the magnetic flux density Bb at which the hysteresis Hys becomes 1 mT is 3 mT. Therefore, the magnetic flux density Bb corresponding to the intensity of the bias magnetic field MFb is preferably 3 mT or more.

[0143] Furthermore, if the intensity of the bias magnetic field MFb is increased, the intensity of the magnetic field component MFx must be increased in order to reduce the output variation rate. In order to increase the intensity of the magnetic field component MFx, for example, the gap AG must be reduced. From the perspective of increasing the gap AG to a certain extent, the magnetic flux density Bb corresponding to the intensity of the bias magnetic field MFb is preferably 40 mT or less.

[0144] However, the bias magnetic field MFb is generated by one or both of the external magnetic field generated by the bias magnetic field generator 50B and the anisotropic magnetic field caused by the anisotropy of the free layer 53 of each MR element 50. When the magnet pair 50C (the first and second magnets 54 and 55) is provided as the bias magnetic field generator 50B, the direction of the bias magnetic field MFb can be set to one direction (the Y direction or the -Y direction). The magnitudes of the first and second detection signals S1 and S2 when the intensity of the magnetic field component MFx is 0, that is, the offset, will differ depending on whether the magnetization direction of the free layer 53 is the Y direction or the -Y direction. In contrast, by providing the magnet pair 50C (the first and second magnets 54 and 55), the magnetization direction of the free layer 53 when the intensity of the magnetic field component MFx is 0 can be fixed to one direction (the Y direction or the -Y direction). This makes it easy to correct the offset.

[0145] In addition, by increasing the strength of the external magnetic field generated by the bias magnetic field generator 50B to a certain extent, when a magnetic field in the opposite direction to the direction of the external magnetic field is applied to the MR element 50, the direction of magnetization of the free layer 53 is reversed when the strength of the magnetic field component MFx is 0, thereby preventing the bias change. From this point of view, the magnetic flux density Bb corresponding to the strength of the bias magnetic field MFb is preferably relatively large, specifically preferably 3 mT or more.

[0146] Next, other effects in the present embodiment are described. In the present embodiment, in order to reduce the components of the odd harmonics below the 11th order contained in the respective error components of the first and second detection signals S1 and S2, a plurality of MR elements 50 are configured. It can be seen from the results of the second simulation that as the magnetic field multiplier increases, specifically, as the intensity of the magnetic field component MFx increases, the components of the odd harmonics below the 13th order contained in the error components increase. If the plurality of MR elements 50 are not configured as described above, as the intensity of the magnetic field component MFx increases, the components of the odd harmonics below the 11th order also increase. In this case, the waveforms of the first and second detection signals S1 and S2 are distorted into rectangular waveforms. As a result, the error of the detection value Vs increases.

[0147] In contrast, according to the present embodiment, by configuring the plurality of MR elements 50 as described above, the intensity of the magnetic field component MFx can be increased while the error component included in each of the first and second detection signals S1 and S2 can be reduced, and the waveforms of the first and second detection signals S1 and S2 can be made close to an ideal sine curve. Thus, according to the present embodiment, the error of the detection value Vs can be reduced while the output variation rate is reduced.

[0148] Below, refer to Fig.19 and Fig. 20 , a lens position detection device (hereinafter referred to as a position detection device) according to this embodiment is described. Fig.19 It is a perspective view showing a lens module including the position detection device according to the present embodiment. Fig. 20 It is a perspective view showing the position detection device according to this embodiment.

[0149] Fig.19 The lens module 300 shown in the figure constitutes a part of a camera for a smartphone, for example, and is used in combination with an image sensor 310 using a CMOS sensor or the like. Fig.19 In the example shown, the lens module 300 includes a triangular prism 302, and three lenses 303A, 303B, and 303C disposed between an image sensor 310 and the prism 302. At least one of the lenses 303A, 303B, and 303C is configured to be movable by a driving device (not shown) so as to be capable of at least one of focusing and zooming.

[0150] Fig. 20 303A, 303B, and 303C. The lens module 300 further includes a lens fixing frame 304 and a shaft 305 for fixing the lens 303. In the lens module 300, the position of the lens 303 can be changed in the optical axis direction of the lens 303 by the lens fixing frame 304, the shaft 305, and a driving device (not shown). Fig. 20 In FIG. 1 , the arrow of symbol D indicates the moving direction of the lens 303 .

[0151] The lens module 300 further includes a position detection device 301 for detecting the position of a position-variable lens 303. The position detection device 301 is used to detect the position of the lens 303 when performing focusing and zooming.

[0152] The position detection device 301 is a magnetic position detection device, and includes the magnetic sensor system 1 of this embodiment. In the lens module 300, the magnetic sensor 2 and the magnetic field generator 3 of the magnetic sensor system 1 are configured so that when the position of the lens 303 changes in the moving direction D, the magnetic field component MFx (refer to Figure 2 ) intensity changes. Specifically, the structure is that the magnetic sensor 2 is fixed and the magnetic field generator 3 can move in the moving direction D together with the lens 303. The moving direction D is Figure 1 2 and is parallel to the X direction shown in FIG. 2. Therefore, when the position of the lens 303 changes, the relative position of the magnetic field generator 3 and the magnetic sensor 2 changes, resulting in a change in the intensity of the magnetic field component MFx.

[0153] The position detection device 301 further includes a detection value generation circuit 4 in this embodiment (see Figure 3). In the position detection device 301, based on the first and second detection signals S1 and S2 generated by the magnetic sensor 2, a detection value Vs corresponding to the position of the lens 303 is generated. In addition, the position of the lens 303 and the relative position of the magnetic field generator 3 with respect to the magnetic sensor 2 have a corresponding relationship. The method for generating the detection value Vs in the position detection device 301 is the same as the method for generating the detection value Vs described above.

[0154] (Variation Example)

[0155] Next, a modification of the MR element 50 in the present embodiment will be described. Fig.21 , a first variation of the MR element 50 is described. In the first variation, two soft magnetic layers 50E among a plurality of soft magnetic layers 50E are arranged at positions overlapping with the same MR element 50 when viewed from the Z direction. The two soft magnetic layers 50E are arranged in the X direction and are arranged at a predetermined interval. One of the two soft magnetic layers 50E is located near one end of the laminate film 50A in the -X direction. The other of the two soft magnetic layers 50E is located near one end of the laminate film 50A in the X direction. The two soft magnetic layers 50E are arranged between the laminate film 50A and the magnet pair 50C (the first and second magnets 54, 55). Each of the two soft magnetic layers 50E has a planar shape that is long in the Y direction.

[0156] Next, refer to Fig. 22 , a second modification of the MR element 50 is described. In the second modification, the MR element 50 includes two stacked films 50A1 and 50A2, instead of Figure 7 as well as Figure 8 The stacked film 50A shown in the figure. The respective structures of the stacked films 50A1 and 50A2 are the same as the structure of the stacked film 50A. The stacked films 50A1 and 50A2 are connected in parallel through electrodes to form a stacked film pair. The stacked film pair is connected in series with respect to the stacked films of other MR elements 50 through electrodes. For example, the respective lower surfaces of the stacked films 50A1 and 50A2 are electrically connected to the respective lower surfaces of the stacked films 50A1 and 50A2 of other MR elements 50 through lower electrodes not shown in the figure, and the respective upper surfaces of the stacked films 50A1 and 50A2 are electrically connected to the respective upper surfaces of the stacked films 50A1 and 50A2 of other MR elements 50 through upper electrodes not shown in the figure.

[0157] In the second modification, the first magnet 54 of the magnet pair 50C is located near one end of each of the laminated films 50A1 and 50A2 in the -Y direction. The second magnet 55 is located near one end of each of the laminated films 50A1 and 50A2 in the Y direction. The soft magnetic layer 50E is arranged at a position overlapping with both the laminated films 50A1 and 50A2 as viewed from the Z direction.

[0158] The configurations of the MR element 50, the magnet pair 50C, and the soft magnetic layer 50E are not limited to Figure 7 , Figure 8 , Fig.21 as well as Fig. 22 For example, the number of stacked films included in one MR element 50 is Figure 7 , Figure 8 as well as Fig.21 In the example shown, there is 1. Fig. 22 In the example shown, there are two. However, the number of laminated films may be three or more. Figure 7 , Figure 8 as well as Fig. 22 In the example shown, there is 1. Fig.21 In the example shown, the number of the soft magnetic layers 50E is 2. However, the number of the soft magnetic layers 50E may be 3 or more, or may be 0.

[0159] The following description will be made by taking as an example the case where a plurality of laminated films are arranged along the X direction and a plurality of soft magnetic layers 50E are arranged along the X direction. For example, when the number of laminated films is 2 and the number of soft magnetic layers 50E is 2, the first soft magnetic layer 50E is arranged at a position overlapping with the first laminated film when viewed from the Z direction, and the second soft magnetic layer 50E is arranged at a position overlapping with the second laminated film when viewed from the Z direction.

[0160] In addition, when the number of stacked films is 2 and the number of soft magnetic layers 50E is 3, the first soft magnetic layer 50E may be arranged at a position overlapping only with the first stacked film when viewed from the Z direction, the second soft magnetic layer 50E may be arranged at a position overlapping with both the first stacked film and the second stacked film when viewed from the Z direction, and the third soft magnetic layer 50E may be arranged at a position overlapping only with the second stacked film when viewed from the Z direction.

[0161] In addition, when the number of stacked films is 3 and the number of soft magnetic layers 50E is 2, the first soft magnetic layer 50E may be arranged at a position overlapping with both the first stacked film and the second stacked film as viewed from the Z direction, and the second soft magnetic layer 50E may be arranged at a position overlapping with both the second stacked film and the third stacked film as viewed from the Z direction.

[0162] In addition, when the number of stacked films is 3 and the number of soft magnetic layers 50E is 4, the first soft magnetic layer 50E can be configured at a position overlapping only with the first stacked film when viewed from the Z direction, the second soft magnetic layer 50E can be configured at a position overlapping with both the first stacked film and the second stacked film when viewed from the Z direction, the third soft magnetic layer 50E can be configured at a position overlapping with both the second stacked film and the third stacked film when viewed from the Z direction, and the fourth soft magnetic layer 50E can be configured at a position overlapping only with the third stacked film when viewed from the Z direction.

[0163] The present invention is not limited to the above-mentioned embodiments, and various changes are possible. For example, as long as the conditions of the claims are met, the shape, number, and arrangement of the MR element 50 are not limited to the examples shown in the embodiments, and any form can be adopted. The planar shape of the MR element 50 is not limited to a rectangle, and can also be a circle, an ellipse, etc.

[0164] Each resistor may also have only Figure 6 The element groups 501 to 504 and 509 to 512 in the element groups 501 to 516 shown in FIG. 1 can reduce the components corresponding to the odd-order harmonics of the seventh or lower order contained in the error components.

[0165] The magnetic field generator 3 may also be a rotation ruler with multiple groups of N poles and S poles magnetized in the rotation direction. The rotation ruler may be a ring magnet or may be obtained by fixing a magnetic medium such as a magnetic strip on a ring or a circular plate.

[0166] It is obvious from the above description that various modes and modifications of the present invention can be implemented. Therefore, within the scope of the equivalents of the claims, the present invention can be implemented even in modes other than the above-described best mode.

Claims

1. A magnetic sensor system, characterized in that: A magnetic field generator is provided to generate a magnetic field of an object; and a magnetic sensor for detecting a magnetic field of the object, The magnetic sensor and the magnetic field generator are configured such that when the relative position of the magnetic field generator with respect to the magnetic sensor changes, the intensity of the magnetic field component in the first direction of the target magnetic field detected by the magnetic sensor changes. The magnetic sensor includes a plurality of magnetoresistive effect elements. Each of the plurality of magnetoresistance effect elements comprises: a magnetization fixed layer having magnetization with a fixed direction; a free layer having magnetization with a direction that can be changed according to the direction of the magnetic field component and the intensity of the magnetic field component; and a spacer layer arranged between the magnetization fixed layer and the free layer, and configured so that a bias magnetic field in a second direction orthogonal to the first direction is applied to the free layer, and a resistance value changes according to the intensity of the magnetic field component, The maximum intensity of the magnetic field component applied to each of the plurality of magnetoresistive effect elements is 1.2 times or more the intensity of the bias magnetic field.

2. The magnetic sensor system according to claim 1, characterized in that The maximum intensity of the magnetic field component applied to each of the plurality of magnetoresistive effect elements is 15.6 times or less of the bias magnetic field intensity.

3. The magnetic sensor system according to claim 1, characterized in that The bias magnetic field is generated by one or both of an external magnetic field applied to the free layer from the outside and an anisotropic magnetic field due to anisotropy of the free layer.

4. The magnetic sensor system according to claim 1, characterized in that The magnetic sensor further includes a bias magnetic field generator that generates an external magnetic field applied to the free layer. The bias magnetic field is generated by at least the external magnetic field.

5. The magnetic sensor system according to claim 4, characterized in that The bias magnetic field generator includes a plurality of magnet pairs each consisting of a first magnet and a second magnet. In the plurality of magnet pairs, the first magnet and the second magnet are arranged at a predetermined interval in the second direction so that the external magnetic field is applied to the entire free layer of at least one magnetoresistance effect element among the plurality of magnetoresistance effect elements.

6. The magnetic sensor system according to claim 5, characterized in that The magnetization fixed layer, the free layer, and the spacer layer constitute a stacked film, The laminate film has a width which is a dimension in a direction parallel to the first direction, The width of the laminate film is equal to or smaller than the distance between the first magnet and the second magnet in each of the plurality of magnet pairs.

7. The magnetic sensor system according to claim 1, characterized in that The free layer has shape magnetic anisotropy, The bias magnetic field is generated at least by the shape magnetic anisotropy.

8. The magnetic sensor system according to claim 1, wherein: The magnetic sensor further includes a magnetic field amplifier that amplifies each of the magnetic field components applied to the plurality of magnetoresistive effect elements.

9. The magnetic sensor system according to claim 8, characterized in that The magnetic field amplifier comprises a plurality of soft magnetic layers, Each of the plurality of soft magnetic layers is arranged at a position overlapping at least one of the plurality of magnetoresistance effect elements when viewed from a third direction that is orthogonal to the first direction and the second direction.

10. The magnetic sensor system according to claim 1, wherein: The spacer layer is a tunnel barrier layer.

11. The magnetic sensor system according to claim 1, wherein: The magnetic field generator is a magnetic ruler with multiple groups of N poles and S poles alternately arranged in a specified direction at a specified interval. The magnetic sensor generates a detection signal corresponding to the resistance value of each of the plurality of magnetoresistive effect elements. The detection signal includes: an ideal component that changes periodically in a manner that describes an ideal sine curve; and an error component consisting of multiple higher harmonics of the ideal component, The plurality of magnetoresistive effect elements are arranged in a predetermined pattern based on the predetermined pitch, thereby reducing the error component.

12. The magnetic sensor system according to claim 11, characterized in that The plurality of magnetoresistive effect elements are arranged so as to reduce a component corresponding to at least seventh-order odd harmonics included in the error component.

13. The magnetic sensor system according to claim 1, wherein: The magnetic sensor further includes a detection value generating circuit that generates a detection value corresponding to a relative position of the magnetic field generator with respect to the magnetic sensor based on the resistance value of each of the plurality of magnetoresistive elements.

14. A lens position detection device, characterized in that: The lens position detection device is used to detect the position of a lens with a variable position. A magnetic sensor system according to claim 1, The lens is configured to be movable in the first direction. The magnetic sensor and the magnetic field generator are configured such that when the position of the lens changes, the intensity of the magnetic field component changes.

15. The lens position detection device according to claim 14, wherein: The device further includes a detection value generating circuit configured to generate a detection value corresponding to a position of the lens based on the resistance value of each of the plurality of magnetoresistive effect elements.