Magnetic sensor

WO2026177108A1PCT designated stage Publication Date: 2026-08-27TDK CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2026/005617
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-18
Filing Date
2026-02-17
Publication Date
2026-08-27

Smart Images

  • Figure JP2026005617_27082026_PF_FP_ABST
    Figure JP2026005617_27082026_PF_FP_ABST
Patent Text Reader

Abstract

A magnetic sensor (1) according to the present invention comprises: a first detection circuit (101) including a plurality of first MR elements (50); a second detection circuit (102) including a plurality of second MR elements (50); and a support member (30) including a first inclined surface (31a) and a second inclined surface (31b). At least some among the plurality of first MR elements (50) are disposed on the first inclined surface (31a), and at least some among the plurality of second MR elements (50) are disposed on the second inclined surface (31b). As a result of the center (C101) of the first detection circuit (101) and the center (C102) of the second detection circuit (102) being aligned in the X-axis direction, the error between the magnitude of a target magnetic field detected by the first detection circuit (101) and the magnitude of the target magnetic field detected by the second detection circuit (102) can be suppressed.
Need to check novelty before this filing date? Find Prior Art

Description

Magnetic sensor

[0001] The present disclosure relates to a magnetic sensor including an anisotropic magnetoresistive effect element.

[0002] In recent years, magnetic sensors have been used in various applications. As magnetic sensors, there are those using a magnetoresistive effect element provided on a substrate. As magnetoresistive effect elements, there are AMR elements using the anisotropic magnetoresistive effect, GMR elements using the giant magnetoresistive effect, TMR elements using the tunneling magnetoresistive effect, and the like.

[0003] In a system including a magnetic sensor, there are cases where it is desired to detect a magnetic field including a component in a direction perpendicular to the surface of the substrate by a magnetoresistive effect element provided on the substrate. In this case, by arranging the magnetoresistive effect element on an inclined surface formed on the substrate, a magnetic field including a component in a direction perpendicular to the surface of the substrate can be detected.

[0004] Japanese Patent Application Laid-Open No. 2020-197491 (JP2020-197491A) discloses a magnetic sensor including a spin valve type magnetoresistive effect element arranged on an inclined surface. Further, Japanese Patent Application Laid-Open No. 2020-197491 (JP2020-197491A) discloses that the spin valve type magnetoresistive effect element may be a tunneling magnetoresistive effect element or a giant magnetoresistive effect element.

[0005] Japanese Patent Application Laid-Open No. 9-219546 (JPH09219546A) discloses a magnetoresistive effect device in which two magnetic thin film stripes are arranged in parallel with a groove on each inclined surface of a plurality of grooves formed on a silicon crystal substrate.

[0006] U.S. Patent Application Publication No. 2005 / 0270020A1 discloses a magnetic sensor unit in which a magnetoresistive strip is arranged on an inclined surface.

[0007] U.S. Patent Application Publication No. US2010 / 0327864A1 discloses a magnetic resistance sensor in which a magnetoresistive effect element formed by a strip of a magnetoresistive material is provided on an inclined wall, and a barb pole is provided on the magnetoresistive effect element.

[0008] Japanese Patent Publication No. 2020-197491, Japanese Patent Publication No. 9-219546, U.S. Patent Publication US2005 / 0270020A1, U.S. Patent Publication US2010 / 0327864A1

[0009] Magnetic sensors are sometimes used in environments with strong external magnetic fields. Furthermore, some systems that include magnetic sensors detect the magnetic field of a magnet moving relative to the sensor. In such systems, magnets that generate relatively strong magnetic fields may be used.

[0010] One of the purposes of this disclosure is to provide a magnetic sensor that can perform stable detection even when a relatively strong magnetic field is applied.

[0011] A magnetic sensor according to a first aspect of the present disclosure includes a substrate having a reference plane; a first detection circuit including a plurality of first magnetoresistive elements for detecting a magnetic field and configured to generate a first detection signal; a second detection circuit including a plurality of second magnetoresistive elements for detecting a magnetic field and configured to generate a second detection signal having a different phase from the first detection signal; and a support member disposed on the substrate and supporting the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements. The support member includes a first inclined surface and a second inclined surface, respectively, inclined with respect to the reference plane. At least a portion of the plurality of first magnetoresistive elements are arranged on the first inclined surface. At least a portion of the plurality of second magnetoresistive elements are arranged on the second inclined surface. The center of the first detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region in a plan view from a direction perpendicular to the reference plane where the plurality of first magnetoresistive elements are arranged. The center of the second detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the multiple second magnetoresistive effect elements are arranged in a plan view from a direction perpendicular to the reference plane. The second detection circuit is aligned with respect to the first detection circuit based on the relationship between a second position, which represents the position of the center of the second detection circuit in a first direction parallel to the reference plane, and a first position, which represents the position of the center of the first detection circuit in the first direction.

[0012] A magnetic sensor according to a second aspect of the present disclosure comprises a substrate having a reference plane; a first detection circuit including a plurality of first magnetoresistive elements for detecting a magnetic field and configured to generate a first detection signal; a second detection circuit including a plurality of second magnetoresistive elements for detecting a magnetic field and configured to generate a second detection signal having a different phase from the first detection signal; and a support member for supporting the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements. The support member includes a plurality of inclined surfaces, each inclined with respect to the reference plane. The plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements are arranged on the plurality of inclined surfaces. The center of the first detection circuit in a plan view from a direction perpendicular to the reference plane is the center in a plan view from a direction perpendicular to the reference plane of the region where the first group of inclined surfaces on which the plurality of first magnetoresistive elements are arranged is located. The center of the second detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the second group of inclined surfaces, on which multiple second magnetoresistive effect elements are arranged, is located, in a plan view from a direction perpendicular to the reference plane. The second group of inclined surfaces is aligned with respect to the first group of inclined surfaces based on the relationship between a second position representing the center of the region where the second group of inclined surfaces is located in a first direction parallel to the reference plane, and a first position representing the center of the region where the first group of inclined surfaces is located in the first direction.

[0013] The technology disclosed herein enables the realization of a magnetic sensor that can detect magnetic fields stably even when relatively strong magnetic fields are applied.

[0014] Figure 1 is a perspective view showing the schematic configuration of a magnetic sensor device according to the first embodiment of this disclosure. Figure 2 is an explanatory diagram showing the operation of a magnetic sensor device according to the first embodiment of this disclosure. Figure 3 is a characteristic diagram schematically showing the strength of multiple magnetic field components in the first embodiment of this disclosure. Figure 4A is an explanatory diagram showing the relationship between relative angle and resistance in the first embodiment of this disclosure. Figure 4B is a characteristic diagram showing the relationship between the position of the magnetic field generator and the relative angle in the first embodiment of this disclosure. Figure 5 is a perspective view showing the schematic configuration of a magnetic sensor device according to the first embodiment of this disclosure. Figure 6 is an explanatory diagram showing an inclined surface structure according to the first embodiment of this disclosure. Figure 7A is an explanatory diagram for explaining the inclined surface coordinate system according to the first embodiment of this disclosure. Figure 7B is an explanatory diagram for explaining the inclined surface coordinate system according to the first embodiment of this disclosure. Figure 8 is an explanatory diagram for explaining the definitions of current angle and magnetization angle in the first embodiment of this disclosure. Figure 9A is a circuit diagram showing the circuit configuration of a magnetic sensor according to the first embodiment of this disclosure. Figure 9B is a functional block diagram showing a magnetic sensor and processor according to a first embodiment of the present disclosure. Figure 10A is a plan view showing the first and second magnetoresistive elements in a first embodiment of the present disclosure. Figure 10B is a plan view showing the third and fourth magnetoresistive elements in a first embodiment of the present disclosure. Figure 11A is an explanatory diagram for illustrating the first and second directions in a first embodiment of the present disclosure. Figure 11B is an explanatory diagram for illustrating the third and fourth directions in a first embodiment of the present disclosure. Figure 11C is an explanatory diagram showing the relationship between the first and fourth directions in a first embodiment of the present disclosure. Figure 11D is an explanatory diagram showing the relationship between the second and third directions in a first embodiment of the present disclosure. Figure 12 is a waveform diagram showing an example of the resistance values ​​of the first and second magnetoresistive elements in a first embodiment of the present disclosure. Figure 13 is a waveform diagram showing an example of the resistance values ​​of the third and fourth magnetoresistive elements in the first embodiment of the present disclosure. Figure 14 is a waveform diagram showing an example of the first and second detection signals in the first embodiment of the present disclosure.Figure 15 is a plan view showing a first example of a plurality of magnetoresistive elements, a plurality of first wirings, and a plurality of second wirings in a first embodiment of the present disclosure. Figure 16 is a plan view showing a second example of a plurality of magnetoresistive elements, a plurality of first wirings, and a plurality of second wirings in a first embodiment of the present disclosure. Figure 17 is a plan view showing a third example of a plurality of magnetoresistive elements, a plurality of first wirings, and a plurality of second wirings in a first embodiment of the present disclosure. Figure 18 is a plan view showing two inclined surfaces of a single protrusion in a first embodiment of the present disclosure. Figure 19 is a plan view showing a magnetic sensor of a first comparative example. Figure 20 is a plan view showing a first example of a magnetic sensor according to a first embodiment of the present disclosure. Figure 21 is a plan view showing a second example of a magnetic sensor according to a first embodiment of the present disclosure. Figure 22 is a cross-sectional view showing a modified example of a magnetic sensor according to a first embodiment of the present disclosure. Figure 23 is a circuit diagram showing the circuit configuration of a magnetic sensor according to a second embodiment of the present disclosure. Figure 24 is a plan view showing a magnetic sensor of a second comparative example. Figure 25 is a plan view showing a first example of a magnetic sensor according to a second embodiment of the present disclosure. Figure 26 is a plan view showing a second example of a magnetic sensor according to a second embodiment of the present disclosure. Figure 27 is a plan view showing a third example of a magnetic sensor according to a second embodiment of the present disclosure. Figure 28 is a plan view showing a magnetoresistive element in a third embodiment of the present disclosure. Figure 29A is a plan view showing the first and second magnetoresistive elements in a fourth embodiment of the present disclosure. Figure 29B is a plan view showing the third and fourth magnetoresistive elements in a fourth embodiment of the present disclosure. Figure 30 is a waveform diagram showing the first and second detection signals in a fifth embodiment of the present disclosure. Figure 31 is a waveform diagram showing the corrected signal in a fifth embodiment of the present disclosure. Figure 32 is a characteristic diagram showing the angle output value in a fifth embodiment of the present disclosure.

[0015] [First Embodiment] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. First, with reference to Figure 1, the general configuration of the magnetic sensor device 100 in the first embodiment of the present disclosure will be described. Figure 1 is a perspective view showing the general configuration of the magnetic sensor device 100.

[0016] The magnetic sensor device 100 comprises a magnetic sensor 1 according to an embodiment of the present disclosure and a magnetic field generator 5 configured to generate a magnetic field applied to the magnetic sensor 1, and is configured to detect the position of an object moving in a certain direction. The magnetic sensor device 100 may also be used as a position detection device. The magnetic sensor 1 and the magnetic field generator 5 may be configured such that the relative position of the magnetic field generator 5 with respect to the magnetic sensor 1 changes in conjunction with the movement of the object whose position is to be detected. For example, the magnetic field generator 5 may be configured to move in conjunction with the movement of the object.

[0017] The magnetic sensor device 100 can be applied to a camera module equipped with an optical image stabilization mechanism as described below. This camera module comprises a lens, a support mechanism, and a drive device. The support mechanism supports the lens so that it can move in first and second directions perpendicular to the optical axis of the lens. The drive device is a device for moving the lens in the first and second directions.

[0018] This camera module detects the position of the lens in a first direction and the position of the lens in a second direction. The magnetic sensor device 100 according to this embodiment can be used to detect the position of the lens. When the magnetic sensor device 100 is used to detect the position of the lens, the magnetic sensor device 100 should be configured so that the magnetic field generator 5 moves in conjunction with the movement of the lens.

[0019] Furthermore, the magnetic sensor device 100 according to this embodiment can be applied to a camera module equipped with an autofocus mechanism, for example, as described below. This camera module comprises a lens, a support mechanism, and a drive device. The support mechanism supports the lens so that it can move in a direction parallel to the optical axis of the lens. The drive device is a device for moving the lens in a direction parallel to the optical axis of the lens.

[0020] This camera module detects the position of the lens in a direction parallel to the optical axis of the lens. The magnetic sensor device 100 according to this embodiment can be used to detect this lens position. In this case, the magnetic sensor device 100 should be configured so that the magnetic field generator 5 moves in conjunction with the movement of the lens.

[0021] Alternatively, the magnetic sensor device 100 can be applied to the following type of switch mechanism. The switch mechanism is a mechanism equipped with a movable part that can be displaced by user operation, such as a key switch, trigger switch, or button switch. The movable part may be, for example, a key top, trigger, or button. In a switch mechanism, it is necessary to detect the position and displacement of the movable part associated with the operation. The magnetic sensor device 100 according to this embodiment can be used to detect the position of this movable part. In this case, the magnetic sensor device 100 should be configured so that the magnetic field generator 5 moves in conjunction with the movement of the movable part. This makes it possible to produce an analog output corresponding to the amount of push or stroke of the switch, or to determine whether it is on or off.

[0022] Hereinafter, the relative position of the magnetic field generator 5 with respect to the magnetic sensor 1 will be referred to as the relative position. The relative position may change due to a change in the position of either the magnetic sensor 1 or the magnetic field generator 5, or it may change due to a change in the positions of both the magnetic sensor 1 and the magnetic field generator 5. For convenience, the following explanation will use the case where the relative position changes due to a change in the position of the magnetic field generator 5 as an example.

[0023] Here, we will explain the reference coordinate system defined by the X, Y, and Z directions, as shown in Figure 1. The reference coordinate system is a coordinate system based on the magnetic sensor 1, with the Z direction being one direction perpendicular to the surface of the substrate, which will be described later. The X, Y, and Z directions are orthogonal to each other. The direction opposite to the X direction is called the -X direction, the direction opposite to the Y direction is called the -Y direction, and the direction opposite to the Z direction is called the -Z direction. Furthermore, the direction parallel to the X direction and the -X direction is called the X-axis direction, the direction parallel to the Y direction and the -Y direction is called the Y-axis direction, and the direction parallel to the Z direction and the -Z direction is called the Z-axis direction.

[0024] Furthermore, below, a position located at the end of the Z-direction relative to a certain reference position will be referred to as "above," and a position on the opposite side from "above" relative to a certain reference position will be referred to as "below." Also, with respect to the components of the magnetic sensor device 100, the surface located at the end in the Z-direction will be referred to as the "top surface," and the surface located at the end in the -Z-direction will be referred to as the "bottom surface." Furthermore, with respect to the components of the magnetic sensor device 100, the shape in a planar view from a specific direction will be referred to as the "planar shape."

[0025] The following explanation will take the case where the magnetic field generator 5 is configured to move in a direction parallel to the X direction as an example. The magnetic field generator 5 is positioned ahead of the magnetic sensor 1 in the Z direction. In the example shown in Figure 1, the magnetic field generator 5 is a magnet containing two sets of north and south poles. Note that the magnetic field generator 5 is not limited to the example shown in Figure 1; it may be a magnet containing only one set of north and south poles, or a magnet containing three or more sets of north and south poles. The magnet may be, for example, a neodymium magnet (NdFeB magnet).

[0026] Figure 2 is an explanatory diagram showing the operation of the magnetic sensor device 100. In Figure 2, the arrow drawn to overlap the magnetic sensor 1 indicates the direction of the magnetic field applied to the magnetic sensor 1 from the magnetic field generator 5. In the example shown in Figure 2, when the position of the center of the magnetic sensor 1 in the X-axis direction (hereinafter referred to as the X position of the magnetic sensor 1) and the position of the center of the magnetic field generator 5 in the X-axis direction (hereinafter simply referred to as the X position of the magnetic field generator 5) coincide, a magnetic field in the X direction is applied to the magnetic sensor 1. When the X position of the magnetic field generator 5 is located beyond the X position of the magnetic sensor 1 in the -X direction, and the X position of the magnetic field generator 5 is on the -X side of the X position of the magnetic sensor 1, a magnetic field is applied to the magnetic sensor 1 in a direction tilted from the X direction toward the Z direction. When the X position of the magnetic field generator 5 is ahead of the X position of the magnetic sensor 1 in the X direction, and the X position of the magnetic field generator 5 is on the X side of the X position of the magnetic sensor 1, a magnetic field is applied to the magnetic sensor 1 in a direction tilted from the X direction toward the -Z direction.

[0027] Here, we will explain the magnetic field components Bx, By, and Bz applied to the magnetic sensor 1. Magnetic field component Bx is the X-axis component of the magnetic field generated by the magnetic field generator 5 and applied to the magnetic sensor 1. Magnetic field component By is the Y-axis component of the magnetic field generated by the magnetic field generator 5 and applied to the magnetic sensor 1. Magnetic field component Bz is the Z-axis component of the magnetic field generated by the magnetic field generator 5 and applied to the magnetic sensor 1.

[0028] Figure 3 is a characteristic diagram schematically showing the strengths of the magnetic field components Bx, By, and Bz. In Figure 3, the horizontal axis represents the X position of the magnetic field generator 5, and the vertical axis represents the strength of the magnetic field components. In Figure 3, the X position of the magnetic field generator 5 is set to 0 when it coincides with the X position of the magnetic sensor 1, the X position of the magnetic field generator 5 is represented as a negative value when it is located beyond the X position of the magnetic sensor 1 in the -X direction, and the X position of the magnetic field generator 5 is represented as a positive value when it is located beyond the X position of the magnetic sensor 1 in the X direction. In the diagrams used in the following explanation, where the horizontal axis represents the X position of the magnetic field generator 5, the X position of the magnetic field generator 5 is represented in the same way as in Figure 3.

[0029] As can be seen from Figure 3, the strength of magnetic field component Bx is maximum when the X position of the magnetic field generator 5 is 0, and decreases as the X position of the magnetic field generator 5 moves away from 0. The strength of magnetic field component By is 0 regardless of the X position of the magnetic field generator 5. The strength of magnetic field component Bz decreases as the X position of the magnetic field generator 5 increases. In the example shown in Figure 3, when the X position of the magnetic field generator 5 is 0, the strength of the third magnetic field component Bz is 0.

[0030] Incidentally, when the magnetic sensor 1 detects only changes in the intensity of a unidirectional component of the magnetic field (for example, magnetic field component Bz), relatively large changes occur in the detection signal of the magnetic sensor 1 due to the respective temperature characteristics of the magnetic sensor 1 and the magnetic field generator 5. In contrast, when the magnetic sensor 1 detects changes in the direction of the magnetic field applied to it, changes in the detection signal caused by the respective temperature characteristics of the magnetic sensor 1 and the magnetic field generator 5 can be suppressed. Furthermore, by configuring the magnetic sensor 1, which consists of a single chip, to obtain multiple detection signals with different phases from each other, characteristic variations caused by manufacturing variations can be suppressed for the multiple detection signals.

[0031] Hereinafter, the magnetic field to be detected by the magnetic sensor 1 will be referred to as the target magnetic field. The magnetic sensor 1 includes a magnetoresistive element configured to detect the target magnetic field. Hereinafter, the magnetoresistive element will be referred to as an MR element. In this embodiment, the magnetic sensor 1 includes an AMR element that uses the anisotropic magnetoresistive effect as the MR element. The AMR element contains a ferromagnetic metal material such as Ni or Fe and is configured such that current flows in one direction, for example. The AMR element is formed from, for example, NiFe, CoFe, etc. In an AMR element, a change in resistance occurs due to the anisotropic magnetoresistive effect when the direction of magnetization DM of the AMR element forms a specific relative angle θ with respect to the direction of current flowing through the AMR element DI.

[0032] Furthermore, AMR elements do not require a magnetization fixed layer, unlike spin-bulb type MR elements such as GMR elements that utilize the giant magnetoresistive effect or TMR elements that utilize the tunnel magnetoresistive effect. Therefore, AMR elements can be used even in environments where relatively strong magnetic fields are used. Examples of relatively strong magnetic fields include those stronger than the Earth's magnetic field, those that change the direction of magnetization of the magnetization fixed layer of a spin-bulb type MR element, and those stronger than the bias magnetic field applied to a spin-bulb type MR element. Magnetic sensor 1 using an AMR element can obtain a stable detection signal even in environments where relatively strong magnetic fields are used.

[0033] An AMR element has a resistance value R that changes due to the anisotropic magnetoresistance effect. Figure 4A is a characteristic diagram showing the relationship between the relative angle θ of the magnetization direction DM and the current direction DI, and the resistance value R of the AMR element. In Figure 4A, the horizontal axis represents the relative angle θ, and the vertical axis represents the resistance value R of the AMR element. As shown in Figure 4A, the resistance value R changes by two periods while the relative angle θ changes by 360°. Therefore, the resistance value R changes at a frequency twice the frequency of the relative angle θ. Also, when the relative angle θ changes with a specific period, the resistance value R changes with a period half the period of the relative angle θ. The resistance value R is maximum when the relative angle θ is 0° and 180°, and minimum when the relative angle θ is 90° and 270°.

[0034] The relative angle θ is also angular information of the target magnetic field. As shown in Figure 4A, the resistance value R of the AMR element contains angular information of the target magnetic field. Therefore, the magnetic sensor 1 can acquire a detection signal as angular information of the target magnetic field by detecting a change in the resistance value R of the AMR element.

[0035] As will be described later, in this embodiment, the magnetization direction DM is configured to change in accordance with the change in the X position of the magnetic field generator 5. The direction of the current DI is constant. Therefore, the relative angle θ changes in accordance with the change in relative position. Figure 4B is a characteristic diagram showing the relationship between the X position of the magnetic field generator 5 and the relative angle θ. In Figure 4B, the horizontal axis represents the X position of the magnetic field generator 5, and the vertical axis represents the relative angle θ. As shown in Figure 4B, the relative angle θ changes according to the X position of the magnetic field generator 5. In the example shown in Figure 4B, when the X position of the magnetic field generator 5 is 0, the relative angle θ is 0. The magnetic sensor device 100 may be configured such that the relative angle θ changes monotonically according to the X position of the magnetic field generator 5. In the example shown in Figure 4B, the relative angle θ decreases monotonically according to the X position of the magnetic field generator 5.

[0036] The detection signal from the magnetic sensor 1 corresponds to the relative angle θ, which is the angular information of the target magnetic field. Therefore, based on the detection signal from the magnetic sensor 1, information about the X position or relative position of the magnetic field generator 5 can be obtained. The magnetic sensor device 100 or the magnetic sensor system including the magnetic sensor device 100 may include a processor configured to generate a detection value as information about the X position or relative position of the magnetic field generator 5.

[0037] The magnetic sensor device 100 may be configured such that the relative angle θ changes periodically in accordance with the X position of the magnetic field generator 5. In this case, the processor may be configured to generate a detected value as information about the X position or relative position of the magnetic field generator 5, for example, based on the magnitude of the relative angle θ and the number of periods included in the change of the relative angle θ or the number of times the relative angle θ shows a specific value.

[0038] Next, the configuration of the magnetic sensor 1 will be described. Figure 5 is a perspective view showing an outline of the configuration of the magnetic sensor 1. In Figure 5, the arrows labeled with the symbol DSp indicate the direction of movement of the magnetic field generator 5 when it moves in the X direction, and the arrows labeled with the symbol DSn indicate the direction of movement of the magnetic field generator 5 when it moves in the -X direction.

[0039] The magnetic sensor 1 comprises a substrate 20 and an inclined surface structure 2 disposed on the substrate 20. The substrate 20 has an upper surface 20a parallel to the XY plane, which is a plane perpendicular to the Z direction. In the magnetic sensor 1 and magnetic sensor device 100, the upper surface 20a of the substrate 20 may be used as a reference plane. The inclined surface structure 2 has an inclined surface that is inclined with respect to the Z-axis direction and the upper surface 20a (reference plane) of the substrate 20. The magnetic sensor 1 further includes a plurality of MR elements 50 disposed on the inclined surface of the inclined surface structure 2. The plurality of MR elements 50 are shown in Figure 6, which will be described later.

[0040] Each of the multiple MR elements 50 may be an AMR element, and it detects at least one of the direction and intensity of the magnetic field in the plane corresponding to the inclined surface. Hereinafter, as with the AMR element described above, the direction of magnetization of the MR element 50, the direction of the current flowing through the MR element 50, and the resistance value of the MR element 50 will be expressed using the symbols DM, DI, and R, respectively. Also, as with the AMR element, the relative angle that the direction of magnetization DM of the MR element 50 makes with respect to the direction of the current flowing through the MR element 50 DI will be expressed using the symbol θ.

[0041] In this embodiment, the target magnetic field includes a first magnetic field component whose direction changes in the XZ plane perpendicular to the upper surface 20a of the substrate 20, which is the reference plane, and a second magnetic field component whose direction changes in the plane corresponding to the inclined surface. The directions of the first magnetic field component and the second magnetic field component change according to the relative position, which is the relative position of the magnetic field generator 5 with respect to the magnetic sensor 1 or the substrate 20. Each of the plurality of MR elements 50 is configured such that its resistance value R changes in accordance with the change in the direction of the second magnetic field component.

[0042] Hereinafter, the XZ plane in which the direction of the first magnetic field component changes is referred to as the first plane, and the plane corresponding to the inclined plane is referred to as the second plane. The first plane and the second plane are each virtual planes. The second plane is defined based on the tangential direction of the inclined plane. The inclined plane may be a plane, a curved surface, or a surface including a plane and a curved surface. When the inclined plane is a plane, the second plane is parallel to the tangential direction of the inclined plane and also parallel to the inclined plane itself. When the inclined plane includes a curved surface, the second plane may be parallel to the tangent of the portion of the inclined plane where the MR element 50 is disposed. In the following description and drawings, for convenience, the inclined plane is assumed to be a plane. The inclined plane is perpendicular to the YZ plane and inclined with respect to both the XY plane (reference plane) and the XZ plane. The second plane is inclined with respect to both the first plane and the XY plane (reference plane). The first plane and the second plane intersect at a dihedral angle other than 90°.

[0043] The magnetization direction DM of the MR element 50 changes according to the direction of the second magnetic field component. For convenience of explanation, the magnetization direction DM of the MR element 50 is assumed to change within the second plane.

[0044] The direction of the first magnetic field component changes non-linearly with respect to the change in the X position of the magnetic field generator 5. In contrast, the magnetic sensor 1 is configured such that a parameter indicating the non-linearity of the change in the direction of the second magnetic field component with respect to the change in the X position of the magnetic field generator 5 is smaller than a parameter indicating the non-linearity of the change in the direction of the first magnetic field component with respect to the change in the X position of the magnetic field generator 5.

[0045] Next, referring to FIG. 6, the inclined plane structure 2 will be specifically described. FIG. 6 is an explanatory diagram showing the inclined plane structure 2. The magnetic sensor 1 further includes a support member 30 that supports a plurality of MR elements 50. The support member 30 is formed, for example, by an insulating layer made of an insulating material formed on the substrate 20 and constitutes the inclined plane structure 2. The insulating layer may be a single-layer film or a multi-layer film.

[0046] The support member 30 includes a flat surface 30a parallel to the upper surface 20a of the substrate 20, which is the reference plane, and a plurality of inclined surfaces 31a and a plurality of inclined surfaces 31b, which are inclined with respect to the upper surface 20a of the substrate 20. Each of the plurality of inclined surfaces 31a is a surface parallel to a plane obtained by inclining the XZ plane toward the Y direction with an axis parallel to the X direction. Each of the plurality of inclined surfaces 31b is a surface parallel to a plane obtained by inclining the XZ plane toward the -Y direction with an axis parallel to the X direction.

[0047] Each of the multiple inclined surfaces 31a and 31b extends along the X-axis direction. The multiple inclined surfaces 31a and 31b are arranged such that they alternate in the Y-axis direction. Also, one inclined surface 31a and one inclined surface 31b constitute one projection 31c. In one projection 31c, the inclined surfaces 31a and 31b are adjacent to each other and face in different directions. The support member 30 includes multiple projections 31c that project in the Z-direction from the flat surface 30a. Each of the multiple projections 31c extends along the X-axis direction. Also, the multiple projections 31c are arranged so as to be aligned in the Y-axis direction. A flat surface 30a is interposed between two adjacent projections 31c in the Y-axis direction.

[0048] The multiple MR elements 50 include a plurality of first elements arranged on a plurality of inclined surfaces 31a and a plurality of second elements arranged on a plurality of inclined surfaces 31b. On each of the plurality of inclined surfaces 31a, the plurality of first elements are arranged along the X-axis direction. On each of the plurality of inclined surfaces 31b, the plurality of second elements are arranged along the X-axis direction.

[0049] The magnetic sensor 1 further includes multiple wirings 40 for supplying current to multiple MR elements 50. Each of the multiple wirings 40 is made of a wiring material with high electrical conductivity, such as Cu or Au. In the example shown in Figure 6, the multiple wirings 40 connect multiple first elements arranged on an inclined surface 31a and multiple second elements arranged on an inclined surface 31b adjacent to this inclined surface 31a in the Y-axis direction in series. However, the example shown in Figure 6 is not limited to the multiple wirings 40, and the multiple wirings 40 may connect multiple first elements arranged on an inclined surface 31a in series with multiple first elements arranged on other inclined surfaces 31a, and connect multiple second elements arranged on an inclined surface 31b in series with multiple second elements arranged on other inclined surfaces 31b.

[0050] Here, the inclined surface coordinate system will be explained with reference to Figures 7A and 7B. Figures 7A and 7B are explanatory diagrams for illustrating the inclined surface coordinate system. The inclined surface coordinate system is used to describe the directions on each of the inclined surfaces 31a and 31b. In the inclined surface coordinate system, the D1 direction and the D2 direction are defined for each of the inclined surfaces 31a and 31b. As shown in Figure 7A, on the inclined surface 31a, the D1 direction coincides with the X direction. Also, on the inclined surface 31a, the D2 direction is the gradient direction of the inclined surface 31a. The gradient direction is also called the maximum gradient direction. Each of the inclined surfaces 31a and 31b has a lower end that is closest to the upper surface 20a (reference plane) of the substrate 20 in the Z-axis direction, and an upper end that is furthest from the upper surface 20a (reference plane) of the substrate 20. On the inclined surface 31a, the D2 direction is the direction that travels the shortest distance from the lower end to the upper end of the inclined surface 31a, while being perpendicular to each of the multiple contour lines (not shown) of the inclined surface 31a in the Z-axis direction. Also, on the inclined surface 31a, the D2 direction coincides with the direction obtained by rotating by α° from the Z direction toward the Y direction. Here, α is greater than 0 and less than 90. The direction opposite to the D2 direction is denoted as the -D2 direction.

[0051] As shown in Figure 7B, on the inclined surface 31b, the D1 direction coincides with the X direction. Also, on the inclined surface 31b, the D2 direction is the direction of the slope of the inclined surface 31b. On the inclined surface 31b, the D2 direction is the direction that travels the shortest distance from the lower end to the upper end of the inclined surface 31b, perpendicular to each of the multiple contour lines (not shown) of the inclined surface 31b. Also, on the inclined surface 31b, the D2 direction coincides with the direction obtained by rotating by β° from the Z direction toward the -Y direction. Note that β is greater than 0 and less than 90. The direction opposite to the D2 direction is called the -D2 direction.

[0052] α and β may be equal to each other or may be different to each other. Furthermore, α and β may be constant regardless of the position in the Z direction and the Y direction, or they may change depending on the position in the Z direction and the Y direction.

[0053] Although not shown in the diagram, the direction perpendicular to both the D1 and D2 directions is defined as the D3 direction. The D3 direction is the normal direction to the inclined surface 31a or 31b, and is the direction away from the inclined surface 31a or 31b to the side away from the substrate 20. The direction opposite to the D3 direction is defined as the -D3 direction.

[0054] Furthermore, the directions in the second plane may also be explained using the inclined plane coordinate system described above. The D1 and D2 directions in the second plane corresponding to the inclined surface 31a are the same as the D1 and D2 directions in the inclined surface 31a. The D1 and D2 directions in the second plane corresponding to the inclined surface 31b are the same as the D1 and D2 directions in the inclined surface 31b.

[0055] Next, with reference to Figure 8, the definitions of current angle and magnetization angle in this embodiment will be explained. Figure 8 is an explanatory diagram for explaining the definitions of current angle θI and magnetization angle θM. The current angle θI and magnetization angle θM are defined in the inclined coordinate system corresponding to the MR element 50. In this embodiment, the current angle θI is the angle that the direction DI of the current flowing through the MR element 50, which is an AMR element, makes with respect to a specific direction. The magnetization angle θM is the angle that the direction DM of the magnetization of the MR element 50 makes with respect to a specific direction. The specific direction may be the D1 direction of the inclined coordinate system, a direction of the inclined coordinate system other than the D1 direction, or a direction of the reference coordinate system. The current angle θI and magnetization angle θM may be expressed as values ​​between 0° and less than 360°. The relative angle θ corresponds to the difference between the current angle θI and the magnetization angle θM.

[0056] The resistance R of the AMR element 50 is expressed by the following equation (1), using the current angle θI and the magnetization angle θM. R0 represents the resistance of the MR element 50 when the current direction DI and the magnetization direction DM of the AMR element are orthogonal, and MR represents the MR ratio of the MR element 50. R = R0(1 + MR・cos 2 (θM−θI)) …(1)

[0057] Next, the circuit configuration of the magnetic sensor 1 will be described with reference to Figures 9A and 9B. Figure 9A is a circuit diagram showing the circuit configuration of the magnetic sensor 1. Figure 9B is a functional block diagram showing the magnetic sensor 1 and the processor. The magnetic sensor 1 may include at least one detection circuit configured to generate at least one detection signal that is composed of a plurality of MR elements 50 and has a corresponding relationship with the target magnetic field. The at least one detection circuit is composed of at least one bridge circuit.

[0058] In a system including a magnetic sensor device 100, for example, an angle output value corresponding to the magnetic field angle θMF, which is the angle that the direction of the target magnetic field makes with respect to a specific direction, may be generated as angle information of the target magnetic field. In order to generate the angle output value, the magnetic sensor 1 may be configured to generate two detection signals that have different phases from each other. In this embodiment, the magnetic sensor 1 includes a first detection circuit 101 configured to generate a first detection signal S1, and a second detection circuit 102 configured to generate a second detection signal S2 that has a different phase from the first detection signal S1. In the example shown in Figure 9A, both the first detection circuit 101 and the second detection circuit 102 are full-bridge circuits. The first detection circuit 101 is also referred to as the first full-bridge circuit. The second detection circuit 102 is also referred to as the second full-bridge circuit. Note that the first detection circuit 101 and the second detection circuit 102 are not limited to full-bridge circuits, but may also be half-bridge circuits.

[0059] The system including the magnetic sensor device 100 may also include a processor 140 electrically connected to a first detection circuit 101 and a second detection circuit 102. The processor 140 is configured to generate the angle output value as a detection value based on a first detection signal S1 and a second detection signal S2. As described above, the target magnetic field includes a first magnetic field component whose direction changes in the XZ plane perpendicular to the upper surface 20a of the substrate 20, which is the reference plane, and a second magnetic field component whose direction changes in the plane corresponding to the inclined surface. The angle output value has a correspondence with at least one of the direction and intensity of the first magnetic field component.

[0060] The first detection circuit 101 includes a power port, a power terminal V1, a ground port, a ground terminal G1, two output ports, E11 and E12, and four sub-circuits 111, 112, 113, and 114. The first resistor, sub-circuit 111, is provided between the power terminal V1 and the output terminal E11. The second resistor, sub-circuit 112, is provided between the ground terminal G1 and the output terminal E11. The third resistor, sub-circuit 113, is provided between the ground terminal G1 and the output terminal E12. The fourth resistor, sub-circuit 114, is provided between the power terminal V1 and the output terminal E12.

[0061] One end of each of the subcircuits 111 and 114 is connected to the power terminal V1. One end of each of the subcircuits 112 and 113 is connected to the ground terminal G1. The other end of each of the subcircuits 111 and 112 is connected to the output terminal E11. The other end of each of the subcircuits 113 and 114 is connected to the output terminal E12. A voltage or current of a specific magnitude is applied to the power terminal V1. The ground terminal G1 is connected to ground.

[0062] The second detection circuit 102 includes a power port, a power terminal V2, a ground port, a ground terminal G2, two output ports, E21 and E22, and four sub-circuits 121, 122, 123, and 124. The first resistor, sub-circuit 121, is provided between the power terminal V2 and the output terminal E21. The second resistor, sub-circuit 122, is provided between the ground terminal G2 and the output terminal E21. The third resistor, sub-circuit 123, is provided between the ground terminal G2 and the output terminal E22. The fourth resistor, sub-circuit 124, is provided between the power terminal V2 and the output terminal E22.

[0063] One end of each of the sub-circuits 121 and 124 is connected to the power supply terminal V2. One end of each of the sub-circuits 122 and 123 is connected to the ground terminal G2. The other end of each of the sub-circuits 121 and 122 is connected to the output terminal E21. The other end of each of the sub-circuits 123 and 124 is connected to the output terminal E22. A voltage or current of a specific magnitude is applied to the power supply terminal V2. The ground terminal G2 is connected to ground.

[0064] The power supply terminal V1 of the first detection circuit 101 and the power supply terminal V2 of the second detection circuit 102 may be connected to separate power supplies. In this case, variations in resistance and output values ​​between the first detection circuit 101 and the second detection circuit 102 can be adjusted and suppressed by the power supply. For example, when a voltage of a specific magnitude is applied to the power supply terminals V1 and V2, variations can be suppressed by adjusting the magnitude of the voltage applied by the power supply. This improves the accuracy of the magnetic sensor 1.

[0065] Alternatively, a single power supply may be connected to the power supply terminal V1 of the first detection circuit 101 and the power supply terminal V2 of the second detection circuit 102. In this case, the influence of the temperature characteristics of the power supply system, including the power supply, is canceled out when calculating the angle output value described later, thereby improving the accuracy of the magnetic sensor 1.

[0066] The magnetic sensor 1 further includes two differential amplifiers (differential detectors) 103 and 104. The two input terminals of differential amplifier 103 are connected to two output terminals E11 and E12. The two input terminals of differential amplifier 104 are connected to two output terminals E21 and E22. Differential amplifier 103 is configured to output a first detection signal S1 corresponding to the potential difference between the two output terminals E11 and E12. Differential amplifier 104 is configured to output a second detection signal S2 corresponding to the potential difference between the two output terminals E21 and E22.

[0067] Each of the first detection signal S1 and the second detection signal S2 includes a periodic component that changes periodically in accordance with the direction of the second magnetic field component or the periodic change in the magnetic field angle θMF. The phase difference between the periodic component of the first detection signal S1 and the periodic component of the second detection signal S2 is an odd multiple of one-quarter of the period of the periodic component. The first detection signal S1 is also called the cos signal. The second detection signal S2 is also called the sin signal. The first detection circuit 101 is also called the cos bridge. The second detection circuit 102 is also called the sin bridge.

[0068] Subcircuits 111-114 and 121-124 are composed of multiple MR elements 50 and multiple wirings 40. Each of subcircuits 111-114 and 121-124 includes at least one MR element 50. In this embodiment, each of subcircuits 111-114 and 121-124 includes multiple MR elements 50 connected in series by multiple wirings 40.

[0069] In this embodiment, subcircuits 111-114 and 121-124 are composed of four types of MR elements 50. Hereinafter, the four types of MR elements 50 will be distinguished using reference numerals 50A, 50B, 50C, and 50D. The plurality of MR elements 50 that constitute each of the subcircuits 111 and 113 are a plurality of first MR elements 50A. The plurality of MR elements 50 that constitute each of the subcircuits 112 and 114 are a plurality of second MR elements 50B. The plurality of MR elements 50 that constitute each of the subcircuits 121 and 123 are a plurality of third MR elements 50C. The plurality of MR elements 50 that constitute each of the subcircuits 122 and 124 are a plurality of fourth MR elements 50D. The first detection circuit 101 is composed of a plurality of first MR elements 50A and a plurality of second MR elements 50B. The second detection circuit 102 is configured using a plurality of third MR elements 50C and a plurality of fourth MR elements 50D.

[0070] Among the multiple inclined surfaces 31a and 31b, the inclined surfaces on which multiple first MR elements 50A are arranged are also referred to as the first inclined surfaces. Among the multiple inclined surfaces 31a and 31b, the inclined surfaces on which multiple second MR elements 50B are arranged are also referred to as the second inclined surfaces. Among the multiple inclined surfaces 31a and 31b, the inclined surfaces on which multiple third MR elements 50C are arranged are also referred to as the third inclined surfaces. Among the multiple inclined surfaces 31a and 31b, the inclined surfaces on which multiple fourth MR elements 50D are arranged are also referred to as the fourth inclined surfaces.

[0071] Figure 10A is a plan view showing the first MR element 50A and the second MR element 50B in the first detection circuit 101. Figure 10B is a plan view showing the third MR element 50C and the fourth MR element 50D in the second detection circuit 102. Figure 11A is an explanatory diagram for illustrating the first and second directions. Figure 11B is an explanatory diagram for illustrating the third and fourth directions. Figures 10A and 10B show the planar shape in a plan view from the direction D3.

[0072] The first MR element 50A may be configured such that the main component of the current flowing through the first MR element 50A flows in a certain reference direction. Alternatively, the first MR element 50A may be configured such that the current flows along a first direction from the first end to the second end of the first MR element 50A. At least one of the above-mentioned reference direction and first direction may be defined in an inclined coordinate system or in a reference coordinate system. In this embodiment, both the above-mentioned reference direction and first direction are assumed to be defined in an inclined coordinate system. In the following description, the first direction will be represented by the symbol Da. The reference direction of the MR element 50 is shown in Figures 15 to 17, which will be described later.

[0073] Furthermore, the first end of the first MR element 50A is also the input terminal for current, and the second end of the first MR element 50A is also the output terminal for current. On the other hand, the two physical ends of the first MR element 50A are sometimes referred to as the first end and the second end. The first end and the second end are defined based on a reference coordinate system or an inclined coordinate system. Depending on the orientation of the first MR element 50A, the first end and the second end may be either the input terminal (first end) or the output terminal (second end). The above explanation of the first end, second end, first end and second end also applies to MR elements 50 other than the first MR element 50A.

[0074] In Figure 10A, the line denoted by the symbol LA is the reference axis in the inclined coordinate system and is an axis extending in a direction parallel to the first direction Da. In the first MR element 50A, current flows along axis LA from the first end to the second end of the first MR element 50A. The first MR element 50A may have a shape that extends along axis LA.

[0075] The second MR element 50B may be configured such that the main component of the current flowing through it flows in a certain reference direction. Alternatively, the second MR element 50B may be configured such that the current flows along a second direction from the first end to the second end. The explanation of the reference direction and the first direction in the first MR element 50A also applies to the reference direction and the second direction in the second MR element 50B. In the following explanation, the second direction will be represented by the symbol Db.

[0076] In Figure 10A, the line denoted by the symbol LB is the reference axis in the inclined coordinate system and is an axis extending in a direction parallel to the second direction Db. In the second MR element 50B, current flows along the axis LB from the first end to the second end of the second MR element 50B. The second MR element 50B may have a shape that extends along the axis LB.

[0077] The third MR element 50C may be configured such that the main component of the current flowing through it flows in a certain reference direction. Alternatively, the third MR element 50C may be configured such that the current flows along a third direction from the first end to the second end of the third MR element 50C. The explanation of the reference direction and the first direction in the first MR element 50A also applies to the reference direction and the third direction in the third MR element 50C. In the following explanation, the third direction will be represented by the symbol Dc.

[0078] In Figure 10B, the line denoted by the symbol LC is the reference axis in the inclined coordinate system and is an axis extending in a direction parallel to the third direction Dc. In the third MR element 50C, current flows along axis LC from the first end to the second end of the third MR element 50C. The third MR element 50C may have a shape that extends along axis LC.

[0079] The fourth MR element 50D may be configured such that the main component of the current flowing through it flows in a certain reference direction. Alternatively, the fourth MR element 50D may be configured such that the current flows along a fourth direction from the first end to the second end of the fourth MR element 50D. The explanation of the reference direction and the first direction in the first MR element 50A also applies to the reference direction and the fourth direction in the fourth MR element 50D. In the following explanation, the fourth direction will be represented by the symbol Dd.

[0080] In Figure 10B, the line denoted by the symbol LD is the reference axis in the inclined coordinate system and is an axis extending in a direction parallel to the fourth direction Dd. In the fourth MR element 50D, current flows along the axis LD from the first end to the second end of the fourth MR element 50D. The fourth MR element 50D may have a shape that extends along the axis LD.

[0081] The first direction Da, the second direction Db, the third direction Dc, and the fourth direction Dd are defined with respect to the X-axis direction. For example, the first direction Da, the second direction Db, the third direction Dc, and the fourth direction Dd are defined as directions obtained by rotating the D1 direction, which is parallel to the X-axis direction, around the axis of an axis parallel to the D3 direction. The directions in which the D1 direction is rotated are from the D1 direction toward the D2 direction, from the D2 direction toward the -D1 direction, from the -D1 direction toward the -D2 direction, and from the -D2 direction toward the D1 direction. In this embodiment, the first direction Da, the second direction Db, the third direction Dc, and the fourth direction Dd all intersect with the X-axis direction and the D1 direction.

[0082] The first direction Da is the direction obtained by rotating the direction D1 by an angle θ1a. The second direction Db is the direction obtained by rotating the direction D1 by an angle θ1b. The third direction Dc is the direction obtained by rotating the direction D1 by an angle θ1c. The fourth direction Dd is the direction obtained by rotating the direction D1 by an angle θ1d. In Figures 11A and 11B, the lines labeled RL11 and RL12 are reference axes in the inclined coordinate system, and represent reference axes extending in a direction parallel to the direction D1. In Figure 11A, angle θ1a is represented as the angle that the first direction Da makes with the reference axis RL11, and angle θ1b is represented as the angle that the second direction Db makes with the reference axis RL11. In Figure 11B, angle θ1c is represented as the angle that the third direction Dc makes with the reference axis RL12, and angle θ1d is represented as the angle that the fourth direction Dd makes with the reference axis RL12.

[0083] The first MR element 50A and the second MR element 50B may be intersected such that the first direction Da and the second direction Db intersect at an angle of 90°. In this case, the difference between angles θ1a and θ1b is 90°. The third MR element 50C and the fourth MR element 50D may be intersected such that the third direction Dc and the fourth direction Dd intersect at an angle of 90°. In this case, the difference between angles θ1c and θ1d is 90°.

[0084] Furthermore, the first direction Da, the second direction Db, the third direction Dc, and the fourth direction Dd may all intersect with the D2 direction. The D2 direction is the gradient direction in the inclined plane coordinate system. The first MR element 50A may be configured such that the first direction Da intersects with the D2 direction, which is the gradient direction of the first inclined surface. The second MR element 50B may be configured such that the second direction Db intersects with the D2 direction, which is the gradient direction of the second inclined surface. The third MR element 50C may be configured such that the third direction Dc intersects with the D2 direction, which is the gradient direction of the third inclined surface. The fourth MR element 50D may be configured such that the fourth direction Dd intersects with the D2 direction, which is the gradient direction of the fourth inclined surface.

[0085] If the first direction Da, the second direction Db, the third direction Dc, and the fourth direction Dd all intersect with both direction D1 and direction D2, then angles θ1a, θ1b, θ1c, and θ1d will be angles other than 0°, 90°, 180°, and 270°, within the range of 0° or more and less than 360°. For example, angle θ1a may be 112.5°. Angles θ1b may be 22.5°. Angles θ1c may be 157.5°. Angles θ1d may be 67.5°.

[0086] Here, with reference to Figures 11C and 11D, the relationship between the first direction Da and the fourth direction Dd, and the relationship between the second direction Db and the third direction Dc will be explained. In Figures 11C and 11D, the lines indicated by the symbols RL21 and RL22 are reference axes in the reference coordinate system, and represent reference axes parallel to the upper surface 20a (reference plane) of the substrate 20. Each of the reference axes RL21 and RL22 may be defined as intersecting the X-axis direction, or as intersecting the D1 direction in a plan view from the Z direction. In this embodiment, in a plan view from the Z direction, each of the reference axes RL21 and RL22 is orthogonal to the D1 direction and parallel to the direction obtained by projecting the D2 direction onto the XY plane. Therefore, the reference axis RL21 and the reference axis RL22 are parallel to each other.

[0087] The first MR element 50A and the fourth MR element 50D may be configured such that, in a plan view from the Z direction, the first direction Da and the fourth direction Dd are symmetrical with respect to the reference axis RL21. The angle θ2a between the reference axis RL21 projected onto the first inclined surface on which the first MR element 50A is located and the first direction Da, and the angle θ2d between the reference axis RL21 projected onto the fourth inclined surface on which the fourth MR element 50D is located and the fourth direction Dd, may be, for example, 22.5°. Angle θ2a is also the angle that the first direction Da makes with respect to the D2 direction. Angle θ2d is also the angle that the fourth direction Dd makes with respect to the D2 direction. Furthermore, the first MR element 50A and the fourth MR element 50D do not need to be arranged symmetrically with respect to the reference axis RL21, as long as the requirement that the first direction Da and the fourth direction Dd are symmetrical with respect to the reference axis RL21 is satisfied.

[0088] The second MR element 50B and the third MR element 50C may be configured such that, in a plan view from the Z direction, the second direction Db and the third direction Dc are symmetrical with respect to the reference axis RL22. The angle θ2b between the reference axis RL22 projected onto the second inclined surface on which the second MR element 50B is located and the second direction Db, and the angle θ2c between the reference axis RL22 projected onto the third inclined surface on which the third MR element 50C is located and the third direction Dc, may be, for example, 67.5°. Angle θ2b is also the angle that the second direction Db makes with respect to the D2 direction. Angle θ2c is also the angle that the third direction Dc makes with respect to the D2 direction. Furthermore, the second MR element 50B and the third MR element 50C do not need to be arranged symmetrically with respect to the reference axis RL22, as long as the requirement that the second direction Db and the third direction Dc are symmetrical with respect to the reference axis RL22 is satisfied.

[0089] Next, with reference to Figures 12 and 13, the resistance values ​​R of the first MR element 50A, the second MR element 50B, the third MR element 50C, and the fourth MR element 50D will be described. Figure 12 is a waveform diagram showing an example of the resistance values ​​R of the first MR element 50A and the second MR element 50B. Figure 13 is a waveform diagram showing an example of the resistance values ​​R of the third MR element 50C and the fourth MR element 50D. In Figures 12 and 13, the horizontal axis represents the magnetization angle θM that the magnetization direction DM of the MR element 50 makes with respect to a specific direction. The vertical axis represents the resistance value R.

[0090] Furthermore, in Figure 12, the waveform denoted by reference numeral 81 represents the resistance value R of the first MR element 50A, and the waveform denoted by reference numeral 82 represents the resistance value R of the second MR element 50B. The first MR element 50A and the second MR element 50B are configured such that, in response to the periodic change in the target magnetic field, the resistance values ​​R of the first MR element 50A and the resistance values ​​R of the second MR element 50B change in different phases from each other. In the example shown in Figure 12, the first MR element 50A and the second MR element 50B are configured such that, in response to the change in the target magnetic field, one of the resistance values ​​R of the first MR element 50A and the other of the second MR element 50B increases and the other decreases. In addition, the resistance values ​​R of the first MR element 50A and the second MR element 50B each change periodically in response to the change in the target magnetic field. When the target magnetic field changes, the magnetization angle θM changes. When the magnetization angle θM changes, the relative angle θ between the magnetization direction DM of the MR element 50 and the direction DI of the current flowing through the MR element 50 changes. When angle θ1a is 112.5°, the resistance value R of the first MR element 50A can be expressed by an equation including -cos(2(θ-π / 8)). When angle θ1b is 22.5°, the resistance value R of the second MR element 50B can be expressed by an equation including cos(2(θ-π / 8)).

[0091] Furthermore, in Figure 13, the waveform denoted by reference numeral 83 represents the resistance value R of the third MR element 50C, and the waveform denoted by reference numeral 84 represents the resistance value R of the fourth MR element 50D. The third MR element 50C and the fourth MR element 50D are configured such that, in response to the periodic change in the target magnetic field, the resistance values ​​R of the third MR element 50C and the resistance values ​​R of the fourth MR element 50D change in different phases from each other. In the example shown in Figure 13, the third MR element 50C and the fourth MR element 50D are configured such that, in response to the change in the target magnetic field, one of the resistance values ​​R of the third MR element 50C and the other of the fourth MR element 50D increases and the other decreases. In addition, the resistance values ​​R of the third MR element 50C and the fourth MR element 50D change periodically in response to the change in the target magnetic field. When the target magnetic field changes, the magnetization angle θM and the relative angle θ change. When the angle θ1c is 157.5°, the resistance R of the third MR element 50C can be expressed by an expression including -sin(2(θ-π / 8)). When the angle θ1d is 67.5°, the resistance R of the fourth MR element 50D can be expressed by an expression including sin(2(θ-π / 8)).

[0092] The resistance values ​​of each of the subcircuits 111 to 114 of the first detection circuit 101 change in accordance with the change in the resistance values ​​R of the first MR element 50A and the second MR element 50B, respectively. Each of the subcircuits 111 and 113 is composed of multiple first MR elements 50A, and each of the subcircuits 112 and 114 is composed of multiple second MR elements 50B. Therefore, when the target magnetic field changes, the resistance value of one of the subcircuits 111, 113 pair and the subcircuit 112, 114 pair decreases, while the resistance value of the other pair increases. As a result, the potentials of the output terminals E11 and E12 change.

[0093] The resistance values ​​of each of the subcircuits 121 to 124 of the second detection circuit 102 change in accordance with the change in the resistance values ​​R of the third MR element 50C and the fourth MR element 50D, respectively. Each of the subcircuits 121 and 123 is composed of multiple third MR elements 50C, and each of the subcircuits 122 and 124 is composed of multiple fourth MR elements 50D. Therefore, when the target magnetic field changes, the resistance value of one of the subcircuits 121, 123 pair and the subcircuit 122, 124 pair decreases, while the resistance value of the other pair increases. As a result, the potentials of the output terminals E21 and E22 change.

[0094] Furthermore, the resistance value R of the MR element 50 configured to allow current to flow in the direction opposite to the first direction Da shown in Figure 11A changes in the same phase and period as the resistance value R of the first MR element 50A in response to the change in the target magnetic field. Each of the subcircuits 111 and 113 may consist only of a plurality of first MR elements 50A, or only of a plurality of MR elements 50 configured to allow current to flow in the direction opposite to the first direction Da, or may consist of a plurality of first MR elements 50A and a plurality of MR elements 50 configured to allow current to flow in the direction opposite to the first direction Da. For convenience, in the following description, an MR element 50 configured to allow current to flow in the direction opposite to the first direction Da may also be referred to as the first MR element 50A.

[0095] Similarly, the resistance R of the MR element 50 configured to allow current to flow in the direction opposite to the second direction Db shown in Figure 11A changes in the same phase and period as the resistance R of the second MR element 50B in response to the change in the target magnetic field. Each of the subcircuits 112 and 114 may consist only of a plurality of second MR elements 50B, or only of a plurality of MR elements 50 configured to allow current to flow in the direction opposite to the second direction Db, or may consist of a plurality of second MR elements 50B and a plurality of MR elements 50 configured to allow current to flow in the direction opposite to the second direction Db. For convenience, in the following description, an MR element 50 configured to allow current to flow in the direction opposite to the second direction Db may also be referred to as a second MR element 50B.

[0096] Similarly, the resistance R of the MR element 50 configured to allow current to flow in the direction opposite to the third direction Dc shown in Figure 11B changes in the same phase and period as the resistance R of the third MR element 50C in response to the change in the target magnetic field. Each of the subcircuits 121 and 123 may consist only of a plurality of third MR elements 50C, or only of a plurality of MR elements 50 configured to allow current to flow in the direction opposite to the third direction Dc, or may consist of a plurality of third MR elements 50C and a plurality of MR elements 50 configured to allow current to flow in the direction opposite to the third direction Dc. For convenience, in the following description, an MR element 50 configured to allow current to flow in the direction opposite to the third direction Dc may also be referred to as a third MR element 50C.

[0097] Similarly, the resistance R of the MR element 50 configured to allow current to flow in the direction opposite to the fourth direction Dd shown in Figure 11B changes in the same phase and period as the resistance R of the fourth MR element 50D in response to the change in the target magnetic field. Each of the subcircuits 122 and 124 may consist only of a plurality of fourth MR elements 50D, or only of a plurality of MR elements 50 configured to allow current to flow in the direction opposite to the fourth direction Dd, or may consist of a plurality of fourth MR elements 50D and a plurality of MR elements 50 configured to allow current to flow in the direction opposite to the fourth direction Dd. For convenience, in the following description, an MR element 50 configured to allow current to flow in the direction opposite to the fourth direction Dd may also be referred to as the fourth MR element 50D.

[0098] Next, the first detection signal S1 and the second detection signal S2 will be described with reference to Figure 14. Figure 14 is a waveform diagram showing an example of the first detection signal S1 and the second detection signal S2. In Figure 14, the horizontal axis represents the magnetization angle θM, and the vertical axis represents the magnitude of the first detection signal S1 and the second detection signal S2, respectively. The waveform denoted by reference numeral 85 represents the first detection signal S1. The waveform denoted by reference numeral 86 represents the second detection signal S2.

[0099] The first detection signal S1 corresponds to the potential difference between the output terminals E11 and E12. The first detection signal S1 may be the potential difference between the output terminals E11 and E12 itself, or it may be the potential difference between the output terminals E11 and E12 to which specific corrections such as gain adjustment and offset adjustment have been applied. Similarly, the second detection signal S2 corresponds to the potential difference between the output terminals E21 and E22. The second detection signal S2 may be the potential difference between the output terminals E21 and E22 itself, or it may be the potential difference between the output terminals E21 and E22 to which specific corrections such as gain adjustment and offset adjustment have been applied.

[0100] The first detection signal S1 and the second detection signal S2 change at a frequency twice the frequency of the magnetization angle θM and the relative angle θ, respectively, and change at a period half the period of the magnetization angle θM and the relative angle θ, respectively. The first detection signal S1 can be expressed by an equation including cos(2(θ-δ)), similar to the resistance values ​​R of the first MR element 50A and the second MR element 50B. The second detection signal S2 can be expressed by an equation including sin(2(θ-δ)), similar to the resistance values ​​R of the third MR element 50C and the fourth MR element 50D.

[0101] The system including the magnetic sensor device 100 generates an angle output value using, for example, the first detection signal S1 and the second detection signal S2 shown in Figure 14. The angle output value θA can be generated, for example, by the following equation (2). Note that S1 represents the magnitude of the first detection signal S1, and S2 represents the magnitude of the second detection signal S2. θA = tan -1 (S2 / S1) …(2)

[0102] Equation (2) essentially represents the calculation of arctangent using the first detection signal S1 and the second detection signal S2. Although not shown in the figure, the angular output value θA changes with respect to the magnetization angle θM and the relative angle θ at a frequency twice the frequency of the respective magnetization angle θM and relative angle θ, and changes with a period half the period of the respective magnetization angle θM and relative angle θ.

[0103] Next, the multiple wirings 40 will be described with reference to Figures 15, 16, and 17. Figure 15 is a plan view showing a first example of multiple MR elements 50, multiple first wirings, and multiple second wirings. Figure 16 is a plan view showing a second example of multiple MR elements 50, multiple first wirings, and multiple second wirings. Figure 17 is a plan view showing a third example of multiple MR elements 50, multiple first wirings, and multiple second wirings.

[0104] The first example is a case where the direction of the current flowing through the MR element 50 is rotated by an angle of less than 90° from the D2 direction toward the D1 direction, or rotated by an angle of less than 90° from the -D2 direction toward the -D1 direction, such as multiple second MR elements 50B and multiple fourth MR elements 50D. The second example is a case where the direction of the current flowing through the MR element 50 is rotated by an angle of less than 90° from the D2 direction toward the -D1 direction, or rotated by an angle of less than 90° from the -D2 direction toward the D1 direction, such as multiple first MR elements 50A and multiple third MR elements 50C. The third example is a case where the rotation angle of the direction of the current flowing through the MR element 50 is smaller than in the first example.

[0105] In the first, second, and third examples, the plurality of MR elements 50 are arranged along the X-axis and the D1 direction. The plurality of wirings 40 include a plurality of first wirings 41 and a plurality of second wirings 42. The plurality of first wirings 41 and the plurality of second wirings 42 electrically connect the plurality of MR elements 50 such that the first wirings 41 and the second wirings 42 are arranged alternately along the direction of current flow. Each of the plurality of first wirings 41 electrically connects two adjacent MR elements 50 in the D1 direction. Each of the plurality of second wirings 42 electrically connects two adjacent MR elements 50 in the D1 direction, each connected to a different first wiring 41.

[0106] As shown in Figures 15 and 16, in the first and second examples, the multiple first wires 41 and the multiple second wires 42 connect the multiple MR elements 50 such that the entire arrangement of the multiple MR elements 50 and the multiple wires 40 forms a meander shape when viewed from a planar perspective in the Z direction. The meander shape is an example of a shape that allows for an increase in the number of MR elements 50 arranged on an inclined surface. In the first and second examples, the multiple first wires 41 are arranged on the D2 direction side of the multiple MR elements 50. The multiple second wires 42 are arranged on the -D2 direction side of the multiple MR elements 50.

[0107] As shown in Figure 17, in the third example, the multiple first wirings 41 and multiple second wirings 42 are arranged alternately along the X-axis and D1 directions. An MR element 50 is placed between adjacent first wirings 41 and second wirings 42 in the X-axis and D1 directions.

[0108] Each of the multiple MR elements 50 has a first end 50a and a second end 50b that are located opposite each other in directions that intersect with the X-axis and D1 directions at angles other than 90°. The first end 50a is located on the -D2 direction side of the MR element 50. The second end 50b is located on the D2 direction side of the MR element 50.

[0109] Here, we focus on the three MR elements 50 arranged in the D1 direction. As shown in Figures 15 to 17, the reference MR element 50 is denoted by reference numeral 50-1, the MR element 50 located ahead of MR element 50-1 in the D1 direction is denoted by reference numeral 50-2, and the MR element 50 located ahead of MR element 50-1 in the -D1 direction is denoted by reference numeral 50-3. In MR element 50-1 in the first and second examples, current flows along the direction from the first end 50a to the second end 50b. In MR elements 50-2 and 50-3 in the first and second examples, current flows along the direction from the second end 50b to the first end 50a. Therefore, in MR element 50-1 in the first and second examples, the first end 50a is the input end (first end) of the current, and the second end 50b is the output end (second end) of the current. Furthermore, in the MR elements 50-2 and 50-3 in the first and second examples, the second end 50b is the current input terminal (first terminal), and the first end 50a is the current output terminal (second terminal).

[0110] The direction of the main component of the current flowing through MR element 50-1 is also referred to as the first reference direction DR1, the direction of the main component of the current flowing through MR element 50-2 is also referred to as the second reference direction DR2, and the direction of the main component of the current flowing through MR element 50-3 is also referred to as the third reference direction DR3. In the first and second examples, MR elements 50-1, 50-2, and 50-3 are configured such that the first reference direction DR1 and the second reference direction DR2 are in opposite directions, and the first reference direction DR1 and the third reference direction DR3 are in opposite directions. Alternatively, in the first and second examples, MR elements 50-2 and 50-3 may be configured such that the second reference direction DR2 and the third reference direction DR3 coincide.

[0111] In the third example, in the MR elements 50-1, 50-2, and 50-3, current flows along the direction from the first end 50a to the second end 50b. Therefore, in the MR elements 50-1, 50-2, and 50-3 in the third example, the first end 50a is the input terminal (first end) of the current, and the second end 50b is the output terminal (second end) of the current. The MR elements 50-1, 50-2, and 50-3 in the third example are configured such that the first reference direction DR1, the second reference direction DR2, and the third reference direction DR3 are in the same direction.

[0112] Figures 15 to 17 show multiple MR elements 50, multiple first wirings 41, and multiple second wirings 42 arranged on one of the multiple inclined surfaces 31a and multiple inclined surfaces 31b. Here, we will focus on the inclined surfaces 31a and 31b of one protrusion 31c and describe the multiple MR elements 50, multiple first wirings 41, and multiple second wirings 42 arranged on each of the inclined surfaces 31a and 31b. Figure 18 is a plan view showing the two inclined surfaces 31a and 31b of one protrusion 31c. In Figure 18, the straight lines denoted by RLs indicate reference axes extending in the X-axis direction and the D1 direction. In the example shown in Figure 18, the upper edges of the inclined surface 31a and the upper edges of the inclined surface 31b coincide with the reference axis RLs in a plan view from the Z direction.

[0113] Here, the group of elements including a plurality of MR elements 50 arranged on the inclined surface 31a is referred to as the first group of elements, and the group of elements including a plurality of MR elements 50 arranged on the inclined surface 31b is referred to as the second group of elements. The first group of elements and the second group of elements are arranged so as to straddle the reference axis RLs. The first reference direction DR1, the second reference direction DR2, and the third reference direction DR3 in the second group of elements may be symmetrical with respect to the first reference direction DR1, the second reference direction DR2, and the third reference direction DR3 in the first group of elements, with respect to the reference axis RLs.

[0114] The first group of elements and the second group of elements may be electrically connected in series. In this case, the first group of elements and the second group of elements may be included in one of the subcircuits 111-114 and 121-124.

[0115] The shapes of the first group of elements in a plan view from the Z direction and the shapes of the second group of elements in a plan view from the Z direction may be symmetrical with respect to the reference axis RLs.

[0116] Furthermore, a group of wirings including a plurality of first wirings 41 and a plurality of second wirings 42 arranged on the inclined surface 31a is referred to as the first wiring group, and a group of wirings including a plurality of first wirings 41 and a plurality of second wirings 42 arranged on the inclined surface 31b is referred to as the second wiring group. The shape of the first wiring group in a plan view from the Z direction and the shape of the second wiring group in a plan view from the Z direction may be symmetrical with respect to the reference axis RLs.

[0117] Note that the shapes of the first element group, the second element group, the first wiring group, and the second wiring group are not limited to the example shown in Figure 18. For example, the planar shapes of the second element group and the second wiring group may coincide with the shape obtained by shifting the planar shapes of the first element group and the first wiring group in the Y direction.

[0118] Next, the configurations of the first wiring 41 and the second wiring 42 will be described. Here, we will focus on a specific first wiring 41 among the plurality of first wirings 41 shown in Figures 15 to 17 that electrically connects MR element 50-1 and MR element 50-2. The specific first wiring 41 has a first junction surface connected to MR element 50-1 and a second junction surface connected to MR element 50-2. The specific first wiring 41 also includes a first portion 41A which includes the first junction surface and is configured so that the main component of the current flows in a first reference direction DR1, a second portion 41B which includes a second junction surface and is configured so that the main component of the current flows in a second reference direction DR2, and a third portion 41C which electrically connects the first portion 41A and the second portion 41B. In the first and second examples, the third portion 41C may be configured so that the main component of the current flows in the X-axis direction. The third portion 41C in the third example may be configured such that the main component of the current flows in a direction that intersects both the D1 direction and the D2 direction.

[0119] Furthermore, among the multiple second wirings 42 shown in Figures 15 to 17, we will focus on a specific second wiring 42 that electrically connects MR element 50-1 and MR element 50-3. The specific second wiring 42 has a third junction surface connected to MR element 50-1 and a fourth junction surface connected to MR element 50-3. The specific second wiring 42 also includes a fourth portion 42A which includes the third junction surface and is configured so that the main component of the current flows in the first reference direction DR1, a fifth portion 42B which includes the fourth junction surface and is configured so that the main component of the current flows in the third reference direction DR3, and a sixth portion 42C which electrically connects the fourth portion 42A and the fifth portion 42B. In the first and second examples, the sixth portion 42C may be configured so that the main component of the current flows in the X-axis direction. The sixth portion 42C in the third example may be configured such that the main component of the current flows in a direction that intersects both the D1 direction and the D2 direction.

[0120] Next, the arrangement of the first detection circuit 101 and the second detection circuit 102 of the magnetic sensor 1 will be described. Hereinafter, the arrangement of the first detection circuit 101 will be described based on a first region where the multiple MR elements 50 constituting the first detection circuit 101 are arranged, or a second region where a group of inclined surfaces including multiple inclined surfaces 31a and multiple inclined surfaces 31b, on which the multiple MR elements 50 constituting the first detection circuit 101 are arranged, as viewed from a planar perspective from the Z direction. For example, the center of the first detection circuit 101 in a planar perspective from the Z direction corresponds to the center of these regions in a planar perspective from the Z direction. The first region may be defined as a rectangular region (minimum circumscribed rectangular region) that includes all of the multiple MR elements 50 constituting the first detection circuit 101 and has the smallest area in a planar perspective from the Z direction. The second region may be defined as the rectangular region (minimum circumscribed rectangular region) that has the smallest area in a plan view from the Z direction, and includes all of the group of inclined surfaces, including the multiple inclined surfaces 31a and multiple inclined surfaces 31b on which the multiple MR elements 50 constituting the first detection circuit 101 are arranged. The planar shapes of the first region and the second region may be the same or different from each other. In the drawings used in the following description, the planar shape of the first detection circuit 101 is shown as the planar shape of either the first region or the second region. In the following description, the center of the first detection circuit 101 in a planar view from the Z direction may be replaced with the center of the first region or the center of the second region in a planar view from the Z direction.

[0121] Furthermore, the arrangement of the second detection circuit 102, the sub-circuits 111 to 114 of the first detection circuit 101, the sub-circuits 121 to 124 of the second detection circuit 102, and the detection circuit and sub-circuits of the magnetic sensor of the comparative example described later will also be explained in the same manner as the first detection circuit 101.

[0122] First, the magnetic sensor 201 of the first comparative example will be described with reference to Figure 19. Figure 19 is a plan view showing the magnetic sensor 201 of the first comparative example. The configuration of the magnetic sensor 201 of the first comparative example is the same as that of the magnetic sensor 1 according to this embodiment, except for the arrangement of the detection circuit and sub-circuits. The magnetic sensor 201 of the first comparative example comprises a main body 210, a first detection circuit 101 and a second detection circuit 102 shown in Figure 9A, and a plurality of electrode pads 230 corresponding to the power terminals V1, V2, ground terminals G1, G2 and output terminals E11, E12, E21, E22 shown in Figure 9A.

[0123] Figure 19 shows the arrangement of the first detection circuit 101 and the second detection circuit 102, the arrangement of the sub-circuits 111 to 114 of the first detection circuit 101, and the arrangement of the sub-circuits 121 to 124 of the second detection circuit 102. Symbols A201 and A202 indicate the regions where the first detection circuit 101 and the second detection circuit 102 are located, respectively. Symbols A211, A212, A213, and A214 indicate the regions where the sub-circuits 111, 112, 113, and 114 of the first detection circuit 101 are located, respectively. Symbols A221, A222, A223, and A224 indicate the regions where the sub-circuits 121, 122, 123, and 124 of the second detection circuit 102 are located, respectively.

[0124] In Figure 19, symbol C201 indicates the center of the first detection circuit 101 in a plan view from the Z direction. Center C201 may also be the centroid of region A201. Symbol C202 indicates the center of the second detection circuit 102 in a plan view from the Z direction. Center C202 may also be the centroid of region A202. The line denoted by symbol L201 intersects center C201 and is parallel to the Y-axis direction. The line denoted by symbol L202 intersects center C202 and is parallel to the Y-axis direction.

[0125] As shown in Figure 19, the first detection circuit 101 and the second detection circuit 102 (regions A201 and A202) are arranged to be aligned along the X-axis. In the example shown in Figure 19, the first detection circuit 101 and the second detection circuit 102 are arranged in this order along the X-direction.

[0126] The subcircuits 111 and 112 (regions A211 and A212) of the first detection circuit 101 are arranged in region A201 so as to be aligned along the Y-axis. The subcircuits 113 and 114 (regions A213 and A214) of the first detection circuit 101 are arranged in region A201 on the X-direction side of the subcircuits 111 and 112 (regions A211 and A212), so as to be aligned along the Y-axis. In the example shown in Figure 19, the subcircuits 111 and 112 are arranged in this order along the -Y direction, and the subcircuits 113 and 114 are arranged in this order along the Y direction. Also, the subcircuits 111 and 114 are arranged in this order along the X direction, and the subcircuits 112 and 113 are arranged in this order along the X direction.

[0127] The subcircuits 121 and 122 (regions A221 and A222) of the second detection circuit 102 are arranged in region A202 so as to be aligned along the Y-axis. The subcircuits 123 and 124 (regions A223 and A224) of the second detection circuit 102 are arranged in region A202 on the X-direction side of the subcircuits 121 and 122 (regions A221 and A222), so as to be aligned along the Y-axis. In the example shown in Figure 19, the subcircuits 121 and 122 are arranged in this order along the -Y direction, and the subcircuits 123 and 124 are arranged in this order along the Y direction. Also, the subcircuits 121 and 124 are arranged in this order along the X direction, and the subcircuits 122 and 123 are arranged in this order along the X direction.

[0128] In the magnetic sensor 201 of the first comparative example, the center C201 of the first detection circuit 101 and the center C202 of the second detection circuit 102, viewed from a planar perspective from the Z direction, are arranged to be aligned along the X-axis. Furthermore, the straight lines L201 and L202 are spaced apart in the X-axis direction. As shown in Figure 3, the intensity of the first magnetic field component Bx and the intensity of the third magnetic field component Bz change according to the X position of the magnetic field generator 5. The target magnetic field of the magnetic sensor 201 of the first comparative example has a corresponding relationship with the first magnetic field component Bx and the third magnetic field component Bz. Therefore, the magnitude of the target magnetic field at center C201 and the magnitude of the target magnetic field at center C202 are different. As a result, the magnitude of the target magnetic field detected by the first detection circuit 101 and the magnitude of the target magnetic field detected by the second detection circuit 102 may differ, potentially causing errors in the angular output value.

[0129] Next, a first example of the magnetic sensor 1 will be described with reference to Figure 20. Figure 20 is a plan view showing a first example of the magnetic sensor 1. The magnetic sensor 1 comprises a main body 110, a first detection circuit 101 and a second detection circuit 102 shown in Figure 9A, and a plurality of electrode pads 130 corresponding to the power terminals V1, V2, ground terminals G1, G2 and output terminals E11, E12, E21, E22 shown in Figure 9A.

[0130] Figure 20 shows the arrangement of the first detection circuit 101 and the second detection circuit 102, the arrangement of the sub-circuits 111 to 114 of the first detection circuit 101, and the arrangement of the sub-circuits 121 to 124 of the second detection circuit 102. Symbols A101 and A102 indicate the regions where the first detection circuit 101 and the second detection circuit 102 are located, respectively. Symbols A111, A112, A113, and A114 indicate the regions where the sub-circuits 111, 112, 113, and 114 of the first detection circuit 101 are located, respectively. Symbols A121, A122, A123, and A124 indicate the regions where the sub-circuits 121, 122, 123, and 124 of the second detection circuit 102 are located, respectively.

[0131] In Figure 20, the symbol C101 indicates the center of the first detection circuit 101 in a plan view from the Z direction. The center C101 may also be the centroid of region A101. The symbol C102 indicates the center of the second detection circuit 102 in a plan view from the Z direction. The center C102 may also be the centroid of region A102. The line denoted by the symbol L101 intersects the center C101 and is parallel to the Y-axis direction. The line denoted by the symbol L102 intersects the center C102 and is parallel to the Y-axis direction.

[0132] As shown in Figure 20, the first detection circuit 101 and the second detection circuit 102 (regions A101 and A102) are arranged to be aligned along the Y-axis. In the example shown in Figure 20, the first detection circuit 101 and the second detection circuit 102 are arranged in this order along the -Y direction.

[0133] The subcircuits 111 and 112 (regions A111 and A112) of the first detection circuit 101 are arranged in region A101 so as to be aligned along the Y-axis. The subcircuits 113 and 114 (regions A113 and A114) of the first detection circuit 101 are arranged in region A101 on the X-direction side of the subcircuits 111 and 112 (regions A111 and A112), so as to be aligned along the Y-axis. In the example shown in Figure 20, the subcircuits 111 and 112 are arranged in this order along the -Y direction, and the subcircuits 113 and 114 are arranged in this order along the Y direction. Also, the subcircuits 111 and 114 are arranged in this order along the X direction, and the subcircuits 112 and 113 are arranged in this order along the X direction.

[0134] The subcircuits 121 and 122 (regions A121 and A122) of the second detection circuit 102 are arranged in region A102 so as to be aligned along the Y-axis. The subcircuits 123 and 124 (regions A123 and A124) of the second detection circuit 102 are arranged in region A102 on the X-direction side of the subcircuits 121 and 122 (regions A121 and A122), so as to be aligned along the Y-axis. In the example shown in Figure 20, the subcircuits 121 and 122 are arranged in this order along the -Y direction, and the subcircuits 123 and 124 are arranged in this order along the Y direction. Also, the subcircuits 121 and 124 are arranged in this order along the X direction, and the subcircuits 122 and 123 are arranged in this order along the X direction.

[0135] In this embodiment, the second detection circuit 102 is aligned with the first detection circuit 101 based on the relationship between the position of the center C102 of the second detection circuit 102 in a plan view from the Z direction and the position of the center C101 of the first detection circuit 101 in a plan view from the Z direction. In the first example of the magnetic sensor 1, the position of the center C102 in the X-axis direction substantially coincides with the position of the center C101 in the X-axis direction. Also, in the first example of the magnetic sensor 1, the straight lines L101 and L102 substantially coincide. Therefore, the intensity of the first magnetic field component Bx at center C101 and the intensity of the first magnetic field component Bx at center C102 substantially coincide, and the intensity of the third magnetic field component Bz at center C101 and the intensity of the third magnetic field component Bz at center C102 substantially coincide. As a result, the magnitude of the target magnetic field detected by the first detection circuit 101 and the magnitude of the target magnetic field detected by the second detection circuit 102 substantially coincide. According to the first example of the magnetic sensor 1, this makes it possible to suppress errors in the angle detection value.

[0136] The arrangement of subcircuits 111 to 114 of the first detection circuit 101 and the arrangement of subcircuits 121 to 124 of the second detection circuit 102 may be defined based on the centers of the subcircuits in a plan view from the Z direction, similar to the first detection circuit 101 and the second detection circuit 102. The definition of the center of a subcircuit in a plan view from the Z direction is the same as the definition of centers C101 and C102. In the first example of the magnetic sensor 1, the centers of subcircuit 111 and subcircuit 114 are aligned along the X-axis direction. The centers of subcircuit 112 and subcircuit 113 are aligned along the X-axis direction. The position of center C101 in the X-axis direction is between the position of the center of subcircuit 111 in the X-axis direction and the position of the center of subcircuit 114 in the X-axis direction, and between the position of the center of subcircuit 112 in the X-axis direction and the position of the center of subcircuit 113 in the X-axis direction.

[0137] The centers of subcircuit 121 and subcircuit 124 are aligned along the X-axis. The centers of subcircuit 122 and subcircuit 123 are aligned along the X-axis. The position of center C102 in the X-axis direction is between the position of the center of subcircuit 121 in the X-axis direction and the position of the center of subcircuit 124 in the X-axis direction, and between the position of the center of subcircuit 122 in the X-axis direction and the position of the center of subcircuit 123 in the X-axis direction.

[0138] The centers of subcircuits 111, 112, 121, and 122 are aligned along the Y-axis. The centers of subcircuits 114, 113, 124, and 123 are aligned along the Y-axis.

[0139] The above description of the arrangement of subcircuits 111-114 and 121-124 also applies to the multiple MR elements 50 belonging to each of the subcircuits 111-114 and 121-124, and to the multiple inclined surfaces 31a and 31b on which these multiple MR elements 50 are arranged. Here, we focus on two of the subcircuits 111-114 and 121-124 that are aligned along the X-axis. Among the multiple inclined surfaces 31a, the inclined surface 31a belonging to one of the two subcircuits and the inclined surface 31a belonging to the other may constitute a continuous inclined surface. Among the multiple inclined surfaces 31b, the inclined surface 31b belonging to one of the two subcircuits and the inclined surface 31b belonging to the other may constitute a continuous inclined surface.

[0140] Next, a second example of the magnetic sensor 1 will be described with reference to Figure 21. Figure 21 is a plan view showing the second example of the magnetic sensor 1. Note that the same symbols as in Figure 20 are used in Figure 21.

[0141] As shown in Figure 21, the first detection circuit 101 and the second detection circuit 102 (regions A101 and A102) are arranged to be aligned along the Y-axis. In the example shown in Figure 21, the first detection circuit 101 and the second detection circuit 102 are arranged in this order along the -Y direction.

[0142] The subcircuits 111, 112, 113, and 114 of the first detection circuit 101 (regions A111, A112, A113, and A114) are arranged in region A101 so as to be aligned along the Y-axis. In the example shown in Figure 21, the subcircuits 111, 112, 113, and 114 are arranged in this order along the -Y direction.

[0143] The subcircuits 121, 122, 123, and 124 of the second detection circuit 102 (regions A121, A122, A123, and A124) are arranged in region A102 so as to be aligned along the Y-axis. In the example shown in Figure 21, the subcircuits 121, 122, 123, and 124 are arranged in this order along the -Y direction.

[0144] In the second example of the magnetic sensor 1, similar to the first example, the position of the center C102 of the second detection circuit 102 in the X-axis direction in a plan view from the Z direction substantially coincides with the position of the center C101 of the first detection circuit 101 in the X-axis direction in a plan view from the Z direction. Therefore, according to the second example of the magnetic sensor 1, errors in the angle detection value can be suppressed, similar to the first example of the magnetic sensor 1.

[0145] Furthermore, in the second example of the magnetic sensor 1, the centers of sub-circuits 111, 112, 113, 114, 121, 122, 123, and 124 are aligned along the Y-axis. The positions of the centers of sub-circuits 111, 112, 113, and 114 in the X-axis direction substantially coincide with the positions of the center C101 in the X-axis direction. The positions of the centers of sub-circuits 121, 122, 123, and 124 in the X-axis direction substantially coincide with the positions of the center C102 in the X-axis direction.

[0146] Thus, according to this embodiment, errors in the angle detection value can be suppressed. As a result, according to this embodiment, stable detection is possible even under conditions where a relatively strong magnetic field is applied.

[0147] [Modification] Next, a modification of the magnetic sensor 1 according to this embodiment will be described with reference to Figure 22. Figure 22 is a cross-sectional view showing a modification of the magnetic sensor 1. In the modification, the support member 30 includes a groove 30b recessed in the -Z direction from the flat surface 30a, instead of the protruding portion 31c. The groove 30b includes a plurality of inclined surfaces 31a and a plurality of inclined surfaces 31b as a plurality of wall surfaces. The plurality of inclined surfaces 31a and a plurality of inclined surfaces 31b may or may not have a bottom portion 31d of the groove. In addition, the groove 30b may substantially have a plurality of protruding portions 31c formed thereon.

[0148] [Second Embodiment] Next, a second embodiment of the present disclosure will be described. First, the circuit configuration of the magnetic sensor 301 according to this embodiment will be described with reference to Figure 23. Figure 23 is a circuit diagram showing the circuit configuration of the magnetic sensor 301.

[0149] The magnetic sensor 301 includes a first detection circuit 103 configured to generate a first detection signal S1, and a second detection circuit 104 configured to generate a second detection signal S2 which has a different phase from the first detection signal S1. In the example shown in Figure 23, both the first detection circuit 103 and the second detection circuit 104 are half-bridge circuits. The first detection circuit 103 is also referred to as the first half-bridge circuit. The second detection circuit 104 is also referred to as the second half-bridge circuit.

[0150] The magnetic sensor 301 further includes a power port, a power terminal V0, a ​​ground port, a ground terminal G0, and two output ports, E3 and E4.

[0151] The first detection circuit 103 includes two sub-circuits 131 and 132. Sub-circuit 131 is provided between the power supply terminal V0 and the output terminal E3. Sub-circuit 132 is provided between the ground terminal G0 and the output terminal E3. The configurations of sub-circuits 131 and 132 may be the same as those of sub-circuits 111 and 112 in the first embodiment.

[0152] The second detection circuit 104 includes two sub-circuits 141 and 142. Sub-circuit 141 is provided between the power supply terminal V0 and the output terminal E4. Sub-circuit 142 is provided between the ground terminal G0 and the output terminal E4. The configurations of sub-circuits 141 and 142 may be the same as those of sub-circuits 121 and 122 in the first embodiment.

[0153] One end of each of the sub-circuits 131 and 141 is connected to the power terminal V0. One end of each of the sub-circuits 132 and 142 is connected to the ground terminal G0. The other end of each of the sub-circuits 131 and 132 is connected to the output terminal E3. The other end of each of the sub-circuits 141 and 142 is connected to the output terminal E4. A voltage or current of a specific magnitude is applied to the power terminal V0. The ground terminal G0 is connected to ground.

[0154] The magnetic sensor 301 outputs a signal corresponding to the potential at output terminal E3 as a first detection signal S1, and outputs a signal corresponding to the potential at output terminal E4 as a second detection signal S2.

[0155] The other configurations of the magnetic sensor 301 are the same as those of the magnetic sensor 1 according to the first embodiment.

[0156] Next, the arrangement of the first detection circuit 103 and the second detection circuit 104 of the magnetic sensor 301 will be described. Hereinafter, the description will be based on either a first region where multiple MR elements 50 are arranged, or a second region where a group of inclined surfaces is arranged, similar to the first embodiment.

[0157] First, the magnetic sensor 401 of the second comparative example will be described with reference to Figure 24. Figure 24 is a plan view showing the magnetic sensor 401 of the second comparative example. The configuration of the magnetic sensor 401 of the second comparative example is the same as that of the magnetic sensor 301 according to this embodiment, except for the arrangement of the detection circuit and sub-circuits. The magnetic sensor 401 of the second comparative example comprises a main body 410, a first detection circuit 103 and a second detection circuit 104 shown in Figure 23, and a plurality of electrode pads 430 corresponding to the power terminal V0, ground terminal G0, and output terminals E3, E4 shown in Figure 23.

[0158] Figure 24 shows the arrangement of the first detection circuit 103 and the second detection circuit 104, the arrangement of the sub-circuits 131 and 132 of the first detection circuit 103, and the arrangement of the sub-circuits 141 and 142 of the second detection circuit 104. Symbols A401 and A402 indicate the regions where the first detection circuit 103 and the second detection circuit 104 are located, respectively. Symbols A431 and A432 indicate the regions where the sub-circuits 131 and 132 of the first detection circuit 103 are located, respectively. Symbols A441 and A442 indicate the regions where the sub-circuits 141 and 142 of the second detection circuit 104 are located, respectively.

[0159] In Figure 24, symbol C401 indicates the center of the first detection circuit 103 in a plan view from the Z direction. Center C401 may also be the centroid of region A401. Symbol C402 indicates the center of the second detection circuit 104 in a plan view from the Z direction. Center C402 may also be the centroid of region A402. The line denoted by symbol L401 intersects center C401 and is parallel to the Y-axis direction. The line denoted by symbol L402 intersects center C402 and is parallel to the Y-axis direction.

[0160] As shown in Figure 24, the first detection circuit 103 and the second detection circuit 104 (regions A401 and A402) are arranged to be aligned along the X-axis. In the example shown in Figure 24, the first detection circuit 103 and the second detection circuit 104 are arranged in this order along the X-direction.

[0161] The subcircuits 131 and 132 (regions A431 and A432) of the first detection circuit 103 are arranged in region A401 so as to be aligned along the Y-axis. In the example shown in Figure 24, the subcircuits 131 and 132 are arranged in this order along the Y-direction.

[0162] The subcircuits 141 and 142 (regions A441 and A442) of the second detection circuit 104 are arranged in region A402 so as to be aligned along the Y-axis. In the example shown in Figure 24, the subcircuits 141 and 142 are arranged in this order along the -Y direction.

[0163] In the second comparative example magnetic sensor 401, the center C401 of the first detection circuit 103 and the center C402 of the second detection circuit 104 in a plan view from the Z direction are arranged to be aligned along the X-axis. Also, the straight lines L401 and L402 are spaced apart in the X-axis direction. Therefore, similar to the first comparative example magnetic sensor 201 described in the first embodiment, the magnitude of the target magnetic field detected by the first detection circuit 103 and the magnitude of the target magnetic field detected by the second detection circuit 104 may differ from each other, which may cause errors in the angular output value.

[0164] Next, a first example of the magnetic sensor 301 will be described with reference to Figure 25. Figure 25 is a plan view showing a first example of the magnetic sensor 301. The magnetic sensor 301 comprises a main body 310, a first detection circuit 103 and a second detection circuit 104 shown in Figure 23, and a plurality of electrode pads 130 corresponding to the power terminal V0, ground terminal G0, and output terminals E3, E4 shown in Figure 23.

[0165] Figure 25 shows the arrangement of the first detection circuit 103 and the second detection circuit 104, the arrangement of the sub-circuits 131 and 132 of the first detection circuit 103, and the arrangement of the sub-circuits 141 and 142 of the second detection circuit 104. Symbols A301 and A302 indicate the regions where the first detection circuit 103 and the second detection circuit 104 are located, respectively. Symbols A331 and A332 indicate the regions where the sub-circuits 131 and 132 of the first detection circuit 103 are located, respectively. Symbols A341 and A342 indicate the regions where the sub-circuits 141 and 142 of the second detection circuit 104 are located, respectively.

[0166] In Figure 25, symbol C301 indicates the center of the first detection circuit 103 in a plan view from the Z direction. Center C301 may also be the centroid of region A301. Symbol C302 indicates the center of the second detection circuit 104 in a plan view from the Z direction. Center C302 may also be the centroid of region A302. The line denoted by symbol L301 intersects center C301 and is parallel to the Y-axis direction. The line denoted by symbol L302 intersects center C302 and is parallel to the Y-axis direction.

[0167] As shown in Figure 25, the first detection circuit 103 and the second detection circuit 104 (regions A301 and A302) are arranged to be aligned along the Y-axis. In the example shown in Figure 25, the first detection circuit 103 and the second detection circuit 104 are arranged in this order along the -Y direction.

[0168] The subcircuits 131 and 132 (regions A331 and A332) of the first detection circuit 103 are arranged in region A301 so as to be aligned along the X-axis. In the example shown in Figure 25, the subcircuits 131 and 132 are arranged in this order along the -X direction.

[0169] The subcircuits 141 and 142 (regions A341 and A342) of the second detection circuit 104 are arranged in region A302 so as to be aligned along the X-axis. In the example shown in Figure 25, the subcircuits 141 and 142 are arranged in this order along the X-direction.

[0170] In this embodiment, the second detection circuit 104 is aligned with the first detection circuit 103 based on the relationship between the position of the center C302 of the second detection circuit 104 in a plan view from the Z direction and the position of the center C301 of the first detection circuit 103 in a plan view from the Z direction. In the first example of the magnetic sensor 301, the position of the center C302 in the X-axis direction substantially coincides with the position of C301 in the X-axis direction. Also, in the first example of the magnetic sensor 301, the straight lines L301 and L302 substantially coincide. Therefore, according to the first example of the magnetic sensor 301, errors in the angle detection value can be suppressed, similar to the first embodiment.

[0171] Furthermore, in the first example of the magnetic sensor 301, the centers of sub-circuit 131 and sub-circuit 132 are aligned along the X-axis direction. The position of the center C301 in the X-axis direction is between the position of the center of sub-circuit 131 in the X-axis direction and the position of the center of sub-circuit 132 in the X-axis direction.

[0172] The centers of subcircuit 141 and subcircuit 142 are aligned along the X-axis. The position of center C302 in the X-axis direction is between the position of the center of subcircuit 141 in the X-axis direction and the position of the center of subcircuit 142 in the X-axis direction.

[0173] The centers of subcircuit 131 and subcircuit 142 are aligned along the Y-axis. The centers of subcircuit 132 and subcircuit 141 are aligned along the Y-axis.

[0174] The above description of the arrangement of subcircuits 131, 132, 141, and 142 also applies to the multiple MR elements 50 belonging to each of the subcircuits 131, 132, 141, and 142, and to the multiple inclined surfaces 31a and 31b on which these multiple MR elements 50 are arranged. Here, we focus on two of the subcircuits 131, 132, 141, and 142 that are aligned along the X-axis. Among the multiple inclined surfaces 31a, the inclined surface 31a belonging to one of the two subcircuits and the inclined surface 31a belonging to the other may form a continuous inclined surface. Among the multiple inclined surfaces 31b, the inclined surface 31b belonging to one of the two subcircuits and the inclined surface 31b belonging to the other may form a continuous inclined surface.

[0175] Next, a second example of the magnetic sensor 301 will be described with reference to Figure 26. Figure 26 is a plan view showing the second example of the magnetic sensor 301. Note that the same symbols as in Figure 25 are used in Figure 26.

[0176] As shown in Figure 26, in the second example, the region A301 where the first detection circuit 103 is located and the region A302 where the second detection circuit 104 is located are substantially the same.

[0177] Sub-circuit 131 (region A331) of the first detection circuit 103 and sub-circuit 141 (region A341) of the second detection circuit 104 are arranged to be aligned along the X-axis. Sub-circuit 132 (region A332) of the first detection circuit 103 and sub-circuit 142 (region A342) of the second detection circuit 104 are arranged on the Y-direction side of sub-circuits 131 and 141 (regions A331 and A341) and are arranged to be aligned along the X-axis. In the example shown in Figure 26, sub-circuits 131 and 141 are arranged in this order along the -X direction, and sub-circuits 132 and 142 are arranged in this order along the X direction. Also, sub-circuits 131 and 142 are arranged in this order along the Y direction, and sub-circuits 132 and 141 are arranged in this order along the -Y direction.

[0178] In the second example of the magnetic sensor 301, the center C302 of the second detection circuit 104 in a plan view from the Z direction substantially coincides with the center C301 of the first detection circuit 103 in a plan view from the Z direction. Therefore, according to the second example of the magnetic sensor 301, errors in the angle detection value can be suppressed, similar to the first example of the magnetic sensor 301.

[0179] Furthermore, in the second example of the magnetic sensor 301, the centers of subcircuit 131 and subcircuit 141 are aligned along the X-axis direction. The centers of subcircuit 132 and subcircuit 142 are aligned along the X-axis direction. The positions of center C301 and center C302 in the X-axis direction are between the position of the center of subcircuit 131 in the X-axis direction and the position of the center of subcircuit 141 in the X-axis direction, and between the position of the center of subcircuit 132 in the X-axis direction and the position of the center of subcircuit 142 in the X-axis direction.

[0180] The centers of subcircuit 131 and subcircuit 142 are aligned along the Y-axis. The centers of subcircuit 132 and subcircuit 142 are aligned along the Y-axis.

[0181] The above description of the arrangement of subcircuits 131, 132, 141, and 142 also applies to the multiple MR elements 50 belonging to each of the subcircuits 131, 132, 141, and 142, and to the multiple inclined surfaces 31a and 31b on which these multiple MR elements 50 are arranged. Here, we focus on two of the subcircuits 131, 132, 141, and 142 that are aligned along the X-axis. Among the multiple inclined surfaces 31a, the inclined surface 31a belonging to one of the two subcircuits and the inclined surface 31a belonging to the other may form a continuous inclined surface. Among the multiple inclined surfaces 31b, the inclined surface 31b belonging to one of the two subcircuits and the inclined surface 31b belonging to the other may form a continuous inclined surface.

[0182] Next, a third example of the magnetic sensor 301 will be described with reference to Figure 27. Figure 27 is a plan view showing the third example of the magnetic sensor 301. Note that the same symbols as in Figure 25 are used in Figure 27.

[0183] As shown in Figure 27, the first detection circuit 103 and the second detection circuit 104 (regions A301 and A302) are arranged to be aligned along the Y-axis. In the example shown in Figure 27, the first detection circuit 103 and the second detection circuit 104 are arranged in this order along the -Y direction.

[0184] The subcircuits 131 and 132 (regions A331 and A332) of the first detection circuit 103 are arranged in region A301 so as to be aligned along the Y-axis. In the example shown in Figure 27, the subcircuits 131 and 132 are arranged in this order along the -Y direction.

[0185] The subcircuits 141 and 142 (regions A341 and A342) of the second detection circuit 104 are arranged in region A302 so as to be aligned along the Y-axis. In the example shown in Figure 27, the subcircuits 141 and 142 are arranged in this order along the -Y direction.

[0186] In the third example of the magnetic sensor 301, similar to the first example, the position of the center C302 of the second detection circuit 104 in the X-axis direction in a plan view from the Z direction substantially coincides with the position of the center C301 of the first detection circuit 103 in the X-axis direction in a plan view from the Z direction. Therefore, according to the third example of the magnetic sensor 301, errors in the angle detection value can be suppressed, similar to the first example.

[0187] Furthermore, in the third example of the magnetic sensor 301, the centers of subcircuit 131, subcircuit 132, subcircuit 141, and subcircuit 142 are aligned along the Y-axis. The position of the center of subcircuit 131 in the X-axis direction and the position of the center of subcircuit 132 in the X-axis direction substantially coincide with the position of the center C301 in the X-axis direction. The position of the center of subcircuit 141 in the X-axis direction and the position of the center of subcircuit 142 in the X-axis direction substantially coincide with the position of the center C302 in the X-axis direction.

[0188] Thus, according to this embodiment, errors in the angle detection value can be suppressed. As a result, according to this embodiment, stable detection is possible even under conditions where a relatively strong magnetic field is applied.

[0189] Other configurations in this embodiment may be the same as those in the first embodiment.

[0190] [Third Embodiment] Next, a third embodiment of the present disclosure will be described with reference to Figure 28. Figure 28 is a plan view showing the MR element in this embodiment.

[0191] In this embodiment, the planar shape of the MR element 250 in a plan view from the direction D3 is circular or nearly circular. Also, in Figure 28, the arrow indicates the direction of the current flowing through the MR element 250. The reference direction DR, which is the direction of the main component of the current flowing through the MR element 250, can be defined by the arrangement of the wiring 40. For example, by arranging two wirings 40 so as to sandwich the MR element 250 along the first direction Da shown in Figure 11A, the reference direction DR can be set to a direction along the first direction Da, similar to the first MR element 50A.

[0192] In this embodiment, the magnetic symmetry of the MR element 250 can be improved. As a result, according to this embodiment, the temperature characteristics of the MR element 250 can be improved.

[0193] Other configurations in this embodiment may be the same as those in the first or second embodiment.

[0194] [Fourth Embodiment] Next, a fourth embodiment of the present disclosure will be described with reference to Figures 29A and 29B. Figure 29A is a plan view showing the first and second magnetoresistive elements in this embodiment. Figure 29B is a plan view showing the third and fourth magnetoresistive elements in this embodiment.

[0195] As shown in Figure 29A, in this embodiment, the direction of axis LA related to the first MR element 50A and the direction of axis LB related to the second MR element 50B are different from those of the first embodiment. Also, as shown in Figure 29B, in this embodiment, the direction of axis LC related to the third MR element 50C and the direction of axis LD related to the fourth MR element 50D are different from those of the first embodiment.

[0196] Axis LA is an axis that extends in a direction parallel to the first direction Da shown in Figure 11A. In this embodiment, the first direction Da coincides with the D1 direction or the -D1 direction.

[0197] Axis LB is an axis that extends in a direction parallel to the second direction Db shown in Figure 11A. In this embodiment, the second direction Db coincides with the D2 direction or the -D2 direction.

[0198] Axis LC is an axis that extends in a direction parallel to the third direction Dc shown in Figure 11B. In this embodiment, the third direction Dc is the direction obtained by rotating the D1 direction by 135° or 315° around the axis of the axis parallel to the D3 direction.

[0199] Axis LD is an axis that extends in a direction parallel to the fourth direction Dd shown in Figure 11B. In this embodiment, the fourth direction Dd is the direction obtained by rotating the D1 direction by 45° or 225° around the axis of the axis parallel to the D3 direction.

[0200] Other configurations in this embodiment may be the same as those in the first or second embodiment.

[0201] [Fifth Embodiment] Next, a fifth embodiment of the present disclosure will be described. In this embodiment, the method for calculating the angle output value θA differs from that of the first embodiment. First, a first correction method for correcting the amplitude and offset of the first detection signal S1 and the second detection signal S2 will be described. Figure 30 is a waveform diagram showing the first detection signal S1 and the second detection signal S2 before applying the first correction method. In Figure 30, the horizontal axis represents the magnetization angle θM, and the vertical axis represents the magnitude of the first detection signal S1 and the second detection signal S2, respectively. Waveforms denoted by reference numeral 91 represent the first detection signal S1. Waveforms denoted by reference numeral 92 represent the second detection signal S2.

[0202] In the first correction method, the maximum value S1h of the first detection signal S1, the minimum value S1s of the first detection signal S1, the maximum value S2h of the second detection signal S2, and the minimum value S2s of the second detection signal S2 are first obtained. In this case, the movement range of the magnetic field generator 5 is within the range in which these values ​​can be obtained.

[0203] Next, the corrected signal S1a of the first detection signal S1 is calculated using equation (3) below, and the corrected signal S2a of the second detection signal S2 is calculated using equation (4) below. In equation (3), S1 represents the first detection signal S1, and in equation (4), S2 represents the second detection signal S2. S1a = (2 * S1 - (S1h + S1s)) / (S1h - S1s) ... (3) S2a = (2 * S2 - (S2h + S2s)) / (S2h - S2s) ... (4)

[0204] Next, we will explain orthogonality correction, which corrects the degree of orthogonality. Orthogonality correction may be performed on the corrected signals S1a and S2a. In this case, first, the first signal S3 and the second signal S4 are calculated using the following equations (5) and (6): S3 = S2a + S1a ... (5) S4 = S2a - S1a ... (6)

[0205] Next, a second correction method is performed to correct the amplitude and offset of the first signal S3 and the second signal S4, respectively. Figure 31 is a waveform diagram showing the first signal S3 and the second signal S4. In Figure 31, the horizontal axis represents the magnetization angle θM, and the vertical axis represents the magnitude of the first signal S3 and the second signal S4, respectively. The waveform denoted by reference numeral 93 represents the first signal S3, and the waveform denoted by reference numeral 94 represents the second signal S4.

[0206] In the second correction method, first, the maximum value S3h and minimum value S3s of the first signal S3, the maximum value S4h and minimum value S4s of the second signal S4 are obtained. In this case, the movement range of the magnetic field generator 5 is within the range in which these values ​​can be obtained. Furthermore, the movement ranges in which the maximum value (maximum value) and minimum value (minimum value) of each signal can be obtained are different in the first and second correction methods.

[0207] Next, the corrected signal S3a of the first signal S3 is calculated using equation (7) below, and the corrected signal S4a of the second signal S4 is calculated using equation (8) below. S3a = (2 * S3 - (S3h + S3s)) / (S3h - S3s) ... (7) S4a = (2 * S4 - (S4h + S4s)) / (S4h - S4s) ... (8)

[0208] Next, the technical significance of the above series of signal corrections will be explained. Here, we assume a first detection signal S1 and a second detection signal S2, each containing amplitude error, offset error, and orthogonality error, respectively. The first detection signal S1 and the second detection signal S2, each containing amplitude error, offset error, and orthogonality error, are expressed by the following equations (9) and (10). In equation (9), S1 represents the first detection signal S1, B indicates the amplitude error of the first detection signal S1, S1o indicates the offset error of the first detection signal S1, and ε indicates the orthogonality error. In equation (10), S2 represents the second detection signal S2, A indicates the amplitude error of the second detection signal S2, and S2o indicates the offset error of the second detection signal S2. S1 = B・cos(2θ + ε) + S1o …(9) S2 = A・sin(2θ) + S2o …(10)

[0209] Furthermore, the first detection signal S1 and the second detection signal S2, represented by equations (9) and (10), and the corrected signals S1a, S2a and S3a, S4a obtained from these first and second detection signals S1 and S2, are used to calculate the angle output values ​​θA1, θA2, and θA3. The angle output value θA1 is the angle output value when no signal correction is applied. The angle output value θA2 is the angle output value when the first correction method is applied but orthogonality correction is not applied. The angle output value θA3 is the angle output value when the first correction method and orthogonality correction are applied.

[0210] The angle output values ​​θA1, θA2, and θA3 can be calculated using the following equations (11), (12), and (13), respectively: θA1 = tan -1 (S2 / S1) ...(11) θA2=tan -1 (S2a / S1a) ...(12) θA3=tan -1 (S4a / S3a) ...(13)

[0211] Figure 32 is a characteristic diagram showing the effect of the series of signal corrections described above. In Figure 32, the horizontal axis represents the magnetization angle θM, and the vertical axis represents the magnitude of the angle output value. The curve labeled 201 represents the angle output value θA1. The curve labeled 202 represents the angle output value θA2. The curve labeled 203 represents the angle output value θA3. As can be seen from Figure 32, even if each of the first detection signal S1 and the second detection signal S2 contains amplitude error, offset error, and orthogonality error, a linearly sound angle output value θA (angle output value θA3) can be obtained by the first correction method and orthogonality correction.

[0212] Other configurations in this embodiment may be the same as those in the first, second, third, or fourth embodiment.

[0213] This disclosure is not limited to the embodiments described above, and various modifications are possible. For example, assuming that the orthogonality correction described in the fifth embodiment is performed, the first MR element 50A, the second MR element 50B, the third MR element 50C, and the fourth MR element 50D may be configured to satisfy the following first and second requirements. The first requirement is that the direction of the current flowing through the second MR element 50B includes a component in a direction orthogonal to the direction of the current flowing through the first MR element 50A, and the direction of the current flowing through the fourth MR element 50D includes a component in a direction orthogonal to the direction of the current flowing through the third MR element 50C.

[0214] The second requirement is that the angle θ1a formed by the first direction Da with respect to the reference axis RL11, as shown in Figure 11A, and the angle θ1b formed by the second direction Db with respect to the reference axis RL11, satisfy the following equations (14) and (15), where n is an integer. θ1a - θ1b ≠ 180° × n …(14) θ1a + θ1b ≠ 90° × n …(15)

[0215] Furthermore, the angle θ1c that the third direction Dc shown in Figure 11B makes with respect to the reference axis RL12 may be 180° - θ1b. Also, the angle θ1d that the fourth direction Dd shown in Figure 11B makes with respect to the reference axis RL12 may be 180° - θ1a.

[0216] Furthermore, the magnetic sensor 1 does not necessarily include the inclined surface structure 2. In this case, the multiple MR elements 50 may be arranged on a plane parallel to the upper surface 20a of the substrate 20. Even in this case, the multiple MR elements 50 may be configured to satisfy the requirements of this disclosure regarding direction, etc. In this case, the direction of the inclined surface coordinate system and the axes defined based on the inclined surface coordinate system may be replaced with the direction and axes projected onto the XY plane of the reference coordinate system.

[0217] Furthermore, the embodiments described above can be combined as appropriate, provided that no technical inconsistencies arise between them. Also, each embodiment should not be interpreted independently or restrictively; it is possible to extract specific configurations or operations described in one embodiment and apply them to other embodiments, or to substitute them with configurations from other embodiments. Thus, configurations obtained by combining each embodiment, or by combining or modifying partial elements included in each embodiment, are also included within the scope of the technical concept of this disclosure.

[0218] As described above, a magnetic sensor according to a first aspect of the present disclosure includes a substrate having a reference plane, a first detection circuit including a plurality of first magnetoresistive elements for detecting a magnetic field and configured to generate a first detection signal, a second detection circuit including a plurality of second magnetoresistive elements for detecting a magnetic field and configured to generate a second detection signal having a different phase from the first detection signal, and a support member disposed on the substrate and supporting the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements. The support member includes a first inclined surface and a second inclined surface, respectively, inclined with respect to the reference plane. At least a portion of the plurality of first magnetoresistive elements are arranged on the first inclined surface. At least a portion of the plurality of second magnetoresistive elements are arranged on the second inclined surface. The center of the first detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region in a plan view from a direction perpendicular to the reference plane where the plurality of first magnetoresistive elements are arranged. The center of the second detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the multiple second magnetoresistive effect elements are arranged in a plan view from a direction perpendicular to the reference plane. The second detection circuit is aligned with respect to the first detection circuit based on the relationship between a second position, which represents the position of the center of the second detection circuit in a first direction parallel to the reference plane, and a first position, which represents the position of the center of the first detection circuit in the first direction.

[0219] In a magnetic sensor according to a first aspect of the present disclosure, the second position in the first direction may substantially coincide with the first position in the first direction.

[0220] Furthermore, in the magnetic sensor according to the first aspect of this disclosure, the first inclined surface and the second inclined surface may each extend along the first direction.

[0221] Furthermore, in the magnetic sensor according to the first aspect of this disclosure, the first detection circuit may include a first sub-circuit and a second sub-circuit. The second detection circuit may include a third sub-circuit and a fourth sub-circuit. The support member may further include a third inclined surface and a fourth inclined surface, respectively, inclined with respect to a reference plane. The plurality of first magnetoresistive elements may include a plurality of first elements constituting the first sub-circuit and a plurality of second elements constituting the second sub-circuit. The plurality of second magnetoresistive elements may include a plurality of third elements constituting the third sub-circuit and a plurality of fourth elements constituting the fourth sub-circuit. The first resistance value of each of the plurality of first elements, the second resistance value of each of the plurality of second elements, the third resistance value of each of the plurality of third elements, and the fourth resistance value of each of the plurality of fourth elements may change in response to a change in the magnetic field. Multiple first elements and multiple second elements may be configured such that one of the first resistance values ​​and the second resistance value increases and the other decreases in response to a change in the magnetic field. Multiple third elements and multiple fourth elements may be configured such that one of the third resistance value and the fourth resistance value increases and the other decreases in response to a change in the magnetic field. Multiple first elements may be arranged on a first inclined surface. Multiple second elements may be arranged on a third inclined surface. Multiple third elements may be arranged on a second inclined surface. Multiple fourth elements may be arranged on a fourth inclined surface.

[0222] The center of the first subcircuit in a plan view from a direction perpendicular to the reference plane may be the center of the region where multiple first elements are arranged in a plan view from a direction perpendicular to the reference plane. The center of the second subcircuit in a plan view from a direction perpendicular to the reference plane may be the center of the region where multiple second elements are arranged in a plan view from a direction perpendicular to the reference plane. The center of the third subcircuit in a plan view from a direction perpendicular to the reference plane may be the center of the region where multiple third elements are arranged in a plan view from a direction perpendicular to the reference plane. The center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane may be the center of the region where multiple fourth elements are arranged in a plan view from a direction perpendicular to the reference plane.

[0223] The position of the center of the first subcircuit in the first direction and the position of the center of the second subcircuit in the first direction may substantially coincide with the first position in the first direction. The position of the center of the third subcircuit in the first direction and the position of the center of the fourth subcircuit in the first direction may substantially coincide with the second position in the first direction.

[0224] The centers of the first and second subcircuits may be aligned along a second direction that intersects the first direction and is parallel to the reference plane. The centers of the third and fourth subcircuits may be aligned along the second direction. Alternatively, the centers of the first, second, third, and fourth subcircuits may be aligned along the second direction.

[0225] The first and third inclined surfaces may be positioned at different locations in a second direction that intersects the first direction and is parallel to the reference plane. The second and fourth inclined surfaces may be positioned at different locations in the second direction.

[0226] The first position in the first direction may be between the position of the center of the first subcircuit in the first direction and the position of the center of the second subcircuit in the first direction. The second position in the first direction may be between the position of the center of the third subcircuit in the first direction and the position of the center of the fourth subcircuit in the first direction.

[0227] The centers of the first subcircuit and the second subcircuit may be aligned along the first direction. The centers of the third subcircuit and the fourth subcircuit may be aligned along the first direction. One of the centers of the third and fourth subcircuits may be aligned with the center of the first subcircuit along a second direction that intersects the first direction and is parallel to the reference plane. The other of the centers of the third and fourth subcircuits may be aligned with the center of the second subcircuit along a second direction. The first and third inclined surfaces may be aligned along the first direction. The second and fourth inclined surfaces may be aligned along the first direction. The first and third inclined surfaces may constitute one continuous inclined surface. The second and fourth inclined surfaces may constitute another continuous inclined surface.

[0228] Furthermore, in a magnetic sensor according to a first aspect of the present disclosure, the support member may further have a flat surface substantially parallel to a reference plane and a projection protruding from the flat surface. The projection may include a first inclined surface and a second inclined surface. Alternatively, the support member may further have a flat surface substantially parallel to a reference plane and a groove recessed from the flat surface. The groove may include a first inclined surface and a second inclined surface.

[0229] Furthermore, in the magnetic sensor according to the first aspect of this disclosure, the magnetic field may include a magnetic field component whose direction changes in a virtual plane perpendicular to the reference plane and parallel to the first direction. Each of the first detection signal and the second detection signal may include a periodic component corresponding to the magnetic field component. The phase difference between the periodic component of the first detection signal and the periodic component of the second detection signal may be an odd multiple of one-quarter of the period of the periodic component. The magnetic sensor according to the first aspect of this disclosure may further include a processor electrically connected to the first detection circuit and the second detection circuit. The processor may be configured to generate a detection value corresponding to at least one of the direction and intensity of the magnetic field component based on the first detection signal and the second detection signal.

[0230] A magnetic sensor according to a second aspect of the present disclosure comprises a substrate having a reference plane; a first detection circuit including a plurality of first magnetoresistive elements for detecting a magnetic field and configured to generate a first detection signal; a second detection circuit including a plurality of second magnetoresistive elements for detecting a magnetic field and configured to generate a second detection signal having a different phase from the first detection signal; and a support member for supporting the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements. The support member includes a plurality of inclined surfaces, each inclined with respect to the reference plane. The plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements are arranged on the plurality of inclined surfaces. The center of the first detection circuit in a plan view from a direction perpendicular to the reference plane is the center in a plan view from a direction perpendicular to the reference plane of the region where the first group of inclined surfaces on which the plurality of first magnetoresistive elements are arranged is located. The center of the second detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the second group of inclined surfaces, on which multiple second magnetoresistive effect elements are arranged, is located, in a plan view from a direction perpendicular to the reference plane. The second group of inclined surfaces is aligned with respect to the first group of inclined surfaces based on the relationship between a second position representing the center of the region where the second group of inclined surfaces is located in a first direction parallel to the reference plane, and a first position representing the center of the region where the first group of inclined surfaces is located in the first direction.

[0231] In a magnetic sensor according to a second aspect of this disclosure, the first detection circuit may include a first sub-circuit and a second sub-circuit. The second detection circuit may include a third sub-circuit and a fourth sub-circuit. The plurality of first magnetoresistive elements may include a plurality of first elements constituting the first sub-circuit and a plurality of second elements constituting the second sub-circuit. The plurality of second magnetoresistive elements may include a plurality of third elements constituting the third sub-circuit and a plurality of fourth elements constituting the fourth sub-circuit. The first resistance value of each of the plurality of first elements, the second resistance value of each of the plurality of second elements, the third resistance value of each of the plurality of third elements, and the fourth resistance value of each of the plurality of fourth elements may change in response to a change in the magnetic field. The plurality of first elements and the plurality of second elements may be configured such that one of the first resistance value and the second resistance value increases and the other decreases in response to a change in the magnetic field. The multiple third elements and multiple fourth elements may be configured such that in response to a change in the magnetic field, one of the third resistance values ​​and the other of the fourth resistance value increases and decreases.

[0232] The multiple inclined surfaces may include a plurality of first inclined surfaces on which a plurality of first elements are arranged, a plurality of second inclined surfaces on which a plurality of second elements are arranged, a plurality of third inclined surfaces on which a plurality of third elements are arranged, and a plurality of fourth inclined surfaces on which a plurality of fourth elements are arranged. The center of the first subcircuit in a plan view from a direction perpendicular to the reference plane may be the center of the first portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane. The center of the second subcircuit in a plan view from a direction perpendicular to the reference plane may be the center of the second portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane. The center of the third subcircuit in a plan view from a direction perpendicular to the reference plane may be the center of the third portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane. The center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane may be the center of the fourth portion of the region where the multiple inclined surfaces are arranged, in a plan view from a direction perpendicular to the reference plane.

[0233] The position of the center of the first part in a first direction and the position of the center of the second part in a first direction may substantially coincide with a first position in the first direction. The position of the center of the third part in a first direction and the position of the center of the fourth part in a first direction may substantially coincide with a second position in the first direction.

[0234] Alternatively, the first position in the first direction may be between the position of the center of the first part in the first direction and the position of the center of the second part in the first direction. The second position in the first direction may be between the position of the center of the third part in the first direction and the position of the center of the fourth part in the first direction.

[0235] Furthermore, another embodiment of the magnetic sensor according to this disclosure includes an AMR element arranged on an inclined surface. This magnetic sensor may be configured to provide at least two detection signals for a magnetic field angle, which is the angle that the magnetic field makes with respect to a reference direction in a first plane. The two detection signals may include components whose phases are orthogonal to each other.

[0236] Another embodiment of the position detection device according to this disclosure comprises a sloped surface structure, a plurality of AMR elements, and a magnetic field generator. The magnetic field generator is configured to move such that the angle at which the magnetic field makes with respect to the reference direction changes within a first plane, where the magnetic field angle is the angle that the magnetic field applied to the sensor makes with respect to the reference direction. The magnetic field generator may also be configured to move along the direction in which the ridge of the sloped surface structure extends. The position detection device may include a plurality of arrays arranged such that their centers of gravity coincide in the direction of movement of the magnetic field generator. The center of gravity of the magnetic field generator and the centers of gravity of the plurality of arrays may coincide in the direction of movement of the magnetic field generator. The inclination angle of the sloped surface of the sloped surface structure may be in the range of 10° to 80°.

[0237] A position detection device according to another embodiment of the present disclosure may be configured such that the linearity error of the angle output value is smaller than the linearity error of the magnetic field angle in the first plane when the magnetic field generator moves.

[0238] A position detection device according to another embodiment of the present disclosure may be configured such that the angle between the direction of the magnetic field in the first plane and the reference direction changes within the range of -90° to 90°.

[0239] In another embodiment of the magnetic sensor of this disclosure, a plurality of AMR elements may be electrically connected on each of the first and second inclined surfaces of the inclined surface structure. The plurality of AMR elements arranged on the first inclined surface and the plurality of AMR elements arranged on the second inclined surface may have a symmetrical shape with respect to a plane that intersects with the ridge of the inclined surface structure and is perpendicular to the surface of the substrate 20.

[0240] A magnetic sensor according to another embodiment of the present disclosure may include a plurality of AMR elements such that the current directions are 0°, 90°, 45°, and 135° with respect to any direction in the inclined coordinate system.

[0241] A magnetic sensor according to another embodiment of the present disclosure may include a plurality of AMR elements whose current directions are 22.5°, 112.5°, 67.5°, and 157.5° with respect to a first direction in the inclined coordinate system.

[0242] A magnetic sensor according to another embodiment of the present disclosure may include a plurality of AMR elements whose current directions are θ1, θ2, 180°-θ1, and 180°-θ2 with respect to a first direction in the inclined coordinate system.

[0243] A magnetic sensor according to another embodiment of the present disclosure may include meander-shaped wiring when viewed from the direction normal to the inclined surface.

[0244] Another embodiment of the magnetic sensor according to this disclosure may include an AMR element that is rectangular or substantially circular when viewed from the direction normal to the inclined surface.

[0245] In another embodiment of the magnetic sensor described herein, the junction surface between the AMR element and the wiring material may be perpendicular to the direction of the main component of the current flowing through the AMR element.

[0246] Another embodiment of the present disclosure of a magnetic sensor may include a plurality of AMR elements extending along the ridge of a slope structure and a plurality of wiring materials. The plurality of wiring materials may include a wiring material whose connection to the electrode is 0° with respect to any direction in the slope coordinate system and is perpendicular to the current direction, a wiring material whose connection to the electrode is 90° with respect to any direction in the slope coordinate system and is perpendicular to the current direction, a wiring material whose connection to the electrode is 45° with respect to any direction in the slope coordinate system and is perpendicular to the current direction, and a wiring material whose connection to the electrode is 135° with respect to any direction in the slope coordinate system and is perpendicular to the current direction. Furthermore, the distance between two adjacent wiring materials may be smaller than the width of the AMR element (the dimension in the direction perpendicular to the longitudinal direction of the AMR element (the short-side direction of the AMR element)).

[0247] Another embodiment of the magnetic sensor according to this disclosure may include a plurality of AMR elements extending along the ridge of a slope structure and a plurality of wiring materials. The plurality of wiring materials may include a wiring material whose connection to the electrode is 22.5° with respect to a first direction of the slope coordinate system and is perpendicular to the current direction, a wiring material whose connection to the electrode is 112.5° with respect to a first direction of the slope coordinate system and is perpendicular to the current direction, a wiring material whose connection to the electrode is 67.5° with respect to a first direction of the slope coordinate system and is perpendicular to the current direction, and a wiring material whose connection to the electrode is 157.5° with respect to a first direction of the slope coordinate system and is perpendicular to the current direction. The spacing between two adjacent wiring materials may be smaller than the width of the AMR element (the dimension in the direction perpendicular to the longitudinal direction of the AMR element (the short-side direction of the AMR element)).

[0248] Another embodiment of the magnetic sensor according to this disclosure may include a plurality of AMR elements extending along the ridge of a slope structure and a plurality of wiring materials. The plurality of wiring materials may include a wiring material whose connection portion with the electrode is perpendicular to the current direction at θ1 with respect to a first direction of the slope coordinate system, a wiring material whose connection portion with the electrode is perpendicular to the current direction at θ2 with respect to a first direction of the slope coordinate system, a wiring material whose connection portion with the electrode is perpendicular to the current direction at 180°-θ1 with respect to a first direction of the slope coordinate system, and a wiring material whose connection portion with the electrode is perpendicular to the current direction at 180°-θ2 with respect to a first direction of the slope coordinate system. Furthermore, the distance between two adjacent wiring materials may be smaller than the width of the AMR element (the dimension in the direction perpendicular to the longitudinal direction of the AMR element (the short-side direction of the AMR element)).

[0249] In another embodiment of the magnetic sensor described herein, the inclination angle of the inclined surface may change continuously. Furthermore, even if the positions of the AMR elements on the first inclined surface and the AMR elements on the second inclined surface are shifted in the same direction, the two AMR elements may be positioned such that the change in the inclination angle of the AMR element on the first inclined surface and the change in the inclination angle of the AMR element on the second inclined surface cancel each other out.

[0250] A magnetic sensor according to another embodiment of the present disclosure may include two bridge circuits and two power supplies, each capable of supplying voltage or current to the two bridge circuits.

[0251] A magnetic sensor according to another embodiment of the present disclosure may include two bridge circuits and one power supply capable of supplying a common voltage or current to the two bridge circuits.

[0252] In another embodiment of the position detection device according to the present disclosure, the magnetic field generator may be configured to move so as to obtain the maximum and minimum values ​​of each of the two detection signals.

[0253] In another embodiment of the magnetic sensor described herein, the arrangement of the AMR elements may be adjusted so that the harmonic components of the magnetic field angle are corrected.

[0254] The technology relating to this disclosure can also be expressed in configurations such as those shown in the following appendix, but the technology of this disclosure is not limited to these.

[0255] Note 1. The device comprises a substrate having a reference plane, a first detection circuit including a plurality of first magnetoresistive elements for detecting a magnetic field and configured to generate a first detection signal, a second detection circuit including a plurality of second magnetoresistive elements for detecting the magnetic field and configured to generate a second detection signal having a different phase from the first detection signal, and a support member disposed on the substrate and supporting the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements, wherein the support member includes a first inclined surface and a second inclined surface, respectively, inclined with respect to the reference plane, at least a portion of the plurality of first magnetoresistive elements are arranged on the first inclined surface, at least a portion of the plurality of second magnetoresistive elements are arranged on the second inclined surface, and the center of the first detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of first magnetoresistive elements are arranged in a plan view from a direction perpendicular to the reference plane. The center of the second detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of second magnetoresistive effect elements are arranged in a plan view from a direction perpendicular to the reference plane, and the second detection circuit is aligned with respect to the first detection circuit based on the relationship between a second position representing the position of the center of the second detection circuit in a first direction parallel to the reference plane and a first position representing the position of the center of the first detection circuit in the first direction, in a magnetic sensor.

[0256] Note 2. The magnetic sensor according to Note 1, wherein the second position in the first direction substantially coincides with the first position in the first direction.

[0257] Note 3. The magnetic sensor according to Note 1 or Note 2, wherein each of the first and second inclined surfaces extends along the first direction.

[0258] Note 4. The first detection circuit includes a first sub-circuit and a second sub-circuit; the second detection circuit includes a third sub-circuit and a fourth sub-circuit; the support member further includes a third inclined surface and a fourth inclined surface, respectively, inclined with respect to the reference plane; the plurality of first magnetoresistive elements include a plurality of first elements constituting the first sub-circuit and a plurality of second elements constituting the second sub-circuit; the plurality of second magnetoresistive elements include a plurality of third elements constituting the third sub-circuit and a plurality of fourth elements constituting the fourth sub-circuit; the first resistance value of each of the plurality of first elements, the second resistance value of each of the plurality of second elements, the third resistance value of each of the plurality of third elements and the fourth resistance value of each of the plurality of fourth elements change in accordance with the change in the magnetic field. The magnetic sensor described in any one of the appendices 1 to 3, wherein the plurality of first elements and the plurality of second elements are configured such that one of the first resistance value and the second resistance value increases and the other decreases in response to a change in the magnetic field, the plurality of third elements and the plurality of fourth elements are configured such that one of the third resistance value and the fourth resistance value increases and the other decreases in response to a change in the magnetic field, the plurality of first elements are arranged on the first inclined surface, the plurality of second elements are arranged on the third inclined surface, the plurality of third elements are arranged on the second inclined surface, and the plurality of fourth elements are arranged on the fourth inclined surface.

[0259] Note 5. The center of the first subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of first elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the second subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of second elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the third subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of third elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of fourth elements are arranged in a plan view from a direction perpendicular to the reference plane; the position of the center of the first subcircuit in the first direction and the position of the center of the second subcircuit in the first direction substantially coincide with the first position in the first direction. The magnetic sensor as described in Appendix 4, wherein the position of the center of the third subcircuit in the first direction and the position of the center of the fourth subcircuit in the first direction substantially coincide with the second position in the first direction.

[0260] Note 6. The magnetic sensor as described in Note 5, wherein the center of the first sub-circuit and the center of the second sub-circuit are aligned along a second direction that intersects the first direction and is parallel to the reference plane, and the center of the third sub-circuit and the center of the fourth sub-circuit are aligned along the second direction.

[0261] Note 7. The magnetic sensor described in Note 6, wherein the centers of the first sub-circuit, the second sub-circuit, the third sub-circuit, and the fourth sub-circuit are aligned along the second direction.

[0262] Note 8. The magnetic sensor according to any one of Notes 5 to 7, wherein the first inclined surface and the third inclined surface are positioned at different locations in a second direction that intersects the first direction and is parallel to the reference plane, and the second inclined surface and the fourth inclined surface are positioned at different locations in the second direction.

[0263] Note 9. The center of the first subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of first elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the second subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of second elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the third subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of third elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of fourth elements are arranged in a plan view from a direction perpendicular to the reference plane; the first position in the first direction is between the position of the center of the first subcircuit in the first direction and the position of the center of the second subcircuit in the first direction. The magnetic sensor described in Appendix 4, wherein the second position in the first direction is located between the position of the center of the third subcircuit in the first direction and the position of the center of the fourth subcircuit in the first direction.

[0264] Note 10. The magnetic sensor as described in Note 9, wherein the center of the first sub-circuit and the center of the second sub-circuit are aligned along the first direction, and the center of the third sub-circuit and the center of the fourth sub-circuit are aligned along the first direction.

[0265] Note 11. The magnetic sensor as described in Note 10, wherein one of the centers of the third subcircuit and the fourth subcircuit is aligned with the center of the first subcircuit along a second direction that intersects the first direction and is parallel to the reference plane, and the other of the centers of the third subcircuit and the fourth subcircuit is aligned with the center of the second subcircuit along the second direction.

[0266] Note 12. The magnetic sensor according to any one of Notes 9 to 11, wherein the first inclined surface and the third inclined surface are aligned along the first direction, and the second inclined surface and the fourth inclined surface are aligned along the first direction.

[0267] Note 13. The magnetic sensor as described in Note 12, wherein the first inclined surface and the third inclined surface constitute one continuous inclined surface, and the second inclined surface and the fourth inclined surface constitute another continuous inclined surface.

[0268] Note 14. The magnetic sensor according to any one of Notes 1 to 13, wherein the support member further has a flat surface substantially parallel to the reference plane and a projection protruding from the flat surface, and the projection includes the first inclined surface and the second inclined surface.

[0269] Note 15. The magnetic sensor according to any one of Notes 1 to 13, wherein the support member further has a flat surface substantially parallel to the reference plane and a groove recessed from the flat surface, and the groove includes the first inclined surface and the second inclined surface.

[0270] Note 16. The magnetic field includes a magnetic field component whose direction changes in a virtual plane perpendicular to the reference plane and parallel to the first direction, each of the first detection signal and the second detection signal includes a periodic component corresponding to the magnetic field component, and the phase difference between the periodic component of the first detection signal and the periodic component of the second detection signal is an odd multiple of one-quarter of the period of the periodic component, as described in any one of Notes 1 to 15.

[0271] Note 17. The magnetic sensor according to Note 16, further comprising a processor electrically connected to the first detection circuit and the second detection circuit, wherein the processor is configured to generate a detection value having a correspondence with at least one of the direction and intensity of the magnetic field component based on the first detection signal and the second detection signal.

[0272] Note 18. The device comprises a substrate having a reference plane, a first detection circuit including a plurality of first magnetoresistive elements for detecting a magnetic field and configured to generate a first detection signal, a second detection circuit including a plurality of second magnetoresistive elements for detecting the magnetic field and configured to generate a second detection signal having a different phase from the first detection signal, and a support member for supporting the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements, wherein the support member includes a plurality of inclined surfaces, each inclined with respect to the reference plane, the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements are arranged on the plurality of inclined surfaces, and the center of the first detection circuit in a plan view from a direction perpendicular to the reference plane is the center in a plan view from a direction perpendicular to the reference plane of the region where the first group of inclined surfaces on which the plurality of first magnetoresistive elements are arranged is located among the plurality of inclined surfaces. The center of the second detection circuit in a plan view from a direction perpendicular to the reference plane is the center in a plan view from a direction perpendicular to the reference plane of the region where the second group of inclined surfaces on which the plurality of second magnetoresistive elements are arranged is located among the plurality of inclined surfaces, and the second group of inclined surfaces is aligned with respect to the first group of inclined surfaces based on the relationship between a second position representing the center of the region where the second group of inclined surfaces is located in a first direction parallel to the reference plane and a first position representing the center of the region where the first group of inclined surfaces is located in the first direction.

[0273] Note 19. The first detection circuit includes a first sub-circuit and a second sub-circuit; the second detection circuit includes a third sub-circuit and a fourth sub-circuit; the plurality of first magnetoresistive elements include a plurality of first elements constituting the first sub-circuit and a plurality of second elements constituting the second sub-circuit; the plurality of second magnetoresistive elements include a plurality of third elements constituting the third sub-circuit and a plurality of fourth elements constituting the fourth sub-circuit; the first resistance value of each of the plurality of first elements, the second resistance value of each of the plurality of second elements, the third resistance value of each of the plurality of third elements and the fourth resistance value of each of the plurality of fourth elements change in response to the change in the magnetic field; the plurality of first elements and the plurality of second elements are configured such that one of the first resistance value and the second resistance value increases and the other decreases in response to the change in the magnetic field. The plurality of third elements and the plurality of fourth elements are configured such that in response to the change in the magnetic field, one of the third resistance value and the fourth resistance value increases and the other decreases; the plurality of inclined surfaces include a plurality of first inclined surfaces on which the plurality of first elements are arranged, a plurality of second inclined surfaces on which the plurality of second elements are arranged, a plurality of third inclined surfaces on which the plurality of third elements are arranged, and a plurality of fourth inclined surfaces on which the plurality of fourth elements are arranged; the center of the first subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the first portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane; the center of the second subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the second portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane; The center of the third subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the third portion of the region where the multiple inclined surfaces are arranged, in a plan view from a direction perpendicular to the reference plane.The center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the fourth portion of the region where the plurality of inclined surfaces are arranged, in a plan view from a direction perpendicular to the reference plane; the position of the center of the first portion in the first direction and the position of the center of the second portion in the first direction substantially coincide with the first position in the first direction; the position of the center of the third portion in the first direction and the position of the center of the fourth portion in the first direction substantially coincide with the second position in the first direction, as described in Appendix 18.

[0274] Note 20. The first detection circuit includes a first sub-circuit and a second sub-circuit; the second detection circuit includes a third sub-circuit and a fourth sub-circuit; the plurality of first magnetoresistive elements include a plurality of first elements constituting the first sub-circuit and a plurality of second elements constituting the second sub-circuit; the plurality of second magnetoresistive elements include a plurality of third elements constituting the third sub-circuit and a plurality of fourth elements constituting the fourth sub-circuit; the first resistance value of each of the plurality of first elements, the second resistance value of each of the plurality of second elements, the third resistance value of each of the plurality of third elements and the fourth resistance value of each of the plurality of fourth elements change in accordance with the change in the magnetic field; the plurality of first elements and the plurality of second elements are configured such that one of the first resistance value and the second resistance value increases and the other decreases in accordance with the change in the magnetic field. The plurality of third elements and the plurality of fourth elements are configured such that in response to the change in the magnetic field, one of the third resistance value and the fourth resistance value increases and the other decreases; the plurality of inclined surfaces include a plurality of first inclined surfaces on which the plurality of first elements are arranged, a plurality of second inclined surfaces on which the plurality of second elements are arranged, a plurality of third inclined surfaces on which the plurality of third elements are arranged, and a plurality of fourth inclined surfaces on which the plurality of fourth elements are arranged; the center of the first subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the first portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane; the center of the second subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the second portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane; The center of the third subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the third portion of the region where the multiple inclined surfaces are arranged, in a plan view from a direction perpendicular to the reference plane.The magnetic sensor as described in Appendix 18, wherein the center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the fourth portion of the region where the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane, the first position in the first direction is between the position of the center of the first portion in the first direction and the position of the center of the second portion in the first direction, and the second position in the first direction is between the position of the center of the third portion in the first direction and the position of the center of the fourth portion in the first direction.

[0275] This application claims priority to U.S. Provisional Patent Application No. 63 / 759,781, filed on 18 February 2025, which is incorporated herein by reference in its entirety.

Claims

1. The device comprises: a substrate having a reference plane; a first detection circuit including a plurality of first magnetoresistive elements for detecting a magnetic field and configured to generate a first detection signal; a second detection circuit including a plurality of second magnetoresistive elements for detecting the magnetic field and configured to generate a second detection signal having a different phase from the first detection signal; and a support member disposed on the substrate and supporting the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements, wherein the support member includes a first inclined surface and a second inclined surface, respectively, inclined with respect to the reference plane; at least a portion of the plurality of first magnetoresistive elements are arranged on the first inclined surface; at least a portion of the plurality of second magnetoresistive elements are arranged on the second inclined surface; and the center of the first detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region in a plan view from a direction perpendicular to the reference plane where the plurality of first magnetoresistive elements are arranged. The center of the second detection circuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of second magnetoresistive effect elements are arranged in a plan view from a direction perpendicular to the reference plane, and the second detection circuit is aligned with respect to the first detection circuit based on the relationship between a second position representing the position of the center of the second detection circuit in a first direction parallel to the reference plane and a first position representing the position of the center of the first detection circuit in the first direction, in a magnetic sensor.

2. The magnetic sensor according to claim 1, wherein the second position in the first direction substantially coincides with the first position in the first direction.

3. The magnetic sensor according to claim 1, wherein each of the first and second inclined surfaces extends along the first direction.

4. The first detection circuit includes a first sub-circuit and a second sub-circuit; the second detection circuit includes a third sub-circuit and a fourth sub-circuit; the support member further includes a third inclined surface and a fourth inclined surface, respectively, inclined with respect to the reference plane; the plurality of first magnetoresistive elements include a plurality of first elements constituting the first sub-circuit and a plurality of second elements constituting the second sub-circuit; the plurality of second magnetoresistive elements include a plurality of third elements constituting the third sub-circuit and a plurality of fourth elements constituting the fourth sub-circuit; the first resistance value of each of the plurality of first elements, the second resistance value of each of the plurality of second elements, the third resistance value of each of the plurality of third elements and the fourth resistance value of each of the plurality of fourth elements change in accordance with the change in the magnetic field. The magnetic sensor according to claim 1, wherein the plurality of first elements and the plurality of second elements are configured such that one of the first resistance value and the second resistance value increases and the other decreases in response to a change in the magnetic field, the plurality of third elements and the plurality of fourth elements are configured such that one of the third resistance value and the fourth resistance value increases and the other decreases in response to a change in the magnetic field, the plurality of first elements are arranged on the first inclined surface, the plurality of second elements are arranged on the third inclined surface, the plurality of third elements are arranged on the second inclined surface, and the plurality of fourth elements are arranged on the fourth inclined surface.

5. The center of the first subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of first elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the second subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of second elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the third subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of third elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of fourth elements are arranged in a plan view from a direction perpendicular to the reference plane; the position of the center of the first subcircuit in the first direction and the position of the center of the second subcircuit in the first direction substantially coincide with the first position in the first direction; The magnetic sensor according to claim 4, wherein the position of the center of the third subcircuit in the first direction and the position of the center of the fourth subcircuit in the first direction substantially coincide with the second position in the first direction.

6. The magnetic sensor according to claim 5, wherein the center of the first subcircuit and the center of the second subcircuit are aligned along a second direction that intersects the first direction and is parallel to the reference plane, and the center of the third subcircuit and the center of the fourth subcircuit are aligned along the second direction.

7. The magnetic sensor according to claim 6, wherein the centers of the first subcircuit, the second subcircuit, the third subcircuit, and the fourth subcircuit are aligned along the second direction.

8. The magnetic sensor according to claim 5, wherein the first inclined surface and the third inclined surface are positioned at different locations from each other in a second direction intersecting the first direction and parallel to the reference plane, and the second inclined surface and the fourth inclined surface are positioned at different locations from each other in the second direction.

9. The center of the first subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of first elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the second subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of second elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the third subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of third elements are arranged in a plan view from a direction perpendicular to the reference plane; the center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the region where the plurality of fourth elements are arranged in a plan view from a direction perpendicular to the reference plane; the first position in the first direction is between the position of the center of the first subcircuit in the first direction and the position of the center of the second subcircuit in the first direction. The magnetic sensor according to claim 4, wherein the second position in the first direction is between the position of the center of the third subcircuit in the first direction and the position of the center of the fourth subcircuit in the first direction.

10. The magnetic sensor according to claim 9, wherein the center of the first subcircuit and the center of the second subcircuit are aligned along the first direction, and the center of the third subcircuit and the center of the fourth subcircuit are aligned along the first direction.

11. The magnetic sensor according to claim 10, wherein one of the centers of the third subcircuit and the fourth subcircuit is aligned with the center of the first subcircuit along a second direction that intersects the first direction and is parallel to the reference plane, and the other of the centers of the third subcircuit and the fourth subcircuit is aligned with the center of the second subcircuit along the second direction.

12. The magnetic sensor according to claim 9, wherein the first inclined surface and the third inclined surface are aligned along the first direction, and the second inclined surface and the fourth inclined surface are aligned along the first direction.

13. The magnetic sensor according to claim 12, wherein the first inclined surface and the third inclined surface constitute one continuous inclined surface, and the second inclined surface and the fourth inclined surface constitute one other continuous inclined surface.

14. The magnetic sensor according to claim 1, wherein the support member further has a flat surface substantially parallel to the reference plane and a projection protruding from the flat surface, the projection including the first inclined surface and the second inclined surface.

15. The magnetic sensor according to claim 1, wherein the support member further has a flat surface substantially parallel to the reference plane and a groove recessed from the flat surface, the groove including the first inclined surface and the second inclined surface.

16. The magnetic field includes a magnetic field component whose direction changes in a virtual plane perpendicular to the reference plane and parallel to the first direction, each of the first detection signal and the second detection signal includes a periodic component corresponding to the magnetic field component, and the phase difference between the periodic component of the first detection signal and the periodic component of the second detection signal is an odd multiple of one-quarter of the period of the periodic component, according to claim 1.

17. The magnetic sensor according to claim 16, further comprising a processor electrically connected to the first detection circuit and the second detection circuit, wherein the processor is configured to generate a detection value having a correspondence with at least one of the direction and intensity of the magnetic field component based on the first detection signal and the second detection signal.

18. A substrate having a reference plane; a first detection circuit including a plurality of first magnetoresistive elements for detecting a magnetic field and configured to generate a first detection signal; a second detection circuit including a plurality of second magnetoresistive elements for detecting the magnetic field and configured to generate a second detection signal having a different phase from the first detection signal; and a support member for supporting the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements, wherein the support member includes a plurality of inclined surfaces, each inclined with respect to the reference plane; the plurality of first magnetoresistive elements and the plurality of second magnetoresistive elements are arranged on the plurality of inclined surfaces; the center of the first detection circuit in a plan view from a direction perpendicular to the reference plane is the center in a plan view from a direction perpendicular to the reference plane of the region among the plurality of inclined surfaces where the first group of inclined surfaces on which the plurality of first magnetoresistive elements are arranged is located. The center of the second detection circuit in a plan view from a direction perpendicular to the reference plane is the center in a plan view from a direction perpendicular to the reference plane of the region where the second group of inclined surfaces on which the plurality of second magnetoresistive elements are arranged is located among the plurality of inclined surfaces, and the second group of inclined surfaces is aligned with respect to the first group of inclined surfaces based on the relationship between a second position representing the position of the center of the region where the second group of inclined surfaces is located in a first direction parallel to the reference plane and a first position representing the position of the center of the region where the first group of inclined surfaces is located in the first direction.

19. The first detection circuit includes a first sub-circuit and a second sub-circuit; the second detection circuit includes a third sub-circuit and a fourth sub-circuit; the plurality of first magnetoresistive elements include a plurality of first elements constituting the first sub-circuit and a plurality of second elements constituting the second sub-circuit; the plurality of second magnetoresistive elements include a plurality of third elements constituting the third sub-circuit and a plurality of fourth elements constituting the fourth sub-circuit; the first resistance value of each of the plurality of first elements, the second resistance value of each of the plurality of second elements, the third resistance value of each of the plurality of third elements and the fourth resistance value of each of the plurality of fourth elements change in response to the change in the magnetic field; the plurality of first elements and the plurality of second elements are configured such that one of the first resistance value and the second resistance value increases and the other decreases in response to the change in the magnetic field. The plurality of third elements and the plurality of fourth elements are configured such that in response to a change in the magnetic field, one of the third resistance value and the fourth resistance value increases and the other decreases; the plurality of inclined surfaces include a plurality of first inclined surfaces on which the plurality of first elements are arranged, a plurality of second inclined surfaces on which the plurality of second elements are arranged, a plurality of third inclined surfaces on which the plurality of third elements are arranged, and a plurality of fourth inclined surfaces on which the plurality of fourth elements are arranged; the center of the first subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the first portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane; the center of the second subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the second portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane; The center of the third subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the third portion of the region where the plurality of inclined surfaces are arranged, in a plan view from a direction perpendicular to the reference plane.The magnetic sensor according to claim 18, wherein the center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the fourth portion of the region where the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane, the position of the center of the first portion in the first direction and the position of the center of the second portion in the first direction substantially coincide with the first position in the first direction, and the position of the center of the third portion in the first direction and the position of the center of the fourth portion in the first direction substantially coincide with the second position in the first direction.

20. The first detection circuit includes a first sub-circuit and a second sub-circuit; the second detection circuit includes a third sub-circuit and a fourth sub-circuit; the plurality of first magnetoresistive elements include a plurality of first elements constituting the first sub-circuit and a plurality of second elements constituting the second sub-circuit; the plurality of second magnetoresistive elements include a plurality of third elements constituting the third sub-circuit and a plurality of fourth elements constituting the fourth sub-circuit; the first resistance value of each of the plurality of first elements, the second resistance value of each of the plurality of second elements, the third resistance value of each of the plurality of third elements and the fourth resistance value of each of the plurality of fourth elements change in response to the change in the magnetic field; the plurality of first elements and the plurality of second elements are configured such that one of the first resistance value and the second resistance value increases and the other decreases in response to the change in the magnetic field. The plurality of third elements and the plurality of fourth elements are configured such that in response to a change in the magnetic field, one of the third resistance value and the fourth resistance value increases and the other decreases; the plurality of inclined surfaces include a plurality of first inclined surfaces on which the plurality of first elements are arranged, a plurality of second inclined surfaces on which the plurality of second elements are arranged, a plurality of third inclined surfaces on which the plurality of third elements are arranged, and a plurality of fourth inclined surfaces on which the plurality of fourth elements are arranged; the center of the first subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the first portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane; the center of the second subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the second portion of the region on which the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane; The center of the third subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the third portion of the region where the plurality of inclined surfaces are arranged, in a plan view from a direction perpendicular to the reference plane.The magnetic sensor according to claim 18, wherein the center of the fourth subcircuit in a plan view from a direction perpendicular to the reference plane is the center of the fourth portion of the region where the plurality of inclined surfaces are arranged in a plan view from a direction perpendicular to the reference plane, the first position in the first direction is between the position of the center of the first portion in the first direction and the position of the center of the second portion in the first direction, and the second position in the first direction is between the position of the center of the third portion in the first direction and the position of the center of the fourth portion in the first direction.