Patent ID: 7511484

Claim:
A magnetic sensor comprising: a substrate; a semiconductor region disposed in the substrate and having a predetermined conductive type; a magnetic field detection portion disposed in the semiconductor region; a pair of first electrodes disposed on a surface of the semiconductor region; and two pairs of second electrodes disposed on the surface of the semiconductor region, wherein one pair of second electrodes sandwiches one of first electrodes, and the other pair of second electrodes sandwiches the other one of first electrodes, wherein the one pair of second electrodes includes first and second terminals, and the other pair of second electrodes includes third and fourth terminals, the first and third terminals are disposed on one side of a line connecting between the first electrodes, and the second and fourth terminals are disposed on the other side of the line, the first and fourth terminals are electrically coupled with a first wiring, and the second and third terminals are electrically coupled with a second wiring, the magnetic field detection portion, the first electrodes and the second electrodes provide a vertical Hall element, the vertical Hall element generates a Hall voltage corresponding to a magnetic field when the magnetic field in parallel to the surface of the substrate is applied to the magnetic field detection portion, and a driving current is supplied to the magnetic field detection portion, one of the first and second electrodes supplies the driving current, and the other one of the first and second electrodes detects the Hall voltage, a distance between the first and third terminals is substantially equal to a distance between the second and fourth terminals, and a distance between the first electrodes is longer than the distance between the first and third terminals.