Patent ID: 8786278

Claim:
A three-dimensional magnetic field sensor for detecting a three-dimensional direction of an external magnetic field, comprising: a substrate having an element placement surface that is planar; and first, second and third magnetoresistive elements disposed on a side of the element placement surface of the substrate and integrated with the substrate, wherein: each of the first, second and third magnetoresistive elements includes a magnetization pinned layer, a nonmagnetic layer, and a free layer that are stacked in a direction perpendicular to the element placement surface; in each of the first, second and third magnetoresistive elements, the nonmagnetic layer is disposed between the magnetization pinned layer and the free layer, and the free layer has a magnetization direction that varies according to the direction of the external magnetic field; the magnetization pinned layer of the first magnetoresistive element has a magnetization direction that is pinned in a first direction parallel to the element placement surface; the magnetization pinned layer of the second magnetoresistive element has a magnetization direction that is pinned in a second direction parallel to the element placement surface and different from the first direction; the magnetization pinned layer of the third magnetoresistive element has a magnetization direction that is pinned in a third direction perpendicular to the element placement surface; the first magnetoresistive element detects a strength of a component of the external magnetic field in the first direction; the second magnetoresistive element detects a strength of a component of the external magnetic field in the second direction; and the third magnetoresistive element detects a strength of a component of the external magnetic field in the third direction.