Magnetic sensor device, magnetic sensor system, and correction method

The magnetic sensor device uses additional magnetic fields to correct detection errors by generating first and second sensitivities, addressing offset and sensitivity variations in magnetic sensors for improved accuracy.

JP7813309B2Active Publication Date: 2026-02-12TDK CORP
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
JP2024044086
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2024-03-19
Publication Date
2026-02-12
Estimated Expiration
2044-03-19

AI Technical Summary

Technical Problem

Magnetic sensors experience detection errors due to offset and sensitivity variations caused by disturbance magnetic fields and environmental factors, requiring complex calculations for offset correction in three-component detection.

Method used

A magnetic sensor device with a magnetic field generator and processor that generates additional magnetic fields to measure sensitivity, allowing for simple correction of detection errors by generating first and second sensitivities based on these fields.

Benefits of technology

The method reduces detection errors in magnetic sensors by using additional magnetic fields to correct offsets, simplifying the correction process and improving accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007813309000001
    Figure 0007813309000001
  • Figure 0007813309000002
    Figure 0007813309000002
  • Figure 0007813309000003
    Figure 0007813309000003
Patent Text Reader

Abstract

To reduce detection error of a magnetic sensor with a simple method.SOLUTION: A magnetic sensor device 100 comprises a magnetic sensor 1, a magnetic field generator 70, and a processor 2. The processor 2 is configured to generate: a first sensitivity which is a sensitivity of the magnetic sensor 1 when the intensity of additive magnetic field is changed within a first range; a second sensitivity which is a sensitivity of the magnetic sensor 1 when the intensity of additive magnetic field is changed within a second range; and a detection value corresponding to a magnetic field component which is a component of an object magnetic field in a predetermined direction on the basis of a detection signal, the first sensitivity and the second sensitivity.SELECTED DRAWING: Figure 14
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a magnetic sensor device having a magnetic field generator for measuring the sensitivity of a magnetic sensor, a magnetic sensor system including the magnetic sensor device, and a method for correcting a detection signal of the magnetic sensor. [Background technology]

[0002] In recent years, magnetic sensors have been used in various applications to detect components of external magnetic fields in a predetermined direction. Magnetic sensors that use magnetic detection elements, such as magnetoresistive elements, are well known.

[0003] Magnetic sensors may experience offsets in their detection signals due to disturbance magnetic fields, etc. Furthermore, the sensitivity of magnetic sensors can vary depending on the individual magnetic sensor and the environment in which they are used. Changes in offset and sensitivity can cause detection errors in magnetic sensors. Therefore, it is desirable for magnetic sensors to be able to correct the offset and sensitivity.

[0004] Patent Document 1 discloses a geomagnetic data correction device that approximates a distribution shape obtained by distributing physical quantity data in space with an ellipsoid, calculates a correction coefficient that corrects the ellipsoid to a sphere, and includes a parameter that corrects an offset value, and corrects the geomagnetic data based on the correction coefficient.

[0005] Patent documents 2 and 3 disclose a magnetic sensor device having three magnetic sensors and a magnetic field generating unit that generates additional magnetic field components in three directions used to measure the main axis sensitivity and other axis sensitivity of the three magnetic sensors. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] International Publication No. 2014 / 141631 [Patent Document 2] Japanese Patent Publication No. 2020-060457 [Patent Document 3] Japanese Patent Publication No. 2020-094883 Summary of the Invention [Problem to be solved by the invention]

[0007] In a magnetic sensor that detects three components in three mutually orthogonal directions and generates three detection signals corresponding to these three components, correcting the offset of each of the three detection signals requires complex calculations, as disclosed in Patent Document 1. This poses the problem of a heavy load on the processor.

[0008] The present invention has been made in consideration of such problems, and its purpose is to provide a magnetic sensor device, a magnetic sensor system, and a correction method that make it possible to reduce the detection error of a magnetic sensor in a simple manner. [Means for solving the problem]

[0009] The magnetic sensor device of the present invention includes a magnetic sensor configured to detect a magnetic field component that is a component in a predetermined direction of a target magnetic field at a reference position and output a detection signal, a magnetic field generator configured to generate an additional magnetic field used to measure the sensitivity of the magnetic sensor in the predetermined direction, and a processor configured to receive the detection signal. The processor is configured to generate a first sensitivity that is the sensitivity of the magnetic sensor when the strength of the additional magnetic field is changed within a first range, generate a second sensitivity that is the sensitivity of the magnetic sensor when the strength of the additional magnetic field is changed within a second range, and generate a detection value that corresponds to the magnetic field component based on the detection signal, the first sensitivity, and the second sensitivity.

[0010] The magnetic sensor system of the present invention includes the magnetic sensor device of the present invention and an external processor. The detection signals include a first signal, a second signal, and a third signal that correspond to components of a target magnetic field at a reference position in three different directions. The external processor generates center coordinate data of a virtual sphere having a spherical surface that approximates the distribution of multiple measurement points at multiple times when coordinates representing a set of values ​​of the first to third signals at a certain timing are taken as measurement points in an orthogonal coordinate system defined by three axes for representing the values ​​of the first to third signals. The processor corrects the offset of each of the first to third signals using the center coordinate data.

[0011] A correction method of the present invention corrects a detection signal of a magnetic sensor configured to detect a magnetic field component that is a component in a predetermined direction of a target magnetic field at a reference position. The correction method of the present invention applies to the magnetic sensor an additional magnetic field used to measure the sensitivity of the magnetic sensor in the predetermined direction, and generates a first sensitivity that is the sensitivity of the magnetic sensor while changing the strength of the additional magnetic field within a first range, generates a second sensitivity that is the sensitivity of the magnetic sensor while changing the strength of the additional magnetic field within a second range, generates a first value that corresponds to the strength of the component in the predetermined direction of the magnetic field applied to the magnetic sensor based on the first sensitivity and the second sensitivity, generates a second value that corresponds to the strength of the component in the predetermined direction of the magnetic field applied to the magnetic sensor based on the detection signal, and corrects an offset of the detection signal based on the first value and the second value. [Effects of the Invention]

[0012] In the magnetic sensor device and magnetic sensor system of the present invention, a first sensitivity is generated, which is the sensitivity of the magnetic sensor when the strength of the additional magnetic field is changed within a first range, and a second sensitivity is generated, which is the sensitivity of the magnetic sensor when the strength of the additional magnetic field is changed within a second range. A detection value corresponding to a magnetic field component is generated based on the detection signal, the first sensitivity, and the second sensitivity. In the correction method of the present invention, a first value corresponding to the strength of a component of the magnetic field applied to the magnetic sensor in a predetermined direction is generated based on the first sensitivity and the second sensitivity, a second value corresponding to the strength of the component of the magnetic field applied to the magnetic sensor in the predetermined direction is generated based on the detection signal, and the offset of the detection signal is corrected based on the first value and the second value. According to the present invention, by using the first sensitivity and the second sensitivity, it is possible to reduce the detection error of the magnetic sensor in a simple manner. [Brief explanation of the drawings]

[0013] [Figure 1] 1 is a perspective view showing a magnetic sensor device according to a first embodiment of the present invention. [Figure 2] FIG. 1 is a functional block diagram showing a configuration of a magnetic sensor device according to a first embodiment of the present invention. [Figure 3] FIG. 1 is a plan view showing a magnetic sensor device according to a first embodiment of the present invention. [Figure 4] FIG. 2 is a circuit diagram showing the circuit configuration of first and second detection circuits in the first embodiment of the present invention. [Figure 5] FIG. 2 is a perspective view showing a part of one resistor portion in the first embodiment of the present invention. [Figure 6] 1 is a perspective view showing a magnetoresistive effect element according to a first embodiment of the present invention. [Figure 7] FIG. 4 is a circuit diagram showing a circuit configuration of a third detection circuit in the first embodiment of the present invention. [Figure 8] FIG. 4 is a perspective view showing a part of a third detection circuit in the first embodiment of the present invention. [Figure 9]FIG. 4 is a plan view showing a part of a third detection circuit in the first embodiment of the present invention. [Figure 10] FIG. 4 is a side view showing a part of a third detection circuit in the first embodiment of the present invention. [Figure 11] FIG. 3 is a characteristic diagram showing an example of the relationship between a first magnetic field component and a first detection signal in the first embodiment of the present invention. [Figure 12] FIG. 10 is a characteristic diagram showing an example of the relationship between a third magnetic field component and a third detection signal in the first embodiment of the present invention. [Figure 13] FIG. 10 is a characteristic diagram showing an example of the relationship between a third magnetic field component and a change in sensitivity in the first embodiment of the present invention. [Figure 14] 3 is a flowchart showing a correction method according to the first embodiment of the present invention. [Figure 15] FIG. 10 is a characteristic diagram showing the linearity of a third detection signal in the first embodiment of the present invention. [Figure 16] FIG. 10 is a functional block diagram showing a configuration of a magnetic sensor system according to a second embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0014] [First embodiment] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. First, a magnetic sensor device 100 according to a first embodiment of the present invention will be described with reference to Figs. 1 to 3. Fig. 1 is a perspective view showing the magnetic sensor device 100 according to this embodiment. Fig. 2 is a functional block diagram showing the configuration of the magnetic sensor device 100 according to this embodiment. Fig. 3 is a plan view showing the magnetic sensor device 100 according to this embodiment.

[0015] The magnetic sensor device 100 includes a magnetic sensor 1 configured to detect a target magnetic field, which is a magnetic field to be detected, and output at least one detection signal; a processor 2 configured to receive the at least one detection signal; and a magnetic field generator 70 configured to generate at least one additional magnetic field used to measure the sensitivity of the magnetic sensor 1. The target magnetic field may be geomagnetic, a magnetic field generated by a magnet, or a magnetic field generated from a current-carrying wiring. In this embodiment, the target magnetic field is a magnetic field other than geomagnetic. An example in which the target magnetic field is geomagnetic will be described in the second embodiment.

[0016] As shown in FIG. 1, the magnetic sensor 1 has the form of a first chip. The processor 2 has the form of a second chip different from the first chip. Both the magnetic sensor 1 and the processor 2 have a rectangular parallelepiped shape. The magnetic sensor 1 has an upper surface 1a and a lower surface 1b located opposite each other, and four side surfaces connecting the upper surface 1a and the lower surface 1b. The outer surface of the processor 2 includes an upper surface 2a and a lower surface 2b located opposite each other, and four side surfaces connecting the upper surface 2a and the lower surface 2b. The magnetic sensor 1 is oriented such that the lower surface 1b faces the upper surface 2a of the processor 2, and the upper surface 2a is implemented above.

[0017] The magnetic sensor 1 has a plurality of electrode pads provided on its upper surface 1a. The processor 2 has a plurality of electrode pads provided on its upper surface 2a. The plurality of electrode pads of the magnetic sensor 1 are connected to the plurality of electrode pads of the processor 2 by, for example, a plurality of bonding wires.

[0018] Here, the reference coordinate system in this embodiment will be described with reference to Fig. 1 and Fig. 3. The reference coordinate system is an orthogonal coordinate system based on the magnetic sensor 1. In the reference coordinate system, an X direction, a Y direction, and a Z direction are defined. As shown in Fig. 3, the X direction, the Y direction, and the Z direction are orthogonal to one another. 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.

[0019] Hereinafter, in the reference coordinate system, the position at the end of the Z direction relative to the reference position will be referred to as "above," and the position on the opposite side of "above" relative to the reference position will be referred to as "below." Furthermore, with regard to the components of the magnetic sensor 1, the surface located at the end of the Z direction will be referred to as the "top surface," and the surface located at the end of the -Z direction will be referred to as the "bottom surface." Furthermore, the expression "when viewed from the Z direction" means viewing the object from a position away in the Z direction.

[0020] The magnetic sensor 1 includes a first detection circuit 10 that generates at least one first detection signal, a second detection circuit 20 that generates at least one second detection signal, and a third detection circuit 30 that generates at least one third detection signal. Each of the first to third detection circuits 10, 20, and 30 includes at least one magnetic detection element. In this embodiment, particularly, each of the first to third detection circuits 10, 20, and 30 includes a plurality of magnetoresistive effect elements (hereinafter referred to as MR elements) as the at least one magnetic detection element.

[0021] At least one first detection signal, at least one second detection signal, and at least one third detection signal correspond to three different directional components of the target magnetic field at a reference position (e.g., the position where the magnetic sensor 1 is disposed). In this embodiment, at least one first detection signal corresponds to a first magnetic field component MFx, which is a component of the target magnetic field parallel to the X direction. At least one second detection signal corresponds to a second magnetic field component MFy, which is a component of the target magnetic field parallel to the Y direction. At least one third detection signal corresponds to a third magnetic field component MFz, which is a component of the target magnetic field parallel to the Z direction.

[0022] The first detection circuit 10 is configured to detect the first magnetic field component MFx and output at least one first detection signal, the second detection circuit 20 is configured to detect the second magnetic field component MFy and output at least one second detection signal, and the third detection circuit 30 is configured to detect the third magnetic field component MFz and output at least one third detection signal.

[0023] The magnetic field generator 70 includes a first coil 71 configured to generate a first additional magnetic field, a second coil 72 configured to generate a second additional magnetic field, and a third coil 73 configured to generate a third additional magnetic field. The first additional magnetic field is used to measure the sensitivity of the first detection circuit 10. The second additional magnetic field is used to measure the sensitivity of the second detection circuit 20. The third additional magnetic field is used to measure the sensitivity of the third detection circuit 30. Each of the first to third additional magnetic fields may be a static magnetic field or an AC magnetic field.

[0024] In the example shown in Fig. 3, the first coil 71 is arranged so as to overlap the first detection circuit 10 when viewed from the Z direction. The second coil 72 is arranged so as to overlap the second detection circuit 20 when viewed from the Z direction. The third coil 73 is arranged so that the third detection circuit 30 is included inside the third coil 73 when viewed from the Z direction. Note that the first to third coils 71 to 73 may be arranged at positions other than those shown in Fig. 3, as long as the first to third additional magnetic fields can be used to measure the sensitivities of the first to third detection circuits 10, 20, and 30.

[0025] The first to third coils 71 to 73 are disposed between the upper surface 1a of the magnetic sensor 1 and the lower surface 2b of the processor 2. The first to third coils 71 to 73 may be provided in the magnetic sensor 1, which is the first chip, or in the processor 2, which is the second chip. When the first to third coils 71 to 73 are provided in the processor 2, the first to third coils 71 to 73 may be disposed in positions closer to the upper surface 2a than to the lower surface 2b.

[0026] The processor 2 includes a calculation unit 41, a control unit 42, a drive unit 43, and a memory unit 44. The calculation unit 41 performs various calculations based on at least one first detection signal, at least one second detection signal, and at least one third detection signal. The drive unit 43 controls the magnetic field generator 70 to generate first to third additional magnetic fields and change the first to third additional magnetic fields. The control unit 42 controls the calculation unit 41, the drive unit 43, and the memory unit 44. The memory unit 44 stores various data, which will be described later.

[0027] The processor 2 may be configured, for example, by an application specific integrated circuit (ASIC).

[0028] The magnetic sensor device 100 may include a processor (not shown) that is not integrated with the magnetic sensor 1, instead of the processor 2. The processor (not shown) may include the functions of the processor 2. The processor (not shown) may be configured by, for example, an ASIC or a microcomputer.

[0029] Next, the configurations of the first and second detection circuits 10, 20 will be described with reference to Fig. 4 to Fig. 6. Fig. 4 is a circuit diagram showing the circuit configuration of the first and second detection circuits 10, 20. Fig. 5 is a perspective view showing a part of one resistor unit. Fig. 6 is a perspective view showing an MR element.

[0030] 4, the first detection circuit 10 includes a power supply port V1, a ground port G1, output ports E11 and E12, and resistor units R11, R12, R13, and R14. The multiple MR elements of the first detection circuit 10 configure the resistor units R11 to R14.

[0031] The resistor R11 is provided between the power supply port V1 and the output port E11. The resistor R12 is provided between the output port E11 and the ground port G1. The resistor R13 is provided between the output port E12 and the ground port G1. The resistor R14 is provided between the power supply port V1 and the output port E12. A voltage or current of a predetermined magnitude is applied to the power supply port V1. The ground port G1 is connected to ground.

[0032] The second detection circuit 20 includes a power supply port V2, a ground port G2, output ports E21 and E22, and resistor units R21, R22, R23, and R24. The plurality of MR elements of the second detection circuit 20 constitute the resistor units R21 to R24.

[0033] The resistor R21 is provided between the power supply port V2 and the output port E21. The resistor R22 is provided between the output port E21 and the ground port G2. The resistor R23 is provided between the output port E22 and the ground port G2. The resistor R24 ​​is provided between the power supply port V2 and the output port E22. A voltage or current of a predetermined magnitude is applied to the power supply port V2. The ground port G2 is connected to ground.

[0034] Here, multiple MR elements will be described. The MR element may be a spin-valve MR element or an AMR (anisotropic magnetoresistance) element. In this embodiment, the MR element is particularly a spin-valve MR element. The spin-valve MR element includes a magnetization pinned layer having a fixed magnetization direction, a free layer having a magnetization whose direction can be changed depending on the magnetic field applied to the magnetic sensor 1, and a gap layer disposed between the magnetization pinned layer and the free layer. The spin-valve MR element may be a TMR (tunneling magnetoresistance) element or a GMR (giant magnetoresistance) element. In a TMR element, the gap layer is a tunnel barrier layer. In a GMR element, the gap layer is a nonmagnetic conductive layer. In a spin-valve MR element, the resistance value changes depending on the angle between the magnetization direction of the free layer and the magnetization direction of the magnetization pinned layer. When this angle is 0°, the resistance value is minimum, and when the angle is 180°, the resistance value is maximum. The free layer has shape anisotropy such that the direction of the easy axis of magnetization is perpendicular to the direction of magnetization of the fixed layer. Note that a magnet that applies a bias magnetic field to the free layer can also be used as a means for setting the easy axis of magnetization in a predetermined direction in the free layer.

[0035] FIG. 5 shows some of the resistor sections R11 to R14 of the first detection circuit 10 and the resistor sections R21 to R24 of the second detection circuit 20. FIG. 5 shows an example in which CPP (Current Perpendicular-to-Plane) MR elements are connected in series. The resistor section includes a plurality of lower electrodes 61, a plurality of MR elements 50, and a plurality of upper electrodes 62. The plurality of lower electrodes 61 are arranged on a substrate (not shown). Each lower electrode 61 has an elongated shape. A gap is formed between two lower electrodes 61 adjacent in the longitudinal direction. As shown in FIG. 5, an MR element 50 is arranged on the upper surface of the lower electrode 61 near both ends in the longitudinal direction.

[0036] 6, the MR element 50 includes an antiferromagnetic layer 51, a magnetization fixed layer 52, a gap layer 53, and a free layer 54, which are stacked in this order from the bottom electrode 61 side. The antiferromagnetic layer 51 is electrically connected to the bottom electrode 61. The antiferromagnetic layer 51 is made of an antiferromagnetic material, and generates exchange coupling with the magnetization fixed layer 52 to fix the magnetization direction of the magnetization fixed layer 52.

[0037] 5, a plurality of upper electrodes 62 are arranged on a plurality of MR elements 50. Each upper electrode 62 has an elongated shape, and is arranged on two adjacent lower electrodes 61 in the longitudinal direction of the lower electrodes 61 to electrically connect the free layers 54 of the two adjacent MR elements 50. With this configuration, any resistor section shown in FIG. 5 includes a plurality of MR elements 50 connected in series by a plurality of lower electrodes 61 and a plurality of upper electrodes 62.

[0038] The magnetization fixed layer 52 may be a so-called self-pinned type fixed layer (synthetic ferri-pinned layer, SFP layer). The self-pinned type fixed layer has a laminated ferri-structure in which a ferromagnetic layer, a non-magnetic intermediate layer, and a ferromagnetic layer are stacked, and the two ferromagnetic layers are antiferromagnetically coupled. When the magnetization fixed layer 52 is a self-pinned type fixed layer, the antiferromagnetic layer 51 may be omitted.

[0039] Furthermore, the arrangement of the layers 51 to 54 in the MR element 50 may be upside down compared to the arrangement shown in FIG.

[0040] Any resistor section may include a plurality of sets of MR elements 50 connected in parallel. The plurality of sets may be connected in series. The MR elements 50 may be CIP (Current In-Plane) type MR elements.

[0041] 4, one MR element 50 is schematically shown as a diagram representing each of the resistance units R11 to R14 and R21 to R24. In FIG. 4, the solid arrows indicate the magnetization direction of the magnetization fixed layer 52 of the MR element 50. In the example shown in FIG. 4, the magnetization direction of the magnetization fixed layer 52 of the MR element 50 in each of the resistance units R11 and R13 is the X direction. The magnetization direction of the magnetization fixed layer 52 of the MR element 50 in each of the resistance units R12 and R14 is the −X direction.

[0042] The magnetization direction of the magnetization fixed layer 52 of the MR element 50 in each of the resistor sections R21 and R23 is the Y direction. 52 The magnetization direction of is the -Y direction.

[0043] The potential difference between the output port E11 and the output port E12 corresponds to the first magnetic field component MFx. The first detection circuit 10 generates a first detection signal S1 corresponding to the potential difference between the output port E11 and the output port E12. Note that, instead of the first detection signal S1, the first detection circuit 10 may generate two signals corresponding to the potentials of the output ports E11 and E12 as two first detection signals.

[0044] The potential difference between the output port E21 and the output port E22 corresponds to the second magnetic field component MFy. The second detection circuit 20 generates a second detection signal S2 corresponding to the potential difference between the output port E21 and the output port E22. Note that the second detection circuit 20 may generate, instead of the second detection signal S2, two signals corresponding to the potentials of the output ports E21 and E22 as two second detection signals.

[0045] Next, the structure of the third detection circuit 30 will be described with reference to Fig. 7 to Fig. 10. Fig. 7 is a circuit diagram showing the circuit configuration of the third detection circuit 30. Fig. 8 is a perspective view showing a part of the third detection circuit 30. Fig. 9 is a plan view showing a part of the third detection circuit 30. Fig. 10 is a side view showing a part of the third detection circuit 30.

[0046] 7, the third detection circuit 30 includes a power supply port V3, a ground port G3, output ports E31 and E32, and resistor units R31, R32, R33, and R34. The multiple MR elements 50 of the third detection circuit 30 configure the resistor units R31 to R34.

[0047] The resistor R31 is provided between the power supply port V3 and the output port E31. The resistor R32 is provided between the output port E31 and the ground port G3. The resistor R33 is provided between the output port E32 and the ground port G3. The resistor R34 is provided between the power supply port V3 and the output port E32. A voltage or current of a predetermined magnitude is applied to the power supply port V3. The ground port G3 is connected to ground.

[0048] The third detection circuit 30 further includes at least one yoke made of a soft magnetic material. When viewed from the Z direction, the at least one yoke has a shape that is elongated in the Y direction. The at least one yoke is configured to generate magnetic field components that are detected by the multiple MR elements 50 of the third detection circuit 30 based on the magnetic field applied to the third detection circuit 30. That is, the at least one yoke is configured to receive the third magnetic field component MFz and generate an output magnetic field. In particular, in this embodiment, the output magnetic field includes, as the magnetic field component, an output magnetic field component that is parallel to the X direction and changes according to the third magnetic field component MFz.

[0049] As shown in FIGS. 8 to 10 , in this embodiment, the third detection circuit 30 includes, as at least one yoke, a plurality of yokes 55 arranged side by side in the X direction. Each of the plurality of yokes 55 has, for example, a rectangular parallelepiped shape that is elongated in the Y direction. The plurality of yokes 55 have the same shape. Each of the plurality of yokes 55 has a first end face 55a and a second end face 55b located at opposite ends in a direction parallel to the X direction. In each of the plurality of yokes 55, the first end face 55a is located at the end in the −X direction, and the second end face 55b is located at the end in the X direction.

[0050] As shown in FIGS. 8 and 9 , in the third detection circuit 30, a plurality of MR elements 50 are arranged in a line along the first end face 55a, and a plurality of MR elements 50 are arranged in a line along the second end face 55b. Hereinafter, the plurality of MR elements 50 arranged along the first end face 55a will be denoted by the reference symbol 50A, and the plurality of MR elements 50 arranged along the second end face 55b will be denoted by the reference symbol 50B. In the third detection circuit 30, the plurality of MR elements 50A and the plurality of MR elements 50B are arranged such that a row of MR elements 50A and a row of MR elements 50B are alternately arranged in a direction parallel to the X direction. As shown in FIGS. 9 and 10 , the plurality of MR elements 50A and the plurality of MR elements 50B do not need to overlap with the plurality of yokes 55 when viewed from the Z direction. Furthermore, as shown in FIG. 10 , each of the plurality of MR elements 50A and the plurality of MR elements 50B may be disposed near the bottom surface of each of the plurality of yokes 55.

[0051] Although not shown, the third detection circuit 30 further includes a plurality of first lower electrodes, a plurality of second lower electrodes, a plurality of first upper electrodes, and a plurality of second upper electrodes. In FIG. 9, reference numeral 80 denotes a wiring section configured with the plurality of first lower electrodes, the plurality of second lower electrodes, the plurality of first upper electrodes, and the plurality of second upper electrodes. Similar to the plurality of MR elements 50 in the first and second detection circuits 10 and 20, the plurality of MR elements 50A are connected in series by the plurality of first lower electrodes and the plurality of first upper electrodes. Similar to the plurality of MR elements 50 in the first and second detection circuits 10 and 20, the plurality of MR elements 50B are connected in series by the plurality of second lower electrodes and the plurality of second upper electrodes.

[0052] Each of the resistance units R31 and R32 is composed of a plurality of MR elements 50 A. Each of the resistance units R33 and R34 is composed of a plurality of MR elements 50 B. In both the plurality of MR elements 50 A and the plurality of MR elements 50 B, the magnetization direction of the magnetization fixed layer 52 is parallel to the X direction.

[0053] 7, one MR element 50A or 50B is schematically shown as a diagram representing each of the resistance units R31 to R34. In FIG. 7, the solid arrows indicate the magnetization direction of the magnetization fixed layer 52. In the example shown in FIG. 7, the magnetization direction of the magnetization fixed layer 52 in each of the resistance units R31 and R34 is the X direction. The magnetization direction of the magnetization fixed layer 52 in each of the resistance units R32 and R33 is the −X direction.

[0054] Next, at least one third detection signal generated by the third detection circuit 30 will be described with reference to Fig. 7. In Fig. 7, one yoke 55 is schematically shown as a graphic representing the plurality of yokes 55 corresponding to the plurality of MR elements 50A of the resistor section R31 and the plurality of MR elements 50B of the resistor section R34. Similarly, in Fig. 7, another yoke 55 is schematically shown as a graphic representing the plurality of yokes 55 corresponding to the plurality of MR elements 50A of the resistor section R32 and the plurality of MR elements 50B of the resistor section R33.

[0055] When the third magnetic field component MFz is not present and, as a result, there is no output magnetic field component parallel to the X direction, the magnetization direction of the free layer 54 of the MR element 50 is parallel to the Y direction. When the third magnetic field component MFz in the Z direction is present, the direction of the output magnetic field component received by the MR element 50A in the resistor units R31 and R32 is the X direction, and the direction of the output magnetic field component received by the MR element 50B in the resistor units R33 and R34 is the −X direction. In this case, the magnetization direction of the free layer 54 of the MR element 50A in the resistor units R31 and R32 tilts from a direction parallel to the Y direction toward the X direction, and the magnetization direction of the free layer 54 of the MR element 50B in the resistor units R33 and R34 tilts from a direction parallel to the Y direction toward the −X direction. As a result, compared to a state in which no output magnetic field component is present, the resistance values ​​of the MR element 50A in the resistor unit R31 and the MR element 50B in the resistor unit R33 decrease, and the resistance values ​​of the resistor units R31 and R33 also decrease. Also, compared to a state in which no output magnetic field component is present, the resistance values ​​of the MR element 50A in the resistor unit R32 and the MR element 50B in the resistor unit R34 increase, and the resistance values ​​of the resistor units R32 and R34 also increase.

[0056] When the third magnetic field component MFz in the -Z direction is present, the direction of the output magnetic field component and the change in the resistance value of the resistors R31 to R34 are opposite to those when the third magnetic field component MFz in the Z direction is present.

[0057] The amount of change in the resistance value of the MR element 50 depends on the strength of the output magnetic field component received by the MR element 50. As the strength of the output magnetic field component increases, the resistance value of the MR element 50 changes in a direction in which the increase or decrease in the resistance value increases. As the strength of the output magnetic field component decreases, the resistance value of the MR element 50 changes in a direction in which the increase or decrease in the resistance value decreases. The strength of the output magnetic field component depends on the strength of the third magnetic field component MFz.

[0058] In this way, when the direction and intensity of the third magnetic field component MFz change, the resistance values ​​of the resistors R31 to R34 change such that the resistance value of each of the resistors R31 and R33 increases while the resistance value of each of the resistors R32 and R34 decreases, or the resistance value of each of the resistors R31 and R33 decreases while the resistance value of each of the resistors R32 and R34 increases. This changes the potential of each of the output ports E31 and E32 shown in FIG. 7.

[0059] The potential difference between the output port E31 and the output port E32 corresponds to the third magnetic field component MFz. The third detection circuit 30 generates a third detection signal S3 corresponding to the potential difference between the output port E31 and the output port E32. Note that the third detection circuit 30 may generate two signals corresponding to the potentials of the output ports E31 and E32 as two third detection signals, instead of the third detection signal S3.

[0060] Next, the magnetic field generator 70 will be described with reference to Figures 2 and 3. As described above, the magnetic field generator 70 includes the first to third coils 71-73.

[0061] The first coil 71 is configured to apply a component of the first additional magnetic field parallel to the X direction to the first detection circuit 10. In the following description, the term "first additional magnetic field" simply refers to the component of the first additional magnetic field parallel to the X direction applied to the first detection circuit 10. The driver 43 controls the direction and intensity of the first additional magnetic field by controlling the direction and magnitude of the current flowing through the first coil 71. In this embodiment, the first coil 71 has a first end 71a and a second end 71b as input / output terminals for the current flowing through the first coil 71. The first and second ends 71a and 71b are connected to the driver 43 of the processor 2. When a current flows from the first end 71a to the second end 71b, a first additional magnetic field in the X direction is applied to the first detection circuit 10. Furthermore, when a current flows in a direction from the second end 71b to the first end 71a, a first additional magnetic field in the −X direction is applied to the first detection circuit 10. The storage unit 44 of the processor 2 may store data indicating a correspondence relationship between the current flowing through the first coil 71 and the first additional magnetic field.

[0062] The second coil 72 is configured to apply a component of the second additional magnetic field parallel to the Y direction to the second detection circuit 20. In the following description, the term "second additional magnetic field" simply refers to the component of the second additional magnetic field parallel to the Y direction applied to the second detection circuit 20. The driver 43 controls the direction and intensity of the second additional magnetic field by controlling the direction and magnitude of the current flowing through the second coil 72. In this embodiment, the second coil 72 has a first end 72a and a second end 72b as input / output terminals for the current flowing through the second coil 72. The first and second ends 72a and 72b are connected to the driver 43 of the processor 2. When a current flows from the first end 72a to the second end 72b, a second additional magnetic field in the Y direction is applied to the second detection circuit 20. Furthermore, when a current flows in a direction from the second end 72b to the first end 72a, a second additional magnetic field in the -Y direction is applied to the second detection circuit 20. The storage unit 44 of the processor 2 may store data indicating the correspondence between the current flowing through the second coil 72 and the second additional magnetic field.

[0063] The third coil 73 is configured to apply a component of the third additional magnetic field parallel to the Z direction to the third detection circuit 30. In the following description, the term "third additional magnetic field" simply refers to the component of the third additional magnetic field parallel to the Z direction applied to the third detection circuit 30. The driver 43 controls the direction and intensity of the third additional magnetic field by controlling the direction and magnitude of the current flowing through the third coil 73. In this embodiment, the third coil 73 has a first end 73a and a second end 73b as input / output terminals for the current flowing through the third coil 73. The first and second ends 73a and 73b are connected to the driver 43 of the processor 2. When a current flows from the first end 73a to the second end 73b, a third additional magnetic field in the Z direction is applied to the third detection circuit 30. Furthermore, when a current flows in a direction from the second end 73b to the first end 73a, a third additional magnetic field in the -Z direction is applied to the third detection circuit 30. The storage unit 44 of the processor 2 may store data indicating a correspondence relationship between the current flowing through the third coil 73 and the third additional magnetic field.

[0064] Next, we will explain the processor 2. The processor 2 is configured to execute a detection value generation process, a sensitivity correction process, an offset correction process using an offset value, an offset correction process using an additional magnetic field, and a nonlinearity correction process.

[0065] First, the detection value generation process will be described. The detection value generation process is a process for generating three detection values ​​corresponding to the first to third magnetic field components MFx, MFy, and MFz, respectively. The first detection signal S1 output from the first detection circuit 10, the second detection signal S2 output from the second detection circuit 20, and the third detection signal S3 output from the third detection circuit 30 are input to the calculation unit 41 of the processor 2. Each of the first to third detection signals S1 to S3 is converted from an analog signal to a digital signal by an analog-to-digital converter (not shown) and input to the calculation unit 41.

[0066] As described above, the first detection signal S1 has a corresponding relationship with the first magnetic field component MFx. FIG. 11 is a characteristic diagram showing an example of the relationship between the first magnetic field component MFx and the first detection signal S1. In FIG. 11, the horizontal axis represents the strength of the first magnetic field component MFx, and the vertical axis represents the magnitude of the first detection signal S1. Note that in FIG. 11, the strength of the first magnetic field component MFx is represented by the value of magnetic flux density corresponding to the strength of the first magnetic field component MFx. In the following description, the strength of a magnetic field or a magnetic field component is represented by the value of magnetic flux density corresponding to the strength of the magnetic field or the magnetic field component.

[0067] 11, the strength of the first magnetic field component MFx is represented by a positive value when the strength of the first magnetic field component MFx is in the X direction, and is represented by a negative value when the strength of the first magnetic field component MFx is in the -X direction. As shown in FIG. 11, the magnitude of the first detection signal S1 changes depending on the strength of the first magnetic field component MFx. The calculation unit 41 is configured to generate a first detection value corresponding to the first magnetic field component MFx based on the first detection signal S1 when the first magnetic field component MFx is applied to the first detection circuit 10.

[0068] Here, the definition of the sensitivity of the first detection circuit 10 will be described. The sensitivity of the first detection circuit 10 is the ratio of a change in the first detection signal S1 to a change in the first magnetic field component MFx. The sensitivity of the first detection circuit 10 can be calculated from the correspondence between the first magnetic field component MFx and the first detection signal S1 as shown in FIG. 11. The storage unit 44 of the processor 2 may store data indicating the correspondence between the first magnetic field component MFx and the first detection signal S1 and data on the sensitivity of the first detection circuit 10. This data may be acquired before shipping or use of the magnetic sensor device 100, regarding the first additional magnetic field as the first magnetic field component MFx. The calculation unit 41 may generate the first detection value by, for example, a calculation including multiplying the first detection signal S1 by the sensitivity of the first detection circuit 10.

[0069] As described above, the second detection signal S2 has a corresponding relationship with the second magnetic field component MFy. Although not shown, the relationship between the second magnetic field component MFy and the second detection signal S2 is the same as the relationship between the first magnetic field component MFx and the first detection signal S1. The calculation unit 41 calculates the second detection circuit 20 Second A second detection value corresponding to the second magnetic field component MFy is generated based on the second detection signal S2 when the magnetic field component MFy is applied.

[0070] Similar to the sensitivity of the first detection circuit 10, the sensitivity of the second detection circuit 20 is the ratio of the change in the second detection signal S2 to the change in the second magnetic field component MFy. The sensitivity of the second detection circuit 20 can be calculated from the correspondence between the second magnetic field component MFy and the second detection signal S2. The storage unit 44 of the processor 2 may store data indicating the correspondence between the second magnetic field component MFy and the second detection signal S2 and data on the sensitivity of the second detection circuit 20. This data may be acquired before shipping or use of the magnetic sensor device 100, regarding the second additional magnetic field as the second magnetic field component MFy. The calculation unit 41 may generate the second detection value by, for example, a calculation including multiplying the second detection signal S2 by the sensitivity of the second detection circuit 20.

[0071] As described above, the third detection signal S3 has a correspondence relationship with the third magnetic field component MFz. FIG. 12 is a characteristic diagram showing an example of the relationship between the third magnetic field component MFz and the third detection signal S3. In FIG. 12, the horizontal axis represents the strength of the third magnetic field component MFz, and the vertical axis represents the magnitude of the third detection signal S3. In FIG. 12, the strength of the third magnetic field component MFz is represented by a positive value when the strength of the third magnetic field component MFz is in the Z direction, and the strength of the third magnetic field component MFz is represented by a negative value when the strength of the third magnetic field component MFz is in the −Z direction. As shown in FIG. 12, the magnitude of the third detection signal S3 changes depending on the strength of the third magnetic field component MFz. The calculation unit 41 generates a third detection value corresponding to the third magnetic field component MFz based on the third detection signal S3 when the target magnetic field is applied to the magnetic sensor 1.

[0072] Similar to the sensitivity of the first detection circuit 10, the sensitivity of the third detection circuit 30 is the ratio of the change in the third detection signal S3 to the change in the third magnetic field component MFz. The sensitivity of the third detection circuit 30 can be calculated from the correspondence between the third magnetic field component MFz and the third detection signal S3 as shown in FIG. 12. As can be seen from FIGS. 11 and 12, in this embodiment, the sensitivity of the third detection circuit 30 is lower than that of the first detection circuit 10. The storage unit 44 of the processor 2 may store data indicating the correspondence between the third magnetic field component MFz and the third detection signal S3 and data on the sensitivity of the third detection circuit 30. This data may be acquired before shipping or use of the magnetic sensor device 100, regarding the third additional magnetic field as the third magnetic field component MFz. The calculation unit 41 may generate the third detection value by, for example, multiplying the third detection signal S3 by the sensitivity of the third detection circuit 30.

[0073] The calculation unit 41 is configured to output the generated first to third detection values ​​to the outside of the magnetic sensor device 100.

[0074] Next, the sensitivity correction process will be described. The sensitivity correction process is a process for correcting the sensitivity of each of the first to third detection circuits 10, 20, and 30. First, the process for correcting the sensitivity of the first detection circuit 10 will be described. The control unit 42 of the processor 2 controls the first coil 71 of the magnetic field generator 70 via the drive unit 43 so that a first additional magnetic field is generated and changed. The control unit 42 generates data that associates the first detection signal S1 when the first additional magnetic field is changed in this manner with the strength of the first additional magnetic field, i.e., the strength of the first magnetic field component MFx. The strength of the first magnetic field component MFx can be determined from the magnitude of the current flowing through the first coil 71. The control unit 42 then stores the generated data in the memory unit 44 of the processor 2 as data indicating the correspondence between the first magnetic field component MFx and the first detection signal S1. In addition, the control unit 42 calculates the sensitivity of the first detection circuit 10 from data indicating the correspondence between the first magnetic field component MFx and the first detection signal S1, and updates the sensitivity data of the first detection circuit 10 stored in the memory unit 44.

[0075] Next, the process of correcting the sensitivity of the second detection circuit 20 will be described. The control unit 42 of the processor 2 controls the second coil 72 of the magnetic field generator 70 via the drive unit 43 to generate a second additional magnetic field and change the second additional magnetic field. The control unit 42 generates data linking the second detection signal S2 obtained when the second additional magnetic field is changed with the strength of the second additional magnetic field, i.e., the strength of the second magnetic field component MFy. The strength of the second magnetic field component MFy can be determined from the magnitude of the current flowing through the second coil 72. The control unit 42 then stores the generated data in the memory unit 44 of the processor 2 as data indicating the correspondence between the second magnetic field component MFy and the second detection signal S2. The control unit 42 also calculates the sensitivity of the second detection circuit 20 from the data indicating the correspondence between the second magnetic field component MFy and the second detection signal S2, and updates the sensitivity data of the second detection circuit 20 stored in the memory unit 44.

[0076] Next, the process of correcting the sensitivity of the third detection circuit 30 will be described. The control unit 42 of the processor 2 controls the third coil 73 of the magnetic field generator 70 via the drive unit 43 to generate a third additional magnetic field and change the third additional magnetic field. The control unit 42 generates data linking the third detection signal S3 when the third additional magnetic field is changed with the strength of the third additional magnetic field. The strength of the third additional magnetic field can be determined from the magnitude of the current flowing through the third coil 73. The control unit 42 then stores the generated data in the memory unit 44 of the processor 2 as data indicating the correspondence between the third additional magnetic field and the third detection signal S3. The control unit 42 also calculates the sensitivity of the third detection circuit 30 from the data indicating the correspondence between the third additional magnetic field and the third detection signal S3, and updates the sensitivity data of the third detection circuit 30 stored in the memory unit 44.

[0077] When an AC magnetic field is used as the first to third additional magnetic fields, error components having frequencies lower than the frequency of the AC magnetic field can be eliminated, thereby enabling more accurate correction of the sensitivity of each of the first to third detection circuits 10, 20, and 30.

[0078] Next, the offset correction process using the offset value will be described. The offset correction process is a process for correcting the offset of each of the first to third detection signals S1 to S3. The storage unit 44 of the processor 2 is configured to hold a first offset value that is the offset value of the first detection signal S1, a second offset value that is the offset value of the second detection signal S2, and a third offset value that is the offset value of the third detection signal S3. Each of the first to third offset values ​​is updated by an update process described below.

[0079] The control unit 42 of the processor 2 controls the calculation unit 41 to correct the offsets of the first to third detection signals S1 to S3 using the first to third offset values. The calculation unit 41 corrects the first detection signal S1, for example, by subtracting the first offset value from the first detection signal S1. Similarly, the calculation unit 41 corrects the second detection signal S2 by subtracting the second offset value from the second detection signal S2, and corrects the third detection signal S3 by subtracting the third offset value from the third detection signal S3.

[0080] Next, the offset correction process using the additional magnetic field will be described. Here, the third detection circuit 30 will be used as an example. First, parameters related to the sensitivity of the third detection circuit 30 will be described. One of the parameters related to sensitivity is sensitivity change. The sensitivity change is a parameter that indicates the amount of change in sensitivity when the strength of the third magnetic field component MFz is within a predetermined range from the sensitivity when the strength of the third magnetic field component MFz is within a reference range. The sensitivity when the strength of the third magnetic field component MFz is within the reference range may be, for example, the sensitivity when the strength of the third magnetic field component MFz is within a range that includes 0.

[0081] FIG. 13 is a characteristic diagram showing an example of the relationship between the third magnetic field component MFz and sensitivity change. In FIG. 13, the horizontal axis represents the third magnetic field component MFz, and the vertical axis represents the sensitivity change. As shown in FIG. 13, the absolute value of the sensitivity change is minimum when the intensity of the third magnetic field component MFz is within a predetermined range including zero. Furthermore, the absolute value of the sensitivity change increases as the intensity of the third magnetic field component MFz becomes smaller than zero, and also increases as the intensity of the third magnetic field component MFz becomes larger than zero. When the sensitivity of the third detection circuit 30 is a positive value, the sensitivity of the third detection circuit 30 is maximum when the intensity of the third magnetic field component MFz is within a predetermined range including zero. FIG. 13 shows that the sensitivity of the third detection circuit 30 decreases as the sensitivity of the third detection circuit 30 moves away from zero. The storage unit 44 of the processor 2 may store data indicating the correspondence relationship between the third magnetic field component MFz and the sensitivity of the third detection circuit 30, or may store data indicating the correspondence relationship between the third magnetic field component MFz and sensitivity change shown in Fig. 13 in addition to or instead of this data. These data may be data obtained using the third additional magnetic field before shipping or before using the magnetic sensor device 100.

[0082] The processor 2 corrects the offset of the third detection signal S3 using the third additional magnetic field by utilizing the sensitivity characteristics shown in FIG. 13. Below, with reference to FIG. 14, an overview of a correction method for correcting the offset of the third detection signal S3 using the third additional magnetic field will be described. The following description of the correction method includes a description of the correction method according to this embodiment. In the correction method, first, the control unit 42 of the processor 2 controls the driving unit 43 to apply the third additional magnetic field to the third detection circuit 30, and controls the calculation unit 41 to generate a first sensitivity, which is the sensitivity of the third detection circuit 30 in the first range, while controlling the driving unit 43 to change the strength of the third additional magnetic field within a first range (step S11).

[0083] Next, the control unit 42 controls the driving unit 43 to change the strength of the third additional magnetic field within a second range, while controlling the calculation unit 41 to generate a second sensitivity, which is the sensitivity of the third detection circuit 30 within the second range (step S12).

[0084] Next, the control unit 42 controls the calculation unit 41 to generate a first value that has a correspondence relationship with the intensity of the third magnetic field component MFz based on the first sensitivity and the second sensitivity (step S13).

[0085] Next, the control unit 42 controls the drive unit 43 to stop applying the third additional magnetic field to the third detection circuit 30 (step S14). Next, the control unit 42 controls the calculation unit 41 to generate a second value corresponding to the intensity of the third magnetic field component MFz based on the third detection signal S3 (step S15).

[0086] Next, the control unit 42 controls the calculation unit 41 to correct the offset of the third detection signal S3 based on the first value and the second value (step S16). Step S16 includes a first step in which the control unit 42 controls the calculation unit 41 to generate an offset value, a second step in which the control unit 42 executes an update process to update the offset value stored in the storage unit 44 with the generated offset value, and a third step in which the control unit 42 corrects the offset of the third detection signal S3 using the updated offset value.

[0087] The above series of steps are executed by the processor 2. Therefore, the processor 2 can also be said to be a correction device that executes offset correction processing using an additional magnetic field. Note that step S15 may be executed before step S11.

[0088] Among the above series of steps, the series of steps from step S11 to the first step of step S16 is also a generation method for generating an offset value of the third detection signal S3. Among the above series of steps, the series of steps from step S11 to the second step of step S16 is also an update method for updating the offset value of the third detection signal S3.

[0089] Next, the correction method will be described in more detail with specific examples of the first and second ranges. Here, the sensitivity of the third detection circuit 30 is assumed to be a positive value. Furthermore, when X is an arbitrary positive number, the range of the intensity of the third additional magnetic field from -XmT to 0mT is defined as the first range, and the range of the intensity of the third additional magnetic field from 0mT to XmT is defined as the second range. Note that, from the viewpoint of improving the accuracy of the determination, it is preferable that X is small. The first sensitivity of the third detection circuit 30 is generated by changing the intensity of the third additional magnetic field within the range of -XmT to 0mT. The second sensitivity of the third detection circuit 30 is generated by changing the intensity of the third additional magnetic field within the range of 0mT to XmT. When the intensity of the third magnetic field component MFz detected by the third detection circuit 30 is a positive value, the first sensitivity is greater than the second sensitivity, and when the intensity of the third magnetic field component MFz detected by the third detection circuit 30 is a negative value, the first sensitivity is less than the second sensitivity. Also, when the intensity of the third magnetic field component MFz detected by the third detection circuit 30 is 0, the first sensitivity and the second sensitivity are equal. In this way, the intensity of the third magnetic field component MFz can be determined by utilizing the sensitivity characteristics shown in FIG. 13.

[0090] When the sensitivity of the third detection circuit 30 is a negative value, the first sensitivity is greater than the second sensitivity when the intensity of the third magnetic field component MFz is a negative value, and when the intensity of the third magnetic field component MFz is a positive value, the first sensitivity is less than the second sensitivity. Also, similar to when the sensitivity of the third detection circuit 30 is a positive value, when the intensity of the third magnetic field component MFz is 0, the first sensitivity and the second sensitivity are equal.

[0091] When the first sensitivity and the second sensitivity are equal, the first value, which is generated based on the first and second sensitivities and represents the intensity of the third magnetic field component MFz, may be set to 0. In this case, since the intensity of the third magnetic field component MFz is 0, if there is no offset in the third detection signal S3, the second value, which is generated based on the third detection signal S3 and represents the intensity of the third magnetic field component MFz, will also be 0. However, if there is an offset in the third detection signal S3, the second value will be a value other than 0 (e.g., 1.2 mT). In this case, the magnitude of the third detection signal S3 corresponding to the second value becomes the offset value. The magnitude of the third detection signal S3 corresponding to the second value can be identified, for example, by referring to data stored in the storage unit 44 and indicating the correspondence between the third magnetic field component MFz and the third detection signal S3.

[0092] In the above description, whether the strength of the third magnetic field component MFz is a positive value or a negative value is determined based on the magnitude relationship between the first sensitivity and the second sensitivity. This determination is essentially equivalent to determining whether the direction of the third magnetic field component MFz is the Z direction or the −Z direction.

[0093] The offset correction process using the third additional magnetic field is performed before or during use of the magnetic sensor device 100.

[0094] The above-described first and second ranges are merely examples. The first and second ranges can be modified in various ways as long as the intensity of the third magnetic field component MFz can be determined. For example, the boundary between the first and second ranges does not have to be 0. Alternatively, the first and second ranges do not have to be continuous.

[0095] Up to this point, the offset correction process using the additional magnetic field has been described using the third detection circuit 30 as an example. The above description also applies to the first detection circuit 10 and the second detection circuit 20.

[0096] Next, the nonlinearity correction process will be described. Here, the third detection circuit 30 will be used as an example. First, the definition of the linearity of the third detection signal S3 will be described. Linearity is defined using a characteristic curve (see FIG. 12) that represents the correspondence relationship between the strength of the third magnetic field component MFz and the magnitude of the third detection signal S3, and an approximation line of this characteristic curve. In other words, linearity is a value obtained by dividing the residual between the value on the approximation line and the value on the characteristic curve for each of the strengths of the multiple third magnetic field components MFz by the magnitude of the variable range of the third detection signal S3. It can be said that the smaller the linearity value, the better the linearity.

[0097] FIG. 15 is a characteristic diagram showing the linearity of the third detection signal S3. In FIG. 15, the horizontal axis represents the intensity of the third magnetic field component MFz, and the vertical axis represents the linearity of the third detection signal S3. As shown in FIG. 15, the absolute value of the linearity increases as the absolute value of the intensity of the third magnetic field component MFz increases. The storage unit 44 of the processor 2 may store data showing the correspondence relationship between the intensity of the third magnetic field component MFz and the linearity of the third detection signal S3. The above data may be data acquired before shipping or use of the magnetic sensor device 100, regarding the third additional magnetic field as the third magnetic field component MFz.

[0098] The storage unit 44 may further store a correction coefficient for correcting nonlinearity of the change in the third detection signal S3 with respect to the change in the strength of the third magnetic field component MFz. As shown in Fig. 15, the linearity changes depending on the strength of the third magnetic field component MFz, so the correction coefficient also changes depending on the strength of the third magnetic field component MFz. The correction coefficient may be data acquired before shipping or use of the magnetic sensor device 100, regarding the third additional magnetic field as the third magnetic field component MFz.

[0099] The control unit 42 of the processor 2 may control the calculation unit 41 to correct the third detection signal using the correction coefficient so that the characteristic curve approaches an approximate straight line.

[0100] Up to this point, the nonlinearity correction process has been described using the third detection circuit 30 as an example. The above description also applies to the first detection circuit 10 and the second detection circuit 20.

[0101] When the target magnetic field is an AC magnetic field, each of the first to third detection signals S1 to S3 is distorted due to the AC magnetic field. By performing a nonlinear correction process on the first to third detection signals S1 to S3, the distortion of each of the first to third detection signals S1 to S3 can be corrected. This reduces the detection error of each of the first to third detection circuits 10, 20, and 30.

[0102] Next, the operation and effect of the magnetic sensor device 100, magnetic sensor system 200, and correction method according to this embodiment will be described. In this embodiment, as described above, a first sensitivity is generated, which is the sensitivity of the third detection circuit 30 when the strength of the third additional magnetic field is changed within a first range. A second sensitivity is generated, which is the sensitivity of the third detection circuit 30 when the strength of the third additional magnetic field is changed within a second range. Then, a third detection value corresponding to the strength of the third magnetic field component MFz is generated based on the third detection signal S3, the first sensitivity, and the second sensitivity. Specifically, the third detection value is generated using the third detection signal S3 corrected based on the first sensitivity and the second sensitivity.

[0103] In this embodiment, an offset value is generated based on the first sensitivity and the second sensitivity, and the offset of the third detection signal S3 is corrected using this offset value. As will be described in the second embodiment, the offset of the third detection signal S3 can also be corrected by using the center coordinates of a virtual sphere. However, in order to improve the calculation accuracy of the center coordinates of the virtual sphere, data from many measurement points is required, which increases the calculation load.

[0104] In contrast, in this embodiment, the offset of the third detection signal S3 can be corrected by a relatively simple method using the first sensitivity and the second sensitivity. Furthermore, in order to obtain the center coordinates of the virtual sphere, a predetermined operation of moving the magnetic sensor device 100 is required to acquire multiple measurement points. In contrast, in this embodiment, such a predetermined operation is not required. For these reasons, according to this embodiment, the detection error of the third detection circuit 30 caused by the offset of the third detection signal S3 can be reduced by a simple method.

[0105] In the present embodiment, the third detection circuit 30 includes a plurality of yokes 55. If the plurality of yokes 55 are magnetized in a predetermined direction due to a disturbance magnetic field or the like, an offset may occur in the third detection signal S3. In contrast, according to the present embodiment, as described above, the offset of the third detection signal S3 can be corrected by a simple method.

[0106] If multiple yokes 55 are magnetized in a predetermined direction, there may be a deviation in the sensitivity of the third detection circuit 30. In contrast, according to the present embodiment, the sensitivity of the third detection circuit 30 can be corrected using the third additional magnetic field.

[0107] The above description of the third detection circuit 30 basically also applies to the first detection circuit 10. In this embodiment, a first sensitivity is generated, which is the sensitivity of the first detection circuit 10 when the strength of the first additional magnetic field is changed within a first range. A second sensitivity is generated, which is the sensitivity of the first detection circuit 10 when the strength of the first additional magnetic field is changed within a second range. A first detection value corresponding to the strength of the first magnetic field component MFx is generated based on the first detection signal S1, the first sensitivity, and the second sensitivity. Specifically, the first detection value is generated using the first detection signal S1 corrected based on the first sensitivity and the second sensitivity. This embodiment allows a simple method to reduce the detection error of the first detection circuit 10 due to an offset in the first detection signal S1.

[0108] The above description of the third detection circuit 30 also basically applies to the second detection circuit 20. In this embodiment, a first sensitivity is generated, which is the sensitivity of the second detection circuit 20 when the strength of the second additional magnetic field is changed within a first range. A second sensitivity is generated, which is the sensitivity of the second detection circuit 20 when the strength of the second additional magnetic field is changed within a second range. A second detection value corresponding to the strength of the second magnetic field component MFy is generated based on the second detection signal S2, the first sensitivity, and the second sensitivity. Specifically, the second detection value is generated using the second detection signal S2 corrected based on the first sensitivity and the second sensitivity. This embodiment allows a simple method to reduce the detection error of the second detection circuit 20 due to an offset in the second detection signal S2.

[0109] [Second embodiment] Next, a second embodiment of the present invention will be described. First, with reference to FIG. 16, the configuration of a magnetic sensor system 200 according to this embodiment will be briefly described. The magnetic sensor system 200 includes a magnetic sensor device 100 according to this embodiment and an external processor 201 as a so-called host processor. The configuration of the magnetic sensor device 100 according to this embodiment is similar to the configuration of the magnetic sensor device 100 according to the first embodiment. In particular, in this embodiment, the target magnetic field of the magnetic sensor 1 of the magnetic sensor device 100 is the earth's magnetism.

[0110] The hardware that constitutes the external processor 201 is different from the hardware that constitutes the processor 2. The external processor 201 is constituted by, for example, a microcomputer.

[0111] Next, the operation of the external processor 201 will be described. The external processor 201 is configured to receive the first to third detection signals S1 to S3 from the processor 2. In the reference coordinate system described in the first embodiment, coordinates (S1, S2, S3) representing a set of values ​​of the first to third detection signals S1 to S3 at a certain timing are defined as measurement points. When the magnetic sensor device 100 is used, multiple measurement points are acquired at multiple timings and plotted on the reference coordinate system, and the distribution of the multiple measurement points can be approximated by a sphere. In this embodiment, the sphere that approximates the distribution of the multiple measurement points is called an approximated sphere. The multiple measurement points are distributed on or near the approximated sphere.

[0112] The external processor 201 generates the center coordinates and radius of a virtual sphere having an approximated spherical surface by calculation using the first to third detection signals S1 to S3. The center coordinates and radius of the virtual sphere may be obtained, for example, by using four measurement points and an equation for the sphere to determine an approximated spherical surface including the four measurement points. Alternatively, the center coordinates and radius of the virtual sphere may be obtained by using five or more measurement points, an equation for the sphere, and the least squares method to determine an approximated spherical surface closest to five or more measurement points.

[0113] As described above, the multiple measurement points are distributed on or near the approximate sphere. If no offset occurs, the center coordinates of the virtual sphere during use of the magnetic sensor device 100 will match or nearly match the center coordinates of the virtual sphere immediately after starting use of the magnetic sensor device 100. However, if an offset occurs in each of the first to third detection signals S1 to S3 due to a disturbance other than geomagnetism, the center coordinates of the virtual sphere will deviate from the initial values ​​of the center coordinates of the virtual sphere (for example, the center coordinates of the virtual sphere at the time of shipment).

[0114] The processor 2 of the magnetic sensor device 100 uses the data of the center coordinates of the virtual sphere to correct the offset of each of the first to third detection signals S1 to S3 so that the center coordinates of the virtual sphere in use coincide with the initial values ​​of the center coordinates of the virtual sphere. Here, the center coordinates of the virtual sphere are represented as (cx, cy, cz). The offset of the first detection signal S1 can be corrected, for example, by subtracting cx from the first detection signal S1. Similarly, the offset of the second detection signal S2 can be corrected, for example, by subtracting cy from the second detection signal S2. Similarly, the offset of the third detection signal S3 can be corrected, for example, by subtracting cz from the third detection signal S3. The external processor 201 essentially calculates the offset caused by disturbances other than geomagnetism. The offset corrected by the processor 2 is caused by disturbances other than geomagnetism. The offset caused by disturbances other than geomagnetism includes an offset caused by a disturbance magnetic field and an offset caused by the MR element 50.

[0115] In this embodiment, data on the center coordinates of the virtual sphere generated by the external processor 201 is configured to be input to the processor 2. The storage unit 44 of the processor 2 updates the offset values ​​of the first to third detection signals S1 to S3 using the data on the center coordinates of the virtual sphere.

[0116] Next, the operation of the processor 2 in this embodiment will be described. As in the first embodiment, the processor 2 generates first and second sensitivities using the first to third additional magnetic fields, thereby making it possible to detect the magnetic fields applied to the first to third detection circuits 10, 20, and 30. In this case, the offset of the first to third detection signals S1 to S3 can be detected by comparing the intensity of the component in a predetermined direction of the magnetic field applied to the first to third detection circuits 10, 20, and 30 detected based on the first and second sensitivities with the intensity of the component in a predetermined direction of the magnetic field applied to the first to third detection circuits 10, 20, and 30 detected without using the first to third additional magnetic fields.

[0117] When the processor 2 detects an offset in the first to third detection signals S1 to S3, the processor 2 may output a command signal to the external processor 201 to generate the center coordinates and radius of a virtual sphere having an approximate spherical surface.

[0118] Next, the operation and effect of the magnetic sensor system 200 according to this embodiment will be described. According to this embodiment, the offsets of the first to third detection signals S1 to S3 can be easily detected by the processor 2. As a result, according to this embodiment, the load on the external processor 201 can be reduced.

[0119] The present invention is not limited to the above-described embodiments and various modifications are possible. For example, the magnetic sensor 1 in the present embodiment may not include any of the first to third detection circuits 10, 20, and 30.

[0120] The first coil 71 and the second coil 72 may be arranged so as to overlap both the first and second detection circuits 10, 20. The first to third coils 71 to 73 may be arranged above the magnetic sensor 1.

[0121] The target magnetic field may also be an AC magnetic field. In this case, the first to third detection circuits 10, 20, and 30 of the magnetic sensor 1 are connected to the processor 2 using AC coupling capacitors. In this case, the processor 2 generates first and second sensitivities using the AC magnetic field as the additional magnetic field, thereby enabling detection of a static magnetic field applied to the magnetic sensor 1.

[0122] As described above, the magnetic sensor device of the present invention includes a magnetic sensor configured to detect a magnetic field component that is a component of a target magnetic field in a predetermined direction and output a detection signal, a magnetic field generator configured to generate an additional magnetic field used to measure the sensitivity of the magnetic sensor in the predetermined direction, and a processor configured to receive the detection signal. The processor is configured to generate a first sensitivity that is the sensitivity of the magnetic sensor when the strength of the additional magnetic field is changed within a first range, generate a second sensitivity that is the sensitivity of the magnetic sensor when the strength of the additional magnetic field is changed within a second range, and generate a detection value that corresponds to the magnetic field component based on the detection signal, the first sensitivity, and the second sensitivity.

[0123] In the magnetic sensor device of the present invention, the sensitivity of the magnetic sensor may change depending on the strength of a component of a magnetic field applied to the magnetic sensor in a predetermined direction.

[0124] In the magnetic sensor device of the present invention, the processor may determine that the intensity of the component of the magnetic field applied to the magnetic sensor in a predetermined direction is zero when the first sensitivity and the second sensitivity are equal.

[0125] In addition, in the magnetic sensor device of the present invention, the processor may use the first sensitivity and the second sensitivity to determine whether the direction of a component of a predetermined direction of the magnetic field applied to the magnetic sensor is a first direction or a second direction opposite to the first direction.

[0126] In addition, in the magnetic sensor device of the present invention, the processor may be further configured to store data indicating the correspondence between the intensity of a component of the magnetic field applied to the magnetic sensor in a specified direction and the sensitivity of the magnetic sensor.

[0127] In the magnetic sensor device of the present invention, the magnetic field generator may include a coil. The strength of the additional magnetic field may vary depending on the magnitude of a current flowing through the coil. The processor may be further configured to store data indicating a correspondence relationship between the magnitude of the current flowing through the coil and the strength of the additional magnetic field.

[0128] In the magnetic sensor device of the present invention, the magnetic field generator may be configured to generate an AC magnetic field as the additional magnetic field.

[0129] Furthermore, in the magnetic sensor device of the present invention, the processor may correct the detection signal based on the first sensitivity and the second sensitivity. The processor may be further configured to hold an offset value of the detection signal. The processor may correct the detection signal using the offset value. The processor may generate a first value representing the strength of a component of a magnetic field applied to the magnetic sensor in a predetermined direction based on the first sensitivity and the second sensitivity at a predetermined timing, generate a second value representing the strength of the component of a magnetic field applied to the magnetic sensor in the predetermined direction based on the detection signal at the predetermined timing, and update the offset value based on the first value and the second value. The predetermined timing may be before use of the magnetic sensor device. Alternatively, the predetermined timing may be during use of the magnetic sensor device.

[0130] In the magnetic sensor device of the present invention, the processor may be further configured to store a correction coefficient that corrects nonlinearity in a change in the detection signal relative to a change in the strength of a component of the magnetic field applied to the magnetic sensor in a predetermined direction. The processor may correct the detection signal using the correction coefficient. The correction coefficient may change according to the strength of the component of the magnetic field applied to the magnetic sensor in the predetermined direction. The processor may generate the correction coefficient by changing the strength of the additional magnetic field.

[0131] In the magnetic sensor device of the present invention, the magnetic sensor may include a magnetic detection element and a yoke made of a soft magnetic material, and the yoke may be configured to generate an output magnetic field component detected by the magnetic detection element based on a component of a magnetic field applied to the magnetic sensor in a predetermined direction.

[0132] In the magnetic sensor device of the present invention, the magnetic sensor may include a magnetoresistive element.

[0133] In the magnetic sensor device of the present invention, the magnetic sensor and the processor may each have an upper surface and a lower surface facing opposite to each other. The magnetic sensor may be mounted on the processor with the lower surface of the magnetic sensor facing the upper surface of the processor. The magnetic field generator may include a coil. The coil may be disposed between the upper surface of the magnetic sensor and the lower surface of the processor.

[0134] The magnetic sensor system of the present invention includes the magnetic sensor device of the present invention and an external processor. The detection signals include a first signal, a second signal, and a third signal that correspond to components of a target magnetic field at a reference position in three different directions. The external processor generates center coordinate data of a virtual sphere having a spherical surface that approximates the distribution of multiple measurement points at multiple times when coordinates representing a set of values ​​of the first to third signals at a certain timing are taken as measurement points in an orthogonal coordinate system defined by three axes for representing the values ​​of the first to third signals. The processor corrects the offset of each of the first to third signals using the center coordinate data.

[0135] In the magnetic sensor system of the present invention, the offset corrected by the processor may be caused by a disturbance other than the geomagnetic field.

[0136] A correction method of the present invention is a correction method for correcting a detection signal of a magnetic sensor configured to detect a magnetic field component that is a component of a target magnetic field in a predetermined direction. The correction method of the present invention applies an additional magnetic field used to measure the sensitivity of the magnetic sensor in the predetermined direction to the magnetic sensor, and generates a first sensitivity that is the sensitivity of the magnetic sensor while changing the strength of the additional magnetic field within a first range, generates a second sensitivity that is the sensitivity of the magnetic sensor while changing the strength of the additional magnetic field within a second range, generates a first value that corresponds to the strength of the component of the magnetic field in the predetermined direction applied to the magnetic sensor based on the first sensitivity and the second sensitivity, generates a second value that corresponds to the strength of the component of the magnetic field in the predetermined direction applied to the magnetic sensor based on the detection signal, and corrects an offset of the detection signal based on the first value and the second value. [Explanation of symbols]

[0137] 1...magnetic sensor, 2...processor, 10...first detection circuit, 20...second detection circuit, 30...third detection circuit, 41...calculation unit, 42...control unit, 43...drive unit, 44...memory unit, 50, 50A, 50B...MR element, 55...yoke, 61...lower electrode, 62...upper electrode, 70...magnetic field generator, 71...first coil, 72...second coil, 73...third coil, 100...magnetic sensor device, 200...magnetic sensor system, 201...external processor, MFx...first magnetic field component, MFy...second magnetic field component, MFz...third magnetic field component, R11 to R14, R21 to R24, R31 to R34...resistance units, S1...first detection signal, S2...second detection signal, S3...third detection signal.

Claims

1. a magnetic sensor configured to detect a magnetic field component that is a component in a predetermined direction of a target magnetic field and output a detection signal; a magnetic field generator configured to generate an additional magnetic field used to measure the sensitivity of the magnetic sensor in the predetermined direction; a processor configured to receive the detection signal; The processor: generating a first sensitivity, which is the sensitivity of the magnetic sensor when the strength of the additional magnetic field is changed within a first range; generating a second sensitivity, which is the sensitivity of the magnetic sensor when the strength of the additional magnetic field is changed within a second range; generating a detection value corresponding to the magnetic field component based on the detection signal, the first sensitivity, and the second sensitivity; a correction coefficient for correcting nonlinearity of a change in the detection signal with respect to a change in the strength of a component of the magnetic field applied to the magnetic sensor in the predetermined direction; The magnetic sensor device is characterized in that the processor corrects the detection signal using the correction coefficient.

2. 2. The magnetic sensor device according to claim 1, wherein the sensitivity of the magnetic sensor varies depending on the intensity of a component of the magnetic field applied to the magnetic sensor in the predetermined direction.

3. 2. The magnetic sensor device according to claim 1, wherein the processor determines that the intensity of the component of the magnetic field applied to the magnetic sensor in the predetermined direction is zero when the first sensitivity and the second sensitivity are equal.

4. 2. The magnetic sensor device according to claim 1, wherein the processor uses the first sensitivity and the second sensitivity to determine whether the direction of the component of the magnetic field applied to the magnetic sensor in the predetermined direction is a first direction or a second direction opposite to the first direction.

5. The magnetic sensor device according to claim 1, wherein the processor is further configured to store data indicating a correspondence between the strength of the component of the magnetic field applied to the magnetic sensor in the specified direction and the sensitivity of the magnetic sensor.

6. the magnetic field generator includes a coil; 2. The magnetic sensor device according to claim 1, wherein the strength of the additional magnetic field varies depending on the magnitude of the current flowing through the coil.

7. 7. The magnetic sensor device according to claim 6, wherein the processor is further configured to hold data indicating a correspondence relationship between the magnitude of the current flowing through the coil and the strength of the additional magnetic field.

8. 2. The magnetic sensor device according to claim 1, wherein the magnetic field generator is configured to generate an AC magnetic field as the additional magnetic field.

9. The magnetic sensor device according to claim 1 , wherein the processor corrects the detection signal based on the first sensitivity and the second sensitivity.

10. The processor is further configured to maintain an offset value of the detection signal; The magnetic sensor device according to claim 9 , wherein the processor corrects the detection signal using the offset value.

11. The magnetic sensor device of claim 10, characterized in that the processor generates a first value representing the strength of a component of a magnetic field applied to the magnetic sensor in a predetermined direction based on the first sensitivity and the second sensitivity at a predetermined timing, generates a second value representing the strength of the component of a magnetic field applied to the magnetic sensor in a predetermined direction based on the detection signal at the predetermined timing, and updates the offset value based on the first value and the second value.

12. 12. The magnetic sensor device according to claim 11, wherein the predetermined timing is before the magnetic sensor device is used.

13. 12. The magnetic sensor device according to claim 11, wherein the predetermined timing occurs when the magnetic sensor device is in use.

14. the correction coefficient changes depending on the strength of a component of the magnetic field applied to the magnetic sensor in the predetermined direction; 2. The magnetic sensor device of claim 1, wherein the processor generates the correction factor by varying the strength of the additional magnetic field.

15. the magnetic sensor includes a magnetic detection element and a yoke made of a soft magnetic material; 2. The magnetic sensor device according to claim 1, wherein the yoke is configured to generate an output magnetic field component that is detected by the magnetic detection element based on a component of the magnetic field applied to the magnetic sensor in the predetermined direction.

16. 2. The magnetic sensor device according to claim 1, wherein the magnetic sensor includes a magnetoresistive element.

17. each of the magnetic sensor and the processor having an upper surface and a lower surface facing opposite to each other; the magnetic sensor is mounted on the processor with the bottom surface of the magnetic sensor facing the top surface of the processor; the magnetic field generator includes a coil; 2. The magnetic sensor device according to claim 1, wherein the coil is disposed between the upper surface of the magnetic sensor and the lower surface of the processor.

18. The magnetic sensor device according to claim 1; an external processor, the detection signal includes a first signal, a second signal, and a third signal corresponding to components of the target magnetic field at a reference position in three different directions; the external processor generates data of center coordinates of a virtual sphere having a spherical surface that approximates a distribution of a plurality of measurement points at a plurality of times when coordinates representing a set of values ​​of the first to third signals at a certain timing are taken as measurement points in an orthogonal coordinate system defined by three axes for representing values ​​of the first to third signals; The magnetic sensor system is characterized in that the processor corrects offsets of the first to third signals using the data of the center coordinates.

19. 19. The magnetic sensor system according to claim 18, wherein the offset corrected by the processor is caused by a disturbance other than the geomagnetic field.

20. 1. A correction method for correcting a detection signal of a magnetic sensor configured to detect a magnetic field component that is a component of a target magnetic field in a predetermined direction, comprising: The correction method includes: applying an additional magnetic field to the magnetic sensor, the additional magnetic field being used to measure the sensitivity of the magnetic sensor in the predetermined direction, and varying the strength of the additional magnetic field within a first range to generate a first sensitivity, which is the sensitivity of the magnetic sensor; generating a second sensitivity of the magnetic sensor while varying the strength of the additional magnetic field through a second range; generating a first value corresponding to the intensity of a component of the magnetic field applied to the magnetic sensor in the predetermined direction based on the first sensitivity and the second sensitivity; generating a second value corresponding to the intensity of the component of the magnetic field applied to the magnetic sensor in the predetermined direction based on the detection signal; correcting an offset of the detection signal based on the first value and the second value; A correction method comprising correcting the detection signal using a correction coefficient that corrects nonlinearity of a change in the detection signal relative to a change in the strength of the component of the magnetic field applied to the magnetic sensor in the specified direction.

Citation Information

Patent Citations

  • Measuring instrument, azimuth measuring instrument, calibration program and calibration method

    JP2004309227A

  • Earth magnetism detecting program and electronic compass

    JP2009204305A

  • Geomagnetism measuring device, geomagnetism measuring method, and geomagnetism measuring program

    JP2013057552A

  • Magnetic sensor

    JP2016166748A

  • Magnetic sensor device

    JP2020060457A