A magnetic field sensor device (2) is described that comprises an
oscillatory member (8) and current control means (6). The current control
means (6) is arranged to pass an alternating current (AC) along at least
first (10) and second (12) current paths provided through the oscillatory
member (8) and is arranged to provide magnetic gradiometer mode operation
(i.e. to measure magnetic field gradient) in which current flow through
the first current path (10) is in substantially the opposite direction to
current flow through the second current path (12). The current control
means (6) can also prove magnetometer mode operation (i.e. to measure
magnetic field strength). The magnetic field sensor (2) may be used in a
compass.