Magnetic sensors, magnetic sensors for linear encoders, and magnetic rotary encoders
The magnetic sensor design with opposite bias magnetic fields applied to pairs of TMR elements in a bridge circuit enhances signal output and accuracy in magnetic field detection by doubling the angular change in free layer magnetization.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- NAT INST FOR MATERIALS SCI
- Filing Date
- 2023-10-04
- Publication Date
- 2026-06-12
AI Technical Summary
Bridge-type magnetic sensors using TMR elements face challenges in detecting magnetic fields due to zero differential output when bias magnetic fields are applied in the same direction, leading to difficulty in accurate position and rotation detection.
A magnetic sensor design that utilizes a bridge circuit with four TMR sensors, each having two free layers, and applies bias magnetic fields in opposite directions to pairs of TMR elements to enhance differential output.
The design achieves a doubled angular change in free layer magnetization, resulting in twice the signal output and improved immunity to noise, enabling more accurate magnetic field detection.
Smart Images

Figure 0007873512000002 
Figure 0007873512000003 
Figure 0007873512000004
Abstract
Description
[Technical Field] 【0001】 This disclosure relates to magnetic sensors, magnetic sensors for linear encoders, and magnetic rotary encoders. This application claims priority under Japanese Patent Application No. 2022-204231, filed in Japan on December 21, 2022, the contents of which are incorporated herein by reference. [Background technology] 【0002】 A position and rotation detection device using an artificial lattice-type giant magnetoresistance element has been proposed (see Patent Document 1). The artificial lattice-type giant magnetoresistance element utilizes antiparallel magnetic coupling between ferromagnetic layers so that, when no external magnetic field is applied, the magnetization of adjacent ferromagnetic free layers is arranged antiparallel. When the magnetic field of the object to be detected is applied to the artificial lattice-type giant magnetoresistance element, the magnetization of the ferromagnetic free layers rotates, and the resistance of the artificial lattice-type giant magnetoresistance element changes. This phenomenon is called the giant magnetoresistance (GMR) effect. Magnetic sensors that detect position and rotation utilize this giant magnetoresistance (GMR) effect. 【0003】 However, in the case of GMR sensors, the resistance change rate corresponding to the sensor's output value is at most about 50%. To achieve more accurate position and rotation detection, the application of tunnel magnetoresistance (TMR) sensors, which exhibit a resistance change rate of about 150-200%, is desirable. Here, the resistance change rate is (R max -R min ) / R min Defined in R max and R min These are the maximum and minimum resistance values for the GMR element or TMR element, respectively. 【0004】 Figure 15 is a block diagram of the configuration of a bridge-type magnetic sensor according to the first comparative example. The bridge-type magnetic sensor shown in Figure 15 comprises a first TMR element Ref1, a second TMR element Ref2, a third TMR element Ref3, and a fourth TMR element Ref4. The bridge magnetic sensor is connected to a power supply E and ground G. 【0005】 Each of the first TMR element Ref1, second TMR element Ref2, third TMR element Ref3, and fourth TMR element Ref4 is a TMR sensor using two free layers. The first TMR element Ref1, second TMR element Ref2, third TMR element Ref3, and fourth TMR element Ref4 are configured to operate as a bridge. The bridge-type magnetic sensor measures the potential difference between the first connection point p1 and the second connection point p2. 【0006】 In hard disk magnetic heads, it is known that odd-function operation is achieved by applying a bias magnetic field Hb to a TMR element using two free layers. An odd-function TMR element exhibits an asymmetric resistance change with respect to the positive or negative direction of the external magnetic field applied to the element. However, in a bridge-type magnetic sensor, applying a bias magnetic field Hb in the same direction to each TMR element results in the following problems. 【0007】 Figure 16A is a diagram illustrating the operation of each element constituting the bridge-type magnetic sensor in Figure 15, and shows the RH (magnetoresistance R and applied magnetic field H) characteristics of the first TMR element Ref1, the second TMR element Ref2, the third TMR element Ref3, and the fourth TMR element Ref4. Figure 16A shows the magnetization direction of the two free layers (first free layer FL1 and second free layer FL2) that constitute each TMR element. 【0008】 Figure 16B is a diagram illustrating the operation of the bridge-type magnetic sensor shown in Figure 15, and shows the difference output of a bridge circuit using the first TMR element Ref1, the second TMR element Ref2, the third TMR element Ref3, and the fourth TMR element Ref4. The difference output of the bridge circuit is read by a voltmeter V (see Figure 15). 【0009】 As shown in Figure 16A, a TMR element containing two free layers used in a bridge-type magnetic sensor exhibits odd-function RH characteristics when a bias magnetic field Hb is applied, as is known with magnetic heads. This is because when a positive applied magnetic field H is applied to the TMR element, the magnetization of the first free layer FL1 and the magnetization of the second free layer FL2 constituting the TMR element become parallel, and the resistance of the TMR element decreases. Conversely, when a negative applied magnetic field H is applied to the TMR element, the magnetization of the first free layer FL1 and the magnetization of the second free layer FL2 constituting the TMR element become antiparallel, and the resistance of the TMR element increases. 【0010】 In an ideal bridge circuit where the characteristics of the first TMR element Ref1, the second TMR element Ref2, the third TMR element Ref3, and the fourth TMR element Ref4 are identical, the differential output ΔV of the bridge circuit is approximately zero, regardless of the magnetic field. The differential output ΔV of the bridge circuit is the potential difference between the first connection point p1 and the second connection point p2. When the differential output ΔV of the bridge circuit is zero, detecting the magnetic field becomes difficult. 【0011】 Figure 17 is a block diagram of the bridge-type magnetic sensor according to the second comparative example. The bridge-type magnetic sensor according to the second comparative example has a first TMR element Ref1', a second TMR element Ref2', a third TMR element Ref3', and a fourth TMR element Ref4'. Each of the first TMR element Ref1', second TMR element Ref2', third TMR element Ref3', and fourth TMR element Ref4' is a TMR element that includes a fixed layer PL1, a tunnel barrier layer, and a free layer FL1. The magnetization of the fixed layer PL1 is fixed in the direction of the detected magnetic field H (±y direction). The magnetization of the fixed layer PL1 of the first TMR element Ref1' and the fourth TMR element Ref4' is fixed in the same direction (-y direction). The magnetization of the fixed layer PL1 of the second TMR element Ref2' and the third TMR element Ref3' is fixed in the same direction (+y direction). The magnetization of the stationary layer PL1 of the first TMR element Ref1' and the fourth TMR element Ref4' is fixed in the opposite direction to that of the stationary layer PL1 of the second TMR element Ref2' and the third TMR element Ref3'. 【0012】 Figure 18A shows the RH characteristics of the first TMR element Ref1' and the fourth TMR element Ref4' of the bridge-type magnetic sensor in Figure 17. Figure 18B shows the RH characteristics of the second TMR element Ref2' and the third TMR element Ref4' of the bridge-type magnetic sensor in Figure 17. The resistance of the first TMR element Ref1' and the fourth TMR element Ref4' decreases when a detection magnetic field H in the -y direction is applied, and increases when a detection magnetic field H in the +y direction is applied. The resistance of the second TMR element Ref2' and the third TMR element Ref3' increases when a detection magnetic field H in the -y direction is applied, and decreases when a detection magnetic field H in the +y direction is applied. 【0013】 As shown in Figures 18A and 18B, the first TMR element Ref1' and the fourth TMR element Ref4' and the second TMR element Ref2' and the third TMR element Ref3' exhibit opposite resistance-magnetic field characteristics. As a result, when an external magnetic field H is applied, for example, if the potential at the first connection point p1 rises, the potential at the second connection point p2 decreases. That is, the potentials at the first connection point p1 and the second connection point p2 fluctuate in opposite directions, and the difference between them is output as the output voltage ΔV (detection voltage). 【0014】 Thus, in the bridge-type magnetic sensor shown in Figure 17, the magnetization direction of the fixed layer PL1 is reversed between the first TMR element Ref1' and the fourth TMR element Ref4' and the second TMR element Ref2' and the third TMR element Ref3', thereby reversing the polarity of the slope direction of the RH characteristic between the first TMR element Ref1' and the fourth TMR element Ref4' and the second TMR element Ref2' and the third TMR element Ref3'. As a result, the bridge-type magnetic sensor shown in Figure 17 solves the problem of output cancellation due to the potential at the first connection point p1 and the potential at the second connection point p2 being the same. Furthermore, Patent Document 2 provides a description of film formation on hard bias laminates. [Prior art documents] [Patent Documents] 【0015】 [Patent Document 1] Japanese Patent Publication No. 2021-71334 [Patent Document 2] WO2010 / 038593A1 [Overview of the Initiative] [Problems that the invention aims to solve] 【0016】 As described above, the bridge-type magnetic sensor, including the bridge circuit shown in Figure 15, applies a bias magnetic field Hb in the same direction to all TMR elements. If each TMR element exhibits the same odd-function type RH characteristic, the difference output ΔV between the first connection point p1 and the second connection point p2 will be almost zero, regardless of the magnetic field. Therefore, the bridge-type magnetic sensor, including the bridge circuit shown in Figure 15, has the problem of difficulty in detecting magnetic fields. 【0017】 In contrast, the bridge-type magnetic sensor shown in Figure 17 reverses the polarity of the slope direction of the RH characteristic by changing the magnetization fixing direction of the fixed layer PL1 between the first TMR element Ref1' and the fourth TMR element Ref4' and the second TMR element Ref2' and the third TMR element Ref3'. Therefore, the bridge-type magnetic sensor shown in Figure 17 solves the problem of the difference output ΔV between the first connection point p1 and the second connection point p2 canceling out and becoming zero. However, as the signal output increases, immunity to noise is required, so a further increase in the difference output ΔV is needed. 【0018】 This disclosure aims to solve these problems by providing a magnetic sensor that can obtain a larger differential output ΔV using a bridge-type magnetic sensor that uses four TMR sensors, each having two free layers. [Means for solving the problem] 【0019】 The TMR element used in the bridge-type magnetic sensor shown in Figure 17 has one free layer FL1. In a TMR element using two free layers FL1 and FL2, the amount of resistance change (angle between the two magnetic layers) when the same magnetic field is applied to the element is twice that of a TMR element using one free layer FL1. Therefore, the inventors have found a configuration that uses a TMR element having two free layers FL1 and FL2 and can obtain a high differential output. 【0020】 [1] The magnetic sensor according to the first embodiment comprises a bridge circuit and a magnetic field application unit. The bridge circuit has a first TMR element, a second TMR element, a third TMR element, and a fourth TMR element. Each of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element has a magnetic junction having a first free layer containing a ferromagnetic material, a second free layer containing a ferromagnetic material, and an insulating layer sandwiched between the first free layer and the second free layer. The first end of the first TMR element and the first end of the third TMR element are connected to a high-potential terminal. The second end of the second TMR element and the second end of the fourth TMR element are connected to a low-potential terminal which is at a lower potential than the high-potential terminal. The second end of the first TMR element and the first end of the second TMR element are connected to each other by a first connection point. The second end of the third TMR element and the first end of the fourth TMR element are connected to each other by a second connection point. The bridge circuit measures the potential difference between the first connection point and the second connection point. The magnetic field application unit applies a bias magnetic field in a first direction to the first TMR element and the fourth TMR element, and applies a bias magnetic field in a second direction to the second TMR element and the third TMR element. The first and second directions are opposite. Here, the free layer refers to the magnetic layer whose magnetization rotates with respect to the detected magnetic field. 【0021】 [2] In the magnetic sensor according to the above embodiment, the magnetic field application unit may include a first hard bias body that applies a first bias magnetic field in the detection magnetic field flow direction of the first TMR element, a second hard bias body that applies a second bias magnetic field in the detection magnetic field flow direction of the second TMR element, a third hard bias body that applies a third bias magnetic field in the detection magnetic field flow direction of the third TMR element, and a fourth hard bias body that applies a fourth bias magnetic field in the detection magnetic field flow direction of the fourth TMR element. 【0022】 [3] In the magnetic sensor according to the above embodiment, the magnetic field application unit may have a power supply and wiring connected to the power supply. The wiring has portions that overlap with each of the first TMR element, the second TMR element, the third TMR element and the fourth TMR element. Wiring Current and wiring in the fourth overlapping portion where the fourth TMR element and the wiring overlap. of current That is, The flow direction is the same. The current in the wiring in the second superposition where the second TMR element and the wiring overlap, and the current in the wiring in the third superposition where the third TMR element and the wiring overlap of current That is, The flow direction is the same. The direction of current flow in the first and fourth superimposed sections is opposite to the direction of current flow in the second and third superimposed sections. 【0023】 [4] In the magnetic sensor according to the above embodiment, the change in the total resistance of the bridge circuit between the high-potential terminal and the low-potential terminal when an external magnetic field is applied may be smaller than the change in the resistance of each of the first TMR element, the second TMR element, the third TMR element and the fourth TMR element individually. 【0024】 In principle, if the magnetoresistance characteristics of the first, second, third, and fourth TMR elements were perfectly matched, the change in the overall resistance of the bridge circuit would be zero. However, in reality, there is variation in each of the first, second, third, and fourth TMR elements, causing a slight change in the overall resistance of the bridge circuit. If the change in the overall resistance of the bridge circuit is smaller than the resistance change of each TMR element, the variation in each TMR element is within an acceptable range. If the variation in each TMR element is sufficiently small, the change in the overall resistance of the bridge circuit will be sufficiently smaller than the resistance change of each TMR element. 【0025】 [5] In the magnetic sensor according to the above embodiment, it is preferable that the first bias magnetic field is applied to the first TMR element such that the resistance value of the first TMR element is the resistance intermediate between the maximum resistance and the minimum resistance; the second bias magnetic field is applied to the second TMR element such that the resistance value of the second TMR element is the resistance intermediate between the maximum resistance and the minimum resistance; the third bias magnetic field is applied to the third TMR element such that the resistance value of the third TMR element is the resistance intermediate between the maximum resistance and the minimum resistance; and the fourth bias magnetic field is applied to the fourth TMR element such that the resistance value of the fourth TMR element is the resistance intermediate between the maximum resistance and the minimum resistance. 【0026】 [6] In the magnetic sensor according to the above embodiment, the insulating layer has at least one selected from the group consisting of MgO, Mg-Al-O and Al2O3, and the first free layer and the second free layer may have layers made of at least CoFeB. 【0027】 [7]In the magnetic sensor according to the above aspect, at least one of the first free layer and the second free layer may be a laminate including a plurality of layers. The laminate has a layer made of CoFeB, a layer made of CoFe, and a central layer. The layer made of CoFe is located farther from the tunnel barrier layer than the layer made of CoFeB, the central layer is between the layer made of CoFeB and the layer made of CoFe, and includes any one selected from the group consisting of NiFe, CoFeSiB, and CoFeBTa. Here, the layer made of CoFe is provided for improving magnetic coupling, and the central layer is provided for improving soft magnetic properties. 【0028】 [8]In the magnetic sensor according to the above aspect, at least one of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element may have the following laminate structure. The laminate structure is [ferromagnetic layer A i / coupling layer A i n / ferromagnetic layer A n+1 / intermediate layer A / the first free layer / insulating layer / the second free layer / intermediate layer B / [ferromagnetic layer B j / coupling layer B j n+1 / ferromagnetic layer B n+2 / Or, [ferromagnetic layer A j / coupling layer A j n+1 / ferromagnetic layer A n+2 / intermediate layer A / the first free layer / insulating layer / the second free layer / intermediate layer B / [ferromagnetic layer B i / coupling layer B i n / ferromagnetic layer B n+1 / has the laminate structure of. Here, n is an integer of 0 or more. When n ≠ 0, i = 1,..., n and j = 1,..., n + 1, and the notation of [ferromagnetic layer A j / coupling layer A j n+1 means "ferromagnetic layer A j / coupling layer A j This means that the two-layer structure of " is repeated and stacked n+1 times, and [ferromagnetic layer B i / Binding layer B i ] n The notation is "ferromagnetic layer B i / Binding layer B i This means that the two-layer structure of "[ ]" is repeated and stacked n times. 【0029】 [9] In the magnetic sensor according to the above embodiment, the ferromagnetic layer A i , the ferromagnetic layer A n+1 , the ferromagnetic layer B j , the ferromagnetic layer B n+2 , the ferromagnetic layer A j and the ferromagnetic layer B i The binding layer A may be CoFe, i , the binding layer B j , the binding layer A j and the binding layer B i The first free layer may be Ru, the intermediate layer A and the intermediate layer B may have at least one selected from the group consisting of Cu, Ag, Cr, Ru, and AgSn, the insulating layer may have any one or more selected from the group consisting of MgO, Mg-Al-O, and Al2O3, and the first free layer and the second free layer may have layers made of at least CoFeB. 【0030】
[10] In the magnetic sensor according to the above embodiment, at least one of the first TMR element, the second TMR element, the third TMR element and the fourth TMR element may have the following stacked structure. The laminated structure consists of a first antiferromagnetic layer / first ferromagnetic layer / first exchange coupling layer / first free layer / insulating layer / second free layer / second exchange coupling layer / second ferromagnetic layer / second antiferromagnetic layer / It has a layered structure. In the laminated structure, the first exchange coupling layer and the second exchange coupling layer are Ru or Cr, and the magnetic coupling between the first ferromagnetic layer and the first free layer, and the magnetic coupling between the second ferromagnetic layer and the second free layer may be antiferromagnetic and ferromagnetic on one side. The magnetic coupling between the first ferromagnetic layer and the first free layer, and the magnetic coupling between the second ferromagnetic layer and the second free layer can be antiferromagnetic or ferromagnetic by changing the film thickness of the first exchange coupling layer or the second exchange coupling layer. 【0031】
[11] In the magnetic sensor according to the above embodiment, the first antiferromagnetic layer and the second antiferromagnetic layer may be at least one of IrMn, PtMn, FeMn, and NiMn, the first ferromagnetic layer and the second ferromagnetic layer may be CoFe, the first exchange coupling layer and the second exchange coupling layer may be Ru, the insulating layer may include any one selected from the group consisting of MgO, Mg-Al-O, and Al2O3, and the first free layer and the second free layer may have layers made of at least CoFeB. 【0032】
[12] In the magnetic sensor according to the above embodiment, at least one of the first TMR element, the second TMR element, the third TMR element and the fourth TMR element may have the following stacked structure. The laminated structure consists of an antiferromagnetic layer A / dust layer A / [ferromagnetic layer A i / bonding layer A i ] n / first free layer / the insulating layer / second free layer / [bonding layer B j / Ferromagnetic layer B j ] n+1 / Dust layer B / Antiferromagnetic layer B / Or, Antiferromagnetic layer A / Dust layer A / [Ferromagnetic layer A j / bonding layer A j ] n+1 / the aforementioned First free layer / the insulating layer / the second free layer / [bonding layer B] i / Ferromagnetic layer B i ] n / Dust layer B / Antiferromagnetic layer B / It has a layered structure represented by [the specified format]. Here, n is a non-negative integer, and when n≠0, i=1,...,n and j=1,...,n+1, where [ferromagnetic layer A j / bonding layer A j ] n+1 The notation is "ferromagnetic layer A j / bonding layer A j This means that the two-layer structure of " is repeated and stacked n+1 times, and [bonding layer B i / Ferromagnetic layer B i ] n The notation is "Boundary layer B i / Ferromagnetic layer B i This means that the two-layer structure of "[ ]" is repeated and stacked n times. 【0033】
[13] In the magnetic sensor according to the above embodiment, the antiferromagnetic layer A and the antiferromagnetic layer B may have at least one selected from the group consisting of IrMn, PtMn, FeMn and NiMn, and the ferromagnetic layer A i , the ferromagnetic layer B j , the ferromagnetic layer A j and the ferromagnetic layer B i The binding layer A may be CoFe, i , the binding layer B j , the binding layer A j and the binding layer B i The dust layer may be Ru, the dust layer A and the dust layer B may be Ru with a thickness of 1 nm or less, the insulating layer may have at least one selected from the group consisting of MgO, Mg-Al-O and Al2O3, and the first free layer and the second free layer may have layers made of at least CoFeB. 【0034】
[14] In the magnetic sensor according to the above embodiment, the laminated structure may be located between a first structure consisting of a substrate / lower electrode / underlayer / antiferromagnetic layer and a second structure consisting of an antiferromagnetic layer / cap layer. 【0035】
[15] In the magnetic sensor according to the above embodiment, the laminated structure may be located between a third structure consisting of a substrate / lower electrode / underlayer and a fourth structure consisting of a cap layer. 【0036】
[16] In the magnetic sensor according to the above embodiment, the substrate is a ceramic wafer made of silicon wafer, AlTiC or aluminum oxide, the underlayer is a laminated structure of Ta and Ru, the antiferromagnetic layer is one selected from the group consisting of IrMn, PtMn, FeMn, and NiMn, and the cap layer may be Ru. 【0037】
[17] A magnetic sensor for a linear encoder according to a second embodiment has the magnetic sensor according to the above embodiment. 【0038】
[18] A magnetic rotary encoder according to a third embodiment has a magnetic sensor according to the above embodiment. [Effects of the Invention] 【0039】 The magnetic sensor of this disclosure can apply a bias magnetic field in a predetermined direction to each of the first to fourth TMR elements. By setting the direction of the bias magnetic field applied to the first and fourth TMR elements to be opposite to the direction of the bias magnetic field applied to the second and third TMR elements, a large differential output ΔV can be obtained. Compared to the differential output output from the bridge circuit of the magnetic sensor of the second comparative example shown in Figure 17, the magnetic sensor of this disclosure uses two free layers, so the angular change between the free layers due to the detected magnetic field is doubled, resulting in twice the signal output. [Brief explanation of the drawing] 【0040】 [Figure 1] This shows a circuit diagram of a bridge-type magnetic sensor according to the first embodiment. [Figure 2A] This is a cross-sectional view showing an example of a stacked structure of a TMR element used in a bridge-type magnetic sensor according to the first embodiment. [Figure 2B]This is a cross-sectional view showing an example of a stacked structure of a TMR element and a hard bias body used in a bridge-type magnetic sensor according to the first embodiment. [Figure 3A] The RH characteristics of the second and third TMR elements are shown. [Figure 3B] The RH characteristics of the first and fourth TMR elements are shown. [Figure 4] This figure shows the difference in RH characteristics between a TMR element used in a bridge-type magnetic sensor according to the first embodiment (where the ferromagnetic layers sandwiching the insulating layer are both free layers FL1 and FL2) and a TMR element used in a bridge-type magnetic sensor according to the second comparative example (where the ferromagnetic layers sandwiching the insulating layer are a free layer FL1 and a fixed layer PL1). [Figure 5] This figure shows the magnetization arrangement and resistive magnetic field characteristics of the TMR element according to the first embodiment, and also shows the magnetization direction of the free layer in three typical magnetization modes. [Figure 6A] This is a cross-sectional view of an example of a multilayer structure (first example of the first multilayer type (n=0)) applicable to a TMR element according to the first embodiment. [Figure 6B] This is a cross-sectional view of an example of a multilayer structure (second example of the first multilayer type (n≧1)) applicable to a TMR element according to the first embodiment. [Figure 6C] This is a cross-sectional view of an example of a multilayer structure (first example of the second multilayer type (n≧1)) applicable to a TMR element according to the first embodiment. [Figure 7A] This is a cross-sectional view of an example of a multilayer structure (a first example of a different type of the first multilayer structure (n=0)) that can be applied to a TMR element according to the first embodiment. [Figure 7B] This is a cross-sectional view of an example of a multilayer structure (a second example of a different type of the first multilayer structure (n≧1)) applicable to the TMR element according to the first embodiment. [Figure 7C] This is a cross-sectional view of an example of a multilayer structure (a first example of a different type of the second multilayer type (n≧1)) applicable to a TMR element according to the first embodiment. [Figure 8] This is a cross-sectional view of a laminated structure (third laminated type) applicable to a TMR element according to the first embodiment. [Figure 9A]This is a cross-sectional view of a multilayer structure (first example of the fourth multilayer type (n=0)) applicable to a TMR element according to the first embodiment. [Figure 9B] This is a cross-sectional view of a multilayer structure (second example of the fourth multilayer type (n≧1)) applicable to a TMR element according to the first embodiment. [Figure 9C] This is a cross-sectional view of a laminated structure (fifth laminated type (n≧1)) applicable to a TMR element according to the first embodiment. [Figure 10] This figure shows an example of a stacked structure for a TMR sensor. [Figure 11] This figure shows the resistance-magnetic field curve of a first type of laminated structure, which is one embodiment of the present invention, as shown in Table 1. The dashed and solid lines represent combinations where the thicknesses of intermediate layer A and intermediate layer B are different. [Figure 12A] This figure shows the magnetization curve of the first free layer of a first-type stacked material (n=0). [Figure 12B] This figure shows the relationship between the thickness of the intermediate layer and the soft pin magnetic field strength (Hpin) of the free layer in various laminate configurations. [Figure 13A] This is a plan view of a bridge-type magnetic sensor where multiple TMR elements connected in series form a single TMR element group, and four TMR element groups are arranged in parallel. [Figure 13B] Figure 13A is a side view of the TMR element group shown. [Figure 14A] This is a perspective view of the configuration of a magnetic linear encoder to which the magnetic sensor according to this embodiment is applied. [Figure 14B] This is a diagram showing the configuration of a magnetic rotary encoder to which the magnetic sensor according to this embodiment is applied. [Figure 15] This is a block diagram of the bridge-type magnetic sensor configuration according to the first comparative example, in which a magnetic field Hb in the same direction is applied to each of the first TMR element Ref1, second TMR element Ref2, third TMR element Ref3, and fourth TMR element Ref4. [Figure 16A] Figure 15 shows the RH characteristics of the TMR element of the bridge-type magnetic sensor. [Figure 16B]This figure shows the differential output of the bridge-type magnetic sensor shown in Figure 15. [Figure 17] This is a block diagram of the configuration of a bridge-type magnetic sensor relating to the first comparative example. [Figure 18A] Figure 17 shows the RH characteristics of the first TMR element Ref1' and the fourth TMR element Ref4'. [Figure 18B] Figure 17 shows the RH characteristics of the second TMR element Ref2' and the third TMR element Ref3'. [Figure 19] The circuit diagram of the bridge-type magnetic sensor according to the second embodiment is shown. [Figure 20] This figure shows the orientation direction of the magnetization of the first free layer FL1 and the second free layer FL2 of each TMR element in the magnetic sensor according to the second embodiment. [Figure 21] This is a schematic diagram illustrating the operation of a bridge-type magnetic sensor according to the second embodiment. [Figure 22] This is a circuit diagram of a modified example of the bridge-type magnetic sensor according to the second embodiment. [Modes for carrying out the invention] 【0041】 The best mode for carrying out the present invention will be described in detail below. 【0042】 Figure 1 is a diagram showing the configuration of a bridge-type magnetic sensor according to the first embodiment. The bridge-type magnetic sensor according to the first embodiment comprises a first TMR element 1, a second TMR element 2, a third TMR element 3, and a fourth TMR element 4. As shown in Figure 1, the first TMR element 1, the second TMR element 2, the third TMR element 3, and the fourth TMR element 4 are connected in a bridge configuration. 【0043】 The first TMR element 1, the second TMR element 2, the third TMR element 3, and the fourth TMR element 4 form a bridge circuit. The first end of the first TMR element 1 and the first end of the third TMR element 3 are connected to a high-potential terminal t1. The high-potential terminal t1 is connected to, for example, a power supply E. The second end of the second TMR element 2 and the second end of the fourth TMR element 4 are connected to a low-potential terminal t2. The low-potential terminal t2 is at a lower potential than the high-potential terminal t1. The low-potential terminal t2 is connected to, for example, ground G. 【0044】 The second terminal of the first TMR element 1 and the first terminal of the second TMR element 2 are connected to each other by a first connection point p1. The second terminal of the third TMR element 3 and the first terminal of the fourth TMR element 4 are connected to each other by a second connection point p2. The bridge circuit measures the potential difference between the first connection point p1 and the second connection point p2. The potential difference is measured, for example, with a voltmeter V. 【0045】 Hard bias bodies are positioned near the side surface of each element in the direction of the detected magnetic field (y-direction). A pair of first hard bias bodies HB1 are located to the side of the first TMR element 1. A pair of second hard bias bodies HB2 are located to the side of the second TMR element 2. A pair of third hard bias bodies HB3 are located to the side of the third TMR element 3. A pair of fourth hard bias bodies HB4 are located to the side of the fourth TMR element 4. The first hard bias bodies HB1, second hard bias bodies HB2, third hard bias bodies HB3, and fourth hard bias bodies HB4 correspond to the magnetic field application section. In the example shown in Figure 1, the magnetization of the free layers of the first TMR element 1, second TMR element 2, third TMR element 3, and fourth TMR element are aligned along the ±x direction when there is no bias magnetic field. 【0046】 The first hard bias unit HB1 applies a first bias magnetic field to the detection magnetic field flow direction (±y direction) of the first TMR element 1. The second hard bias unit HB2 applies a second bias magnetic field to the detection magnetic field flow direction (±y direction) of the second TMR element 2. The third hard bias unit HB3 applies a third bias magnetic field to the detection magnetic field flow direction (±y direction) of the third TMR element 3. The fourth hard bias unit HB4 applies a fourth bias magnetic field to the detection magnetic field flow direction (±y direction) of the fourth TMR element 4. 【0047】 The first TMR element 1 and the fourth TMR element 4 have a bias magnetic field applied in the first direction (-y direction). The second TMR element 2 and the third TMR element 3 have a bias magnetic field applied in the second direction (+y direction). The first and second directions are 180 degrees opposite and are in opposite directions. 【0048】 The direction in which the bias magnetic field is applied differs depending on the magnetization direction of the hard bias element. For example, the first TMR element 1, the second TMR element 2, the third TMR element 3, and the fourth TMR element 4 are separated from the bridge-type sensor, and a magnetic field sufficiently larger than the coercivity of each hard bias element is applied. This magnetic field magnetizes each hard bias element in the predetermined direction. Then, as shown in Figure 1, by bridging each TMR element, magnetic fields in opposite directions can be applied to the first TMR element 1 and the fourth TMR element 4, and to the second TMR element 2 and the third TMR element 3. 【0049】 A hard-biased material is, for example, a hard-biased laminate. Figure 2B shows an example of a hard-biased laminate. 【0050】 Hard bias laminates can be formed, for example, using ion beam deposition (IBD). In IBD, an ion beam is irradiated onto a target. Sputtered particles emitted from the target reach the device substrate with high directionality. By controlling the gas pressure, the directionality of the emitted sputtered particles can be controlled to some extent. Hard bias laminates may also be attached near each TMR element using bulk hard material. 【0051】 A hard bias laminate comprises, for example, a base layer 121 and a magnetic layer 122. The base layer 121 is, for example, Cr or an alloy thereof. The magnetic layer 122 is, for example, a CoCrPt alloy or CoPt alloy capable of generating high coercivity and remanent magnetization. A high coercivity exceeding 160 kA / m (2000 Oe) is required to sufficiently fix the magnetization of the hard bias laminate to an external magnetic field. A larger bias magnetic field can be obtained when the remanent magnetization of the ferromagnetic material is high. The crystal orientation of the Cr base layer is usually (110) and (100) in the case of the magnetic layer. The c-axis of the Co alloy is set in a random direction, but in most cases it is parallel to the substrate plane. 【0052】 Generally, a magnetoresistive element is obtained by first depositing each layer that constitutes the element and then patterning them. For example, in current tunnel magnetoresistive (TMR) elements, each layer that constitutes the TMR element is first deposited, and then each layer is patterned using general lithography techniques. Then, an insulating layer such as Al2O3, SiO2, or Si-N is deposited on the side walls 100b, 100c of the patterned TMR element and on the field region 124 exposed by patterning. For example, by providing a photoresist structure, film deposition is not performed on the top of the TMR element. The insulating layer 119 can be formed on the side walls of the patterned TMR element by, for example, sputtering, atomic layer deposition (ALD), or chemical vapor deposition (CVD). 【0053】 Next, a hard bias laminate is formed so as to be in contact with the insulating layer 119 stacked near the junction wall (the insulating layer 119 attached to the side wall of the TMR element) and the field region. IBD deposits the Cr underlayer 121 and the magnetic layer 122 at different incidence angles, achieving the desired hard bias laminate shape. The target size used in IBD technology tends to be very large in order to obtain sufficient uniformity across the entire wafer. The deposition rate is low, and the incidence angle (of the magnetic layer) affects important magnetic properties such as coercivity, making optimization complex. 【0054】 Figure 2A is a configuration diagram showing an example of a stacked TMR element configuration, and Figure 2B is a cross-sectional view of a TMR element with bias bodies provided on both sides. Note that in Figures 2A and 2B, the junction wall (part of the insulating layer 119) is shown vertically for illustrative purposes, but if the TMR element has a trapezoidal inclination, the junction wall may also be inclined. 【0055】 Figure 2A shows an example of a stacked structure of a TMR element applied to a bridge-type magnetic sensor according to the first embodiment. 【0056】 The magnetoresistive element 100 shown in Figure 2A has a laminated structure represented by a base layer 100a / antiferromagnetic layer 101 / ferromagnetic layer 102 / coupling layer 103 / first free layer 104 / tunnel barrier layer 105 / second free layer 106 / coupling layer 107 / ferromagnetic layer 108 / antiferromagnetic layer 109 / cap layer 110. Here, " / " indicates the lamination interface of each layer, and the layers are laminated in this order with " / " in between. Here, the magnetoresistive element 100 is an example of a TMR element applied to a bridge-type magnetic sensor, the first free layer 104 corresponds to the first free layer, the second free layer 106 corresponds to the second free layer, and the tunnel barrier layer 105 corresponds to the insulating layer. 【0057】 In the absence of a hard bias magnetic field applied by a hard bias body, and in the absence of a detection magnetic field (i.e., no magnetic field applied to the element), the magnetizations of the first free layer 104 and the second free layer 106 are arranged antiparallel in the x-direction. This antiparallel arrangement is achieved using the antiferromagnetic layers 101 and 109 and the coupling layers 103 and 107. 【0058】 [Structure of TMR element] Next, with reference to Figures 2A and 2B, a magnetic sensor laminate 130 comprising a hard bias laminate in the field region 124 on the side of the magnetoresistive element 100 will be described. Figures 2A and 2B are schematic diagrams illustrating the TMR element and hard bias body used in the bridge-type magnetic sensor according to this embodiment. The magnetic sensor laminate 130 corresponds to the combination of the TMR element and hard bias body in the bridge-type magnetic sensor. 【0059】 As shown in Figure 2B, the magnetic sensor laminate 130 has a magnetoresistive element 100 in the approximate center of the bottom non-magnetic electrode layer 125, which serves as the substrate. The magnetoresistive element 100 consists of multiple laminated films with different compositions, and its electrical resistance changes when a magnetic field is applied. The magnetic sensor laminate 130 also has a hard bias laminate 120 above the field region 124 located to the sides of the two opposing side walls 100b and 100c of the magnetoresistive element 100. The hard bias laminate 120 can apply a bias magnetic field to the magnetoresistive element 100. 【0060】 The magnetoresistive element 100 illustrated in Figure 2A is a magnetic tunnel junction (MTJ) that has an oxide barrier layer (MgO) as a tunnel barrier layer 105 directly below the second free layer 106. 【0061】 The magnetoresistive element 100 is laminated on a non-magnetic electrode 125 made of, for example, Cu. The magnetoresistive element 100 mainly comprises an antiferromagnetic layer 101, a ferromagnetic layer 102, a first free layer 104, a tunnel barrier layer 105, and a second free layer 106. 【0062】 The magnetoresistive element 100 may also have a base layer 100a. The base layer 100a is located between the non-magnetic electrode 125 and the antiferromagnetic layer 101. The base layer 100a may have a two-layer structure, for example, a lower base layer made of Ta and an upper base layer made of Ru. 【0063】 The antiferromagnetic layer 101 is, for example, an antiferromagnetic material such as IrMn. The antiferromagnetic layer 101 is laminated on, for example, the non-magnetic electrode 125, with an underlayer 100a in between as needed. 【0064】 The magnetoresistive element 100 may also have an antiferromagnetic layer 109. The antiferromagnetic layer 109 is formed of an antiferromagnetic material such as IrMn. The antiferromagnetic layer 109 is laminated on the ferromagnetic layer 108, for example. 【0065】 The ferromagnetic layer 102 is, for example, CoFe, a material to which magnetization is easily fixed by the antiferromagnetic layer 101. The magnetoresistive element 100 may also have an antiferromagnetic layer 108. The ferromagnetic layer 108 is, for example, CoFe, a material to which magnetization is easily fixed by the antiferromagnetic layer 109. 【0066】 The magnetoresistive element 100 may also have coupling layers 103 and 107. The coupling layer 103 uses a material such as Ru, Cr, Ir, or Rh, which has the property that the interlayer coupling between the ferromagnetic layer 102 and the first free layer 104 changes to two types, antiferromagnetic coupling and ferromagnetic coupling, depending on the film thickness. The coupling layer 107 uses a material such as Ru, Cr, Ir, or Rh, which has the property that the interlayer coupling between the ferromagnetic layer 108 and the second free layer 106 changes to two types, antiferromagnetic coupling and ferromagnetic coupling, depending on the film thickness. For example, if a film thickness that results in antiferromagnetic coupling is used in the coupling layer 103, a film thickness that results in ferromagnetic coupling is used in the coupling layer 107. Conversely, if a film thickness that results in ferromagnetic coupling is used in the coupling layer 103, a film thickness that results in antiferromagnetic coupling is used in the coupling layer 107. 【0067】 The first free layer 104 contains a ferromagnetic material. The first free layer 104 may, for example, be made of CoFeB, but is not limited to this. 【0068】 The tunnel barrier layer 105 consists of a non-magnetic layer or a tunnel insulating layer, and is formed of an oxide layer such as MgO. The tunnel barrier layer 105 may use at least one of Mg-Al-O or Al2O3 instead of MgO. 【0069】 The first free layer 106 may also be a laminate containing multiple layers. For example, the laminate may have a CoFeB layer, a CoFe layer, and a central layer. The CoFeB layer is, for example, located on the tunnel barrier layer 105 side. The CoFe layer is located further away from the tunnel barrier layer 105 than the CoFeB layer. The central layer is located between the CoFeB layer and the CoFe layer. For example, the central layer may be made of NiFe, CoFeSiB, CoFeBTa, or other materials that have excellent soft magnetic properties. 【0070】 The second free layer 106 is formed of a ferromagnetic material such as CoFeB, and may be a layer in which a Ta layer and a NiFe layer are laminated on a ferromagnetic material such as CoFeB. Alternatively, the second free layer 106 may have a laminate similar to that of the first free layer 104. 【0071】 When a bias magnetic field is applied, the magnetization of the second free layer 106 becomes an intermediate resistance state between the lowest and highest resistance states of the magnetoresistive element 100. The lowest resistance state of the magnetoresistive element 100 is when the magnetization of the first free layer 104 and the magnetization of the second free layer 106 are arranged in parallel. The highest resistance state of the magnetoresistive element 100 is when the magnetization of the first free layer 104 and the magnetization of the second free layer 106 are arranged antiparallel. For example, the magnetization of the second free layer 106 is set to an intermediate resistance state where the gradient of the magnetic field-resistance characteristic is the steepest. By arranging the magnetization of the free layers of the magnetoresistive element 100 in this way, the sensor sensitivity can be increased and a good linear response to the detected external magnetic field can be provided. The bias magnetic field is also called a "hard bias" and prevents the formation of magnetic domains in the second free layer 106. The change in magnetoresistance of the magnetoresistive element 100 is determined by the relative direction of magnetization between the first free layer 104 and the second free layer 106. 【0072】 The magnetoresistive element 100 may have a cap layer 110. The cap layer 110 may be selected as needed from, for example, Cr, Ru, Ta, Ti and their alloys, as well as C. The cap layer 110 covers the antiferromagnetic layer 109. 【0073】 As described above, a hard bias laminate 120 is formed on the field region 124 of the non-magnetic electrode 125. The hard bias laminate 120 has a base layer 121 and a magnetic layer 122. 【0074】 The magnetic layer 122 is formed of an alloy (permanent magnet) having a hexagonal crystal structure (hcp) selected from a group of alloys containing Co and Pt, such as Co-Pt and Co-Cr-Pt. The magnetic layer 122 is laminated on the non-magnetic electrode 125 via the underlayer 121. 【0075】 The underlayer 121 is formed of, for example, a body-centered cubic (bcc) alloy selected from Cr, Cr-Mo, Cr-Ti, Nb, Ta, W, and their alloy groups. This underlayer 121 has a thickness of, for example, 3-7 nm on the field region 124 and less than 3 nm on the sidewalls 100b and 100c. 【0076】 Furthermore, a seed layer (not shown) may be provided on the base layer 121 to create a double base layer. That is, a seed layer selected from, for example, CrB, CrTiB, MgO, Ru, Ta, Ti, and their alloys may be further formed on the field region 124 and the side walls 100b, 100c of the magnetoresistive element laminate 100. This seed layer may have a thickness of less than 1 nm on the field region 124 and a thickness of 0.5 to 2 nm on the side walls 100b, 100c. 【0077】 Furthermore, the magnetic layer 122 may be covered with a capping layer 123. The capping layer 123 includes, for example, any of Cr, Mo, Nb, Ru, Ta, Ti, V, and W or their alloys. An insulating layer 119 is placed between the capping layer 123 and the non-magnetic electrode 126. 【0078】 An insulating layer 119 is placed below the magnetic layer 122 and on the side walls 100b and 100c of the magnetoresistive element 100. The insulating layer 119 is made of, for example, Al2O3, SiO2, Si-N, HfO2, or a combination thereof. This insulating layer 119 separates the magnetoresistive element 100 (TMR element) and the hard bias laminate 120 (hard bias) by a distance of several microns to several hundred microns, for example, on the field region 124. 【0079】 The magnetic sensor laminate 130 includes a non-magnetic electrode 125 beneath the base layer 100a and a non-magnetic electrode 126 on top of the capping layer 123. The non-magnetic electrodes 125 and 126 are made of, for example, Cu. The magnetoresistive element 100 is sandwiched between the two thick non-magnetic electrodes 125 and 126. 【0080】 Next, with reference to Figure 2B, the manufacturing method of the magnetic sensor laminate 130 will be described. 【0081】 As shown in Figure 2B, first, each layer constituting the magnetoresistive element 100 is deposited on the non-magnetic electrode 125. Next, the magnetoresistive element 100 is formed by applying a photoresist (PR) mask, patterning, and developing. For the non-magnetic electrode 125, for example, a non-magnetic electrode made of Cu or the like is used. 【0082】 A photoresist mask (not shown) is used to mask a portion of the laminate that will become the magnetoresistive element 100 during the etching process. For the etching process, for example, ion beam etching (IBE) or reactive ion etching (RIE) may be used. When RIE is used, a hard mask may be formed on the laminate that will become the magnetoresistive element 100. In this case, the photoresist mask is used first to form the hard mask and is removed by an oxygen ashing process before the magnetoresistive element 100 is formed by etching. 【0083】 After etching, an insulating layer 119 is coated onto the magnetoresistive element 100 and its side walls 100b and 100c. The insulating layer 119 is preferably an oxide insulator (3-5 nm) such as Al2O3 or SiO2. The insulating layer 119 can be fabricated by any of the following deposition methods: physical vapor deposition (PVD), ion beam deposition (IBD), atomic layer deposition (ALD), and chemical vapor deposition (CVD). Conformal deposition is possible with ALD and CVD. 【0084】 Next, a hard bias laminate 120 is deposited on the insulating layer 119. In the case of a basic hard bias laminate 120, a base layer 121 is deposited on the insulating layer 119, followed by a magnetic layer 122 and a capping layer 123. 【0085】 <Method for forming magnetoresistive element 100> A method for forming the magnetoresistive element 100 will be described. First, a laminate for magnetoresistive elements is formed on a wafer, then a photoresist is formed on top of it, developed, and patterned. 【0086】 Next, the uncovered portions of the magnetoresistive element laminate are etched using an ion beam. By changing the angle of incidence of the beam, the shape of the sidewalls 100b and 100c of the magnetoresistive element 100 can be controlled. When the beam is incident almost vertically, the sidewalls 100b and 100c form a skirt-like shape, narrower at the top and wider as they approach the lower layers. By aiming the ion beam at an even sharper angle, the sidewalls 100b and 100c can be made more vertical, reducing the spread at the bottom and resulting in nearly vertical sidewalls 100b and 100c. 【0087】 Next, an insulating layer 119, selected from, for example, Al2O3, SiO2, Si-N, HfO2, or a combination thereof, is deposited to electrically insulate the side walls 100b and 100c. 【0088】 The insulating layer 119 can be deposited by physical vapor deposition (PVD). However, since controlling the thickness of the insulating layer 119 on the side walls 100b and 100c is extremely important, more suitable deposition techniques such as ion beam deposition (IBD) or atomic layer deposition (ALD) are preferred. 【0089】 Next, the hard bias laminate is formed. For forming the hard bias laminate, it is preferable to use a hard bias laminate forming apparatus that uses ionized physical vapor deposition, for example, as disclosed in Patent Document 2. This makes it possible to obtain a magnetic sensor laminate with high coercivity, a good hard bias laminate, and high sensitivity. 【0090】 Four magnetoresistive elements 100 with hard bias laminates 120 configured in this way are prepared and connected in a bridge to fabricate a bridge-type magnetic sensor. Figure 3A shows the RH characteristics of the second TMR element 2 and the third TMR element 3 of the bridge-type magnetic sensor. Figure 3B shows the RH characteristics of the first TMR element 1 and the fourth TMR element 4 of the bridge-type magnetic sensor. As shown in Figures 3A and 3B, with H=0 as the reference point, the RH characteristics of the second TMR element 2 and the third TMR element 3 and the first TMR element 1 and the fourth TMR element 4 are inverted according to the direction of the bias magnetic field applied from the hard bias laminate. As a result, the differential output ΔV from the bridge-type magnetic sensor increases. 【0091】 Figure 4 shows the difference in RH characteristics between a TMR element used in a bridge-type magnetic sensor according to the first embodiment (where the ferromagnetic layers sandwiching the insulating layer are both free layers FL1 and FL2) and a TMR element used in a bridge-type magnetic sensor according to the second comparative example (where the ferromagnetic layers sandwiching the insulating layer are a free layer FL1 and a fixed layer PL1). 【0092】 In the bridge-type magnetic sensor according to the first embodiment, each TMR element has two free layers FL1 and FL2 (first free layer 104, second free layer 106). In the bridge-type magnetic sensor according to the first embodiment, the magnetization of each of the two free layers rotates due to the bias magnetic field, and the relative angle between the magnetizations of the two free layers changes significantly. 【0093】 In contrast, the TMR element used in the bridge-type magnetic sensor according to the second comparative example has a free layer FL1 and a fixed layer PL1. The magnetization of the free layer FL1 rotates due to the bias magnetic field, but the magnetization of the fixed layer PL1 remains fixed even when a bias magnetic field is applied. Therefore, the change in the relative angle between the magnetization of the free layer FL1 and the magnetization of the fixed layer PL1 is smaller than the change in the relative angle between the magnetizations of the two free layers. 【0094】 The resistance of a TMR element changes according to the relative angle between the magnetizations of two ferromagnetic elements. Compared to the bridge-type magnetic sensor according to the second comparative example, the bridge-type magnetic sensor according to the first embodiment has a larger change in resistance of each TMR element constituting the magnetic sensor, thus providing twice the signal output. 【0095】 <Magnetic properties of TMR elements> A dual-free TMR element is based on a three-layer structure consisting of a first free layer 104 (ferromagnetic metal), a tunnel barrier layer 105 (insulating oxide), and a second free layer 106 (ferromagnetic metal). The tunnel barrier layer 105 magnetically separates the first free layer 104 and the second free layer 106. The dual-free TMR element also exhibits the tunnel magnetoresistance effect. When a voltage is applied between the first free layer 104 and the second free layer 106, the resistance of the dual-free TMR element changes depending on the relative angle of magnetization between the first free layer 104 and the second free layer 106. Whether the magnetic properties of the TMR element exhibit even-function or odd-function characteristics is determined by the presence or absence of a hard bias element. 【0096】 A dual-free TMR element, as shown in Figures 5(A) to 5(C), for example, has a first free layer 11, a tunnel barrier layer 12, and a second free layer 13. The tunnel barrier layer 12 is sandwiched between the first free layer 11 and the second free layer 13. The first free layer 11 corresponds to the first free layer 104 described above, the second free layer 13 corresponds to the second free layer 106 described above, and the tunnel barrier layer 12 corresponds to the tunnel barrier layer 105 described above. 【0097】 The first free layer 11 and the second free layer 13 are ferromagnetic layers, preferably made of CoFeB, but not limited thereto. The tunnel barrier layer 12 is at least one selected from the group consisting of MgO, Mg-Al-O, and Al2O3. The first free layer 11 or the second free layer 13 may be a laminate containing multiple layers. The laminate may include, for example, a layer made of CoFeB, a layer made of CoFe, and a central layer. CoFeB, which has excellent TMR properties, is preferably placed near the tunnel barrier layer 12, and CoFe may be placed near the interface with other layers located away from the tunnel barrier layer 12. The central layer is placed between these layers, and can be made of NiFe, CoFeSiB, CoFeBTa, etc., which have excellent soft magnetic properties. 【0098】 As shown in Figure 5(B), the magnetizations of the first free layer 11 and the second free layer 13, separated by the tunnel barrier layer 12, are stabilized in an antiparallel arrangement under no magnetic field conditions and without hard bias. The magnetic sensor is positioned, for example, so that the magnetic field to be detected is applied perpendicular to it (in the direction of the hard axis of the free layer). 【0099】 When an external magnetic field is applied in the direction of the hard axis of the first free layer 11 and the second free layer 13, the magnetization of the first free layer 11 and the second free layer 13 rotates symmetrically with respect to the direction of the external magnetic field. As the strength of the external magnetic field increases, the angle between the magnetizations of the first free layer 11 and the second free layer 13 decreases, resulting in the state shown in Figure 5 (A) or (C). In the states of Figure 5 (A) and (B), the element resistance is lower than in the state of Figure 5 (C). The unidirectional magnetic anisotropy of the magnetization of the first free layer 11 and the second free layer 13 is set to a strength appropriate to the magnitude of the magnetic field to be detected, as will be described later. The magnitude of the saturation magnetic field and the permeability of the free layers are determined by the strength of the magnetic anisotropy (soft pin magnetic field strength). 【0100】 In a dual-free TMR element, the relationship between the magnetic field and resistance is as shown in Figure 5(D), where magnetoresistance is maximized in the absence of a magnetic field. When an external magnetic field is applied in the hard axis direction of the first free layer 11 and the second free layer 13, the magnetization of the first free layer 11 and the second free layer 13 rotates symmetrically with respect to the external magnetic field. As the strength of the external magnetic field increases, the angle between the magnetizations of the first free layer 11 and the second free layer 13 decreases, and the element resistance of the dual-free TMR element decreases. As a result, a dual-free TMR element without a hard bias body exhibits an even-function type resistive magnetic field characteristic that is symmetric with respect to the sign of the external magnetic field. 【0101】 When a bias magnetic field is applied to this TMR element in the same direction as the detection magnetic field, the operating point at magnetic field H=0 shifts, enabling odd-function type operation similar to the linear response operation used in magnetic heads and the like. For example, applying a bias magnetic field to the TMR element that maximizes the slope of the RH characteristic results in highly sensitive characteristics. 【0102】 The following embodiments are examples of TMR elements applicable to the magnetic sensor according to this embodiment. In this specification, the TMR elements applicable to the magnetic sensor according to this embodiment may be referred to as a "dual soft-pin TMR sensor". 【0103】 Typical materials for each layer of the TMR element applicable to the magnetic sensor according to this embodiment are as follows: A laminate of Ta and Ru can be used as the underlayer. One or more materials selected from the group consisting of IrMn, PtMn, FeMn, and NiMn can be used as the antiferromagnetic material. CoFe can be used as the ferromagnetic layer. Ru can be used as the bonding layer. Non-magnetic materials such as Cu, Ag, Cr, and Ru, preferably AgSn, can be used as the intermediate layer. Ru can be used as the capping layer. 【0104】 Furthermore, in the following first and second layered structures, the bottommost and topmost ferromagnetic layers of the layered structure may be replaced with hard magnetic films such as CoPt, instead of using an antiferromagnetic layer. 【0105】 The free layers (first free layer and second free layer) may be a single-layer structure made of CoFeB, but may also be a laminated structure to further enhance magnetic properties. For example, the laminated free layer may consist of a layer made of CoFeB, a layer made of CoFe, and a central layer. The CoFeB layer, which has excellent TMR properties, is placed closer to the tunnel barrier layer than the CoFe layer. The central layer between the CoFeB layer and the CoFe layer may be made of NiFe, CoFeSiB, CoFeBTa, or other materials with excellent soft magnetic properties. 【0106】 Figure 6A shows a TMR element of the first example (n=0) of the first stacked type according to this embodiment. The first example (n=0) of the first type of lamination 1 has a laminated structure represented by electrode 20 / underlayment 20a / antiferromagnetic layer 21 / ferromagnetic layer 22 / intermediate layer 23 / first free layer 24 / tunnel barrier layer 25 / second free layer 26 / intermediate layer 27 / ferromagnetic layer 28 / coupling layer 28a / ferromagnetic layer 28b / antiferromagnetic layer 29 / cap layer (not shown). This laminated structure can be replaced with the magnetoresistive element 100 shown in Figures 2A and 2B. 【0107】 Intermediate layers 23 and 27 are, for example, AgSn. A ferromagnetic interlayer bond acts between the ferromagnetic layer 22 flanking the intermediate layer 23 and the first free layer 24. A ferromagnetic interlayer bond acts between the ferromagnetic layer 28 flanking the intermediate layer 27 and the second free layer 26. The bonding layer 28a is, for example, Ru, and strongly antiparallel bonds are formed between the ferromagnetic layers 28 and 28b on either side of the bonding layer 28a. 【0108】 Figure 6B shows a second example (n≧1) of the first stacked type TMR element according to this embodiment. A second example (n≧1) of the first lamination type has a laminated structure represented by electrode 20 / underlayment 20a / antiferromagnetic layer 21 / laminated body 22p (=[ferromagnetic layer 22a / coupling layer 22b] repeated n times) / ferromagnetic layer 22 / intermediate layer 23 / first free layer 24 / tunnel barrier layer 25 / second free layer 26 / intermediate layer 27 / ferromagnetic layer 28 / laminated body 28p (=[coupling layer 28a / ferromagnetic layer 28b] repeated n+1 times) / antiferromagnetic layer 29 / cap layer (not shown). This laminated structure can be replaced with the magnetoresistive element 100 shown in Figures 2A and 2B. 【0109】 Figure 6C shows a TMR element of the first example (n≧1) of the second stacked type according to this embodiment. Figure 6C is obtained by swapping the stacking order of [ferromagnetic layer 22a / coupling layer 22b]n and [coupling layer 28a / ferromagnetic layer 28b]n+1 of the first stacked type shown in Figure 6B. 【0110】 The first example (n≧1) of the second type of lamination has a laminated structure represented by electrode 20 / underlayment 20a / antiferromagnetic layer 21 / laminated body 22p' (=[ferromagnetic layer 22c / coupling layer 22d] repeated n+1 times) / ferromagnetic layer 22 / intermediate layer 23 / first free layer 24 / tunnel barrier layer 25 / second free layer 26 / intermediate layer 27 / ferromagnetic layer 28 / laminated body 28p' (=[coupling layer 28c / ferromagnetic layer 28d] repeated n times) / antiferromagnetic layer 29 / cap layer (not shown). This laminated structure can be replaced with the magnetoresistive element 100 shown in Figures 2A and 2B. 【0111】 Here, the first stacked type (n≧1) TMR element shown in Figure 6B can also be expressed as a general formula as follows: Type 1 layer: Substrate / Antiferromagnetic layer A / [Ferromagnetic layer A i / bonding layer A i ] n / Ferromagnetic layer A n+1 Intermediate layer A / First free layer / Tunnel barrier layer / Second free layer / Intermediate layer B / [Ferromagnetic layer B j / Binding layer B j ] n+1 / Ferromagnetic layer B n+2 / Aniferomagnetic layer B / Cap layer 【0112】 In addition, the TMR element of the second lamination type (n≧1) shown in FIG. 6C can also be expressed as follows as a general formula. Second lamination type: Underlayer / Antiferromagnetic layer A / [Ferromagnetic layer A j / Coupling layer A j n+1 / Ferromagnetic layer A n+2 / Intermediate layer A / First free layer / Tunnel barrier layer / Second free layer / Intermediate layer B / [Ferromagnetic layer B i / Coupling layer B i n / Ferromagnetic layer B n+1 / Antiferromagnetic layer B / Cap layer 【0113】 Here, n is an integer of 0 or more, and when n≠0, i = 1, …, n and j = 1, …, n + 1. [Ferromagnetic layer A j / Coupling layer A j n+1 means that the two-layer structure of "Ferromagnetic layer A j / Coupling layer A j " is laminated n + 1 times. That is, when n = 1, [Ferromagnetic layer A j / Coupling layer A j n+1 / Ferromagnetic layer A n+2 means the lamination of Ferromagnetic layer A1 / Coupling layer A1 / Ferromagnetic layer A2 / Coupling layer A2 / Ferromagnetic layer A3. 【0114】 The operation of the device configured as described above will be described. The magnetization of the first free layer and the magnetization of the second free layer are oriented in a direction that increases the slope of the RH characteristic under the influence of the bias magnetic field in the absence of a magnetic field. First, the relationship between the magnetic field and resistance in an even-function dual-free TMR element, as shown in Figures 5(A) to (D), is as follows: Ferromagnetic layer A is laminated on antiferromagnetic layer A. Antiferromagnetic layer B is laminated on ferromagnetic layer B. When n≠0, the number of times the ferromagnetic layer / coupling layer is laminated in the laminate containing magnetic layer A and the number of times the ferromagnetic layer / coupling layer is laminated in the laminate containing magnetic layer B are either even or odd. Also, the magnetizations of the ferromagnetic layers on both sides of the coupling layer are magnetically coupled antiparallel to each other. After forming these laminated structures, if they are heat-treated under a magnetic field (around 300°C) and then returned to room temperature, the magnetizations of ferromagnetic layer A and ferromagnetic layer B are fixed in the same direction due to unidirectional magnetic anisotropy. Through the antiparallel magnetic coupling of the coupling layer, the magnetization of the first free layer and the magnetization of the second free layer have unidirectional magnetic anisotropy in opposite directions, and the magnetization of the first free layer and the magnetization of the second free layer are oriented antiparallel under no magnetic field conditions. 【0115】 In this embodiment, the first stacked type TMR element (n≧1) has an odd-function relationship between the magnetic field and resistance. This is because, as shown in Figure 5(E), applying a bias magnetic field to an even-function dual-free TMR element causes a shift in the even-function RH curve. 【0116】 As shown in Figures 5(A) to (D), in an even-function dual-free TMR element, the angle between the magnetizations of the first and second free layers decreases as the external magnetic field strength increases, resulting in a decrease in element resistance. The external magnetic field is applied in the hard axis direction of the first and second free layers (orthogonal to the magnetization directions of the first and second free layers under no magnetic field). The magnetizations of the first and second free layers rotate symmetrically with respect to the direction of the external magnetic field. Thus, an even-function dual-free TMR element exhibits even-function resistive magnetic field characteristics that are symmetric with respect to the positive and negative directions of the applied external magnetic field. The magnitude of the saturation magnetic field and the permeability of the free layers are determined by the soft pin strength of the first and second free layers, but these can be adjusted to the desired magnitude by the thickness and material (such as AgSn) of the intermediate layer. 【0117】 In contrast, when a bias magnetic field is applied to a first-layer type TMR element (n≧1), the relationship between the magnetic field and resistance exhibits odd-function characteristics. This is because, as shown in Figure 5(E), the RH curve shifts when a bias magnetic field is applied to an even-function type dual-free TMR element. 【0118】 Figure 7A is a cross-sectional view of an example of a multilayer structure (a first example of a different type of the first multilayer type (n=0)) that can be applied to the TMR element according to the first embodiment. Figure 7A is a modified example of the first example (n=0) of the first multilayer type shown in Figure 6A. 【0119】 A first example of another type of the first layered structure has a layered structure represented by electrode 30 / underlayment 30a / antiferromagnetic layer 31 / ferromagnetic layer 32 / intermediate layer 33 / first free layer 34 / tunnel barrier layer 35 / second free layer 36 / intermediate layer 37 / ferromagnetic layer 38 / coupling layer 28a / ferromagnetic layer 38b / antiferromagnetic layer 39 / cap layer (not shown). This layered structure can be replaced with the magnetoresistive element 100 shown in Figures 2A and 2B. 【0120】 Figure 7B is a cross-sectional view of an example of a multilayer structure (a second example of a different type of the first multilayer type (n≧1)) that can be applied to the TMR element according to the first embodiment. Figure 7A is a modified example of the second example (n≧1) of the first multilayer type shown in Figure 6B. 【0121】 A first example of another type of the first laminated structure has a laminated structure represented as follows: electrode 30 / base layer 30a / antiferromagnetic layer 31 / laminate 32p (= [ferromagnetic layer 32a / coupling layer 32b] repeated n times) / ferromagnetic layer 32 / intermediate layer 33 / first free layer 34 / tunnel barrier layer 35 / second free layer 36 / intermediate layer 37 / ferromagnetic layer 38 / laminate 38p (= [coupling layer 38a / ferromagnetic layer 38b] repeated n+1 times) / antiferromagnetic layer 39 / cap layer (not shown). This laminated structure can be replaced with the magnetoresistive element 100 shown in Figures 2A and 2B. 【0122】 Figure 7C is a cross-sectional view of an example of a multilayer structure (a first example of a different type of the second multilayer type (n≧1)) applicable to the TMR element according to the first embodiment. Figure 7C is a modified example of the first example of the second multilayer type (n≧1) shown in Figure 6C. 【0123】 The first example (n≧1) of another type of the second layered structure has a layered structure represented by electrode 30 / underlayment 30a / antiferromagnetic layer 31 / laminate 32p' (=[ferromagnetic layer 32c / coupling layer 32d] repeated n+1 times) / ferromagnetic layer 32 / intermediate layer 33 / first free layer 34 / tunnel barrier layer 35 / second free layer 36 / intermediate layer 37 / ferromagnetic layer 38 / laminate 38p' (=[coupling layer 38c / ferromagnetic layer 38d] repeated n times) / antiferromagnetic layer 39 / cap layer (not shown). This layered structure can be replaced with the magnetoresistive element 100 shown in Figures 2A and 2B. 【0124】 In the configurations shown in Figures 7A to 7C, the names of each layer shown in Figures 6A to 6C are the same, and the same configuration as in Figures 6A to 6C can be used. The laminates shown in Figures 7A to 7C differ from the laminates shown in Figures 6A to 6C, in that the magnetization directions of the ferromagnetic layers 32 and 38 are antiparallel to the first free layer 34 / tunnel barrier layer 35 / second free layer 36, while the magnetization directions of the ferromagnetic layers 22 and 28 are parallel to the first free layer 24 / tunnel barrier layer 25 / second free layer 26. 【0125】 Figure 8 shows the layered structure of the third layered type. The third type of laminated structure has a laminated structure represented by an electrode 40 / underlayment 40a / antiferromagnetic layer 41 / ferromagnetic layer 42 / exchange coupling layer 43 / first free layer 44 / tunnel barrier layer 45 / second free layer 46 / exchange coupling layer 47 / ferromagnetic layer 48 / antiferromagnetic layer 49 / cap layer (not shown). This laminated structure can be replaced with the magnetoresistive element 100 shown in Figures 2A and 2B. 【0126】 The exchange coupling layers 43 and 47 are made of Ru, Cr, Ir, Rh, etc. Depending on the thickness of the exchange coupling layer 43, the interlayer coupling between the ferromagnetic layer 42 and the first free layer 44 can be either antiferromagnetic or ferromagnetic. Depending on the thickness of the exchange coupling layer 47, the interlayer coupling between the ferromagnetic layer 48 and the second free layer 46 can be either antiferromagnetic or ferromagnetic. If the thickness of the exchange coupling layer 43 is such that the interlayer coupling between the ferromagnetic layer 42 and the first free layer 44 is antiferromagnetic, then the thickness of the exchange coupling layer 47 is such that the interlayer coupling between the ferromagnetic layer 48 and the second free layer 46 is ferromagnetic. If the thickness of the exchange coupling layer 43 is such that the relationship between the layers flanking the exchange coupling layer 43 is ferromagnetic, then the thickness of the exchange coupling layer 47 is such that the relationship between the layers flanking the exchange coupling layer 47 is antiferromagnetic. 【0127】 Figure 9A shows the layered structure of the fourth layered type (n=0). The fourth type of laminated structure has a laminated structure represented by an electrode 50 / base layer 50a / antiferromagnetic layer 51 / dust layer 53 / first free layer 54 / tunnel barrier layer 55 / second free layer 56 / coupling layer 57 / ferromagnetic layer 58 / dust layer 58a / antiferromagnetic layer 59 / cap layer (not shown). This laminated structure can be replaced with the magnetoresistive element 100 shown in Figures 2A and 2B. Dust layers 53 and 58a are non-magnetic layers such as Ru with a thickness of 1 nm or less, and they function to weaken the exchange bias of the antiferromagnetic material. 【0128】 Figure 9B shows the layered structure of the fourth layered type (n≧1). The fourth type of laminated structure has a laminated structure represented by an electrode 50 / base layer 50a / antiferromagnetic layer 51 / dust layer 53 / laminate 53p (= [ferromagnetic layer 53a / coupling layer 53b] repeated n times) / first free layer 54 / tunnel barrier layer 55 / second free layer 56 / laminate 58p (= [coupling layer 57 / ferromagnetic layer 58] repeated n+1 times) / dust layer 58a / antiferromagnetic layer 59 / cap layer (not shown). This laminated structure can be replaced with the magnetoresistive element 100 shown in Figures 2A and 2B. 【0129】 FIG. 9C is a diagram showing a stacked structure of the fifth stacking type (n≧1). The fifth stacking type has a stacked structure represented by electrode 50 / underlayer 50a / antiferromagnetic layer 51 / dust layer 53 / stacked body 53p’(=[ferromagnetic layer 53c / bonding layer 53d] repeated n+1 times) / first free layer 54 / tunnel barrier layer 55 / second free layer 56 / stacked body 58p’(=[bonding layer 57c / ferromagnetic layer 58c] repeated n times) / dust layer 58a / antiferromagnetic layer 59 / cap layer (not shown). This stacked structure can be replaced with the magnetoresistive element 100 shown in FIGS. 2A and 2B. 【0130】 Here, the stacked structure of the fourth stacking type (n≧1) shown in FIG. 9B can also be expressed as follows as a general formula. Fourth stacking type 4: underlayer / antiferromagnetic layer A / dust layer A / [ferromagnetic layer A i / bonding layer A i n / first free layer / tunnel barrier layer / second free layer / [bonding layer B j / ferromagnetic layer B j n+1 / dust layer B / antiferromagnetic layer B / cap layer Also, the stacked structure of the fifth stacking type (n≧1) shown in FIG. 9C can also be expressed as follows as a general formula. Fifth stacking type: underlayer / antiferromagnetic layer A / dust layer A / [ferromagnetic layer A j / bonding layer A j n+1 / first free layer / tunnel barrier layer / second free layer / [bonding layer B i / ferromagnetic layer B i n / dust layer B / antiferromagnetic layer B / cap layer Here, n is an integer of 0 or more, and when n≠0, i = 1,…,n and j = 1,…,n+1. 【0131】 FIG. 10 is a diagram showing the configuration of a TMR element using stacked bodies of the first to fifth stacking types. 【0132】 The TMR element has a laminated structure consisting of a substrate 600, a lower electrode 602, a laminated layer 604C, and an upper electrode 606. The laminated layer 604C is one of five types of laminated structures (1st to 5th layered types). The laminated layer 604C is obtained by stacking each layer and then patterning it into a predetermined shape using photolithography or the like. The substrate 600 is a silicon wafer or a ceramic wafer made of AlTiC or alumina, and the lower electrode 602 and upper electrode 606 are made of materials such as Cu, Au, or Ru. Insulating layers 604L and 604R are provided in the adjacent regions to the left and right of the laminated layer 604C. 【0133】 <Example of Magnetic Property Evaluation 1: Film Structure and RH Characteristics> A TMR element with the first stacked type (n=0) structure shown in Table 1 was fabricated. This TMR element has the stacked structure of the first stacked type (n=0) shown in Figure 6A. In addition, a TMR sensor with the second stacked type (n=1, 2) structure shown in Figure 12B was also fabricated. 【0134】 After film deposition, the element was microfabricated and then subjected to magnetic field heat treatment at 300°C for 1 hour. Figure 11 shows the RH characteristics. Here, the resistance value is normalized to the resistance change rate. Figure 11 shows the characteristics of two types of samples with different thicknesses of intermediate layer A (AgSn) and intermediate layer B. Both exhibit even-function RH characteristics and a resistance change rate of approximately 160%, but the difference in thickness between intermediate layer A and intermediate layer B adjusts the value of the saturation magnetic field and the slope of the resistance change rate with respect to the magnetic field change (i.e., sensitivity). This resistance change rate is equivalent to that of a spin valve type TMR sensor fabricated under the same heat treatment conditions. 【0135】 [Table 1] 【0136】 <Example of Magnetic Property Evaluation 2: Soft Pin Magnetic Field Control of the Free Layer> Figures 12A and 12B show that the saturation magnetic field and permeability of the first and second free layers of the first and second type laminated structures can be controlled by the film thickness of intermediate layers A and B. First, Figure 12A shows the magnetization curve of the first free layer of the first type laminated structure (n=0). The magnetization curve was measured for each sample with different film thicknesses of intermediate layer A (using AgSn). Here, the material and film thickness of each layer are the same as in Table 1. The center of the hysteresis curve of the first free layer is shifted from zero magnetic field, and the magnitude of this shift is the magnitude of the unidirectional magnetic anisotropy for the first free layer, which is called the soft pin magnetic field Hpin. By controlling the magnitude of Hpin, the operating magnetic field range of the TMR sensor can be controlled. Figure 12B plots the soft pin magnetic field Hpin against the film thickness of the AgSn intermediate layer for various laminated structures. In all cases, Hpin decreases as the film thickness of the intermediate layer increases. From this data, we can determine the appropriate intermediate layer thickness for obtaining the desired Hpin. Furthermore, it can be easily inferred that even greater Hpin can be obtained by making the AgSn intermediate layer thinner than the 2.2 nm or 2.3 nm shown here. 【0137】 <TMR element array configuration> Figure 13A is a plan view of an example using a TMR element array in a bridge-type magnetic sensor. Figure 13A is a side view of one TMR array in an example using a TMR element array in a bridge-type magnetic sensor. Each of the TMR arrays A1 to A4 can be replaced by each of the first TMR element 1 to the fourth TMR element 4 in Figure 1. Hard bias bodies 120 are arranged to the sides of the TMR arrays A1 to A4. Each of the hard bias bodies 120 corresponds to each of the first hard bias body HB1 to the fourth hard bias body HB4. 【0138】 As shown in Figure 13A, each TMR element array A1 to A4 has multiple magnetoresistive elements 100. Hard bias bodies 120 are located on both sides of the magnetoresistive elements 100. The distance between each magnetoresistive element 100 and the hard bias body 120 is preferably in the range of 1 μm to 1000 μm, and more preferably in the range of 5 μm to 200 μm. Note that in Figure 13A, the connecting lines between TMR element arrays A1 to A4 are omitted. 【0139】 As shown in Figure 13B, multiple magnetoresistive elements 100 are connected in series by an upper electrode 125 and a lower electrode 126. The disclosure is not limited thereto, and the magnetoresistive elements 100 may also be connected in parallel, or in a combination of series and parallel. 【0140】 By using TMR element arrays A1 to A4, the bias voltage applied to each magnetoresistive element 100 is distributed, which can mitigate the problem of the resistance change rate of the magnetoresistive element 100 decreasing due to a high bias voltage. 【0141】 <Bridge configuration> When using dual soft-pin TMR elements as position detection sensors, the bridge circuit configuration shown in Figure 1 is recommended. Figure 1 is a circuit diagram of an encoder using the bridge configuration according to the first embodiment. The first TMR element 1, second TMR element 2, third TMR element 3, and fourth TMR element can be the dual soft-pin TMR elements shown in Figures 6A to 6C, 7A to 7C, 8, 9A, and 9B. For example, these TMR elements are connected in parallel so that current flows from the power supply E to ground G through the line connecting the first TMR element 1 and the second TMR element 2, and through the line connecting the third TMR element 3 and the fourth TMR element 4. The potential of the first connection point p1 located midway between the first TMR element 1 and the second TMR element 2, and the potential of the second connection point p2 located midway between the third TMR element 3 and the fourth TMR element 4 are detected as sensor outputs. 【0142】 Next, a magnetic linear encoder and a magnetic rotary encoder using a magnetic sensor according to this embodiment will be described. 【0143】 Figure 14A is a perspective view of the configuration of a magnetic linear encoder to which the magnetic sensor 200 according to this embodiment is applied. The magnetic linear encoder has a permanent magnet sheet with alternating north and south poles magnetized as a magnetic scale 201. The position on the surface of this magnetic scale 201 (permanent magnet sheet) is detected by the magnetic sensor 200. 【0144】 Figure 14B is a perspective view of the configuration of a magnetic rotary encoder to which the magnetic sensor 300 according to this embodiment is applied. The magnetic rotary encoder has a permanent magnet region 301 on the circumferential surface of a rotating body 302, to which north and south poles are alternately magnetized. The magnetic rotary encoder detects the rotation angle of this permanent magnet region 301 with the magnetic sensor 300. 【0145】 While several embodiments of the present invention have been described so far, these embodiments are presented as examples only and are not intended to limit the scope of the invention. These novel embodiments can be implemented in a variety of other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their variations are included in the scope and spirit of the invention, as well as in the claims of the invention and its equivalents. 【0146】 For example, in the above embodiment, a hard bias laminate was shown as the hard bias body, but the present invention is not limited thereto, and the hard bias body may be constructed by bonding together bulk materials and keeping it far away from the TMR. 【0147】 Furthermore, in the above embodiment, a bridge circuit using four TMR elements to which a bias magnetic field is applied is shown, with a current source that is connected to a current source and grounded. However, the present invention is not limited to this, and the bridge circuit does not need to be grounded. The bridge-type magnetic sensor only needs to have two terminals (high potential terminal t1 and low potential terminal t2) on the high potential side and the low potential side. One end of the first TMR element 1 and the third TMR element 3 may be connected to the high potential terminal t1, and one end of the second TMR element 2 and the fourth TMR element 4 may be connected to the low potential terminal t2. 【0148】 Furthermore, while Figure 1 shows an example where the magnetic field application unit that applies a bias magnetic field to each of the first TMR element 1, second TMR element 2, third TMR element 3, and fourth TMR element 4 consists of a hard bias body, the magnetic field application unit that applies a bias magnetic field to each TMR element is not limited to this example. Also, the direction of the detected magnetic field of the bridge-type magnetic sensor is not limited to the y-direction. Figure 19 is a circuit diagram of the bridge-type magnetic sensor according to the second embodiment. 【0149】 The bridge-type magnetic sensor shown in Figure 19 has a magnetic field application section comprising a power supply E' and wiring W. The bridge-type magnetic sensor shown in Figure 19 differs from the bridge-type magnetic sensor shown in Figure 1 in that the power supply E' and wiring W are installed as the magnetic field application section instead of the first hard bias elements HB1 to the fourth hard bias elements HB4. The bridge-type magnetic sensor shown in Figure 19 also differs from the bridge-type magnetic sensor shown in Figure 1 in that the direction of the detected magnetic field is the x-direction. The first TMR element 1, the second TMR element 2, the third TMR element 3, and the fourth TMR element 4 form a bridge circuit and are connected to the power supply E and ground G. The configuration of the bridge circuit in Figure 19 is the same as that of the bridge circuit in Figure 1. 【0150】 Wiring W is connected to power supply E' and carries current i'. Wiring W branches into wiring W1 and wiring W2 midway and then recombines. Wiring W1 is located near the first TMR element 1 and the second TMR element 2. Here, "nearby" means that the distance between the wiring and the TMR elements is narrow, within a range where insulation between the wiring and the TMR elements can be ensured. For example, this distance is in the range of 10 nm to 1000 nm. The position of wiring W1 is not important as long as bias magnetic fields in different directions can be applied to the first TMR element 1 and the second TMR element 2. At least a portion of wiring W1 has a first superimposed portion that overlaps with the first TMR element 1 when viewed from one direction, and a second superimposed portion that overlaps with the second TMR element 2. Wiring W2 is located near the third TMR element 3 and the fourth TMR element 4. The position of wiring W2 is not important as long as bias magnetic fields in different directions can be applied to the third TMR element 3 and the fourth TMR element 4. At least a portion of the wiring W2 has a third superimposed portion that overlaps with the third TMR element 3 and a fourth superimposed portion that overlaps with the fourth TMR element 4 when viewed from one direction. In the first and fourth superimposed portions, current flows in the wiring W in the same direction. In the second and third superimposed portions, current flows in the wiring W in the same direction. The direction of current flow in the first and fourth superimposed portions is opposite to the direction of current flow in the second and third superimposed portions. The bridge-type magnetic sensor shown in Figure 19 detects a magnetic field in the x direction. 【0151】 A bias magnetic field generated by the current flowing through the wiring W1 is applied to the first TMR element 1 and the second TMR element 2. A bias magnetic field in the first direction is applied to the first TMR element 1, and a bias magnetic field in the second direction is applied to the second TMR element 2. The first and second directions are 180 degrees opposite. A bias magnetic field generated by the current flowing through the wiring W2 is applied to the third TMR element 3 and the fourth TMR element 4. A bias magnetic field in the second direction is applied to the third TMR element 3, and a bias magnetic field in the first direction is applied to the fourth TMR element 4. 【0152】 Figure 20 shows the orientation direction of the magnetization of the first free layer FL1 and the second free layer FL2 of each TMR element in the magnetic sensor according to the second embodiment. The magnetization of the first free layer FL1 and the magnetization of the second free layer FL2 of each TMR element are arranged antiparallel when no current flows through the wiring W (initial state). When current flows through the wiring W, the bias magnetic field generated from the wirings W1 and W2 rotates the direction of the magnetization of the first free layer FL1 and the magnetization of the second free layer FL2 from the initial state. In the first TMR element 1 and the second TMR element 2, the direction in which the magnetization of the first free layer FL1 and the magnetization of the second free layer FL2 rotate from the initial state is different. This is because the direction of the bias magnetic field Hb applied to each TMR element by the wiring W1 is opposite. Similarly, in the third TMR element 3 and the fourth TMR element 4, the direction in which the magnetization of the first free layer FL1 and the magnetization of the second free layer FL2 rotate from the initial state is different. This is because the direction of the bias magnetic field Hb applied to each TMR element is opposite due to the wiring W2. 【0153】 Figure 21 is a schematic diagram illustrating the operation of a bridge-type magnetic sensor according to the second embodiment. When no current i' flows through the wiring W, the first TMR element 1, the second TMR element 2, the third TMR element 3, and the fourth TMR element each exhibit even-function type RH characteristics. Unlike Figure 1, the direction of the magnetic field H is in the x-direction, and in the absence of a bias magnetic field Hb, the magnetization of the free layer is in the ±y direction. When current i' flows through the wiring W, a bias magnetic field Hb is applied to each TMR element. When a bias magnetic field Hb is applied, the even-function type RH curve shifts. As a result, the first TMR element 1, the second TMR element 2, the third TMR element 3, and the fourth TMR element each exhibit odd-function type RH characteristics. A bias magnetic field Hb in the opposite direction is applied to the first TMR element 1 and the fourth TMR element 4, and to the second TMR element 2 and the third TMR element 3. Therefore, the direction in which the RH curve shifts is reversed. As a result, similar to Figures 3A and 3B, the slope direction of the RH characteristics is opposite for the first TMR element 1 and the fourth TMR element 4, and for the second TMR element 2 and the third TMR element 3. 【0154】 In the bridge-type magnetic sensor according to the second embodiment, the slope direction of the RH characteristics is opposite for the first TMR element 1 and the fourth TMR element 4, and for the second TMR element 2 and the third TMR element 3. Therefore, the problem of the difference output ΔV between the first connection point p1 and the second connection point p2 canceling out and becoming zero does not occur. Furthermore, in the bridge-type magnetic sensor according to the second embodiment, since each of the first TMR element 1, the second TMR element 2, the third TMR element 3, and the fourth TMR element has a first free layer and a second free layer, the output ΔV can be increased. 【0155】 Figure 22 is a circuit diagram of a modified example of the bridge-type magnetic sensor according to the second embodiment. In the modified example shown in Figure 22, the magnetization of the first TMR element 1, the second TMR element 2, the third TMR element 3, and the fourth TMR element 4 are oriented in the ±x direction, and the routing pattern of the wiring W is different from the example shown in Figure 19. In other words, the specific configuration of the magnetic field application section and the direction of the magnetic field detected by the bridge-type magnetic sensor can be changed. The bridge-type magnetic sensor shown in Figure 22 detects a magnetic field in the y direction, similar to the bridge-type magnetic sensor shown in Figure 1. 【0156】 In the example shown in Figure 22, the magnetization of the first TMR element 1 and the fourth TMR element 4 is oriented in the +x direction, while the magnetization of the second TMR element 2 and the third TMR element 3 is oriented in the -x direction. 【0157】 Wiring W branches into wiring W3 and wiring W4 midway and then recombines. Wiring W3 is located near the first TMR element 1 and the third TMR element 3. At least a portion of wiring W3 has, when viewed from one direction, a first superimposed portion that superimposes with the first TMR element 1 and a third superimposed portion that superimposes with the third TMR element 3. In the first superimposed portion, a bias magnetic field in the +y direction is applied to the first TMR element 1 by the current i' flowing through wiring W3. In the third superimposed portion, a bias magnetic field in the -y direction is applied to the third TMR element 3 by the current i' flowing through wiring W3. 【0158】 The wiring W4 is located near the second TMR element 2 and the fourth TMR element 4. At least a portion of the wiring W4 has, when viewed from one direction, a second superimposed portion that overlaps with the second TMR element 2 and a fourth superimposed portion that overlaps with the fourth TMR element 4. In the second superimposed portion, a bias magnetic field in the -y direction is applied to the second TMR element 2 by the current i' flowing through the wiring W4. In the fourth superimposed portion, a bias magnetic field in the +y direction is applied to the fourth TMR element 4 by the current i' flowing through the wiring W4. 【0159】 Current flows in the same direction in the first and fourth superimposed sections. Current also flows in the same direction in the second and third superimposed sections. The direction of current flow in the first and fourth superimposed sections is opposite to the direction of current flow in the second and third superimposed sections. 【0160】 The wiring W is stacked on the first TMR element 1, the second TMR element 2, the third TMR element 3, and the fourth TMR element 4 via an insulating layer. The thickness of the insulating layer is, for example, 10 nm to 1000 nm. If the insulating layer is too thin, the risk of short circuits between the TMR elements and the wiring W increases. If the insulating layer is too thick, the current magnetic field applied to each TMR element becomes smaller. As a result, it becomes impossible to apply a sufficient bias magnetic field necessary for the highly sensitive bias point where the resistance changes sharply. 【0161】 In the second embodiment, two examples are illustrated, demonstrating how a bias magnetic field is applied to each TMR element by wiring W. This disclosure is not limited to these examples. Furthermore, the width of wiring W, the distance between wiring W and the free layer, etc., can be freely designed. [Industrial applicability] 【0162】 The magnetic sensor according to this disclosure has a large maximum resistance change rate of the TMR element, approximately 210% when the stacked structure is optimized and approximately 160% even when manufactured within a typical range, which can suppress asymmetry of the RH characteristics due to deviations in the direction of the magnetic field to be detected. Therefore, this magnetic sensor is suitable for use in position and rotation detection devices. [Explanation of Symbols] 【0163】 1. First TMR element 2. Second TMR element 3. Third TMR element 4. Fourth TMR element 11. The First Free Class (First Free Class) 12. Tunnel barrier layer (insulating layer) 13. The Second Free Class 20, 30, 40, 50 electrodes 20a, 30a, 40a, 50a, 100a Base layer 21, 31, 41, 51, 101 antiferromagnetic layer 22, 32, 42, 52 ferromagnetic layer 23, 33 Intermediate layer (insulating layer) 24, 34, 44, 54, 104 First Free Class (First Free Class) 25, 35, 45, 55, 105 Tunnel barrier layer (MgO, insulating layer) 26, 36, 46, 56, 106 Second Free Class (Second Free Class) 27, 37 Intermediate layer (insulating layer) 28, 38, 48, 58 ferromagnetic layer 29, 39, 49, 59, 109 antiferromagnetic layer 22a, 28b, 32a, 32c, 38b, 38d, 53a, 53c, 58c ferromagnetic layer 22b, 28a, 32b, 32d, 38a, 38c, 53b, 53d, 57, 57c, 103, 107 bonding layer 43, 47 exchange coupling layer 53, 58a Dust layer 100 Magnetoresistive Element Stack (TMR) 100b, 100c Joint wall surface 110 Cap layer 119 Insulating layer 120 Hard Bias Laminate 121 Base layer 122 Magnetic layer 123 Capping layer 124 Field Area 130 Magnetic Sensor Stack 160 electrodes 161 Base layer, 162, 164, 167 ferromagnetic layer 163, 165 Nonmagnetic layer 166 Repeated Lamination
Claims
[Claim 1] It comprises a bridge circuit and a magnetic field application unit, The bridge circuit comprises a first TMR element, a second TMR element, a third TMR element, and a fourth TMR element. Each of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element has a magnetic junction comprising a first free layer containing a ferromagnetic material, a second free layer containing a ferromagnetic material, and an insulating layer sandwiched between the first free layer and the second free layer. The first end of the first TMR element and the first end of the third TMR element are connected to a high-potential terminal. The second terminal of the second TMR element and the second terminal of the fourth TMR element are connected to a low-potential terminal which is at a lower potential than the high-potential terminal. The second end of the first TMR element and the first end of the second TMR element are connected to each other by a first connection point. The second end of the third TMR element and the first end of the fourth TMR element are connected to each other by a second connection point. The bridge circuit detects the potential difference between the first connection point and the second connection point. The magnetic field application unit applies a bias magnetic field in a first direction to the first TMR element and the fourth TMR element, and applies a bias magnetic field in a second direction to the second TMR element and the third TMR element, with the first and second directions being opposite to each other. The insulating layer has at least one selected from the group consisting of MgO, Mg-Al-O, and Al₂O₃. At least one of the first free layer and the second free layer is a laminate containing multiple layers, The laminate comprises a layer made of CoFeB, a layer made of CoFe, and a central layer. The layer made of CoFe is located at a position further away from the insulating layer than the layer made of CoFeB. The aforementioned central layer is located between the CoFeB layer and the CoFe layer and includes one selected from the group consisting of NiFe, CoFeSiB, and CoFeBTa, in a magnetic sensor. [Claim 2] It comprises a bridge circuit and a magnetic field application unit, The bridge circuit comprises a first TMR element, a second TMR element, a third TMR element, and a fourth TMR element. Each of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element has a magnetic junction comprising a first free layer containing a ferromagnetic material, a second free layer containing a ferromagnetic material, and an insulating layer sandwiched between the first free layer and the second free layer. The first end of the first TMR element and the first end of the third TMR element are connected to a high-potential terminal. The second terminal of the second TMR element and the second terminal of the fourth TMR element are connected to a low-potential terminal which is at a lower potential than the high-potential terminal. The second end of the first TMR element and the first end of the second TMR element are connected to each other by a first connection point. The second end of the third TMR element and the first end of the fourth TMR element are connected to each other by a second connection point. The bridge circuit detects the potential difference between the first connection point and the second connection point. The magnetic field application unit applies a bias magnetic field in a first direction to the first TMR element and the fourth TMR element, and applies a bias magnetic field in a second direction to the second TMR element and the third TMR element, with the first and second directions being opposite to each other. At least one of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element is [Ferromagnetic layer A i / coupling layer A i] n / ferromagnetic layer A n+1 / intermediate layer A / the first free layer / the insulating layer / the second free layer / intermediate layer B / [ferromagnetic layer B j / coupling layer B j] n+1 / ferromagnetic layer B n+2 / Or, [Ferromagnetic layer A j / coupling layer A j] n+1 / ferromagnetic layer A n+2 / intermediate layer A / the first free layer / the insulating layer / the second free layer / intermediate layer B / [ferromagnetic layer B i / coupling layer B i] n / ferromagnetic layer B n+1 / It has a laminated structure represented by, Here, n is a non-negative integer, and when n≠0, i=1, ..., n and j=1, ..., n+1, and the notation [ferromagnetic layer A j / coupling layer A j] n+1 means that the two-layer structure of "ferromagnetic layer A j / coupling layer A j" is stacked n+1 times, and the notation [ferromagnetic layer B i / coupling layer B i] n means that the two-layer structure of "ferromagnetic layer B i / coupling layer B i" is stacked n times, a magnetic sensor. [Claim 3] The ferromagnetic layer A i , the ferromagnetic layer A n+1 , the ferromagnetic layer B j , the ferromagnetic layer B n+2 , the ferromagnetic layer A j and the ferromagnetic layer B i It is CoFe, The binding layer A i , the binding layer B j The binding layer Aj and the binding layer Bi are Ru, The aforementioned intermediate layer A and intermediate layer B each contain at least one selected from the group consisting of Cu, Ag, Cr, Ru, and AgSn. The insulating layer has any one or more selected from the group consisting of MgO, Mg—Al—O, and Al 2 O 3 and has a thickness of from 1 nm to 100 nm The magnetic sensor according to claim 2, wherein the first free layer and the second free layer each have layers made of at least CoFeB. [Claim 4] It comprises a bridge circuit and a magnetic field application unit, The bridge circuit comprises a first TMR element, a second TMR element, a third TMR element, and a fourth TMR element. Each of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element has a magnetic junction comprising a first free layer containing a ferromagnetic material, a second free layer containing a ferromagnetic material, and an insulating layer sandwiched between the first free layer and the second free layer. The first end of the first TMR element and the first end of the third TMR element are connected to a high-potential terminal. The second terminal of the second TMR element and the second terminal of the fourth TMR element are connected to a low-potential terminal which is at a lower potential than the high-potential terminal. The second end of the first TMR element and the first end of the second TMR element are connected to each other by a first connection point. The second end of the third TMR element and the first end of the fourth TMR element are connected to each other by a second connection point. The bridge circuit detects the potential difference between the first connection point and the second connection point. The magnetic field application unit applies a bias magnetic field in a first direction to the first TMR element and the fourth TMR element, and applies a bias magnetic field in a second direction to the second TMR element and the third TMR element, with the first and second directions being opposite to each other. At least one of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element is First antiferromagnetic layer / First ferromagnetic layer / First exchange coupling layer / First free layer / Insulating layer / Second free layer / Second exchange coupling layer / Second ferromagnetic layer / Second antiferromagnetic layer / It has a laminated structure represented by, The first exchange bond layer and the second exchange bond layer are Ru or Cr, A magnetic sensor in which the magnetic coupling between the first ferromagnetic layer and the first free layer, and the magnetic coupling between the second ferromagnetic layer and the second free layer, are antiferromagnetic and ferromagnetic, respectively. [Claim 5] The first antiferromagnetic layer and the second antiferromagnetic layer are at least one of IrMn, PtMn, FeMn, and NiMn. The first ferromagnetic layer and the second ferromagnetic layer are made of CoFe, The first exchange bond layer and the second exchange bond layer are made of Ru. The insulating layer consists of MgO, Mg-Al-O, and Al 2 O 3 It includes one of the following selected from the group consisting of The first free layer and the second free layer each have layers made of at least CoFeB. The magnetic sensor according to claim 4. [Claim 6] It comprises a bridge circuit and a magnetic field application unit, The bridge circuit comprises a first TMR element, a second TMR element, a third TMR element, and a fourth TMR element. Each of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element has a magnetic junction comprising a first free layer containing a ferromagnetic material, a second free layer containing a ferromagnetic material, and an insulating layer sandwiched between the first free layer and the second free layer. The first end of the first TMR element and the first end of the third TMR element are connected to a high-potential terminal. The second terminal of the second TMR element and the second terminal of the fourth TMR element are connected to a low-potential terminal which is at a lower potential than the high-potential terminal. The second end of the first TMR element and the first end of the second TMR element are connected to each other by a first connection point. The second end of the third TMR element and the first end of the fourth TMR element are connected to each other by a second connection point. The bridge circuit detects the potential difference between the first connection point and the second connection point. The magnetic field application unit applies a bias magnetic field in a first direction to the first TMR element and the fourth TMR element, and applies a bias magnetic field in a second direction to the second TMR element and the third TMR element, with the first and second directions being opposite to each other. At least one of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element is Antiferromagnetic layer A / Dust layer A / [Ferromagnetic layer A i / Coupling layer A i] n / The first free layer / The insulating layer / The second free layer / [Coupling layer B j / Ferromagnetic layer B j] n+1 / Dust layer B / Antiferromagnetic layer B / Or, Antiferromagnetic layer A / Dust layer A / [Ferromagnetic layer A j / Coupling layer A j] n+1 / The first free layer / The insulating layer / The second free layer / [Coupling layer B i / Ferromagnetic layer B i] n / Dust layer B / Antiferromagnetic layer B / It has a laminated structure represented by, Here, n is a non-negative integer, and when n≠0, i=1, ..., n and j=1, ..., n+1, and the notation [ferromagnetic layer A j / coupling layer A j] n+1 means that the two-layer structure of "ferromagnetic layer A j / coupling layer A j" is stacked n+1 times, and the notation [coupling layer B i / ferromagnetic layer B i] n means that the two-layer structure of "coupling layer B i / ferromagnetic layer B i" is stacked n times, a magnetic sensor. [Claim 7] The antiferromagnetic layer A and the antiferromagnetic layer B each have at least one selected from the group consisting of IrMn, PtMn, FeMn, and NiMn. The ferromagnetic layer A i , the ferromagnetic layer B j , the ferromagnetic layer A j and the ferromagnetic layer B i It is CoFe, The binding layer A i , the binding layer B j , the binding layer A j and the binding layer B i is Ru, The dust layer A and the dust layer B are made of Ru with a thickness of 1 nm or less. The insulating layer consists of MgO, Mg-Al-O, and Al 2 O 3 It has at least one selected from the group consisting of, The magnetic sensor according to claim 6, wherein the first free layer and the second free layer each have layers made of at least CoFeB. [Claim 8] The magnetic sensor according to claim 2, wherein the laminated structure is located between a first structure consisting of a substrate / lower electrode / underlayer / antiferromagnetic layer and a second structure consisting of an antiferromagnetic layer / cap layer. [Claim 9] The substrate is a silicon wafer, or a ceramic wafer made of AlTiC or aluminum oxide. The aforementioned underlayer has a layered structure of Ta and Ru. The antiferromagnetic layer is one of the following selected from the group consisting of IrMn, PtMn, FeMn, and NiMn. The cap layer is made of Ru. The magnetic sensor according to claim 8. [Claim 10] The magnetic sensor according to claim 4, wherein the laminated structure is located between a third structure consisting of a substrate / lower electrode / underlayer and a fourth structure consisting of a cap layer. [Claim 11] The substrate is a silicon wafer, or a ceramic wafer made of AlTiC or aluminum oxide. The aforementioned underlayer has a layered structure of Ta and Ru. The cap layer is made of Ru. The magnetic sensor according to claim 10. [Claim 12] The magnetic sensor according to any one of claims 1 to 11, wherein the magnetic field application unit comprises a first hard bias body that applies a first bias magnetic field in the detection magnetic field flow direction of the first TMR element, a second hard bias body that applies a second bias magnetic field in the detection magnetic field flow direction of the second TMR element, a third hard bias body that applies a third bias magnetic field in the detection magnetic field flow direction of the third TMR element, and a fourth hard bias body that applies a fourth bias magnetic field in the detection magnetic field flow direction of the fourth TMR element. [Claim 13] The magnetic field application unit consists of a power supply and wiring connected to the power supply. The aforementioned wiring has portions that overlap with each of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element. The current flow direction of the wiring in the first superposition area where the first TMR element and the wiring overlap is the same as the current flow direction of the wiring in the fourth superposition area where the fourth TMR element and the wiring overlap. The current flow direction of the wiring in the second overlapping section where the second TMR element and the wiring overlap is the same as the current flow direction of the wiring in the third overlapping section where the third TMR element and the wiring overlap. The magnetic sensor according to any one of claims 1 to 11, wherein the direction of current flow in the first superimposed portion and the fourth superimposed portion is opposite to the direction of current flow in the second superimposed portion and the third superimposed portion. [Claim 14] The magnetic sensor according to any one of claims 1 to 11, wherein the change in the total resistance of the bridge circuit between the high-potential terminal and the low-potential terminal when an external magnetic field is applied is smaller than the change in the resistance of each of the first TMR element, the second TMR element, the third TMR element, and the fourth TMR element individually. [Claim 15] The first bias magnetic field applied to the first TMR element is applied to the first TMR element such that the resistance value of the first TMR element becomes a resistance midway between the maximum resistance and the minimum resistance. The second bias magnetic field applied to the second TMR element is applied to the second TMR element such that the resistance value of the second TMR element becomes the resistance midway between the maximum resistance and the minimum resistance. The third bias magnetic field applied to the third TMR element is applied to the third TMR element such that the resistance value of the third TMR element becomes the resistance midway between the maximum resistance and the minimum resistance. The magnetic sensor according to any one of claims 1 to 11, wherein the fourth bias magnetic field applied to the fourth TMR element is applied to the fourth TMR element such that the resistance value of the fourth TMR element becomes a resistance midway between the maximum resistance and the minimum resistance. [Claim 16] A magnetic sensor for a linear encoder, having the magnetic sensor described in any one of claims 1 to 11. [Claim 17] A magnetic rotary encoder having a magnetic sensor according to any one of claims 1 to 11.