Patent ID: 8487611

Claim:
A magnetic sensor comprising: a bridge circuit with a first resistor, a second resistor, a third resistor, and a fourth resistor annularly and electrically connected together in this order; a compensation resistor, one end of the compensation resistor connected to a point at which the fourth resistor is connected with the first resistor, and the compensation resistor includes a fifth resistor and a sixth resistor connected in parallel with the fifth resistor, wherein: a voltage is applied between another end of the compensation resistor and a point at which the second resistor is connected with the third resistor, the first, second, third, and fourth resistors comprise a first magneto resistance element, a second magneto resistance element, a third magneto resistance element, and a fourth magneto resistance element, respectively, and each of the magneto resistance elements is a tunnel magneto-resistance element comprising a magnetization fixed layer with a magnetization direction fixed with respect to an external magnetic field, a ferromagnetic layer with a magnetization direction rotating in response to the external magnetic field, and an insulating layer sandwiched between the magnetization fixed layer and the ferromagnetic layer, each of the magnetization directions in the magnetization fixed layers in the second and the fourth magneto resistance elements is opposite to the magnetization direction in the magnetization fixed layer in the first magneto resistance element, the magnetization direction in the magnetization fixed layer in the third magneto resistance element is the same as the magnetization direction in the magnetization fixed layer in the first magneto resistance element, an electric resistance of the compensation resistor varies with a period of 180 degrees with respect to a rotation angle of the external magnetic field, the fifth and sixth resistors comprise a fifth magneto resistance element and a sixth magneto resistance element, respectively, and each of the magneto resistance elements comprises a magnetization fixed layer with a magnetization direction fixed with respect to the external magnetic field, a ferromagnetic layer with a magnetization direction rotating in response to the external magnetic field, and a nonmagnetic intermediate layer sandwiched between the magnetization fixed layer and the ferromagnetic layer, and the magnetization direction in the magnetization fixed layer in the fifth magneto resistance element is opposite to the magnetization direction in the magnetization fixed layer in the sixth magneto resistance element.