Patent ID: 8779756

Claim:
A current sensor comprising: a sensor chip including a magnetoresistive element and adapted to be located near a current path where a target current flows; a coil configured to apply a bias magnetic field to the magnetoresistive element; a current control circuit configured to supply a bias current to the coil to cause the coil to generate the bias magnetic field, the bias current periodically changing in polarity; and an output circuit configured to output a difference between a first voltage and a second voltage, wherein the first voltage is generated by the magnetoresistive element, when the bias current flowing through the coil has a positive value, the second voltage is generated by the magnetoresistive element, when the bias current flowing through the coil has a negative value, the sensor chip is located inside the coil, the target current is detected based on the difference between the first voltage and the second voltage, the bias magnetic field is perpendicular to a magnetic field which is generated according to the target current flowing through the current path, and an absolute value of the positive value is equal to an absolute value of the negative value.