Magnetic sensor device

By using multiple magnetoresistive elements and alternating correction processing of the processor in the magnetic sensor, the error problem caused by the magnetic field in the non-detection direction in the multi-directional magnetic field detection is solved, and the detection accuracy is improved.

CN122109945APending Publication Date: 2026-05-29TDK CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TDK CORP
Filing Date
2022-09-21
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing magnetic sensors are susceptible to interference from magnetic fields outside the detection direction when detecting magnetic fields in multiple directions, leading to a decrease in detection accuracy.

Method used

By employing multiple magnetoresistive elements and processors, and alternately performing correction and determination processes, errors in the magnetic field in non-detection directions are reduced, generating accurate magnetic field component detection values.

Benefits of technology

It effectively reduces the impact of non-detection direction magnetic fields on detection accuracy and improves the accuracy of magnetic sensors in multi-directional magnetic field detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122109945A_ABST
    Figure CN122109945A_ABST
Patent Text Reader

Abstract

A magnetic sensor device includes a first detection circuit, a second detection circuit, and a processor. The processor is configured to execute a first generation process of generating a first initial detection value, a second generation process of generating a second initial detection value, a first correction process, a second correction process, and a determination process. The first correction process is a process of correcting and updating the first initial detection value. The second correction process is a process of correcting and updating the second initial detection value. The processor executes the determination process after alternately executing the first correction process and the second correction process.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application was filed on [date]. September 21, 2022 Application number is 202211154982.0 The invention is named Magnetic sensing Device A divisional application of the patent application. Technical Field

[0002] The present invention relates to a magnetic sensor device configured to detect multiple magnetic fields in multiple directions that are different from each other. Background Technology

[0003] In recent years, magnetic sensors using magnetoresistive elements have been employed in various applications. In systems incorporating magnetic sensors, it is sometimes desirable to detect a magnetic field component that includes a direction perpendicular to the surface of the substrate using a magnetoresistive element mounted on a substrate. In such cases, by providing a soft magnetic material that converts the magnetic field perpendicular to the surface of the substrate into a magnetic field parallel to the surface of the substrate, or by arranging the magnetoresistive element on an inclined surface formed on the substrate, it is possible to detect the magnetic field component that includes a direction perpendicular to the surface of the substrate.

[0004] Japanese Patent Application Publication No. 2006-261401 discloses a magnetic sensor in which an X-axis sensor, a Y-axis sensor, and a Z-axis sensor are disposed on a substrate. The magnetoresistive element constituting the Z-axis sensor is disposed on the inclined surface of a protrusion formed on a base film of the substrate.

[0005] In magnetic sensors where the magnetoresistive element is positioned on an inclined surface, a soft magnetic material is not required to convert the magnetic field. However, the soft magnetic material sometimes also functions as a shield. That is, the soft magnetic material is sometimes configured to hardly attenuate the magnetic field in the direction to be detected, but to block or attenuate the magnetic field in a direction opposite to the direction to be detected. Therefore, in magnetic sensors with such a soft magnetic material, or where no shield is provided, the sensitivity of the magnetoresistive element will vary depending on the magnetic field in a direction opposite to the direction to be detected, resulting in a decrease in the detection accuracy of the magnetic sensor. Summary of the Invention

[0006] The object of the present invention is to provide a magnetic sensor device that can reduce the error caused by magnetic fields other than the magnetic field of the object being detected in a magnetic sensor device configured to detect multiple magnetic fields in multiple directions that are different from each other.

[0007] The magnetic sensor device of the present invention comprises: a first detection circuit configured to detect a component of the magnetic field of an object magnetic field in one direction, which is the object of detection, and to generate a first detection signal; a second detection circuit configured to detect a component of the magnetic field of the object in another direction and to generate a second detection signal; and a processor.

[0008] The processor is configured to perform the following processes: a first generation process, generating a first initial detection value using a first detection signal; a second generation process, generating a second initial detection value using a second detection signal; a first correction process, correcting the first initial detection value using a second correction value generated based on the latest second initial detection value, and updating the first initial detection value; a second correction process, correcting the second initial detection value using the first correction value generated based on the latest first initial detection value, and updating the second initial detection value; and a determination process, determining the latest first initial detection value as a first detection value corresponding to a component of the object's magnetic field parallel to a first reference direction, and determining the latest second initial detection value as a second detection value corresponding to a component of the object's magnetic field parallel to a second reference direction. After alternately executing the first correction process and the second correction process, the processor executes the determination process.

[0009] In the magnetic sensor device of the present invention, the processor performs a determination process after alternately executing a first correction process and a second correction process. Therefore, according to the present invention, errors caused by magnetic fields other than the magnetic field of the detected object can be reduced.

[0010] Other objects, features and advantages of the present invention will become fully apparent from the following description. Attached Figure Description

[0011] Figure 1 This is a perspective view of a magnetic sensor device according to a first embodiment of the present invention.

[0012] Figure 2 This is a top view showing the magnetic sensor device according to the first embodiment of the present invention.

[0013] Figure 3 This is a functional block diagram illustrating the structure of the magnetic sensor device according to the first embodiment of the present invention.

[0014] Figure 4 This is a circuit diagram showing the circuit structure of the first detection circuit according to the first embodiment of the present invention.

[0015] Figure 5 This is a circuit diagram showing the circuit structure of the second detection circuit according to the first embodiment of the present invention.

[0016] Figure 6 This is a circuit diagram showing the circuit structure of the third detection circuit according to the first embodiment of the present invention.

[0017] Figure 7 This is a top view showing a portion of the first chip according to the first embodiment of the present invention.

[0018] Figure 8This is a cross-sectional view showing a portion of the first chip according to the first embodiment of the present invention.

[0019] Figure 9 This is a top view showing a portion of the second chip according to the first embodiment of the present invention.

[0020] Figure 10 This is a cross-sectional view showing a portion of the second chip according to the first embodiment of the present invention.

[0021] Figure 11 This is a side view showing the magnetoresistive effect element according to the first embodiment of the present invention.

[0022] Figure 12 This is a functional block diagram illustrating the structure of the processor according to the first embodiment of the present invention.

[0023] Figure 13 This is a circuit diagram showing the circuit structure of the first detection circuit according to the second embodiment of the present invention.

[0024] Figure 14 This is a circuit diagram showing the circuit structure of the second detection circuit according to the second embodiment of the present invention.

[0025] Figure 15 This is a circuit diagram showing the circuit structure of the third detection circuit according to the second embodiment of the present invention.

[0026] Figure 16 This is a functional block diagram illustrating the structure of the magnetic sensor device according to the third embodiment of the present invention.

[0027] Figure 17 This is a circuit diagram showing the circuit structure of the first detection circuit according to the third embodiment of the present invention.

[0028] Figure 18 This is a circuit diagram showing the circuit structure of the second detection circuit according to the third embodiment of the present invention.

[0029] Figure 19 This is a circuit diagram showing the circuit structure of the third detection circuit according to the third embodiment of the present invention.

[0030] Figure 20 This is a perspective view showing a plurality of magnetoresistive elements and a plurality of magnetic yokes according to a third embodiment of the present invention.

[0031] Figure 21 This is a side view showing a plurality of magnetoresistive effect elements and a plurality of magnetic yokes according to a third embodiment of the present invention.

[0032] Figure 22 This is a functional block diagram illustrating the structure of the processor according to the third embodiment of the present invention. Detailed Implementation

[0033] [First Implementation]

[0034] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. First, referring to... Figures 1-3 The structure of the magnetic sensor device according to the first embodiment of the present invention will be described. Figure 1 This is a perspective view of the magnetic sensor device 100. Figure 2 This is a top view of the magnetic sensor device 100. Figure 3 This is a functional block diagram showing the structure of the magnetic sensor device 100. The magnetic sensor device 100 includes a magnetic sensor 1.

[0035] The magnetic sensor device 100 includes a first chip 2, a second chip 3, and a support 4 supporting the first and second chips 2 and 3. The magnetic sensor 1 is composed of the first chip 2 and the second chip 3. The first chip 2, the second chip 3, and the support 4 are all cuboid in shape. The support 4 has a reference plane 4a as its upper surface, a lower surface located on the opposite side of the reference plane 4a, and four side surfaces connecting the reference plane 4a and the lower surface.

[0036] Here, refer to Figure 1 and Figure 2 The reference coordinate system of this embodiment will be explained below. The reference coordinate system is a coordinate system based on the magnetic sensor device 100, and is an orthogonal coordinate system defined by three axes. In the reference coordinate system, the X direction, Y direction, and Z direction are defined. The X direction, Y direction, and Z direction are orthogonal to each other. In this embodiment, the direction perpendicular to the reference plane 4a of the support body 4, that is, the direction from the lower surface of the support body 4 toward the reference plane 4a, is specifically defined as the Z direction. Furthermore, the direction opposite to the X direction is defined as the -X direction, the direction opposite to the Y direction is defined as the -Y direction, and the direction opposite to the Z direction is defined as the -Z direction. The three axes of the reference coordinate system are defined as axes parallel to the X direction, axes parallel to the Y direction, and axes parallel to the Z direction.

[0037] Hereinafter, the position in front of the reference point in the Z direction will be referred to as "above," and the position opposite to "above" relative to the reference point will be referred to as "below." Furthermore, for the constituent elements of the magnetic sensor device 100, the surface located at one end in the Z direction will be referred to as the "upper surface," and the surface located at one end in the -Z direction will be referred to as the "lower surface." Additionally, the expression "when viewed from the Z direction" refers to viewing the object from a position separated along the Z direction.

[0038] The first chip 2 has an upper surface 2a and a lower surface located on opposite sides, and four side surfaces connecting the upper surface 2a and the lower surface. The second chip 3 has an upper surface 3a and a lower surface located on opposite sides, and four side surfaces connecting the upper surface 3a and the lower surface.

[0039] The first chip 2 is mounted on the reference plane 4a with its lower surface facing the reference plane 4a of the support 4. The second chip 3 is mounted on the reference plane 4a with its lower surface facing the reference plane 4a of the support 4. The first chip 2 and the second chip 3 are respectively bonded to the support 4 by, for example, adhesives 6 and 7.

[0040] The first chip 2 has a plurality of first electrode pads 21 disposed on its upper surface 2a. The second chip 3 has a plurality of second electrode pads 31 disposed on its upper surface 3a. The support 4 has a plurality of third electrode pads disposed on a reference plane 4a. Although not shown, in the magnetic sensor device 100, two corresponding electrode pads of the plurality of first electrode pads 21, the plurality of second electrode pads 31, and the plurality of third electrode pads are interconnected by bonding wires.

[0041] Here, the dimension perpendicular to the reference plane 4a is referred to as the thickness. For example... Figure 1 As shown, the thickness of the first chip 2 and the thickness of the second chip 3 can also be the same. Alternatively, the thickness of the support 4 can be greater than the thickness of both the first chip 2 and the second chip 3.

[0042] The magnetic sensor 1 includes a first detection circuit 10, a second detection circuit 20, and a third detection circuit 30. The first chip 2 includes the first detection circuit 10. The second chip 3 includes the second detection circuit 20 and the third detection circuit 30. Since the magnetic sensor 1 is a component of the magnetic sensor device 100, it can also be said that the magnetic sensor device 100 includes the first to third detection circuits 10, 20, and 30.

[0043] The magnetic sensor device 100 also includes a processor 40. The support 4 contains the processor 40. The first to third detection circuits 10, 20, 30 and the processor 40 are connected via a plurality of first electrode pads 21, a plurality of second electrode pads 31, a plurality of third electrode pads and a plurality of bonding wires.

[0044] The first to third detection circuits 10, 20, and 30 each include multiple magnetic gas detection elements, which are configured to generate at least one detection signal based on the magnetic field of the detected object. In this embodiment, in particular, the multiple magnetic gas detection elements are multiple magnetoresistive elements. Hereinafter, magnetoresistive elements will be referred to as MR elements.

[0045] The processor 40 is configured to process multiple detection signals generated by the first to third detection circuits 10, 20, and 30 to generate a first detection value, a second detection value, and a third detection value that correspond to the components of the magnetic field in three distinct directions at a predetermined reference position. In this embodiment, the three distinct directions are specifically two directions parallel to the XY plane and a direction parallel to the Z direction. The processor 40 is, for example, constructed from an application-specific integrated circuit (ASIC).

[0046] Next, refer to Figures 3 to 10 The first to third detection circuits 10, 20 and 30 will be described. Figure 4 This is a circuit diagram showing the circuit structure of the first detection circuit 10. Figure 5 This is a circuit diagram showing the circuit structure of the second detection circuit 20. Figure 6 This is a circuit diagram showing the circuit structure of the third detection circuit 30. Figure 7 This is a top view showing a portion of the first chip 2. Figure 8 This is a cross-sectional view showing a portion of the first chip 2. Figure 9 This is a top view showing a portion of the second chip 3. Figure 10 This is a cross-sectional view showing a portion of the second chip 3.

[0047] Here, as Figure 7 and Figure 9 As shown, the U direction and V direction are defined as follows. The U direction is the direction of rotation from the X direction toward the -Y direction. The V direction is the direction of rotation from the Y direction toward the X direction. In this embodiment, the U direction is specifically defined as the direction of rotation α from the X direction toward the -Y direction, and the V direction is defined as the direction of rotation α from the Y direction toward the X direction. Furthermore, α is an angle greater than 0° and less than 90°. In one example, α is 45°. In addition, the direction opposite to the U direction is defined as the -U direction, and the direction opposite to the V direction is defined as the -V direction.

[0048] In this embodiment, the U direction corresponds to the "first reference direction" of the present invention. Additionally, in this embodiment, the V direction corresponds to the "second reference direction" of the present invention. Both the first reference direction (U direction) and the second reference direction (V direction) are parallel to and orthogonal to the reference plane 4a.

[0049] In addition, such as Figure 10As shown, the W1 and W2 directions are defined as follows. The W1 direction is the direction of rotation from the V direction toward the -Z direction. The W2 direction is the direction of rotation from the V direction toward the Z direction. In this embodiment, the W1 direction is specifically defined as the direction of rotation β from the V direction toward the -Z direction, and the W2 direction is defined as the direction of rotation β from the V direction toward the Z direction. Furthermore, β is an angle greater than 0° and less than 90°. In addition, the direction opposite to the W1 direction is defined as the -W1 direction, and the direction opposite to the W2 direction is defined as the -W2 direction. The W1 and W2 directions are both orthogonal to the U direction.

[0050] The first detection circuit 10 is configured to detect the component of the object's magnetic field parallel to the U direction and generate at least one first detection signal corresponding to that component. The second detection circuit 20 is configured to detect the component of the object's magnetic field parallel to the W1 direction and generate at least one second detection signal corresponding to that component. The third detection circuit 30 is configured to detect the component of the object's magnetic field parallel to the W2 direction and generate at least one third detection signal corresponding to that component.

[0051] like Figure 4 As shown, the first detection circuit 10 includes a power supply terminal V1, a ground terminal G1, signal output terminals E11 and E12, a first resistor R11, a second resistor R12, a third resistor R13, and a fourth resistor R14. The multiple MR elements of the first detection circuit 10 constitute the first to fourth resistors R11, R12, R13, and R14.

[0052] The first and second resistors R11 and R12 are connected along the path that electrically connects the first node P11 and the second node P12, i.e., the first path ( Figure 4 The third and fourth resistors R13 and R14 are connected in series on the other path that electrically connects the first node P11 and the second node P12, namely the second path (…). Figure 4 Connected in series on the path on the right side of the text.

[0053] The first and fourth resistors, R11 and R14, are connected to the first node P11. The second and third resistors, R12 and R13, are connected to the second node P12. The first node P11 is connected to the power supply terminal V1. The second node P12 is connected to the ground terminal G1. The connection point of the first resistor R11 and the second resistor R12 is connected to the signal output terminal E11. The connection point of the third resistor R13 and the fourth resistor R14 is connected to the signal output terminal E12.

[0054] like Figure 5As shown, the second detection circuit 20 includes a power supply terminal V2, a ground terminal G2, signal output terminals E21 and E22, a first resistor R21, a second resistor R22, a third resistor R23, and a fourth resistor R24. The multiple MR elements of the second detection circuit 20 constitute the first to fourth resistors R21, R22, R23, and R24.

[0055] The circuit structure of the second detection circuit 20 is basically the same as that of the first detection circuit 10. If the power supply terminal V1, ground terminal G1, signal output terminals E11, E12, resistors R11, R12, R13, R14 and nodes P11, P12 in the description of the circuit structure of the first detection circuit 10 are replaced with the power supply terminal V2, ground terminal G2, signal output terminals E21, E22, resistors R21, R22, R23, R24 and nodes P21, P22 respectively, then the circuit structure of the second detection circuit 20 is described.

[0056] like Figure 6 As shown, the third detection circuit 30 includes a power supply terminal V3, a ground terminal G3, signal output terminals E31 and E32, a first resistor R31, a second resistor R32, a third resistor R33, and a fourth resistor R34. The multiple MR elements of the third detection circuit 30 constitute the first to fourth resistors R31, R32, R33, and R34.

[0057] The circuit structure of the third detection circuit 30 is basically the same as that of the first detection circuit 10. If the power supply terminal V1, ground terminal G1, signal output terminals E11, E12, resistors R11, R12, R13, R14 and nodes P11, P12 in the description of the circuit structure of the first detection circuit 10 are replaced with the power supply terminal V3, ground terminal G3, signal output terminals E31, E32, resistors R31, R32, R33, R34 and nodes P31, P32 respectively, then the circuit structure of the third detection circuit 30 is described.

[0058] Apply a specified voltage or current to each of the power supply terminals V1 to V3. Grounding terminals G1 to G3 are each grounded.

[0059] Hereinafter, the plurality of MR elements in the first detection circuit 10 will be referred to as a plurality of first MR elements 50A, the plurality of MR elements in the second detection circuit 20 will be referred to as a plurality of second MR elements 50B, and the plurality of MR elements in the third detection circuit 30 will be referred to as a plurality of third MR elements 50C. Since the first to third detection circuits 10, 20, and 30 are constituent elements of the magnetic sensor 1, it can also be said that the magnetic sensor 1 includes a plurality of first MR elements 50A, a plurality of second MR elements 50B, and a plurality of third MR elements 50C. Furthermore, any MR element will be designated by the symbol 50.

[0060] Figure 11 This is a side view of the MR element 50. The MR element 50 is a spin-valve type MR element. The MR element 50 has: a magnetized fixed layer 52 with a fixed orientation, a magnetized free layer 54 with an orientation that can vary according to the direction of the object's magnetic field, and a gap layer 53 disposed between the magnetized fixed layer 52 and the free layer 54. The MR element 50 can be a TMR (tunneling magnetoresistance) element or a GMR (giant magnetoresistance) element. In a TMR element, the gap layer 53 is a tunnel barrier layer. In a GMR element, the gap layer 53 is a non-magnetic conductive layer. In the MR element 50, the resistance value varies according to the angle between the magnetization direction of the free layer 54 and the magnetization direction of the magnetized fixed layer 52. The resistance value is at its minimum when the angle is 0° and at its maximum when the angle is 180°. In each MR element 50, the free layer 54 has an anisotropic shape with its easy magnetization axis orthogonal to the magnetization direction of the magnetized fixed layer 52. Furthermore, as a method for setting a predefined direction for the easily magnetized axis in the free layer 54, a magnet that applies a bias magnetic field to the free layer 54 can also be used.

[0061] The MR element 50 also has an antiferromagnetic layer 51. The antiferromagnetic layer 51, the magnetization fixation layer 52, the gap layer 53, and the free layer 54 are sequentially stacked. The antiferromagnetic layer 51 is made of an antiferromagnetic material and generates exchange coupling with the magnetization fixation layer 52, fixing the magnetization direction of the magnetization fixation layer 52. Alternatively, the magnetization fixation layer 52 can be a so-called self-pinned fixation layer (SFP layer). A self-pinned fixation layer has a stacked iron structure consisting of a ferromagnetic layer, a non-magnetic intermediate layer, and a ferromagnetic layer, where two ferromagnetic layers are antiferromagnetically coupled. When the magnetization fixation layer 52 is a self-pinned fixation layer, the antiferromagnetic layer 51 can be omitted.

[0062] Furthermore, the arrangement of layers 51-54 in MR element 50 can also be consistent with... Figure 11 The configuration shown is reversed from top to bottom.

[0063] exist Figures 4-6 In the diagram, solid arrows indicate the direction of magnetization of the magnetized fixed layer 52 of the MR element 50. Hollow arrows indicate the direction of magnetization of the free layer 54 of the MR element 50 when no target magnetic field is applied to the MR element 50.

[0064] Here, the first magnetization direction, the second magnetization direction, the third magnetization direction, and the fourth magnetization direction are defined as follows: The first magnetization direction is a direction that intersects an axis parallel to the Z-direction (hereinafter referred to as the Z-axis). The second magnetization direction is a direction that intersects the Z-axis, i.e., a direction opposite to the first magnetization direction. The third magnetization direction is a direction that intersects the Z-axis, i.e., a direction orthogonal to the first magnetization direction. The fourth magnetization direction is a direction that intersects the Z-axis, i.e., a direction opposite to the third magnetization direction.

[0065] In the first detection circuit 10, the first magnetization direction is the U direction, the second magnetization direction is the -U direction, the third magnetization direction is the V direction, and the fourth magnetization direction is the -V direction. Figure 4 In the example shown, the magnetization of the magnetization fixing layer 52 in each of the first and third resistor sections R11 and R13 includes a component in the first magnetization direction (U direction). The magnetization of the magnetization fixing layer 52 in each of the second and fourth resistor sections R12 and R14 includes a component in the second magnetization direction (-U direction).

[0066] In addition, Figure 4 In the example shown, when no target magnetic field is applied to the first MR element 50A, the magnetization of the free layer 54 in each of the first and second resistive sections R11 and R12 includes a component in the third magnetization direction (V direction). When no target magnetic field is applied to the first MR element 50A, the magnetization of the free layer 54 in each of the third and fourth resistive sections R13 and R14 includes a component in the fourth magnetization direction (-V direction).

[0067] Furthermore, when the magnetization of the magnetization fixing layer 52 includes a component with a specific magnetization direction, this component with the specific magnetization direction may also be the principal component of the magnetization of the magnetization fixing layer 52. Alternatively, the magnetization of the magnetization fixing layer 52 may not contain a component with a direction orthogonal to the specific magnetization direction. In this embodiment, when the magnetization of the magnetization fixing layer 52 includes a component with a specific magnetization direction, the direction of the magnetization of the magnetization fixing layer 52 becomes a specific magnetization direction or a substantially specific magnetization direction.

[0068] Similarly, if the magnetization of the free layer 54 without applying an object magnetic field includes a component of a specific magnetization direction, that component of the specific magnetization direction may also be the principal component of the magnetization of the free layer 54. Alternatively, the magnetization of the free layer 54 in the above-described case may not contain a component of a direction orthogonal to the specific magnetization direction. In this embodiment, when the magnetization of the free layer 54 in the above-described case includes a component of a specific magnetization direction, the direction of the magnetization of the free layer 54 in the above-described case becomes a specific magnetization direction or a substantially specific magnetization direction.

[0069] The first detection circuit 10 is configured such that, in the absence of an applied magnetic field, the magnetization of the free layer 54 is in the direction described above. Specifically, the free layer 54 of each of the plurality of first MR elements 50A in the first detection circuit 10 has a shape anisotropy in which the easy magnetization axis is parallel to the third magnetization direction (V direction). Furthermore, the direction parallel to the third magnetization direction (V direction) is also parallel to the fourth magnetization direction (-V direction).

[0070] In the second detection circuit 20, the first magnetization direction is the W1 direction, the second magnetization direction is the -W1 direction, the third magnetization direction is the U direction, and the fourth magnetization direction is the -U direction. If the description of the magnetization direction of the magnetization fixed layer 52 and the magnetization direction of the free layer 54 in the first detection circuit 10 is replaced by the description of the first detection circuit 10, resistors R11, R12, R13, R14, first MR element 50A, U direction, -U direction, V direction, and -V direction, respectively, with the description of the magnetization direction of the magnetization fixed layer 52 and the magnetization direction of the free layer 54 in the second detection circuit 20, then this becomes the description of the magnetization direction of the magnetization fixed layer 52 and the magnetization direction of the free layer 54 in the second detection circuit 20.

[0071] In the third detection circuit 30, the first magnetization direction is the W2 direction, the second magnetization direction is the -W2 direction, the third magnetization direction is the U direction, and the fourth magnetization direction is the -U direction. If the description of the magnetization direction of the magnetization fixed layer 52 and the magnetization direction of the free layer 54 in the first detection circuit 10 is replaced by the description of the first detection circuit 10, resistors R11, R12, R13, R14, first MR element 50A, U direction, -U direction, V direction, and -V direction, respectively, with the description of the magnetization direction of the magnetization fixed layer 52 and the magnetization direction of the free layer 54 in the third detection circuit 30, then this becomes the description of the magnetization direction of the magnetization fixed layer 52 and the magnetization direction of the free layer 54 in the third detection circuit 30.

[0072] The magnetic sensor 1 includes a magnetic field generator configured to apply a magnetic field of a predetermined direction to the free layers 54 of each of a plurality of first MR elements 50A, a plurality of second MR elements 50B, and a plurality of third MR elements 50C. In this embodiment, the magnetic field generator includes a first coil 70 that applies a magnetic field of a predetermined direction to the free layers 54 of each of the first MR elements 50A, and a second coil 80 that applies a magnetic field of a predetermined direction to the free layers 54 of each of the plurality of second MR elements 50B and the plurality of third MR elements 50C. A first chip 2 includes the first coil 70. A second chip 3 includes the second coil 80.

[0073] The specific structures of the first chip 2 and the second chip 3 are described in detail below. First, refer to... Figure 7 and Figure 8 The structure of the first chip 2 will be described. Figure 8 Indicates in Figure 7 A portion of the cross section at the location indicated by line 8-8.

[0074] The first chip 2 includes: a substrate 201 having an upper surface 201a, insulating layers 202, 203, 204, 207, 208, 209, and 210, a plurality of lower electrodes 61A, a plurality of upper electrodes 62A, a plurality of lower coil elements 71, and a plurality of upper coil elements 72. The upper surface 201a of the substrate 201 is configured to be parallel to the XY plane. The Z direction is also a direction perpendicular to the upper surface 201a of the substrate 201. Furthermore, the coil elements are part of the winding of the coil.

[0075] An insulating layer 202 is disposed on a substrate 201. A plurality of lower coil elements 71 are disposed on the insulating layer 202. An insulating layer 203 is disposed on the insulating layer 202 around the plurality of lower coil elements 71. An insulating layer 204 is disposed on the plurality of lower coil elements 71 and the insulating layer 203.

[0076] Multiple lower electrodes 61A are disposed on insulating layer 204. Insulating layer 207 is disposed on insulating layer 204 around the multiple lower electrodes 61A. Multiple first MR elements 50A are disposed on the multiple lower electrodes 61A. Insulating layer 208 is disposed on the multiple lower electrodes 61A and insulating layer 207 around the multiple first MR elements 50A. Multiple upper electrodes 62A are disposed on the multiple first MR elements 50A and insulating layer 208. Insulating layer 209 is disposed on insulating layer 208 around the multiple upper electrodes 62A.

[0077] An insulating layer 210 is disposed over a plurality of upper electrodes 62A and an insulating layer 209. A plurality of upper coil elements 72 are disposed over the insulating layer 210. The first chip 2 may also further include an insulating layer (not shown) covering the plurality of upper coil elements 72 and the insulating layer 210. Furthermore, in Figure 7 The image shows the insulating layer 204, multiple first MR elements 50A, and multiple upper coil elements 72 among the constituent elements of the first chip 2.

[0078] The upper surface 201a of the substrate 201 is parallel to the XY plane, and the upper surfaces of the plurality of lower electrodes 61A are also parallel to the XY plane. Therefore, in the above-described state, it can be said that the plurality of first MR elements 50A are arranged on a plane parallel to the XY plane.

[0079] like Figure 7As shown, multiple first MR elements 50A are arranged in multiples along the U direction and multiples along the V direction. The multiple first MR elements 50A are connected in series via multiple lower electrodes 61A and multiple upper electrodes 62A. Furthermore, when viewed from the Z direction, adjacent first MR elements 50A may or may not be offset along a direction parallel to the V direction.

[0080] Here, refer to Figure 11 The connection method of multiple first MR elements 50A is described in detail. Figure 11 In the diagram, symbol 61 represents the lower electrode corresponding to any MR element 50, and symbol 62 represents the upper electrode corresponding to any MR element 50. For example... Figure 11 As shown, each lower electrode 61 has an elongated shape. A gap is formed between two adjacent lower electrodes 61 along their long sides. MR elements 50 are disposed near both ends of the upper surface of the lower electrodes 61 along their long sides. Furthermore, each upper electrode 62 has an elongated shape, and two adjacent MR elements 50 disposed on adjacent lower electrodes 61 along their long sides are electrically connected to each other.

[0081] Although not shown, one MR element 50 located at one end of a column of multiple MR elements 50 arranged in a row is connected to another MR element 50 located at one end of a column of other multiple MR elements 50 adjacent to it in a direction intersecting the long side direction of the lower electrode 61. These two MR elements 50 are interconnected via an electrode not shown. The electrode not shown could also be an electrode connecting the lower surfaces or upper surfaces of the two MR elements 50 to each other.

[0082] exist Figure 11 When the MR element 50 shown is the first MR element 50A, Figure 11 The lower electrode 61 shown corresponds to the lower electrode 61A. Figure 11 The upper electrode 62 shown corresponds to the upper electrode 62A. Furthermore, in this case, the long side direction of the lower electrode 61 is parallel to the V direction.

[0083] Furthermore, in this embodiment, a laminated film comprising an antiferromagnetic layer 51, a magnetization fixing layer 52, a gap layer 53, and a free layer 54 is described as the MR element 50. However, a component comprising this laminated film, a lower electrode 61, and an upper electrode 62 may also be used as the MR element in this embodiment. The laminated film comprises multiple magnetic films.

[0084] Each of the plurality of upper coil elements 72 extends in a direction parallel to the Y direction. Furthermore, the plurality of upper coil elements 72 are arranged in a manner aligned along the X direction. In this embodiment, particularly when viewed from the Z direction, two upper coil elements 72 overlap with each of the plurality of first MR elements 50A.

[0085] Each of the multiple lower coil elements 71 extends in a direction parallel to the Y direction. Furthermore, the multiple lower coil elements 71 are arranged in a manner aligned along the X direction. The shape and arrangement of the multiple lower coil elements 71 may be the same as or different from the shape and arrangement of the multiple upper coil elements 72.

[0086] exist Figure 7 and Figure 8 In the example shown, multiple lower coil elements 71 and multiple upper coil elements 72 are electrically connected in such a way that they form a first coil 70 that applies a magnetic field parallel to the X-direction to the free layers 54 of each of the multiple first MR elements 50A. Alternatively, the first coil 70 may be configured to, for example, apply an X-direction magnetic field to the free layers 54 in the first and second resistive sections R11 and R12, and an -X-direction magnetic field to the free layers 54 in the third and fourth resistive sections R13 and R14. Furthermore, the first coil 70 may also be controlled by the processor 40.

[0087] Next, refer to Figure 9 and Figure 10 The structure of the second chip 3 will be explained. Figure 10 Indicates in Figure 9 A portion of the cross section at the location indicated by the 10-10 line.

[0088] The second chip 3 includes a substrate 301 with an upper surface 301a, insulating layers 302, 303, 304, 305, 307, 308, 309, and 310, multiple lower electrodes 61B and 61C, multiple upper electrodes 62B and 62C, multiple lower coil elements 81, and multiple upper coil elements 82. The upper surface 301a of the substrate 301 is parallel to the XY plane. The Z direction is also a direction perpendicular to the upper surface 301a of the substrate 301.

[0089] An insulating layer 302 is disposed on a substrate 301. A plurality of lower coil elements 81 are disposed on the insulating layer 302. An insulating layer 303 is disposed on the insulating layer 302 around the plurality of lower coil elements 81. Insulating layers 304 and 305 are sequentially stacked on the plurality of lower coil elements 81 and the insulating layer 303.

[0090] Multiple lower electrodes 61B and multiple lower electrodes 61C are disposed on insulating layer 305. Insulating layer 307 is disposed on insulating layer 305 around the multiple lower electrodes 61B and around the multiple lower electrodes 61C. Multiple second MR elements 50B are disposed on the multiple lower electrodes 61B. Multiple third MR elements 50C are disposed on the multiple lower electrodes 61C. Insulating layer 308 is disposed on the multiple lower electrodes 61B, the multiple lower electrodes 61C, and insulating layer 307 around the multiple second MR elements 50B and around the multiple third MR elements 50C. Multiple upper electrodes 62B are disposed on the multiple second MR elements 50B and insulating layer 308. Multiple upper electrodes 62C are disposed on the multiple third MR elements 50C and insulating layer 308. Insulating layer 309 is disposed on insulating layer 308 around the multiple upper electrodes 62B and around the multiple upper electrodes 62C.

[0091] An insulating layer 310 is disposed over a plurality of upper electrodes 62B, a plurality of upper electrodes 62C, and an insulating layer 309. A plurality of upper coil elements 82 are disposed over the insulating layer 310. The second chip 3 may also further include an insulating layer (not shown) covering the plurality of upper coil elements 82 and the insulating layer 310.

[0092] The second chip 3 includes a support member supporting a plurality of second MR elements 50B and a plurality of third MR elements 50C. The support member has at least one inclined surface that is tilted relative to the upper surface 301a of the substrate 301. In this embodiment, the support member is specifically formed of an insulating layer 305. Furthermore, in… Figure 9 The diagram shows the components of the second chip 3, including an insulating layer 305, multiple second MR elements 50B, multiple third MR elements 50C, and multiple upper coil elements 82.

[0093] The insulating layer 305 has a plurality of convex surfaces 305c extending in a direction (Z direction) away from the upper surface 301a of the substrate 301. Each of the plurality of convex surfaces 305c extends in a direction parallel to the U direction. The overall shape of the convex surfaces 305c is such that... Figure 10 The triangular shape of the convex surface 305c shown is a triangular roof shape formed by moving it along a direction parallel to the U direction. In addition, multiple convex surfaces 305c are arranged along a direction parallel to the V direction.

[0094] Each of the plurality of convex surfaces 305c has an upper end portion furthest from the upper surface 301a of the substrate 301. In this embodiment, the upper end portions of each of the plurality of convex surfaces 305c extend in a direction parallel to the U direction. Here, we focus on any one of the plurality of convex surfaces 305c. The convex surface 305c includes a first inclined surface 305a and a second inclined surface 305b. The first inclined surface 305a is the surface of the convex surface 305c that is closer to the V direction side than the upper end portion of the convex surface 305c. The second inclined surface 305b is the surface of the convex surface 305c that is closer to the -V direction side than the upper end portion of the convex surface 305c. The upper end portion of the convex surface 305c may also be the boundary between the first inclined surface 305a and the second inclined surface 305b.

[0095] The upper surface 301a of the substrate 301 is parallel to the XY plane. The first inclined surface 305a and the second inclined surface 305b are each inclined relative to the upper surface 301a of the substrate 301, i.e., the XY plane. In a cross section perpendicular to the upper surface 301a of the substrate 301, the distance between the first inclined surface 305a and the second inclined surface 305b decreases as one moves away from the upper surface 301a of the substrate 301.

[0096] In this embodiment, because there are multiple convex surfaces 305c, there are also multiple first inclined surfaces 305a and multiple second inclined surfaces 305b. The insulating layer 305 has multiple first inclined surfaces 305a and multiple second inclined surfaces 305b.

[0097] The insulating layer 305 includes a plurality of protrusions projecting in the Z direction. Each of the protrusions extends in a direction parallel to the U direction. The convex surface 305c is formed by the upper surface of the insulating layer 305. In addition, the plurality of protrusions are arranged in a direction parallel to the V direction.

[0098] Multiple lower electrodes 61B are disposed on multiple first inclined surfaces 305a. Multiple lower electrodes 61C are disposed on multiple second inclined surfaces 305b. As described above, since the first inclined surfaces 305a and the second inclined surfaces 305b are each inclined relative to the upper surface 301a of the substrate 301, i.e., the XY plane, the upper surfaces of each of the multiple lower electrodes 61B and the multiple lower electrodes 61C are also inclined relative to the XY plane. Therefore, it can be said that multiple second MR elements 50B and multiple third MR elements 50C are disposed on inclined surfaces inclined relative to the XY plane. The insulating layer 305 is a component for supporting each of the multiple second MR elements 50B and the multiple third MR elements 50C in an inclined manner relative to the XY plane.

[0099] In this embodiment, each of the plurality of first inclined surfaces 305a is a plane parallel to the U direction and the W1 direction. Each of the plurality of second inclined surfaces 305b is a plane parallel to the U direction and the W2 direction.

[0100] Although not shown, the insulating layer 305 also has a flat surface surrounding the plurality of convex surfaces 305c. The plurality of convex surfaces 305c may also protrude from the flat surface in the Z direction. Alternatively, the plurality of convex surfaces 305c may be arranged at predetermined intervals such that a flat surface is formed between adjacent convex surfaces 305c. Alternatively, the insulating layer 305 may also have a groove recessed from the flat surface in the -Z direction. In this case, the plurality of convex surfaces 305c may also exist within the groove.

[0101] Alternatively, the convex surface 305c can also be a semi-cylindrical curved surface formed by moving the curved shape (arch shape) along a direction parallel to the U direction. In this case, the first inclined surface 305a becomes a curved surface. The second MR element 50B is bent along the curved surface (first inclined surface 305a). Even in this case, for convenience, the magnetization direction of the magnetization fixing layer 52 of the second MR element 50B is defined as a linear direction as described above. Similarly, the second inclined surface 305b becomes a curved surface. The third MR element 50C is bent along the curved surface (second inclined surface 305b). Even in this case, for convenience, the magnetization direction of the magnetization fixing layer 52 of the third MR element 50C is defined as a linear direction as described above.

[0102] like Figure 9 As shown, a plurality of second MR elements 50B are arranged in multiples along both the U and V directions. On a first inclined surface 305a, the plurality of second MR elements 50B are arranged in a column. Similarly, a plurality of third MR elements 50C are arranged in multiples along both the U and V directions. On a second inclined surface 305b, a plurality of third MR elements 50C are arranged in a column. In this embodiment, the columns of the plurality of second MR elements 50B and the columns of the plurality of third MR elements 50C are alternately arranged in a direction parallel to the V direction.

[0103] Furthermore, when viewed from the Z direction, adjacent second MR elements 50B and third MR elements 50C can be offset along a direction parallel to the U direction, or they can be offset directly. Additionally, when viewed from the Z direction, two adjacent second MR elements 50B separated by one third MR element 50C can also be offset along a direction parallel to the U direction, or they can be offset directly. Furthermore, when viewed from the Z direction, two adjacent third MR elements 50C separated by one second MR element 50B can also be offset along a direction parallel to the U direction, or they can be offset directly.

[0104] Multiple second MR elements 50B are connected in series via multiple lower electrodes 61B and multiple upper electrodes 62B. The above description of the connection method for multiple first MR elements 50A also applies to the connection method for multiple second MR elements 50B. Figure 11When the MR element 50 shown is the second MR element 50B, Figure 11 The lower electrode 61 shown corresponds to the lower electrode 61B. Figure 11 The upper electrode 62 shown corresponds to the upper electrode 62B. Furthermore, in this case, the long side direction of the lower electrode 61 is parallel to the U direction.

[0105] Similarly, multiple third MR elements 50C are connected in series via multiple lower electrodes 61C and multiple upper electrodes 62C. The above description of the connection method for multiple first MR elements 50A also applies to the connection method for multiple third MR elements 50C. Figure 11 In the case where the MR element 50 shown is the third MR element 50C, Figure 11 The lower electrode 61 shown corresponds to the lower electrode 61C. Figure 11 The upper electrode 62 shown corresponds to the upper electrode 62C. Furthermore, in this case, the long side direction of the lower electrode 61 is parallel to the U direction.

[0106] Each of the multiple upper coil elements 82 extends in a direction parallel to the Y direction. Furthermore, the multiple upper coil elements 82 are arranged in a manner aligned along the X direction. In this embodiment, particularly when viewed from the Z direction, two upper coil elements 82 overlap with each of the multiple second MR elements 50B and the multiple third MR elements 50C.

[0107] Each of the multiple lower coil elements 81 extends in a direction parallel to the Y direction. Furthermore, the multiple lower coil elements 81 are arranged in a manner aligned along the X direction. The shape and arrangement of the multiple lower coil elements 81 may be the same as or different from the shape and arrangement of the multiple upper coil elements 82.

[0108] exist Figure 9 and Figure 10 In the example shown, multiple lower coil elements 81 and multiple upper coil elements 82 are electrically connected to form a second coil 80 that applies a magnetic field parallel to the X-direction to the free layers 54 of each of the multiple second MR elements 50B and the multiple third MR elements 50C. Alternatively, the second coil 80 may be configured to, for example, apply an X-direction magnetic field to the free layers 54 in the first and second resistor sections R21, R22 of the second detection circuit 20 and the first and second resistor sections R31, R32 of the third detection circuit 30, and apply a -X-direction magnetic field to the free layers 54 in the third and fourth resistor sections R23, R24 of the second detection circuit 20 and the third and fourth resistor sections R33, R34 of the third detection circuit 30. Furthermore, the second coil 80 may also be controlled by the processor 40.

[0109] Next, the first to third detection signals will be explained. First, refer to... Figure 4 The first detection signal will now be explained. When the intensity of the component of the object's magnetic field parallel to the U direction changes, the resistance values ​​of the resistors R11 to R14 of the first detection circuit 10 change as follows: as the resistance values ​​of resistors R11 and R13 increase, the resistance values ​​of resistors R12 and R14 decrease, or as the resistance values ​​of resistors R11 and R13 decrease, the resistance values ​​of resistors R12 and R14 increase. Consequently, the potentials of the signal output terminals E11 and E12 change. The first detection circuit 10 is configured to generate a first detection signal S11 corresponding to the potential of the signal output terminal E11, and to generate a first detection signal S12 corresponding to the potential of the signal output terminal E12.

[0110] Next, refer to Figure 5 The second detection signal will now be explained. When the intensity of the component of the object's magnetic field parallel to the W1 direction changes, the resistance values ​​of the resistors R21 to R24 in the second detection circuit 20 change as follows: the resistance values ​​of resistors R21 and R23 increase while the resistance values ​​of resistors R22 and R24 decrease, or the resistance values ​​of resistors R22 and R24 decrease while the resistance values ​​of resistors R21 and R23 decrease. Consequently, the potentials of the signal output terminals E21 and E22 change. The second detection circuit 20 is configured to generate a second detection signal S21 corresponding to the potential of the signal output terminal E21, and to generate a second detection signal S22 corresponding to the potential of the signal output terminal E22.

[0111] Next, refer to Figure 6 The third detection signal will now be explained. When the intensity of the component of the object's magnetic field parallel to the W2 direction changes, the resistance values ​​of the resistors R31 to R34 in the third detection circuit 30 change as follows: as the resistance values ​​of resistors R31 and R33 increase, the resistance values ​​of resistors R32 and R34 decrease, or as the resistance values ​​of resistors R31 and R33 decrease, the resistance values ​​of resistors R32 and R34 increase. Consequently, the potentials of the signal output terminals E31 and E32 change. The third detection circuit 30 is configured to generate a third detection signal S31 corresponding to the potential of the signal output terminal E31, and to generate a third detection signal S32 corresponding to the potential of the signal output terminal E32.

[0112] Next, the structure and operation of the processor 40 will be described. The processor 40 is configured to generate a first detection value based on first detection signals S11 and S12, and to generate a second and third detection value based on second detection signals S21 and S22 and third detection signals S31 and S32. The first detection value corresponds to the component of the object's magnetic field parallel to the U direction. The second detection value corresponds to the component of the object's magnetic field parallel to the V direction. The third detection value corresponds to the component of the object's magnetic field parallel to the Z direction. Hereinafter, the first detection value will be represented by the symbol Su, the second detection value by the symbol Sv, and the third detection value by the symbol Sz.

[0113] Figure 12 This is a functional block diagram representing the structure of processor 40. Processor 40 includes a first arithmetic circuit 41, a second arithmetic circuit 42, and a correction circuit 43. The first arithmetic circuit 41 is configured to perform a first generation process. The first generation process is the process of generating a first initial detection value Sup corresponding to the first detection value Su using first detection signals S11 and S12.

[0114] In this embodiment, the first arithmetic circuit 41 generates a first initial detection value Sup by performing an operation that includes calculating the difference S11-S12 between the first detection signal S11 and the first detection signal S12. The first initial detection value Sup can be the difference S11-S12 itself, or it can be a value to which a predetermined correction such as gain adjustment and offset adjustment has been applied to the difference S11-S12.

[0115] The second operational circuit 42 is configured to perform at least a portion of the second generation process. The second generation process includes generating a second initial detection value Svp corresponding to the second detection value Sv and generating a third initial detection value Szp corresponding to the third detection value Sz. In the process of generating the second initial detection value Svp, at least the second detection signals S21 and S22 are used. In this embodiment, the second detection signals S21 and S22 and the third detection signals S31 and S32 are used in both the process of generating the second initial detection value Svp and the process of generating the third initial detection value Szp.

[0116] In this embodiment, the second generation process includes a first process, a second process, and a third process. The first process is the process of generating a first value S1 using the second detection signals S21 and S22. The second process is the process of generating a second value S2 using the third detection signals S31 and S32. The third process is the process of generating a second initial detection value Svp and a third initial detection value Szp using the first value S1 and the second value S2.

[0117] In this embodiment, the second arithmetic circuit 42 is specifically configured to perform a first process and a second process. The first process generates a first value S1 by performing an operation that includes calculating the difference S21-S22 between the second detection signal S21 and the second detection signal S22. The second process generates a second value S2 by performing an operation that includes calculating the difference S31-S32 between the third detection signal S31 and the third detection signal S32.

[0118] The third process includes the calculation of values ​​S3 and S4 using the following formulas (1) and (2).

[0119] S3=(S2+S1) / (2cosα)……(1)

[0120] S4=(S2-S1) / (2sinα)……(2)

[0121] The third process also includes generating second and third initial detection values ​​Svp and Szp using values ​​S3 and S4. The second initial detection value Svp generated by the third process can be value S3 itself, or a value of value S3 with specified corrections such as gain adjustment and offset adjustment applied. Similarly, the third initial detection value Szp generated by the third process can be value S4 itself, or a value of value S4 with specified corrections such as gain adjustment and offset adjustment applied.

[0122] The correction circuit 43 uses the first to third initial detection values ​​Sup, Svp, and Szp to generate the first to third detection values ​​Su, Sv, and Sz. In this embodiment, in particular, the correction circuit 43 is configured to perform a third process, a first correction process, a second correction process, and a determination process for generating the first to third detection values ​​Su, Sv, and Sz.

[0123] In the first correction process, the first initial detection value Sup is updated more than once. Hereinafter, the last updated first initial detection value Sup will be referred to as the latest first initial detection value Sup. Furthermore, for convenience, the first initial detection value Sup after the first generation process and before the first first correction process will also be referred to as the latest first initial detection value Sup.

[0124] In the second correction process, the second initial detection value Svp and the third initial detection value Szp are each updated more than once. Hereinafter, the last updated second initial detection value Svp will be referred to as the latest second initial detection value Svp, and the last updated third initial detection value Szp will be referred to as the latest third initial detection value Szp.

[0125] The first correction process is to use the second correction value Svc generated based on the latest second initial detection value Svp to correct the first initial detection value Sup (the latest first initial detection value Sup) and update the first initial detection value Sup.

[0126] The second correction value Svc can also be calculated by multiplying the latest second initial detection value Svp by the second correction coefficient. Hereinafter, the last calculated second correction value Svc will be referred to as the latest second correction value Svc. The first correction process can also be a process of calculating (updating) the first initial detection value Sup by substituting the latest first initial detection value Sup and the latest second correction value Svc into an expression using the first initial detection value Sup and the second correction value Svc. The above expression can also include a first operation and a second operation, where the first operation multiplies the latest first initial detection value Sup by the second correction value Svc, and the second operation adds the value obtained through the first operation to the latest first initial detection value Sup or subtracts it from the latest first initial detection value Sup.

[0127] The second correction process involves using a first correction value Suc generated based on the latest first initial detection value Sup to correct the second initial detection value Svp (the latest second initial detection value Svp) and the third initial detection value Szp (the latest third initial detection value Szp), and updating the second and third initial detection values ​​Svp and Szp. In this embodiment, the second correction process specifically includes a fourth process, a fifth process, and a sixth process. The fourth process involves using the first correction value Suc to correct and update the first and second values ​​S1 and S2. The fifth process involves generating the second and third initial detection values ​​Svp and Szp using the latest first and second values ​​S1 and S2. The sixth process involves updating the second and third initial detection values ​​Svp and Szp using the second and third initial detection values ​​Svp and Szp generated by the fifth process. Furthermore, the latest first value S1 refers to the last updated first value S1. Additionally, the latest second value S2 refers to the last updated second value S2. For convenience, the first value S1 and the second value S2 after the first and second processes are executed and before the first third process is executed are also referred to as the latest first value S1 and the latest second value S2, respectively.

[0128] The content of the fifth process is essentially the same as the third process of the second generation process. That is, the second correction process essentially includes the third process of the second generation process. The fifth process includes the process of calculating the values ​​S3 and S4 using the latest first and second values ​​S1 and S2 and equations (1) and (2) and the process of generating the second and third initial detection values ​​Svp and Szp using the values ​​S3 and S4.

[0129] The first correction value Suc can also be a value calculated by multiplying the latest first initial detection value Sup by the first correction coefficient. Hereinafter, the last calculated first correction value Suc will be referred to as the latest first correction value Suc. The fourth process of the second correction process can also be as follows: the first value S1 is calculated (updated) by substituting the latest first value S1 and the latest first correction value Suc into the first expression expressed using the first value S1 and the first correction value Suc; the second value S2 is calculated (updated) by substituting the latest second value S2 and the latest first correction value Suc into the second expression expressed using the second value S2 and the first correction value Suc. The first expression can also be an expression including a third operation and a fourth operation, wherein the third operation includes multiplying the latest first value S1 by the first correction value Suc, and the fourth operation adds the value obtained through the third operation to the latest first value S1 or subtracts it from the latest first value S1. The second expression can also be an expression that includes a fifth operation and a sixth operation. The fifth operation includes multiplying the latest second value S2 by the first correction value Suc, and the sixth operation adds the value obtained through the fifth operation to the latest second value S2 or subtracts it from the latest second value S2.

[0130] The determination process is as follows: the latest first initial detection value Sup is determined as the first detection value Su, the latest second initial detection value Svp is determined as the second detection value Sv, and the latest third initial detection value Szp is determined as the third detection value Sz. The correction circuit 43 executes the determination process after alternating between the first and second correction processes at least once. The correction circuit 43 can execute the first and second correction processes once each, twice each, or three or more times each.

[0131] The correction circuit 43 can also be executed before the update of the second and third initial detection values ​​Svp and Szp. That is, the correction circuit 43 can also execute the first second correction process before executing the first first correction process.

[0132] The first second correction process is executed after the first and second processes of the second generation process. Furthermore, as mentioned above, the second correction process essentially includes the third process of the second generation process. Therefore, by executing the first second correction process, the second generation process is essentially executed.

[0133] Furthermore, the architecture of processor 40 is not limited to Figure 12The example shown. For instance, the first arithmetic circuit 41, the second arithmetic circuit 42, and the correction circuit 43 can essentially be a single circuit. In this case, a single circuit can be configured to perform all the processes executed by the first arithmetic circuit 41, the second arithmetic circuit 42, and the correction circuit 43. Alternatively, instead of providing a correction circuit 43, the first arithmetic circuit 41 can perform a portion of the processing executed by the correction circuit 43 (processing related to the first initial detection value Sup and the first detection value Su), and the second arithmetic circuit 42 can perform the remaining portion of the processing executed by the correction circuit 43 (processing related to the second and third initial detection values ​​Svp and Szp, and the second and third detection values ​​Sv and Sz). In this case, it can also be configured to transmit and receive the first and second initial detection values ​​Sup and Svp between the first arithmetic circuit 41 and the second arithmetic circuit 42.

[0134] Next, the effects of the series of processes performed by the correction circuit 43 will be explained. First, the first to third detection circuits of the comparative example will be explained. The structure of the first detection circuit of the comparative example, except for the magnetization direction of the free layer 54 of each of the multiple first MR elements 50A when no object magnetic field is applied to the multiple first MR elements 50A, is similar to... Figure 4 The structure of the first detection circuit 10 shown is the same. In the first detection circuit of the comparative example, under the above-described condition, the magnetization direction of the free layer 54 is the V direction in all of the plurality of first MR elements 50A.

[0135] The structure of the comparative example's second detection circuit, except for the magnetization direction of the free layer 54 of each of the multiple second MR elements 50B when no object magnetic field is applied to the multiple second MR elements 50B, is similar to... Figure 5 The structure of the second detection circuit 20 shown is the same. In the comparative example's second detection circuit, under the above-described condition, the magnetization direction of the free layer 54 is the U direction in all of the plurality of second MR elements 50B.

[0136] The structure of the comparative example's third detection circuit, except for the magnetization direction of the free layer 54 of each of the multiple third MR elements 50C when no object magnetic field is applied to the multiple third MR elements 50C, is similar to... Figure 6 The structure of the third detection circuit 30 shown is the same. In the third detection circuit of the comparative example, under the above-described condition, the magnetization direction of the free layer 54 is the U direction in all of the plurality of third MR elements 50C.

[0137] In the first detection circuit of the comparative example, the magnetic field in the direction parallel to the V direction (the component of the object magnetic field in the direction parallel to the V direction) essentially has the effect of changing the anisotropic magnetic field whose shape is anisotropic based on the easy magnetization axis direction being parallel to the V direction. This anisotropic magnetic field acts on the magnetization of the free layer 54. Therefore, in the first detection circuit of the comparative example, the direction of magnetization of the free layer 54 when detecting the component of the object magnetic field in the direction parallel to the U direction changes depending on the presence or absence of the magnetic field in the direction parallel to the V direction or the change in its intensity. As a result, the first detection signals S11 and S12 deviate from the first detection signals S11 and S12 when detecting the component of the object magnetic field in the direction parallel to the U direction in the absence of the magnetic field in the direction parallel to the V direction. Consequently, the difference S11-S12, which is essentially equivalent to the first detection value Su, also deviates.

[0138] In contrast, in this embodiment, the magnetization direction of the free layer 54 is different for each resistive section. Specifically, the magnetization direction of the free layer 54 is set so that deviations in the first detection signals S11 and S12 caused by a magnetic field parallel to the V direction can be offset when calculating the difference S11-S12. Therefore, according to this embodiment, deviations in the difference S11-S12 caused by a magnetic field parallel to the V direction can be suppressed. Consequently, according to this embodiment, the error in the first detection value Su caused by a magnetic field parallel to the V direction can be reduced.

[0139] The description of the first detection circuit in the comparative example also applies to the second and third detection circuits in the comparative example. In the second detection circuit of the comparative example, the second detection signals S21 and S22 deviate from the second detection signals S21 and S22 when a component of the target magnetic field parallel to the W1 direction is detected in the absence of a magnetic field parallel to the U direction, resulting in a deviation in the first value S1. Similarly, in the third detection circuit of the comparative example, the third detection signals S31 and S32 deviate from the third detection signals S31 and S32 when a component of the target magnetic field parallel to the W2 direction is detected in the absence of a magnetic field parallel to the U direction, resulting in a deviation in the second value S2. Therefore, the value S3, which is substantially equivalent to the second detection value Sv, and the value S4, which is substantially equivalent to the third detection value Sz, also deviate. In contrast, according to this embodiment, the deviation of values ​​S3 and S4 caused by a magnetic field parallel to the U direction can be suppressed. As a result, according to this embodiment, the errors in the second and third detection values ​​Sv and Sz caused by a magnetic field parallel to the U direction can be reduced.

[0140] The series of processes performed by the correction circuit 43 are for further suppressing the deviations of the suppressed differences S11-S12 (i.e., the deviation of the first initial detection value Sup), the deviation of value S3 (i.e., the deviation of the second initial detection value Svp), and the deviation of value S4 (i.e., the deviation of the third initial detection value Szp) as described above. In the first correction process, the first initial detection value Sup is corrected using the second initial detection value Svp, which corresponds to the strength of the component of the object's magnetic field parallel to the V direction. The first initial detection value Sup can be corrected based on the presence or absence of the magnetic field in the direction parallel to the V direction, or its strength, by using the second initial detection value Svp. Specifically, because the second correction value Svp varies based on the presence or absence of the magnetic field in the direction parallel to the V direction, or its strength, the first initial detection value Sup can be corrected with high precision.

[0141] The second correction coefficient, or the formula expressed using the first initial detection value Sup and the second correction value Svc described above, can also be defined as follows: as the deviation of the first initial detection value Sup increases, the correction amount of the first initial detection value Sup also increases, and the sign of the correction amount of the first initial detection value Sup changes depending on whether the first initial detection value Sup deviates in a decreasing or increasing manner. For example, if the first initial detection value Sup deviates in a decreasing manner, the correction amount of the first initial detection value Sup, equivalent to the decrease in the first initial detection value Sup, can be added to the first initial detection value Sup. Conversely, if the first initial detection value Sup deviates in an increasing manner, the correction amount of the first initial detection value Sup, equivalent to the increase in the first initial detection value Sup, can be subtracted from the first initial detection value Sup.

[0142] The above explanation of the first correction process also applies to the second correction process. That is, in the second correction process, the first and second values ​​S1 and S2 are corrected using a first initial detection value Sup that corresponds to the strength of the component of the object's magnetic field parallel to the U direction. Thus, essentially, the second and third initial detection values ​​Svp and Szp are corrected using the first initial detection value Sup that corresponds to the strength of the component of the object's magnetic field parallel to the U direction. The first and second values ​​S1 and S2 (the second and third initial detection values ​​Svp and Szp) can be corrected based on the presence or absence of a magnetic field parallel to the U direction or its change in strength by using the first initial detection value Sup. Specifically, because the first correction value Suc changes based on the presence or absence of a magnetic field parallel to the U direction or its change in strength, the first and second values ​​S1 and S2 (the second and third initial detection values ​​Svp and Szp) can be corrected with high precision.

[0143] The first correction coefficient, or the first and second equations mentioned above, can also be defined as follows: as the deviation of the second initial detection value Svp increases, the correction amount of the second initial detection value Svp increases, and the sign of the correction amount of the second initial detection value Svp changes depending on whether the second initial detection value Svp deviates in a decreasing manner or in an increasing manner.

[0144] Alternatively, a first correction factor and a second correction factor can be pre-selected to suppress deviations in the first initial detection value Sup, the second initial detection value Svp, and the third initial detection value Szp. The first and second correction factors can also be determined based on multiple measurement results using numerical analysis or similar methods.

[0145] Furthermore, if the first and second correction processes are to be applied to the first and third initial detection values ​​Sup, Svp, and Szp generated by the first to third detection circuits of the comparative example, it is necessary to change the sign of the first and second correction coefficients and the content of the first and second correction processes according to the direction of the applied magnetic field. In contrast, in this embodiment, the same first and second correction processes can be applied regardless of the direction of the applied magnetic field, which simplifies the structure of the correction circuit 43 and the content of the first and second correction processes.

[0146] However, as a method to suppress deviations in the first to third initial detection values ​​Sup, Svp, and Szp, it is considered to provide a shield made of magnetic material so that a magnetic field other than the detection object is not applied to each of the first to third detection circuits 10, 20, and 30. For example, it is considered to provide a shield in the first detection circuit 10, which is configured such that the magnetic field in the direction parallel to the U direction is hardly attenuated, but the magnetic field in the direction parallel to the V direction is blocked or attenuated. Similarly, it is considered to provide shields in the second and third detection circuits 20 and 30, which are configured such that the magnetic field in the direction parallel to the W1 direction and the magnetic field in the direction parallel to the W2 direction is almost attenuated, but the magnetic field in the direction parallel to the U direction is blocked or attenuated. However, in this embodiment, deviations in the first to third initial detection values ​​Sup, Svp, and Szp are suppressed without providing shields in each of the first to third detection circuits 10, 20, and 30. Therefore, according to this embodiment, the structure of the magnetic sensor 1 can be simplified.

[0147] In this embodiment, the first initial detection value Sup is generated using first detection signals S11 and S12, which are generated by detecting the component of the object's magnetic field in the direction parallel to the reference plane 4a (i.e., the XY plane) (the component of the object's magnetic field in the direction parallel to the U direction). The second and third initial detection values ​​Svp and Szp are generated using second detection signals S21 and S22 and third detection signals S31 and S32, which are generated by detecting the component of the object's magnetic field in one direction inclined relative to the reference plane 4a (i.e., the XY plane) (the component of the object's magnetic field in the direction parallel to the W1 direction) and the component of the object's magnetic field in another direction inclined relative to the reference plane 4a (i.e., the XY plane) (the component of the object's magnetic field in the direction parallel to the W2 direction). Thus, in this embodiment, the characteristic is that deviations of the first to third initial detection values ​​Sup, Svp, and Szp generated by detecting the component of the object's magnetic field in the direction parallel to the XY plane and the component in the direction inclined relative to the XY plane are suppressed.

[0148] Furthermore, as described above, in this embodiment, the detection value corresponding to the component of the object magnetic field parallel to the U direction (first initial detection value Sup) is generated by detecting the component of the object magnetic field parallel to the U direction. However, the detection value corresponding to the component of the object magnetic field parallel to the V direction (second initial detection value Svp) is not generated by detecting the component of the object magnetic field parallel to the V direction, and the detection value corresponding to the component of the object magnetic field parallel to the Z direction (third initial detection value Szp) is also not generated by detecting the component of the object magnetic field parallel to the Z direction. Therefore, in this embodiment, sometimes the first initial detection value Sup can be generated with higher accuracy compared to the second and third initial detection values ​​Svp and Szp. In this case, by performing a second correction process using the first initial detection value Sup before performing the first correction process, the first to third initial detection values ​​Sup, Svp, and Szp can be updated with higher accuracy.

[0149] Furthermore, in this embodiment, the first detection circuit 10 that generates the first detection signals S11 and S12 is included in the first chip 2, and the second detection circuit 20 that generates the second detection signals S21 and S22 and the third detection circuit 30 that generates the third detection signals S31 and S32 are included in the second chip 3. Thus, in this embodiment, the characteristic is that deviations of the first to third initial detection values ​​Sup, Svp, and Szp generated using the detection circuits contained in two physically separate chips are suppressed.

[0150] Next, the simulation results for investigating the error of the second detection value Sv will be explained. In the simulation, an object magnetic field containing at least components in the U direction and the V direction is applied to the magnetic sensor device 100, generating first to third detection values ​​Su, Sv, and Sz. Furthermore, in the simulation, correction differences S11-S12 and values ​​S3 and S4 are generated, representing the strength of the component of the object magnetic field parallel to the U direction, the component of the object magnetic field parallel to the V direction, and the component of the object magnetic field parallel to the Z direction, respectively, to generate first to third initial detection values ​​Sup, Svp, and Szp. In addition, in the simulation, a first second correction process is performed before the first first correction process is performed.

[0151] In the simulation, each time the second correction process and the first correction process are executed alternately, a determination process is performed to generate the first to third detection values ​​Su, Sv, and Sz. Furthermore, the error of the second detection value Sv is calculated by dividing the difference between the intensity of the V-direction component of the object's magnetic field and the second detection value Sv by the intensity of the V-direction component of the object's magnetic field.

[0152] Furthermore, in the simulation, a third process, the second generation process, is performed before the first and second correction processes. A second initial detection value Svp is obtained, and the error of the second detection value Sv when the first and second correction processes have each been executed zero times is calculated based on this second initial detection value Svp. Specifically, the error of the second detection value Sv when the first and second correction processes have each been executed zero times is calculated by dividing the difference between the intensity of the V-direction component of the object's magnetic field and the aforementioned second initial detection value Svp by the intensity of the V-direction component of the object's magnetic field. The error of the second detection value Sv when the first and second correction processes have each been executed zero times is 3.54%.

[0153] Furthermore, the error of the second detection value Sv when the first and second correction processes are each executed once is 0.13%. Additionally, the error of the second detection value Sv when the first and second correction processes are each executed twice and three times is 0%.

[0154] Based on the simulation results, it can be understood that by executing the first and second correction processes once each, the error of the second detection value Sv can be reduced. Furthermore, by executing the first and second correction processes twice each, the error of the second detection value Sv can be reduced to approximately zero. Moreover, even if the first and second correction processes are executed three times each, the error of the second detection value Sv remains approximately zero. From the viewpoint of processor 40 load, it is preferable that the first and second correction processes are executed twice each.

[0155] The above description of the second detection value Sv also applies to the first detection value Su and the third detection value Sz.

[0156] [Second Implementation]

[0157] Next, the magnetic sensor device according to the second embodiment of the present invention will be described. In this embodiment, the magnetization direction of the free layer 54 of the MR element 50 is different from that in the first embodiment.

[0158] Hereinafter, the magnetization direction of the free layer 54 of the MR element 50 will be described using the first to fourth magnetization directions defined in the first embodiment. Figure 13 This is a circuit diagram showing the circuit structure of the first detection circuit 10. Figure 14 This is a circuit diagram showing the circuit structure of the second detection circuit 20. Figure 15 This is a circuit diagram showing the circuit structure of the third detection circuit 30.

[0159] Similar to the first embodiment, in the first detection circuit 10, the first magnetization direction is the U direction, the second magnetization direction is the -U direction, the third magnetization direction is the V direction, and the fourth magnetization direction is the -V direction. In this embodiment, when no target magnetic field is applied to the first MR element 50A, the magnetization of the free layer 54 in each of the first and fourth resistive sections R11 and R14 includes a component of the third magnetization direction (V direction). When no target magnetic field is applied to the first MR element 50A, the magnetization of the free layer 54 in each of the second and third resistive sections R12 and R13 includes a component of the fourth magnetization direction (-V direction).

[0160] In addition, in this embodiment, the first coil 70 (refer to...) Figure 3 It can also be configured such that, for example, a magnetic field in the X direction is applied to the free layer 54 in the first and fourth resistor sections R11 and R14, and a magnetic field in the -X direction is applied to the free layer 54 in the second and third resistor sections R12 and R13.

[0161] Similarly to the first embodiment, in the second detection circuit 20, the first magnetization direction is the W1 direction, the second magnetization direction is the -W1 direction, the third magnetization direction is the U direction, and the fourth magnetization direction is the -U direction. In this embodiment, when no target magnetic field is applied to the second MR element 50B, the magnetization of the free layer 54 in each of the first and fourth resistive sections R21 and R24 includes a component of the third magnetization direction (U direction). When no target magnetic field is applied to the second MR element 50B, the magnetization of the free layer 54 in each of the second and third resistive sections R22 and R23 includes a component of the fourth magnetization direction (-U direction).

[0162] Similarly to the first embodiment, in the third detection circuit 30, the first magnetization direction is the W2 direction, the second magnetization direction is the -W2 direction, the third magnetization direction is the U direction, and the fourth magnetization direction is the -U direction. In this embodiment, when no target magnetic field is applied to the third MR element 50C, the magnetization of the free layer 54 in each of the first and fourth resistive sections R31 and R34 includes a component of the third magnetization direction (U direction). When no target magnetic field is applied to the third MR element 50C, the magnetization of the free layer 54 in each of the second and third resistive sections R32 and R33 includes a component of the fourth magnetization direction (-U direction).

[0163] In addition, in this embodiment, the second coil 80 (refer to...) Figure 3 It can also be configured such that, for example, a magnetic field in the X direction can be applied to the free layer 54 in the first and fourth resistor sections R21 and R24 of the second detection circuit 20 and the first and fourth resistor sections R31 and R34 of the third detection circuit 30, and a magnetic field in the -X direction can be applied to the free layer 54 in the second and third resistor sections R22 and R23 of the second detection circuit 20 and the second and third resistor sections R32 and R33 of the third detection circuit 30.

[0164] The other structures, functions, and effects of this embodiment are the same as those of the first embodiment.

[0165] [Third Implementation]

[0166] Next, a third embodiment of the present invention will be described. The magnetic sensor device 100 of this embodiment is composed of a magnetic sensor 101 of this embodiment and a processor 40 described in the first embodiment. The magnetic sensor 101 may also have the same external shape as the first chip 2 or the second chip 3 of the first embodiment.

[0167] The following is for reference Figures 16-19 The structure of the magnetic sensor 101 in this embodiment will be described. Figure 16 This is a functional block diagram showing the structure of the magnetic sensor device 100 in this embodiment. Figure 17 This is a circuit diagram showing the circuit structure of the first detection circuit in this embodiment. Figure 18 This is a circuit diagram showing the circuit structure of the second detection circuit in this embodiment. Figure 19 This is a circuit diagram showing the circuit structure of the third detection circuit in this embodiment.

[0168] The magnetic sensor 101 includes a first detection circuit 110, a second detection circuit 120, and a third detection circuit 130. Each of the first to third detection circuits 110, 120, and 130 includes multiple MR elements.

[0169] The first detection circuit 110 is configured to detect the component of the magnetic field of the target object in the direction parallel to the U direction, and generates first detection signals S111 and S112 corresponding to this component. The second detection circuit 120 is configured to detect the component of the magnetic field of the target object in the direction parallel to the V direction, and generates second detection signals S121 and S122 corresponding to this component. The third detection circuit 130 is configured to detect the component of the magnetic field of the target object in the direction parallel to the Z direction, and generates third detection signals S131 and S132 corresponding to this component.

[0170] The circuit structure of the first detection circuit 110 is basically the same as that of the first detection circuit 10 in the first embodiment. Figure 17 In the diagram, the symbols R111, R112, R113, and R114 represent the first to fourth resistor sections of the first detection circuit 10, which correspond to the first to fourth resistor sections R11, R12, R13, and R14, respectively.

[0171] The circuit structure of the second detection circuit 120 is basically the same as that of the second detection circuit 20 in the first embodiment. Figure 18 In the diagram, the symbols R121, R122, R123, and R124 represent the first to fourth resistor sections of the second detection circuit 120, which correspond to the first to fourth resistor sections R21, R22, R23, and R24 of the second detection circuit 20, respectively.

[0172] The circuit structure of the third detection circuit 130 is basically the same as that of the third detection circuit 30 in the first embodiment. Figure 19 In the diagram, the symbols R131, R132, R133, and R134 represent the first to fourth resistor sections of the third detection circuit 130, which correspond to the first to fourth resistor sections R31, R32, R33, and R34 of the third detection circuit 30, respectively.

[0173] The resistive sections R111-R114, R121-R124, and R131-R134 are composed of multiple MR elements. Hereinafter, the multiple MR elements of the magnetic sensor 101 will be represented by the symbol 150. The structure of the MR element 150 may also be the same as the structure of the MR element 50 described in the first embodiment. That is, the MR element 150 has at least a magnetization fixing layer 52, a free layer 54, and a gap layer 53 (see reference 53). Figure 11 ).

[0174] exist Figures 17-19 In the diagram, the solid arrow indicates the direction of magnetization of the magnetization fixing layer 52 of the MR element 150. Figure 17In the example shown, the magnetization direction of the magnetization fixing layer 52 in each of the first and third resistor sections R111 and R113 is the U direction. The magnetization direction of the magnetization fixing layer 52 in each of the second and fourth resistor sections R112 and R114 is the -U direction. In addition, the free layer 54 of each of the plurality of MR elements 150 in the first detection circuit 110 has a shape anisotropy in which the easy magnetization axis is parallel to the V direction.

[0175] exist Figure 18 In the example shown, the magnetization direction of the magnetization fixing layer 52 in each of the first and third resistor sections R121 and R123 is the V direction. The magnetization direction of the magnetization fixing layer 52 in each of the second and fourth resistor sections R122 and R124 is the -V direction. In addition, the free layer 54 of each of the plurality of MR elements 150 in the second detection circuit 120 has a shape anisotropy in which the easy magnetization axis is parallel to the U direction.

[0176] The free layer 54 of each of the multiple MR elements 150 in the third detection circuit 130 has an anisotropic shape with its easy magnetization axis direction parallel to the V direction. The magnetization direction of the magnetization fixed layer 52 in the third detection circuit 130 will be explained later.

[0177] Next, the specific structure of the magnetic sensor 101 will be described. The magnetic sensor 101 includes a substrate having an upper surface, a first part including a first detection circuit 110, a second part including a second detection circuit 120, and a third part including a third detection circuit 130. The upper surface of the substrate is parallel to the XY plane. The first to third parts are formed on the substrate. The structures of the first part and the second part are the same as those of the first chip 2 (except for the substrate 201) described in the first embodiment. The plurality of MR elements 150 included in the first part each have a shape that is elongated in the V direction. The plurality of MR elements 150 included in the second part each have a shape that is elongated in the U direction. Furthermore, the first and second parts may or may not include the first coil 70 described in the first embodiment.

[0178] Next, refer to Figure 20 and Figure 21 The structure of the third part of the magnetic sensor 101 will be described. Figure 20 It is a three-dimensional diagram showing multiple MR elements 150 and multiple magnetic yokes. Figure 21 This is a side view showing multiple MR elements 150 and multiple magnetic yokes.

[0179] The structure of the third part is basically the same as that of the first part. The third part also includes multiple magnetic yokes 151, each made of soft magnetic material. Each of the multiple magnetic yokes 151 may also have a cuboid shape that is longer in the V direction. Each of the multiple magnetic yokes 151 is configured to receive an input magnetic field that includes an input magnetic field component in a direction parallel to the Z direction and generate an output magnetic field. The output magnetic field includes an output magnetic field component in a direction parallel to the U direction, that is, an output magnetic field component that varies according to the input magnetic field component.

[0180] Each of the plurality of magnetic yokes 151 has a first end face 151a and a second end face 151b located at both ends in a direction parallel to the U direction. In each of the plurality of magnetic yokes 151, the first end face 151a is located at one end of the magnetic yoke 151 in the -U direction, and the second end face 151b is located at one end of the magnetic yoke 151 in the U direction. Furthermore, the plurality of magnetic yokes 151 are arranged in a direction parallel to the U direction.

[0181] like Figure 20 and Figure 21 As shown, in the third part, multiple MR elements 150 are arranged in a row along the first end face 150a, and multiple MR elements 150 are arranged in a row along the second end face 150b. Hereinafter, the multiple MR elements 150 arranged along the first end face 150a will be represented by the symbol 150A, and the multiple MR elements 150 arranged along the second end face 150b will be represented by the symbol 150B. In the third part, the multiple MR elements 150A and the multiple MR elements 150B are arranged in an alternating manner in a direction parallel to the U direction. When viewed from above, the multiple MR elements 150A and the multiple MR elements 150B may not overlap with the multiple yokes 151.

[0182] Although not illustrated, the third part also includes multiple first lower electrodes, multiple second lower electrodes, multiple first upper electrodes, and multiple second upper electrodes. Multiple MR elements 150A are connected in series via the multiple first lower electrodes and the multiple first upper electrodes. Multiple MR elements 150B are connected in series via the multiple second lower electrodes and the multiple second upper electrodes.

[0183] Next, the multiple magnetic yokes 151 will be described in detail. When the direction of the input magnetic field component is the Z direction, the direction of the output magnetic field component received by each of the multiple MR elements 150A is the U direction, and the direction of the output magnetic field component received by each of the multiple MR elements 150B is the -U direction. When the direction of the input magnetic field component is the -Z direction, the direction of the output magnetic field component received by each of the multiple MR elements 150A is the -U direction, and the direction of the output magnetic field component received by each of the multiple MR elements 150B is the U direction.

[0184] Next, the first to third detection signals of this embodiment will be described. First, the first detection signal will be briefly described. The resistance values ​​of the resistors R111 to R114 of the first detection circuit 110 change in the same way as the resistance values ​​of the resistors R11 to R14 of the first detection circuit 10 described in the first embodiment. The first detection circuit 110 is configured to generate a first detection signal S111 as a signal corresponding to the potential of the signal output terminal E11, and to generate a first detection signal S112 as a signal corresponding to the potential of the signal output terminal E12.

[0185] Next, refer to Figure 18 The second detection signal will now be explained. When the intensity of the component of the object's magnetic field parallel to the V direction changes, the resistance values ​​of the resistors R121 to R124 in the second detection circuit 120 change as follows: as the resistance values ​​of resistors R121 and R123 increase, the resistance values ​​of resistors R122 and R124 decrease, or as the resistance values ​​of resistors R121 and R123 decrease, the resistance values ​​of resistors R122 and R124 increase. Consequently, the potentials of the signal output terminals E21 and E22 change. The second detection circuit 120 is configured to generate a second detection signal S121 corresponding to the potential of the signal output terminal E21, and to generate a second detection signal S122 corresponding to the potential of the signal output terminal E22.

[0186] Next, refer to Figures 19-21 The third detection signal will be explained below. The first resistor section R131 and the second resistor section R132 are composed of multiple MR elements 150A. The third resistor section R133 and the fourth resistor section R134 are composed of multiple MR elements 150B.

[0187] Here, a region where the plurality of MR elements 150 constituting the third detection circuit 130 are arranged is divided into a first region and a second region. The plurality of MR elements 150A constituting the first resistive section R131 and the plurality of MR elements 150B constituting the fourth resistive section R134 may also be arranged in the first region. The plurality of MR elements 150A constituting the second resistive section R132 and the plurality of MR elements 150B constituting the third resistive section R133 may also be arranged in the second region.

[0188] The magnetization direction of the magnetization fixing layer 52 in the first and fourth resistor sections R131 and R134 is the U direction. The magnetization direction of the magnetization fixing layer 52 in the second and third resistor sections R132 and R133 is the -U direction.

[0189] When the direction of the input magnetic field component is the Z direction, the direction of the output magnetic field component received by the plurality of MR elements 150A in the first and second resistor sections R131 and R132 becomes the U direction, and the direction of the output magnetic field component received by the plurality of MR elements 150B in the third and fourth resistor sections R133 and R134 becomes the -U direction. In this case, compared with the state where there is no output magnetic field component, the resistance values ​​of the plurality of MR elements 150A in the first resistor section R131 and the plurality of MR elements 150B in the third resistor section R133 decrease, and the resistance values ​​of the first and third resistor sections R131 and R133 also decrease. In addition, compared with the state where there is no output magnetic field component, the resistance values ​​of the respective MR elements 150A in the second resistor section R132 and the plurality of MR elements 150B in the fourth resistor section R134 increase, and the resistance values ​​of the second and fourth resistor sections R132 and R134 also increase.

[0190] When the direction of the input magnetic field component is in the -Z direction, the direction of the output magnetic field component and the change in the resistance values ​​of the first to fourth resistors R131 to R134 are opposite to those when the direction of the input magnetic field component is in the Z direction.

[0191] Thus, when the direction and intensity of the input magnetic field component change, the resistance values ​​of the resistors R131 to R134 in the third detection circuit 130 change as follows: the resistance values ​​of resistors R131 and R133 increase while the resistance values ​​of resistors R132 and R134 decrease, or the resistance values ​​of resistors R131 and R133 decrease while the resistance values ​​of resistors R132 and R134 increase. Consequently, the potentials of the signal output terminals E31 and E32 change. The third detection circuit 130 is configured to generate a third detection signal S131 corresponding to the potential of the signal output terminal E31, and to generate a third detection signal S132 corresponding to the potential of the signal output terminal E32.

[0192] Next, the structure and operation of the processor 40 in this embodiment will be described. Figure 22 This is a functional block diagram illustrating the structure of the processor 40 in this embodiment. In this embodiment, the processor 40 is configured to generate a first detection value Su corresponding to the component of the object magnetic field parallel to the U direction based on first detection signals S111 and S112, a second detection value Sv corresponding to the component of the object magnetic field parallel to the V direction based on second detection signals S121 and S122, and a third detection value Sz corresponding to the component of the object magnetic field parallel to the Z direction based on third detection signals S131 and S132.

[0193] The processor 40 of this embodiment replaces the first and second arithmetic circuits of the first embodiment and includes a first arithmetic circuit 141, a second arithmetic circuit 142, and a third arithmetic circuit 143. The first arithmetic circuit 141 is configured to perform a first generation process. The content of the first generation process in this embodiment is the same as that in the first embodiment. That is, the first generation process in this embodiment is a process of generating a first initial detection value Sup corresponding to the first detection value Su using the first detection signals S111 and S112. The first arithmetic circuit 141 generates the first initial detection value Sup by performing an operation including calculating the difference S111-S112 between the first detection signals S111 and S112. The first initial detection value Sup can be the difference S111-S112 itself, or it can be a value on which a predetermined correction such as gain adjustment and offset adjustment is applied to the difference S111-S112.

[0194] The second arithmetic circuit 142 is configured to perform a second generation process. The content of the second generation process in this embodiment differs from that in the first embodiment. In this embodiment, the second generation process generates a second initial detection value Svp corresponding to the second detection value Sv using the second detection signals S121 and S122. The second arithmetic circuit 142 generates the second initial detection value Svp through an operation including calculating the difference S121-S122 between the second detection signals S121 and S122. The second initial detection value Svp can be the difference S121-S122 itself, or it can be a value to which a predetermined correction such as gain adjustment and offset adjustment has been applied to the difference S121-S122.

[0195] The third arithmetic circuit 143 is configured to perform a third generation process. The third generation process is the process of generating a third detection value Sz using the third detection signals S131 and S132. The third arithmetic circuit 143 generates the third detection value Sz by performing an operation that includes calculating the difference S131-S132 between the third detection signals S131 and S132. The third detection value Sz can be the difference S131-S132 itself, or it can be a value on which predetermined corrections such as gain adjustment and offset adjustment are applied to the difference S131-S132.

[0196] Furthermore, in this embodiment, the correction circuit 43 is configured not to generate the third detection value Sz. Also, the determination process in this embodiment differs from that in the first embodiment. The determination process in this embodiment includes determining the first detection value Su and the second detection value Sv, but does not include determining the third detection value Sz.

[0197] Furthermore, in this embodiment, the correction circuit 43 performs a determination process after alternately executing the first correction process and the second correction process. The correction circuit 43 may execute the first correction process and the second correction process once each, twice each, or three or more times each. Additionally, the correction circuit 43 may execute before the update of the second initial detection value Svp. That is, the correction circuit 43 may execute the first second correction process before executing the first first correction process.

[0198] The other structures, functions, and effects of this embodiment are the same as those of the first embodiment.

[0199] Furthermore, the present invention is not limited to the embodiments described above, and various modifications can be made. For example, the magnetic sensor of the present invention can also integrate the first chip 2 and the second chip 3.

[0200] Alternatively, the second chip 3 may replace the second and third detection circuits 20 and 30 and include only a second detection circuit that is configured to contain a component of the magnetic field of the target object that is parallel to the V direction. Or, the second chip 3 may replace the second and third detection circuits 20 and 30 and include a second detection circuit that is configured to contain a component of the magnetic field of the target object that is parallel to the V direction and a third detection circuit that is configured to contain a component of the magnetic field of the target object that is parallel to the Z direction.

[0201] Furthermore, the second arithmetic circuit 42 in the first embodiment can also be configured to perform a third process of the second generation process in addition to the first and second processes of the second generation process. In this case, the correction circuit 43 can also replace the first and second values ​​S1 and S2 and use the second and third initial detection values ​​Svp and Szp generated by the second arithmetic circuit 42 to perform the second correction process. The second correction process can also be as follows: the second initial detection value Svp is calculated (updated) by substituting the latest second initial detection value Svp and the latest first correction value Suc into a first formula expressed using the second initial detection value Svp and the first correction value Suc, and the third initial detection value Szp is calculated (updated) by substituting the latest third initial detection value Szp and the latest first correction value Suc into a second formula expressed using the third initial detection value Szp and the first correction value Suc. The first formula can also be a formula that includes an operation of multiplying the latest second initial detection value Svp by the first correction value Suc and an operation of adding the value obtained by the operation to the latest second initial detection value Svp or subtracting it from the latest second initial detection value Svp. The second formula can also be a formula that includes the operation of multiplying the latest third initial detection value Szp by the first correction value Suc, and the operation of adding the value obtained by the operation to the latest third initial detection value Szp or subtracting it from the latest third initial detection value Szp.

[0202] As described above, the magnetic sensor device of the present invention includes: a first detection circuit configured to detect a component of the magnetic field of an object as the target magnetic field in one direction and generate a first detection signal; a second detection circuit configured to detect a component of the magnetic field of the target in another direction and generate a second detection signal; and a processor.

[0203] The processor is configured to perform the following processes: a first generation process, generating a first initial detection value using a first detection signal; a second generation process, generating a second initial detection value using a second detection signal; a first correction process, correcting the first initial detection value using a second correction value generated based on the latest second initial detection value, and updating the first initial detection value; a second correction process, correcting the second initial detection value using the first correction value generated based on the latest first initial detection value, and updating the second initial detection value; and a determination process, determining the latest first initial detection value as a first detection value corresponding to a component of the object's magnetic field parallel to a first reference direction, and determining the latest second initial detection value as a second detection value corresponding to a component of the object's magnetic field parallel to a second reference direction. The processor performs the determination process after alternately executing the first correction process and the second correction process.

[0204] In the magnetic sensor device of the present invention, the processor may also execute the first correction process and the second correction process twice each.

[0205] In addition, in the magnetic sensor device of the present invention, the processor may also perform a first second correction process before performing the first first correction process.

[0206] Furthermore, in the magnetic sensor device of the present invention, the first correction value can also be a value calculated by multiplying the latest first initial detection value by a first correction coefficient. The second correction value can also be a value calculated by multiplying the latest second initial detection value by a second correction coefficient.

[0207] Furthermore, in the magnetic sensor device of the present invention, the first detection circuit and the second detection circuit may each include: a first magnetoresistive element and a second magnetoresistive element, which are connected in series on a first path, the path that electrically connects the first node and the second node; and a third magnetoresistive element and a fourth magnetoresistive element, which are connected in series on another path, the second path, that electrically connects the first node and the second node. The first magnetoresistive element and the fourth magnetoresistive element may also be connected to the first node. The second magnetoresistive element and the third magnetoresistive element may also be connected to the second node. Each of the first to fourth magnetoresistive elements may also include a magnetized fixed layer having a first magnetization with a fixed direction, a free layer having a second magnetization with a direction that can vary according to the magnetic field of the object, and a gap layer disposed between the magnetized fixed layer and the free layer. The direction of the principal component of the first magnetization in the first magnetoresistive element and the direction of the principal component of the first magnetization in the third magnetoresistive element may also be the same direction. The direction of the principal component of the first magnetization in the second magnetoresistive element and the direction of the principal component of the first magnetization in the fourth magnetoresistive element may also be the same direction. The direction of the principal component of the first magnetization in the second magnetoresistive element can also be opposite to the direction of the principal component of the first magnetoresistive element. Similarly, the direction of the principal component of the first magnetization in the fourth magnetoresistive element can be opposite to the direction of the principal component of the first magnetoresistive element in the third magnetoresistive element. When no object magnetic field is applied to the first and second detection circuits, the direction of the principal component of the second magnetization in each of the first to fourth magnetoresistive elements can also be opposite to the direction of the principal component of the second magnetization in each of the other two magnetoresistive elements. The gap layer can also be a tunnel barrier layer.

[0208] Alternatively, in the magnetic sensor device of the present invention, shielding may not be provided in either the first detection circuit or the second detection circuit.

[0209] In addition, in the magnetic sensor device of the present invention, the first reference direction and the second reference direction may both be parallel to the reference plane and orthogonal to each other.

[0210] Furthermore, in the magnetic sensor device of the present invention, the direction of the component of the target magnetic field detected by the first detection circuit can also be a direction parallel to the reference plane. The direction of the component of the target magnetic field detected by the second detection circuit can also be a direction inclined relative to the reference plane.

[0211] Alternatively, the magnetic sensor device of the present invention may further include a third detection circuit, configured to detect a component of the object magnetic field that is tilted relative to the reference plane and has a direction different from that of the component of the object magnetic field detected by the second detection circuit, and generate a third detection signal. The second generation process may also be a process of generating a second initial detection value and a third initial detection value using the second and third detection signals. The second correction process may also be a process of correcting and updating the second and third initial detection values ​​using a first correction value. The determination process may further determine the latest third initial detection value as a third detection value that corresponds to the component of the object magnetic field perpendicular to the reference plane.

[0212] When the magnetic sensor device of the present invention includes a third detection circuit, the second generation process may also include a first process for generating a first value using a second detection signal, a second process for generating a second value using a third detection signal, and a third process for generating a second initial detection value and a third initial detection value using the first value and the second value. The second correction process may also substantially include the third process. In this case, the processor may execute the first second correction process and the first first correction process sequentially after executing the first and second processes. Furthermore, the second correction process may also include a fourth process for correcting the first and second values ​​using a first correction value, a fifth process for generating a second initial detection value and a third initial detection value using the first and second values ​​corrected by the fourth process, and a sixth process for updating the second initial detection value and the third initial detection value using the second initial detection value and the third initial detection value generated by the fifth process.

[0213] When the magnetic sensor device of the present invention includes a third detection circuit, each of the first to third detection circuits may also include: a first magnetoresistive element and a second magnetoresistive element connected in series on a first path, which electrically connects the first node and the second node; and a third magnetoresistive element and a fourth magnetoresistive element connected in series on another path, which electrically connects the first node and the second node, namely a second path. The first and fourth magnetoresistive elements may also be connected to the first node. The second and third magnetoresistive elements may also be connected to the second node. Each of the first to fourth magnetoresistive elements may also include a magnetized fixed layer having a first magnetization with a fixed direction, a free layer having a second magnetization with a direction that can vary according to the magnetic field of the object, and a gap layer disposed between the magnetized fixed layer and the free layer. The direction of the principal component of the first magnetization in the first magnetoresistive element and the direction of the principal component of the first magnetization in the third magnetoresistive element may also be the same direction. The direction of the principal component of the first magnetization in the second magnetoresistive element and the direction of the principal component of the first magnetization in the fourth magnetoresistive element may also be the same direction. The direction of the principal component of the first magnetization in the second magnetoresistive element can also be opposite to the direction of the principal component of the first magnetoresistive element. Similarly, the direction of the principal component of the first magnetization in the fourth magnetoresistive element can be opposite to the direction of the principal component of the first magnetoresistive element in the third magnetoresistive element. When no object magnetic field is applied to the first to third detection circuits, the direction of the principal component of the second magnetization in each of the two magnetoresistive elements in the first to fourth magnetoresistive elements can also be opposite to the direction of the principal component of the second magnetization in each of the other two magnetoresistive elements in the first to fourth magnetoresistive elements. The gap layer can also be a tunnel barrier layer.

[0214] Furthermore, when the magnetic sensor device of the present invention is equipped with a third detection circuit, shielding may not be provided in each of the first to third detection circuits.

[0215] In addition, when the magnetic sensor device of the present invention is equipped with a third detection circuit, the magnetic sensor device of the present invention may also be equipped with a first chip including a first detection circuit and a second chip including a second detection circuit and a third detection circuit.

[0216] Alternatively, the magnetic sensor device of the present invention may also include a third detection circuit, configured to detect the component of the object magnetic field perpendicular to the reference plane and generate a third detection signal. The direction of the component of the object magnetic field detected by the first detection circuit may also be a first direction parallel to the reference plane. The direction of the component of the object magnetic field detected by the second detection circuit may also be a second direction parallel to the reference plane. The second generation process may also be a process of generating a second initial detection value and a third detection value using the second detection signal and the third detection signal. The third detection value may also correspond to the component of the object magnetic field perpendicular to the reference plane.

[0217] As can be seen from the above description, various modes or variations of the present invention can be implemented. Therefore, within the equivalent scope of the claims, the present invention can be implemented even in modes other than the preferred mode described above.

Claims

1. A magnetic sensor device, characterized in that, have: The first detection circuit is configured to detect a component of one direction of the magnetic field of the object, which is the magnetic field to be detected, and generate a first detection signal. The second detection circuit is configured to detect the component of the magnetic field of the object in another direction and generate a second detection signal. as well as processor, The processor is configured to perform the following processes: A first generation process uses the first detection signal to generate a first initial detection value; The second generation process uses the second detection signal to generate a second initial detection value; The first correction process uses a second correction value generated based on the latest second initial detection value to correct the first initial detection value and update the first initial detection value. The second correction process uses a first correction value generated based on the latest first initial detection value to correct the second initial detection value and updates the second initial detection value. The process involves determining the latest first initial detection value as a first detection value corresponding to the component of the object's magnetic field parallel to the first reference direction, and determining the latest second initial detection value as a second detection value corresponding to the component of the object's magnetic field parallel to the second reference direction. After alternately executing the first correction process and the second correction process, the processor executes the determination process. The first correction value is calculated by multiplying the latest first initial detection value by a first correction coefficient. The second correction value is calculated by multiplying the latest second initial detection value by the second correction coefficient. The first correction process includes updating the first initial detection value by substituting the latest first initial detection value and the latest second correction value into an expression including a first operation and a second operation. The first operation includes multiplying the latest first initial detection value by the second correction value, and the second operation adds the value obtained by the first operation to the latest first initial detection value or subtracts it from the latest first initial detection value. The second correction process includes updating the first value by substituting the latest first value and the latest first correction value into an expression including a third operation and a fourth operation, and generating the second initial detection value based on the first value. The third operation includes multiplying the first value corresponding to the latest second initial detection value by the first correction value, and the fourth operation adds the value obtained by the third operation to the latest first value or subtracts it from the latest first value.

2. The magnetic sensor device according to claim 1, characterized in that, The processor executes the first correction process and the second correction process twice each.

3. The magnetic sensor device according to claim 1, characterized in that, The processor performs a first second correction process before performing the first first correction process.

4. The magnetic sensor device according to claim 1, characterized in that, The first detection circuit and the second detection circuit each include: The first magnetoresistive element and the second magnetoresistive element are connected in series on a first path that serves as the path for electrically connecting the first node and the second node. The third and fourth magnetoresistive elements are connected in series on a second path, which serves as another path electrically connecting the first and second nodes. The first magnetoresistive element and the fourth magnetoresistive element are connected to the first node. The second magnetoresistive element and the third magnetoresistive element are connected to the second node. The first magnetoresistive element, the second magnetoresistive element, the third magnetoresistive element, and the fourth magnetoresistive element each include a magnetized fixed layer having a first magnetization with a fixed direction, a free layer having a second magnetization with an direction that can change according to the magnetic field of the object, and a gap layer disposed between the magnetized fixed layer and the free layer. The direction of the principal component of the first magnetization in the first magnetoresistive element and the direction of the principal component of the first magnetization in the third magnetoresistive element are the same. The direction of the principal component of the first magnetization in the second magnetoresistive element and the direction of the principal component of the first magnetization in the fourth magnetoresistive element are the same. The direction of the principal component of the first magnetization in the second magnetoresistive element is opposite to the direction of the principal component of the first magnetization in the first magnetoresistive element. The direction of the principal component of the first magnetization in the fourth magnetoresistive element is opposite to the direction of the principal component of the first magnetization in the third magnetoresistive element. When the magnetic field of the object is not applied to the first detection circuit and the second detection circuit, the direction of the principal component of the second magnetization of each of the first magnetoresistive element, the second magnetoresistive element, the third magnetoresistive element, and the fourth magnetoresistive element is opposite to the direction of the principal component of the second magnetization of each of the other two magnetoresistive elements.

5. The magnetic sensor device according to claim 4, characterized in that, The gap layer is a tunnel barrier layer.

6. The magnetic sensor device according to any one of claims 1 to 5, characterized in that, Neither the first detection circuit nor the second detection circuit has a shielding component.

7. The magnetic sensor device according to any one of claims 1 to 5, characterized in that, Both the first reference direction and the second reference direction are parallel to the reference plane and orthogonal to each other.

8. The magnetic sensor device according to any one of claims 1 to 5, characterized in that, The direction of the component of the magnetic field of the object detected by the first detection circuit is parallel to the reference plane. The direction of the component of the magnetic field of the object detected by the second detection circuit is the direction of inclination relative to the reference plane.

9. A magnetic sensor device, characterized in that, have: The first detection circuit is configured to detect a component of one direction of the magnetic field of the object, which is the magnetic field to be detected, and generate a first detection signal. The second detection circuit is configured to detect the component of the magnetic field of the object in another direction and generate a second detection signal. as well as processor, The processor is configured to perform the following processes: A first generation process uses the first detection signal to generate a first initial detection value; The second generation process uses the second detection signal to generate a second initial detection value; The first correction process corrects the first initial detection value using a second correction value generated based on the latest second initial detection value instead of using the first initial detection value, and updates the first initial detection value. The second correction process corrects the second initial detection value using a first correction value generated based on the latest first initial detection value without using the second initial detection value, and updates the second initial detection value. The process involves determining the latest first initial detection value as a first detection value corresponding to the component of the object's magnetic field parallel to the first reference direction, and determining the latest second initial detection value as a second detection value corresponding to the component of the object's magnetic field parallel to the second reference direction. The processor executes the determination process after alternately executing the first correction process and the second correction process.