A magnetic field sensor for measuring movement of a target object, the movement parallel to an x-z plane within x-y-z Cartesian coordinates with x, y, and z orthogonal axes, the target object capable of rotating about an axis of rotation parallel to the y-axis, the magnetic field sensor comprising: a substrate having a major planar surface within twenty degrees of parallel to the x-z plane; a plurality of magnetic field sensing elements disposed upon the major planar surface of the substrate, each one of the plurality of magnetic field sensing elements having a major response axis substantially parallel to the major planar surface of the substrate, and the plurality of magnetic field sensing elements is configured to generate a respective plurality of magnetic field signals, wherein the plurality of magnetic field sensing elements is formed as at least one circular vertical Hall, CVH, sensing element having a plurality of vertical Hall elements arranged in a circle; a magnet fixedly coupled to the substrate, the magnet having at least two poles to generate a magnetic field substantially parallel to the major planar surface of the substrate, wherein the magnetic field sensor is rotatable such that a line perpendicular to the major planar surface of the substrate is within twenty degrees of parallel to the axis of rotation of the target object and the line is in the x-y plane, and wherein a line parallel to the major planar surface of the substrate intersects the axis of rotation of the target object, wherein a line between the at least two poles of the magnet is parallel to the major planar surface of the substrate, wherein a line perpendicular to the major planar surface of the substrate intersects the magnet and the CVH sensing element. a substrate having a major planar surface within twenty degrees of parallel to the x-z plane; a plurality of magnetic field sensing elements disposed upon the major planar surface of the substrate, each one of the plurality of magnetic field sensing elements having a major response axis substantially parallel to the major planar surface of the substrate, and the plurality of magnetic field sensing elements is configured to generate a respective plurality of magnetic field signals, wherein the plurality of magnetic field sensing elements is formed as at least one circular vertical Hall, CVH, sensing element having a plurality of vertical Hall elements arranged in a circle; a magnet fixedly coupled to the substrate, the magnet having at least two poles to generate a magnetic field substantially parallel to the major planar surface of the substrate, wherein the magnetic field sensor is rotatable such that a line perpendicular to the major planar surface of the substrate is within twenty degrees of parallel to the axis of rotation of the target object and the line is in the x-y plane, and wherein a line parallel to the major planar surface of the substrate intersects the axis of rotation of the target object, wherein a line between the at least two poles of the magnet is parallel to the major planar surface of the substrate, wherein a line perpendicular to the major planar surface of the substrate intersects the magnet and the CVH sensing element.