Patent Description:
Magnetic field sensors are often used to detect a rotating magnetic target. For example, a magnet may be placed at the end of a rotation shaft, such as a cam shaft or axle. A magnetic field sensor can be placed adjacent to the magnet to detect it as the shaft rotates.

In some cases, the magnet and sensor are designed to detect an angular position. The magnet may be positioned so that its polarity vector rotates with the shaft. The sensor may be designed to detect the direction of the polarity vector and calculate a positional angle of the magnet.

Extraneous or stray magnetic fields can make detection of the magnet less accurate and can induce errors in calculating the angle. These fields can be present in the ambient environment or produced by nearby equipment or electronic devices.

<CIT>) provides magnetic field angle sensing systems and methods. In an embodiment, a magnetic field angle sensing system configured to determine a rotational position of a magnetic field source around an axis, comprises N sensor devices arranged in a circle concentric to an axis, wherein N><NUM> and the sensor devices are spaced apart from one another by about (<NUM>/N) degrees along the circle, each sensor device comprising a magnetic field sensing device having a sensitivity plane comprising at least one reference direction of the magnetic field sensing device, wherein the magnetic field sensing device is sensitive to a magnetic field component in the sensitivity plane and configured to provide a signal related to a (co)sine of an angle between the reference direction and the magnetic field in the sensitivity plane; and circuitry coupled to the N sensor devices and configured to provide a signal indicative of a rotational position of a magnetic field source around the axis determined by combining the signals from the magnetic field sensing devices of the N sensor devices.

<CIT>) provides a sensor device for suppressing a magnetic stray field, having a semiconductor body with a surface, formed in an x-y plane, and a back surface. Each circle half of a disk-shaped magnet has two magnetic poles and the magnet is rotatable relative to the IC housing around a z-direction. An imaginary lengthening of the axis penetrates the magnet in the center of gravity of the main extension surface of the magnet. A first pixel cell and a second pixel cell are integrated into the surface of the semiconductor body together with a circuit arrangement, and each pixel cell has a first magnetic field sensor and a second magnetic field sensor. The first pixel cell is spaced apart from the second pixel cell along a connecting line, and the first pixel cell in a projection along an imaginary lengthening of the axis is arranged within the two inner circle segments.

<CIT>) provides a magnetic field differential sensor system for measuring rotational movements of a shaft. The described magnetic field sensor system comprises (a) a biasing magnet configured for generating a biasing magnetic field; (b) a magnetic wheel having a wheel axis and a circumferential surface which comprises a regular structure of teeth and gaps arranged in an alternating manner, wherein (i) the magnetic wheel is attachable to the shaft and (ii) the magnetic wheel can be magnetized by the biasing magnetic field; and (c) a magnetic sensor arrangement comprising four magnetic sensor elements being connected with each other in a Wheatstone bridge configuration. Respectively two of the magnetic sensor elements are assigned to one half bridge of the Wheatstone bridge. Further, the four magnetic sensor elements are arranged within an y-z plane, wherein an x-axis, a y-axis and a z-axis define an orthogonal Cartesian coordinate system in which (i) the x-axis is oriented parallel with the wheel axis of the magnetic wheel, (ii) the y-axis is oriented tangential to the circumferential surface of the magnetic wheel, and (iii) the z-axis is the symmetry line through the center of the biasing magnet and the center of the magnetic wheel. The magnetic sensor elements can be hall sensor elements or magnetoresistive sensor elements.

In an embodiment, a system comprises the features of appended claim <NUM>, inter alia, a magnetic target producing a rotating magnetic field, a first set of magnetic field sensing elements placed in spaced relation to the magnetic target and comprising at least a first magnetic field sensing element and a second magnetic field sensing element, each magnetic field sensing element having an axis of maximum sensitivity and a second set of magnetic field sensing elements placed in spaced relation to the magnetic target and comprising at least a third magnetic field sensing element and a fourth magnetic field sensing element, each magnetic field sensing element having an axis of maximum sensitivity. The first set of magnetic field sensing elements is positioned closer to a center point of the magnetic field than the second set of magnetic field sensing elements.

Further embodiments are defined in the appended dependent claims.

The foregoing features may be more fully understood from the following description of the drawings. The drawings aid in explaining and understanding the disclosed technology. Since it is often impractical or impossible to illustrate and describe every possible embodiment, the provided figures depict one or more exemplary embodiments. Accordingly, the figures are not intended to limit the scope of the invention. Like numbers in the figures denote like elements. It is noted that embodiments according to the present invention comprise a magnetic target as shown in <FIG>. Other embodiments of this disclosure, comprising other types of magnetic targets, do not form part of the present invention.

As used herein, the term "magnetic field sensing element" is used to describe a variety of electronic elements that can sense a magnetic field. The magnetic field sensing element can be, but is not limited to, a Hall Effect element, a magnetoresistance element, or a magnetotransistor. As is known, there are different types of Hall Effect elements, for example, a planar Hall element, and a vertical Hall element. As is also known, there are different types of magnetoresistance elements, for example, a semiconductor magnetoresistance element such as Indium Antimonide (InSb), a giant magnetoresistance (GMR) element, an anisotropic magnetoresistance element (AMR), a tunneling magnetoresistance (TMR) element, and a magnetic tunnel junction (MTJ). The magnetic field sensing element may be a single element or, alternatively, may include two or more magnetic field sensing elements arranged in various configurations, e.g., a half bridge or full (Wheatstone) bridge. Depending on the device type and other application requirements, the magnetic field sensing element may be a device made of a type IV semiconductor material such as Silicon (Si) or Germanium (Ge), or a type III-V semiconductor material like Gallium-Arsenide (GaAs) or an Indium compound, e.g., Indium-Antimonide (InSb).

As is known, some of the above-described magnetic field sensing elements tend to have an axis of maximum sensitivity parallel to a substrate that supports the magnetic field sensing element, and others of the above-described magnetic field sensing elements tend to have an axis of maximum sensitivity perpendicular to a substrate that supports the magnetic field sensing element. In particular, planar Hall elements tend to have axes of sensitivity perpendicular to a substrate, while metal based or metallic magnetoresistance elements (e.g., GMR, TMR, AMR) and vertical Hall elements tend to have axes of sensitivity parallel to a substrate.

As used herein, the term "magnetic field sensor" is used to describe a circuit that uses a magnetic field sensing element, generally in combination with other circuits. Magnetic field sensors are used in a variety of applications, including, but not limited to, an angle sensor that senses an angle of a direction of a magnetic field, a current sensor that senses a magnetic field generated by a current carried by a current-carrying conductor, a magnetic switch that senses the proximity of a ferromagnetic object, a rotation detector that senses passing ferromagnetic articles, for example, magnetic domains of a ring magnet or a ferromagnetic target (e.g., gear teeth) where the magnetic field sensor is used in combination with a back-biased or other magnet, and a magnetic field sensor that senses a magnetic field density of a magnetic field.

As used herein, the terms "target" and "magnetic target" are used to describe an object to be sensed or detected by a magnetic field sensor or magnetic field sensing element.

<FIG> shows an example of a system <NUM> for detecting a magnetic target <NUM>. Target <NUM> may be placed at the end of rotating shaft <NUM>. In embodiments, rotating shaft may be a cam shaft, an axle, a spindle, a spool, or any type of machine that rotates.

Magnetic target <NUM> may be polarized so that it has a north section <NUM> and a south section <NUM>. In the case of a cylindrical target <NUM>, north section <NUM> and south section <NUM> may each comprise a horizontal cylindrical segment of target <NUM>. The polarization of magnet <NUM> may produce a magnetic field vector in the direction of vector <NUM>.

A magnetic field sensor <NUM> may be positioned adjacent to target <NUM> to detect the magnetic field. As shaft <NUM> rotates, magnetic field vector <NUM> may also rotate. Magnetic field sensor <NUM> may be configured to detect the magnetic field and the angle of its rotation.

Magnetic field sensor <NUM> may be communicatively coupled to a processor <NUM>. As an example, if shaft <NUM> is a camshaft in a vehicle, processor <NUM> may be an invehicle computer that may control the vehicle based, in part, on information provided by sensor <NUM>. As sensor <NUM> detects the magnetic field, it may send information about the magnetic field (such as position, speed of rotation, phase, angle, etc.) to processor <NUM>. Magnetic field sensor <NUM> may also communicate information about any errors encountered to processor <NUM>.

Referring to <FIG>, a system <NUM> includes a magnetic field sensor <NUM>, which may be the same as or similar to magnetic field sensor <NUM>, and a target <NUM>, which may be the same as or similar to target <NUM>. Target <NUM> may produce magnetic field <NUM>. For ease of illustration, magnetic field <NUM> produced by target <NUM> is illustrated by straight magnetic field lines <NUM>. However, the direction of magnetic field <NUM> may be different from that shown by magnetic field lines <NUM>. For example, magnetic field lines <NUM>' may present a more realistic depiction of a magnetic field produced by target <NUM>. One skilled in the art will recognize that, throughout the figures, magnetic fields may be drawn with straight lines for ease of illustration, but may take other shapes, forms, and directions depending on the type and shape of the magnetic source. Even though a magnetic field is drawn in the figures using straight lines, it does not necessarily indicate that the magnetic field has uniform field strength along those lines, unless specifically described as uniform in the text. For example, the magnetic field depicted by magnetic field lines <NUM> will have greater strength (e.g. flux density) around pair <NUM> (closer to target <NUM>) and relatively weaker strength around pair <NUM> (further away from target <NUM>).

Magnetic field sensor <NUM> may be positioned adjacent to target <NUM> to detect magnetic field <NUM> as target <NUM> rotates and compute an angle of rotation of target <NUM>. Magnetic field lines <NUM> represent an external, or stray, magnetic field that can influence detection of magnetic field <NUM> by sensor <NUM> and potentially cause errors or inaccuracies.

In embodiments, magnetic field sensor <NUM> may include a first set <NUM> of magnetic field sensing elements <NUM> and <NUM>, and a second set <NUM> of magnetic field sensing elements <NUM> and <NUM>. Each set may contain a pair of magnetic field sensing elements. In other embodiments, each set may contain more than two magnetic field sensing elements.

Magnetic field sensing element <NUM> may be positioned so that set <NUM> is closer to target <NUM> than set <NUM>. Thus, magnetic field sensing elements <NUM> and <NUM> may be subject to and detect a stronger magnetic field <NUM> than that which is detected by magnetic field sensing elements <NUM> and <NUM>.

Magnetic field <NUM> may be a uniform magnetic field that affects magnetic field sensing elements <NUM>, <NUM>, <NUM>, and <NUM> substantially equally. Thus, in contrast to magnetic field <NUM>, magnetic fields sensing elements <NUM>, <NUM>, <NUM>, and <NUM> may be subject to and detect a substantially equal stray magnetic field <NUM>.

Each magnetic field sensing element <NUM>, <NUM>, <NUM>, and <NUM> has an axis of maximum sensitivity (as described above) represented by arrows <NUM>, <NUM>, <NUM>, and <NUM>, respectively. The axes of maximum sensitivity <NUM> and <NUM> may be viewed as non-parallel vectors and thus may define a first plane. Similarly, the axes of maximum sensitivity <NUM> and 23o may be viewed as non-parallel vectors and thus may define a second plane. In embodiments, the first and second planes may be the same (or substantially the same) plane as shown in FIG. Magnetic field sensing elements <NUM>, <NUM>, <NUM>, and <NUM> may be placed within the plane formed by the axes of maximum sensitivities, with set <NUM> of magnetic field sensing elements <NUM> and <NUM> being further away from target <NUM> than set <NUM> of magnetic field sensing elements <NUM> and <NUM>.

In embodiments, axis of maximum sensitivity <NUM> of magnetic field sensing element <NUM> is orthogonal to axis of maximum sensitivity <NUM> of magnetic field sensing element <NUM>, and the axis of maximum sensitivity <NUM> of magnetic field sensing element <NUM> is orthogonal to the axis of maximum sensitivity <NUM> of magnetic field sensing element <NUM>.

As shown in <FIG>, axes of maximum sensitivity <NUM> and <NUM> form a ninety-degree angle with each other. In an embodiment, magnetic field sensing elements <NUM> and <NUM> may also be placed so that their respective axes of maximum sensitivity form a forty-five degree angle with respect to magnetic field <NUM>. Similarly, axes of maximum sensitivity <NUM> and <NUM> form a ninety-degree angle with each other. In an embodiment, magnetic field sensing elements <NUM> and <NUM> may also be placed so that their respective axes of maximum sensitivity form a forty-five-degree angle with respect to magnetic field <NUM>.

One skilled in the art will recognize that the respective angle formed by the axes of maximum sensitivity <NUM>, <NUM>, <NUM>, and <NUM> may be described with various coordinate systems. For example, using an angular coordinate system <NUM> and assuming centerline <NUM> is parallel to the expected direction of magnetic field <NUM>, the angle between axis of maximum sensitivity <NUM> and centerline <NUM> is about <NUM> degrees; the angle between axis of maximum sensitivity <NUM> and centerline <NUM> is about <NUM> degrees; the angle between the axis of maximum sensitivity <NUM> and centerline <NUM> is about <NUM> degrees; and the angle between axis of maximum sensitivity <NUM> and centerline <NUM> is about <NUM> degrees with respect to centerline <NUM>.

As noted above, stray magnetic field <NUM> may have an expected direction that is orthogonal to magnetic field <NUM>. Thus, in one example, the magnetic field sensing elements may be placed so that the angle between axis of maximum sensitivity <NUM> and stray magnetic field <NUM> may be <NUM> degrees; the angle between axis of maximum sensitivity <NUM> and stray magnetic field <NUM> may be <NUM> degrees; the angle between axis of maximum sensitivity <NUM> and stray magnetic field <NUM> may be <NUM> degrees; and the angle between axis of maximum sensitivity <NUM> and stray magnetic field <NUM> may be <NUM> degrees.

Target <NUM> may be a cylindrical, rotating target. In some instances, target <NUM> may be an end-of-shaft magnetic target that may be placed on the end of a rotating shaft. Target <NUM> may comprise two horizontal cylindrical segments <NUM> and <NUM> formed by a plane (represented by line <NUM>) that runs parallel to and through the cylinders axis of symmetry. Segments <NUM> and <NUM> may have opposite magnetic polarity-magnetic south for segment <NUM> and magnetic north for segment <NUM>, for example.

As target <NUM> rotates, so does magnetic field <NUM>. Each magnetic field sensing element <NUM>, <NUM>, <NUM>, and <NUM> may detect magnetic field <NUM> and produce an output signal representing magnetic field <NUM> as detected by the respective magnetic field sensing element.

The positioning of the pairs <NUM> and <NUM> may allow magnetic field sensor <NUM> to detect magnetic field <NUM> while reducing interference or errors from stray field <NUM>. For example, because set <NUM> is further from target <NUM> than is set <NUM>, set <NUM> may detect a weaker magnetic field <NUM> than that detected by set <NUM>.

Referring to <FIG>, graph <NUM> illustrates the difference in magnetic field strength experienced by the pairs of magnetic field sensing elements. In graph <NUM>, the horizontal axis represents distance between the magnetic field sensing element and the target, and the vertical axis represents the magnetic field as detected by a magnetic field sensing element. If set <NUM> is placed at a distance of about <NUM> from the target, it may experience <NUM> Gauss of field strength, according to point <NUM>. If set <NUM> is placed at a distance of about <NUM> from the target, it may experience <NUM> Gauss of field strength, according to point <NUM>.

The field strength difference may also be detected by magnetic field sensing elements placed in two 3D sensing groups. These groups may be in the same die, or on different die, so long as their respective spacing from the target is maintained. If they are placed on the same die, the die may be positioned perpendicular to the target so that one group (or set) of magnetic field sensing elements is further from the target than the other.

Referring again to <FIG>, in embodiments, magnetic field <NUM> may be a substantially uniform magnetic field. Thus, set <NUM> and set <NUM> may detect magnetic field <NUM> with the same magnitude or strength. A processor (such as processor <NUM> in <FIG>) may receive the outputs from each set <NUM> and <NUM> and use the varying magnetic field strengths detected by pairs <NUM> and <NUM> to calculate an angle of magnetic field <NUM> while reducing or minimizing the effect that magnetic field <NUM> has on the calculation.

Referring to <FIG>, in an embodiment, system <NUM>' may include magnetic field sensor <NUM> and target <NUM> arranged so that magnetic field sensor <NUM> is orthogonal to the cylindrical (e.g. center) axis of target <NUM>. In this embodiment, the cylindrical axis of target <NUM> may perpendicular (into and out of) the page. Magnetic field sensor <NUM> may be arranged so that set <NUM> is closer to target <NUM> (i.e. closer to the central axis) than is set <NUM>. In this embodiment, the stray field may have an expected direction orthogonal to magnetic field <NUM> (i.e. an expected direction into or out of the page). In other embodiments, the stray field may have an expected direction along the plane of the page, similar to that of stray magnetic field <NUM> shown in <FIG>.

In this arrangement, magnetic field sensing element <NUM> may be positioned further away that magnetic field sensing element pair <NUM> from target <NUM>. In an embodiment, magnetic field sensing element pair <NUM>, magnetic field sensing element pair <NUM>, and target <NUM> may be arranged in a line. The strength of magnetic field <NUM> may be greater closer to target <NUM> and relatively weaker further away from target <NUM>. As a result, magnetic field sensing element pair <NUM> may detect a stronger magnetic field than magnetic field sensing element pair <NUM>.

Referring to <FIG>, system <NUM>" may include magnetic field sensor <NUM>' having magnetic field sensing element pair <NUM>' and magnetic field sensing element pair <NUM>'. Magnetic field sensor <NUM>' may be positioned so that a line <NUM> drawn through the center of pair <NUM>' and pair <NUM>' is substantially perpendicular to a line <NUM> drawn through the center <NUM> of magnetic field sensor <NUM>' and the center <NUM> of target <NUM>.

In embodiments, target <NUM> may rotate about an axis of rotation that passes through center point <NUM> and goes into and out of the page. In other words, target <NUM> may rotate in a clockwise and/or counterclockwise direction, as shown by arrow <NUM>, about center point <NUM>.

As target <NUM> rotates, the magnetic field <NUM> it produces also rotates about the axis of rotation. As magnetic field <NUM> rotates past magnetic field sensing element pairs <NUM>' and <NUM>', the magnetic field sensing elements will detect changes in the magnetic field due to its rotation. Assume that magnetic field <NUM> is rotating in a counterclockwise direction. Magnetic field sensing element pair <NUM>' may detect a particular level or a particular change in magnetic field <NUM> before magnetic field sensing element pair <NUM>' does. Thus, an output signal from magnetic field sensing element pair <NUM>' may reflect the particular change or level before an output signal from magnetic field sensing element pair <NUM>' does. In other words, in this arrangement, there may be a phase difference between the output signals of the magnetic field sensing elements of pair <NUM>' and the magnetic field sensing elements of pair <NUM>'. This phase difference may be used to detect speed of rotation, direction of rotation, position of target <NUM>, etc..

Referring to <FIG>, in an unclaimed example, system 300B may include magnetic field sensor <NUM> and target <NUM>. Target <NUM> may be a cylindrical or flat rod-shaped target configured to move back and/or forth along line <NUM> as shown by arrow <NUM>. Target <NUM> may include a magnetic north segment <NUM> directly adjacent to a magnetic south segment <NUM>. Although two segments <NUM>, <NUM> are shown, target <NUM> may include additional segments coupled together so that adjacent segments have opposite magnetic poles. In unclaimed examples, target <NUM> may have one or more non-magnetic segments adjacent to magnetic segments. The magnetic segments surrounding a non-magnetic segment may have opposite magnetic poles or the same magnetic poles.

Magnetic field sensor <NUM> may include a first pair <NUM> of magnetic field sensing elements and a second pair <NUM> of magnetic field sensing elements. Magnetic field sensor <NUM> may arranged so that a line drawn from the center of pair <NUM> to the center of pair <NUM> is substantially perpendicular to the line of travel <NUM> of target <NUM>. Pair <NUM> may be closer than pair <NUM> to target <NUM>. As a result, the magnetic field sensing elements of pair <NUM> may detect a stronger magnetic field than the magnetic field sensing elements of pair <NUM>.

Referring to <FIG>, in another unclaimed example, system 300C may include magnetic field sensor <NUM> and target <NUM>. Target <NUM> may be a cylindrical or flat rod-shaped target configured to move back and/or forth along line <NUM> as shown by arrow <NUM>. Target <NUM> may include a magnetic north segment <NUM> directly adjacent to a magnetic south segment <NUM>. Although two segments <NUM>, <NUM> are shown, target <NUM> may include additional segments coupled together so that adjacent segments have opposite magnetic poles. In unclaimed examples, target <NUM> may have one or more non-magnetic segments adjacent to magnetic segments. The magnetic segments surrounding a non-magnetic segment may have opposite magnetic poles or the same magnetic poles.

Magnetic field sensor <NUM> may include a first pair <NUM> of magnetic field sensing elements and a second pair <NUM> of magnetic field sensing elements. Magnetic field sensor <NUM> may arranged so that a line <NUM> drawn from the center of pair <NUM> to the center of pair <NUM> is substantially parallel to the line of travel <NUM> of target <NUM>.

In unclaimed examples, target <NUM> may move translationally in the directions indicated by arrow <NUM>. As target <NUM> moves, the magnetic field it produces also moves. As the magnetic field moves past or through magnetic field sensing element pairs <NUM> and <NUM>, the magnetic field sensing elements will detect changes in the magnetic field due to its movement. Assume that target <NUM> is moving in a left-to-right direction on the page. Magnetic field sensing element pair <NUM> may detect a particular level or a particular change in the magnetic field before magnetic field sensing element pair <NUM> does. Thus, an output signal from magnetic field sensing element pair <NUM> may reflect the particular change or level before an output signal from magnetic field sensing element pair <NUM> does. In other words, in this arrangement, there may be a phase difference between the output signals of the magnetic field sensing elements of pair <NUM> and the magnetic field sensing elements of pair <NUM>. This phase difference may be used to detect speed of rotation, direction of rotation, position of target <NUM>, etc..

Referring to <FIG>, in an embodiment, system <NUM>" may include magnetic field sensor <NUM> and target <NUM> arranged so that magnetic field sensor <NUM> overlaps a flat surface <NUM> of target <NUM>. In other embodiments, magnetic field sensor may be offset from the center of target <NUM>.

Referring to <FIG>, system <NUM> may include a magnetic field sensor <NUM>, which may be the same as or similar to magnetic field sensor <NUM>. Magnetic field sensor <NUM> may be placed adjacent to target <NUM> to detect a magnetic field produced by target <NUM>.

Target <NUM> may comprise four quadrants <NUM>-<NUM>. Each adjacent quadrant may have opposite magnetic polarities. For example, quadrant <NUM> and <NUM> may be adjacent because they share an edge <NUM>. Thus, quadrant <NUM> may have a south polarity and quadrant <NUM> may have a north polarity. Quadrant <NUM> and <NUM> may be adjacent because they share an edge <NUM>. Thus, quadrant <NUM> may have a south polarity and quadrant <NUM> may have a north polarity. Quadrant <NUM> may have a north polarity and share edges with south polarity quadrants <NUM> and <NUM>.

The four quadrants <NUM>-<NUM> may produce a magnetic field with a direction, in part, that is substantially parallel to the top surface of target <NUM> as shown, for example, by magnetic field lines <NUM>. Magnetic field sensor <NUM> may be offset from the center of target <NUM> to detect the magnetic field produced by target <NUM> as target <NUM> rotates. In another embodiment, magnetic field sensor <NUM> may be positioned adjacent to the circumference of target <NUM>.

Referring to <FIG>, the magnetic field sensor may be centered in position <NUM> over target <NUM>, or may be offset, as shown by positions <NUM>. As noted above, the magnetic field sensor may have two (or more) pairs or sets of magnetic field sensing elements. (See set <NUM> and set <NUM> in <FIG>). In embodiments, one set of magnetic field sensing elements may be positioned closer to the center of target <NUM> at, for example, position <NUM>. The other set of magnetic field sensing elements may be further offset from the center of target <NUM> at, for example, one of the positions <NUM>. Separation of the sets of magnetic field sensing elements may result in one set detecting a stronger magnetic field from target <NUM> and the other set detecting a weaker magnetic field from target <NUM>. The difference in detected field strength may be utilized to reject stray magnetic fields, as described above.

Referring to <FIG>, system <NUM> may include magnetic field sensor <NUM> and target <NUM>. Target <NUM> may be the same as or similar to target <NUM> or <NUM>. System <NUM> may also include a substrate <NUM>, which may be a semiconductor substrate, and which may support processing circuit <NUM> (e.g. processing circuit <NUM> may be formed in and/or on substrate <NUM>). Substrate <NUM> may also support magnetic field sensor <NUM> and magnetic field sensing elements <NUM>, <NUM>, <NUM>, <NUM>.

Processing circuit <NUM> may include circuitry to receive signals from magnetic field sensing elements <NUM>, <NUM>, <NUM>, <NUM>, which represent detection of magnetic field <NUM>, and may calculate an angle of rotation of magnetic field <NUM>, a speed of rotation of magnetic field <NUM>, etc. To perform the calculation, processing circuit <NUM> may include custom circuitry and/or processor executing software or firmware code that calculates the angle of the magnetic field. Processing circuit <NUM> may also generate an output signal <NUM> representing the computed angle, speed, etc..

Immunity to stray field <NUM> may be accomplished by utilizing the varying levels of signal intensity from the magnetic field sensing elements. As noted above, magnetic field sensing elements <NUM> and <NUM> may detect a stronger magnetic field <NUM> than magnetic field sensing elements <NUM> and <NUM> detect, because magnetic field sensing elements <NUM> and <NUM> may be closer to target <NUM>.

Processor <NUM> may use the following equations to compute the detected magnetic field: <MAT> <MAT> <MAT> <MAT> In the equations above, H1y is the output signal of magnetic field sensing element <NUM>, H1x is the output signal of magnetic field sensing element <NUM>, H2y is the output of magnetic field sensing element <NUM>, H2x is the output of magnetic field sensing element <NUM>, A is a scalar sensitivity factor of the magnetic field sensing elements, Bi is magnetic field <NUM>, Bstray is stray magnetic field <NUM>, and k is a scaling factor representing the difference in magnetic field strength as detected by set <NUM> and set <NUM> (see <FIG>).

Subtracting equations <NUM> from <NUM> and <NUM> from <NUM> removes the effect of the stray field and reduces the equations to the following: <MAT> <MAT> The angle of rotation of the magnetic field can be calculated with the following formula: <MAT> Processing circuit <NUM> may provide the signal θB as output signal <NUM>.

Claim 1:
A system comprising:
a magnetic target (<NUM>, <NUM>) producing a rotating magnetic field, wherein the target comprises a body comprising a cylinder (<NUM>), wherein the cylinder is defined by four quadrants (<NUM>, <NUM>, <NUM>, <NUM>), wherein adjacent quadrants have opposite magnetic polarities, and wherein a first quadrant (<NUM>) and a second quadrant (<NUM>) are adjacent and share a diametric edge (<NUM>), and wherein the second quadrant and a third quadrant (<NUM>) are adjacent and share an edge (<NUM>) defined by a plane orthogonal to the longitudinal axis of the cylinder;
a first set of magnetic field sensing elements (<NUM>, <NUM>', <NUM>) placed in spaced relation to the magnetic target and comprising at least a first magnetic field sensing element (<NUM>, <NUM>) and a second magnetic field sensing element (<NUM>, <NUM>), each magnetic field sensing element having an axis of maximum sensitivity (<NUM>, <NUM>);
a second set of magnetic field sensing elements (<NUM>, <NUM>', <NUM>) placed in spaced relation to the magnetic target and comprising at least a third magnetic field sensing element (<NUM>, <NUM>) and a fourth magnetic field sensing element (<NUM>, <NUM>), each magnetic field sensing element having an axis of maximum sensitivity (<NUM>, <NUM>);
wherein the first set of magnetic field sensing elements is positioned closer to the magnetic target than the second set of magnetic field sensing elements; and
wherein the magnetic field sensing elements are placed so that their respective axes of maximum sensitivity are at a predetermined angle with respect to an expected direction of a stray magnetic field (<NUM>).