Patent ID: 7495541

Claim:
A current sensor comprising: a conductor which extends in a first direction at a first level and to which a current to be detected is supplied; a first magnetoresistive element which extends in the first direction in a region corresponding to the conductor at a second level different from the first level and whose resistance value changes according to a current magnetic field generated by the current to be detected flowing in the conductor; and a second magnetoresistive element which extends in the first direction in a region corresponding to the conductor at a third level positioned on a side opposite to the second level with respect to the first level, and whose resistance value changes in a direction opposite to that in the first magnetoresistive element in accordance with the current magnetic field; a first compensating current line provided in a region corresponding to the first magnetoresistive element at a fourth level adjacent to the second level, and applying a compensating current magnetic field in the direction opposite to that of a current magnetic field applied to the first magnetoresistive element on the basis of the current to be detected when a compensating current according to the voltage drop difference flows, to the first magnetoresistive element; and a second compensating current line provided in a region corresponding to the second magnetoresistive element at a fifth level adjacent to the third level, and applying a compensating current magnetic field in the direction opposite to that of a current magnetic field applied to the second magnetoresistive element on the basis of the current to be detected when a compensating current according to the voltage drop difference flows, to the second magnetoresistive element, wherein the current to be detected is detected on the basis of a difference between voltage drops which occur when constant currents whose values are equal to each other flow to the first and second magnetoresistive elements.