Patent ID: 8324891

Claim:
A magnetic field sensor for measuring a direction of a magnetic field in a plane, comprising: a sensing structure comprising a ring-shaped, electrically conductive well, and a plurality of at least eight contacts of equal size placed at equal distance from each other along the ring-shaped well and contacting the ring-shaped well, and an electronic circuit comprising at least one current source, a voltage measuring device configured to measure a difference between a first voltage and a second voltage, a plurality of electronic switches associated with the contacts of the sensing structure, wherein at least four electronic switches are associated with each of the contacts, a logic block for controlling the electronic switches, a timing circuit providing a control signal for controlling the logic block and providing a reference signal, wherein the logic block is adapted to close and open the electronic switches under the control of the control signal according to a predetermined scheme such that a predetermined number of contacts of the plurality of contacts form a vertical Hall element that is supplied with current from the at least one current source and that has two contacts connected to the voltage measuring device, and such that the vertical Hall element is moved in steps along the ring-shaped well, and circuitry configured to measure a phase shift between the reference signal and an output signal of the voltage measuring device.